shared

package
v1.74.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TimeoutWaitForGardenerResourceManagerBootstrapping is the maximum time the bootstrap process for the
	// gardener-resource-manager may take.
	// Exposed for testing.
	TimeoutWaitForGardenerResourceManagerBootstrapping = 2 * time.Minute
	// IntervalWaitForGardenerResourceManagerBootstrapping is the interval how often it's checked whether the bootstrap
	// process for the gardener-resource-manager has completed.
	// Exposed for testing.
	IntervalWaitForGardenerResourceManagerBootstrapping = 5 * time.Second
)

Functions

func AddIstioIngressGateway

func AddIstioIngressGateway(
	istioDeployer istio.Interface,
	namespace string,
	annotations map[string]string,
	labels map[string]string,
	externalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType,
	serviceExternalIP *string,
	zone *string,
) error

AddIstioIngressGateway adds an Istio ingress gateway to the given deployer. It uses the first Ingress Gateway to fill out common chart values. Hence, it is assumed that at least one Ingress Gateway was added to the given `istioDeployer` before calling this function.

func DeployGardenerResourceManager

func DeployGardenerResourceManager(
	ctx context.Context,
	c client.Client,
	secretsManager secretsmanager.Interface,
	gardenerResourceManager resourcemanager.Interface,
	namespace string,
	determineReplicas func(ctx context.Context) (int32, error),
	getAPIServerAddress func() string,
) error

DeployGardenerResourceManager deploys the gardener-resource-manager

func DeployKubeAPIServer

func DeployKubeAPIServer(
	ctx context.Context,
	runtimeClient client.Client,
	runtimeNamespace string,
	kubeAPIServer kubeapiserver.Interface,
	apiServerConfig *gardencorev1beta1.KubeAPIServerConfig,
	serverCertificateConfig kubeapiserver.ServerCertificateConfig,
	sniConfig kubeapiserver.SNIConfig,
	externalHostname string,
	externalServer string,
	etcdEncryptionKeyRotationPhase gardencorev1beta1.CredentialsRotationPhase,
	serviceAccountKeyRotationPhase gardencorev1beta1.CredentialsRotationPhase,
	wantScaleDown bool,
) error

DeployKubeAPIServer deploys the Kubernetes API server.

func GetIstioNamespaceForZone

func GetIstioNamespaceForZone(defaultNamespace string, zone string) string

GetIstioNamespaceForZone returns the namespace to use for a given zone. In case the zone name is too long the first five characters of the hash of the zone are used as zone identifiers.

func GetIstioZoneLabels

func GetIstioZoneLabels(labels map[string]string, zone *string) map[string]string

GetIstioZoneLabels returns the labels to be used for istio with the mandatory zone label set.

func IsZonalIstioExtension

func IsZonalIstioExtension(labels map[string]string) (bool, string)

IsZonalIstioExtension indicates whether the namespace related to the given labels is a zonal istio extension. It also returns the zone.

func NewEtcdDruid

func NewEtcdDruid(
	c client.Client,
	gardenNamespaceName string,
	runtimeVersion *semver.Version,
	imageVector imagevector.ImageVector,
	imageVectorOverwrites map[string]string,
	etcdConfig *config.ETCDConfig,
	priorityClassName string,
) (
	component.DeployWaiter,
	error,
)

NewEtcdDruid instantiates a new `etcd-druid` component.

func NewFluentOperator

func NewFluentOperator(
	c client.Client,
	gardenNamespaceName string,
	runtimeVersion *semver.Version,
	imageVector imagevector.ImageVector,
	enabled bool,
	priorityClassName string,
) (
	deployer component.DeployWaiter,
	err error,
)

NewFluentOperator instantiates a new `Fluent Operator` component.

func NewFluentOperatorCustomResources

func NewFluentOperatorCustomResources(
	c client.Client,
	gardenNamespaceName string,
	imageVector imagevector.ImageVector,
	enabled bool,
	priorityClassName string,
	additionalInputs []*fluentbitv1alpha2.ClusterInput,
	additionalFilters []*fluentbitv1alpha2.ClusterFilter,
	additionalParsers []*fluentbitv1alpha2.ClusterParser,
) (
	deployer component.DeployWaiter,
	err error,
)

NewFluentOperatorCustomResources instantiates a new `Fluent Operator Custom Resources` component.

func NewHVPA

func NewHVPA(
	c client.Client,
	gardenNamespaceName string,
	runtimeVersion *semver.Version,
	imageVector imagevector.ImageVector,
	enabled bool,
	priorityClassName string,
) (
	deployer component.DeployWaiter,
	err error,
)

NewHVPA instantiates a new `hvpa-controller` component.

func NewIstio

func NewIstio(
	cl client.Client,
	imageVector imagevector.ImageVector,
	chartRenderer chartrenderer.Interface,
	namePrefix string,
	ingressNamespace string,
	priorityClassName string,
	istiodEnabled bool,
	labels map[string]string,
	toKubeAPIServerPolicyLabel string,
	lbAnnotations map[string]string,
	externalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType,
	serviceExternalIP *string,
	servicePorts []corev1.ServicePort,
	proxyProtocolEnabled bool,
	vpnEnabled bool,
	zones []string,
) (
	istio.Interface,
	error,
)

NewIstio returns a deployer for Istio.

func NewKubeAPIServer

