options

package
v0.0.0-...-73e1fb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileConfig

type FileConfig struct {
	// BootstrapConfig holds the rendered control plane component config file for bootstrapping (phase 1).
	BootstrapConfig []byte

	// PostBootstrapConfig holds the rendered control plane component config file after bootstrapping (phase 2).
	PostBootstrapConfig []byte

	// Assets holds the loaded assets like certs and keys.
	Assets map[string][]byte
}

FileConfig

type GenericOptions

type GenericOptions struct {
	DefaultFile                   string
	BootstrapOverrideFile         string
	PostBootstrapOverrideFile     string
	AdditionalConfigOverrideFiles []string

	ConfigOutputFile string

	TemplatesDir   string
	AssetInputDir  string
	AssetOutputDir string
}

GenericOptions contains the generic render command options.

func NewGenericOptions

func NewGenericOptions() *GenericOptions

NewGenericOptions returns a default set of generic options.

func (*GenericOptions) AddFlags

func (o *GenericOptions) AddFlags(fs *pflag.FlagSet, configGVK schema.GroupVersionKind)

AddFlags adds the generic flags to the flagset.

func (*GenericOptions) ApplyTo

func (o *GenericOptions) ApplyTo(cfg *FileConfig, defaultConfig, bootstrapOverrides, postBootstrapOverrides Template, templateData interface{}, specialCases map[string]resourcemerge.MergeFunc) error

ApplyTo applies the options ot the given config struct using the provides text/template data.

func (*GenericOptions) Complete

func (o *GenericOptions) Complete() error

Complete fills in missing values before execution.

func (*GenericOptions) Validate

func (o *GenericOptions) Validate() error

Validate verifies the inputs.

type ManifestConfig

type ManifestConfig struct {
	// ConfigHostPath is a host path mounted into the controller manager pods to hold the config file.
	ConfigHostPath string

	// ConfigFileName is the filename of config file inside ConfigHostPath.
	ConfigFileName string

	// CloudProviderHostPath is a host path mounted into the apiserver pods to hold cloud provider configuration.
	CloudProviderHostPath string

	// SecretsHostPath holds certs and keys
	SecretsHostPath string

	// Namespace is the target namespace for the bootstrap controller manager to be created.
	Namespace string

	// Image is the pull spec of the image to use for the controller manager.
	Image string

	// OperatorImage is the pull spec of the image to use for the operator (optional).
	OperatorImage string

	// ImagePullPolicy specifies the image pull policy to use for the images.
	ImagePullPolicy string
}

ManifestConfig is a struct of values to be used in manifest templates.

type ManifestOptions

type ManifestOptions struct {
	Namespace             string
	Image, OperatorImage  string
	ImagePullPolicy       string
	ConfigHostPath        string
	ConfigFileName        string
	CloudProviderHostPath string
	SecretsHostPath       string
}

ManifestOptions contains the values that influence manifest contents.

func NewManifestOptions

func NewManifestOptions(componentName, image string) *ManifestOptions

NewManifestOptions return default values for ManifestOptions.

func (*ManifestOptions) AddFlags

func (o *ManifestOptions) AddFlags(fs *pflag.FlagSet, humanReadableComponentName string)

AddfFlags adds the manifest related flags to the flagset.

func (*ManifestOptions) ApplyTo

func (o *ManifestOptions) ApplyTo(cfg *ManifestConfig) error

ApplyTo applies the options ot the given config struct.

func (*ManifestOptions) Complete

func (o *ManifestOptions) Complete() error

Complete fills in missing values before execution.

func (*ManifestOptions) Validate

func (o *ManifestOptions) Validate() error

Validate verifies the inputs.

type Template

type Template struct {
	FileName string
	Content  []byte
}

type TemplateData

type TemplateData struct {
	ManifestConfig
	FileConfig
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL