options

package
v0.0.0-...-aa38cc1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminAuthentication

type AdminAuthentication struct {
	KubeConfigPath string

	// TODO: move into Secret in-cluster, maybe by using an "in-cluster" string as value
	ShardAdminTokenHashFilePath string
}

AdminAuthentication holds the configuration for the admin authentication in standalone mode.

func NewAdminAuthentication

func NewAdminAuthentication(rootDir string) *AdminAuthentication

NewAdminAuthentication returns a new AdminAuthentication for the given root directory where the kubeconfig and the token hash file should be written.

func (*AdminAuthentication) AddFlags

func (s *AdminAuthentication) AddFlags(fs *pflag.FlagSet)

AddFlags adds the flags for the admin authentication to the given FlagSet.

func (*AdminAuthentication) ApplyTo

func (s *AdminAuthentication) ApplyTo(config *genericapiserver.Config) (volatileGcpAdminToken, volatileUserToken string, err error)

ApplyTo returns a new volatile gcp admin token. It also returns a new shard admin token and its hash if the configured shard admin hash file is not present. If the shard admin hash file is present only the shard admin hash is returned and the returned shard admin token is empty.

func (*AdminAuthentication) Validate

func (s *AdminAuthentication) Validate() []error

Validate validates the admin authentication configuration.

func (*AdminAuthentication) WriteKubeConfig

func (s *AdminAuthentication) WriteKubeConfig(config genericapiserver.CompletedConfig, gcpAdminToken, userToken string) error

WriteKubeConfig writes the kubeconfig to the configured path.

type CompletedConfig

type CompletedConfig struct {
	// contains filtered or unexported fields
}

CompletedConfig holds the completed configuration for the generic controlplane server.

type CompletedOptions

type CompletedOptions struct {
	// contains filtered or unexported fields
}

CompletedOptions holds the completed configuration for the generic controlplane server.

func (*CompletedOptions) Validate

func (o *CompletedOptions) Validate() []error

Validate validates the generic controlplane server options.

type Config

type Config struct {
	Options CompletedOptions

	EmbeddedEtcd  *embeddedetcd.Config
	Aggregator    *aggregatorapiserver.Config
	ControlPlane  *controlplaneapiserver.Config
	APIExtensions *apiextensionsapiserver.Config

	ExtraConfig
}

Config holds the configuration for the generic controlplane server.

func NewConfig

func NewConfig(opts CompletedOptions) (*Config, error)

NewConfig creates all the self-contained pieces making up an generic controlplane server.

func (*Config) Complete

func (c *Config) Complete() (CompletedConfig, error)

Complete fills in any fields not set that are required to have valid data.

type ExtraConfig

type ExtraConfig struct {
	// authentication
	GcpAdminToken, UserToken string
	// Batteries holds the batteries configuration for the generic controlplane server.
	Batteries batteries.Batteries
}

ExtraConfig holds the extra configuration for the generic controlplane server.

type ExtraOptions

type ExtraOptions struct {
	RootDir   string
	Batteries batteries.Batteries
}

ExtraOptions holds the extra configuration for the generic controlplane server.

type Options

type Options struct {
	GenericControlPlane controlplaneapiserveroptions.Options
	EmbeddedEtcd        etcdoptions.Options

	AdminAuthentication AdminAuthentication

	Extra ExtraOptions
}

Options holds the configuration for the generic controlplane server.

func NewOptions

func NewOptions(rootDir string) *Options

NewOptions creates a new Options with default parameters.

func (*Options) AddFlags

func (o *Options) AddFlags(fss *cliflag.NamedFlagSets)

AddFlags adds flags for a specific APIServer to the specified FlagSet.

func (*Options) Complete

func (o *Options) Complete() (*CompletedOptions, error)

Complete fills in any fields not set that are required to have valid data.

Jump to

Keyboard shortcuts

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