func NewKubeAPIServer(
	ctx context.Context,
	runtimeClientSet kubernetes.Interface,
	auditConfigClient client.Client,
	runtimeNamespace string,
	objectMeta metav1.ObjectMeta,
	runtimeVersion *semver.Version,
	targetVersion *semver.Version,
	imageVector imagevector.ImageVector,
	secretsManager secretsmanager.Interface,
	namePrefix string,
	apiServerConfig *gardencorev1beta1.KubeAPIServerConfig,
	autoscalingConfig kubeapiserver.AutoscalingConfig,
	serviceNetworkCIDR string,
	vpnConfig kubeapiserver.VPNConfig,
	priorityClassName string,
	isWorkerless bool,
	staticTokenKubeconfigEnabled *bool,
	auditWebhookConfig *kubeapiserver.AuditWebhook,
	authenticationWebhookConfig *kubeapiserver.AuthenticationWebhook,
	authorizationWebhookConfig *kubeapiserver.AuthorizationWebhook,
	resourcesToStoreInETCDEvents []schema.GroupResource,
) (
	kubeapiserver.Interface,
	error,
)

NewKubeAPIServer returns a deployer for the kube-apiserver.

func NewKubeControllerManager

func NewKubeControllerManager(
	log logr.Logger,
	runtimeClientSet kubernetes.Interface,
	runtimeNamespace string,
	runtimeVersion *semver.Version,
	targetVersion *semver.Version,
	imageVector imagevector.ImageVector,
	secretsManager secretsmanager.Interface,
	namePrefix string,
	config *gardencorev1beta1.KubeControllerManagerConfig,
	priorityClassName string,
	isWorkerless bool,
	hvpaConfig *kubecontrollermanager.HVPAConfig,
	podNetwork *net.IPNet,
	serviceNetwork *net.IPNet,
	clusterSigningDuration *time.Duration,
	controllerWorkers kubecontrollermanager.ControllerWorkers,
	controllerSyncPeriods kubecontrollermanager.ControllerSyncPeriods,
) (
	kubecontrollermanager.Interface,
	error,
)

NewKubeControllerManager returns a deployer for the kube-controller-manager.

func NewKubeStateMetrics

func NewKubeStateMetrics(
	c client.Client,
	gardenNamespaceName string,
	runtimeVersion *semver.Version,
	imageVector imagevector.ImageVector,
	priorityClassName string,
) (
	component.DeployWaiter,
	error,
)

NewKubeStateMetrics instantiates a new `kube-state-metrics` component.

func NewRuntimeGardenerResourceManager

func NewRuntimeGardenerResourceManager(
	c client.Client,
	gardenNamespaceName string,
	runtimeVersion *semver.Version,
	imageVector imagevector.ImageVector,
	secretsManager secretsmanager.Interface,
	logLevel, logFormat string,
	secretNameServerCA string,
	priorityClassName string,
	defaultNotReadyToleration *int64,
	defaultUnreachableToleration *int64,
	defaultSeccompProfileEnabled bool,
	endpointSliceHintsEnabled bool,
	additionalNetworkPolicyNamespaceSelectors []metav1.LabelSelector,
	zones []string,
) (
	component.DeployWaiter,
	error,
)

NewRuntimeGardenerResourceManager instantiates a new `gardener-resource-manager` component configured to reconcile objects in the runtime (seed) cluster.

func NewTargetGardenerResourceManager

func NewTargetGardenerResourceManager(
	c client.Client,
	namespaceName string,
	imageVector imagevector.ImageVector,
	secretsManager secretsmanager.Interface,
	clusterIdentity *string,
	defaultNotReadyTolerationSeconds *int64,
	defaultUnreachableTolerationSeconds *int64,
	kubernetesVersion *semver.Version,
	logLevel, logFormat string,
	namePrefix string,
	podTopologySpreadConstraintsEnabled bool,
	priorityClassName string,
	schedulingProfile *gardencorev1beta1.SchedulingProfile,
	secretNameServerCA string,
	systemComponentsToleration []corev1.Toleration,
	topologyAwareRoutingEnabled bool,
	kubernetesServiceHost *string,
	isWorkerless bool,
) (
	resourcemanager.Interface,
	error,
)

NewTargetGardenerResourceManager instantiates a new `gardener-resource-manager` component configured to reconcile object in a target (shoot) cluster.

func NewVali added in v1.74.0

func NewVali(
	c client.Client,
	namespace string,
	imageVector imagevector.ImageVector,
	secretsManager secretsmanager.Interface,
	clusterType component.ClusterType,
	replicas int32,
	isLoggingEnabled bool,
	isShootNodeLoggingEnabled bool,
	priorityClassName string,
	storage *resource.Quantity,
	ingressHost string,
	authEnabled bool,
	hvpaEnabled bool,
	maintenanceTimeWindow *hvpav1alpha1.MaintenanceTimeWindow,
) (
	component.Deployer,
	error,
)

NewVali returns new Vali deployer

func NewVerticalPodAutoscaler

func NewVerticalPodAutoscaler(
	c client.Client,
	gardenNamespaceName string,
	runtimeVersion *semver.Version,
	imageVector imagevector.ImageVector,
	secretsManager secretsmanager.Interface,
	enabled bool,
	secretNameServerCA string,
	priorityClassNameAdmissionController string,
	priorityClassNameRecommender string,
	priorityClassNameUpdater string,
) (
	component.DeployWaiter,
	error,
)

NewVerticalPodAutoscaler instantiates a new `vertical-pod-autoscaler` component.

func SnapshotEtcd

func SnapshotEtcd(ctx context.Context, secretsManager secretsmanager.Interface, etcdMain etcd.Interface) error

SnapshotEtcd performs a full snapshot on ETCD main.

Types

This section is empty.

Jump to

Keyboard shortcuts

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