componentconfig

package
v0.0.0-...-133fb1b Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerManagerDefaultLockObjectNamespace is the default lock namespace for leader election.
	ControllerManagerDefaultLockObjectNamespace = "garden"
	// ControllerManagerDefaultLockObjectName is the default lock name for leader election.
	ControllerManagerDefaultLockObjectName = "garden-controller-manager-leader-election"
)
View Source
const GroupName = "componentconfig.sapcloud.io"

GroupName is the group name use in this package

Variables

View Source
var (
	// SchemeBuilder used to register the Shoot resource.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a pointer to SchemeBuilder.AddToScheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func ApplyEnvironmentToConfig

func ApplyEnvironmentToConfig(config *ControllerManagerConfiguration)

ApplyEnvironmentToConfig checks for several well-defined environment variables and if they are set, it sets the value of the respective keys of <config> to the values in the environment. Currently implemented environment variables: KUBECONFIG can override config.ClientConnection.KubeConfigFile WATCH_NAMESPACE can override config.Controller.WatchNamespace and config.LeaderElection.LockObjectNamespace

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ClientConnectionConfiguration

type ClientConnectionConfiguration struct {
	// KubeConfigFile is the path to a kubeconfig file.
	KubeConfigFile string
	// AcceptContentTypes defines the Accept header sent by clients when connecting to
	// a server, overriding the default value of 'application/json'. This field will
	// control all connections to the server used by a particular client.
	AcceptContentTypes string
	// ContentType is the content type used when sending data to the server from this
	// client.
	ContentType string
	// QPS controls the number of queries per second allowed for this connection.
	QPS float32
	// Burst allows extra queries to accumulate when a client is exceeding its rate.
	Burst int32
}

ClientConnectionConfiguration contains details for constructing a client.

func (*ClientConnectionConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionConfiguration.

func (*ClientConnectionConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControllerManagerConfiguration

type ControllerManagerConfiguration struct {
	metav1.TypeMeta
	// ClientConnection specifies the kubeconfig file and client connection
	// settings for the proxy server to use when communicating with the apiserver.
	ClientConnection ClientConnectionConfiguration
	// Controller defines the configuration of the controllers.
	Controller ControllerManagerControllerConfiguration
	// GardenNamespace is the namespace in which the configuration and secrets for
	// the Garden controller manager will be stored (e.g., secrets for the Seed clusters).
	// Not specifying this field means the same namespace the Garden controller manager is
	// running in (only reasonable when the Garden controller manager runs inside a Kubernetes
	// cluster).
	GardenNamespace string
	// Images is a list of container images which are deployed by the Garden controller manager.
	Images []ControllerManagerImagesConfiguration
	// LeaderElection defines the configuration of leader election client.
	LeaderElection LeaderElectionConfiguration
	// LogLevel is the level/severity for the logs. Must be one of [`info`,`debug`,
	// `error`].
	LogLevel string
	// Metrics defines the metrics configuration.
	Metrics MetricsConfiguration
	// Server defines the configuration of the HTTP server.
	Server ServerConfiguration
}

ControllerManagerConfiguration defines the configuration for the Garden controller manager.

func (*ControllerManagerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerConfiguration.

func (*ControllerManagerConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ControllerManagerConfiguration) DeepCopyObject

func (in *ControllerManagerConfiguration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ControllerManagerControllerConfiguration

type ControllerManagerControllerConfiguration struct {
	// HealthCheckPeriod is the duration how often the health check of Shoot clusters
	// is performed (only if no operation is already running on them).
	HealthCheckPeriod metav1.Duration
	// Reconciliation defines the reconciliation settings of the controllers.
	Reconciliation ControllerReconciliationConfiguration
	// WatchNamespace defines the namespace which should be watched by the controller.
	WatchNamespace *string
}

ControllerManagerControllerConfiguration contains configuration for the controllers of the Garden controller manager. Not only the usual reconciliation configuration is reflected, but also a health check period and a namespace which should be watched.

func (*ControllerManagerControllerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerControllerConfiguration.

func (*ControllerManagerControllerConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControllerManagerImagesConfiguration

type ControllerManagerImagesConfiguration struct {
	// Name is an alias for the image.
	Name string
	// Image is the name of the image (registry location and used tag/version).
	Image string
}

ControllerManagerImagesConfiguration contains configuration for the contaimer images and tags/versions which are used by the Garden controller manager.

func (*ControllerManagerImagesConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerImagesConfiguration.

func (*ControllerManagerImagesConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControllerReconciliationConfiguration

type ControllerReconciliationConfiguration struct {
	// ConcurrentSyncs is the number of workers used for the controller to work on
	// events.
	ConcurrentSyncs int
	// ConcurrentSyncs is the duration how often the caches of existing resources
	// are reconciled.
	ResyncPeriod metav1.Duration
	// RetryDuration is the maximum duration how often a reconciliation will be retried
	// in case of errors.
	RetryDuration *metav1.Duration
}

ControllerReconciliationConfiguration contains details for the reconciliation settings of a controller.

func (*ControllerReconciliationConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerReconciliationConfiguration.

func (*ControllerReconciliationConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LeaderElectionConfiguration

type LeaderElectionConfiguration struct {
	// LeaderElect enables a leader election client to gain leadership
	// before executing the main loop. Enable this when running replicated
	// components for high availability.
	LeaderElect bool
	// LeaseDuration is the duration that non-leader candidates will wait
	// after observing a leadership renewal until attempting to acquire
	// leadership of a led but unrenewed leader slot. This is effectively the
	// maximum duration that a leader can be stopped before it is replaced
	// by another candidate. This is only applicable if leader election is
	// enabled.
	LeaseDuration metav1.Duration
	// RenewDeadline is the interval between attempts by the acting master to
	// renew a leadership slot before it stops leading. This must be less
	// than or equal to the lease duration. This is only applicable if leader
	// election is enabled.
	RenewDeadline metav1.Duration
	// RetryPeriod is the duration the clients should wait between attempting
	// acquisition and renewal of a leadership. This is only applicable if
	// leader election is enabled.
	RetryPeriod metav1.Duration
	// ResourceLock indicates the resource object type that will be used to lock
	// during leader election cycles.
	ResourceLock string
	// LockObjectNamespace defines the namespace of the lock object.
	LockObjectNamespace string
	// LockObjectName defines the lock object name.
	LockObjectName string
}

LeaderElectionConfiguration defines the configuration of leader election clients for components that can run with leader election enabled.

func (*LeaderElectionConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionConfiguration.

func (*LeaderElectionConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricsConfiguration

type MetricsConfiguration struct {
	// The interval defines how frequently metrics get scraped.
	Interval metav1.Duration
}

MetricsConfiguration contains options to configure the metrics.

func (*MetricsConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsConfiguration.

func (*MetricsConfiguration) DeepCopyInto

func (in *MetricsConfiguration) DeepCopyInto(out *MetricsConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServerConfiguration

type ServerConfiguration struct {
	// BindAddress is the IP address on which to listen for the specified port.
	BindAddress string
	// Port is the port on which to serve unsecured, unauthenticated access.
	Port int
}

ServerConfiguration contains details for the HTTP server.

func (*ServerConfiguration) DeepCopy

func (in *ServerConfiguration) DeepCopy() *ServerConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerConfiguration.

func (*ServerConfiguration) DeepCopyInto

func (in *ServerConfiguration) DeepCopyInto(out *ServerConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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