Documentation ¶
Index ¶
- Constants
- Variables
- func AreObjectsRemaining(err error) bool
- func CheckObjectsRemaining(list runtime.Object) error
- func CheckObjectsRemainingMatching(ctx context.Context, c client.Client, list runtime.Object, ...) error
- func CleanMatching(ctx context.Context, c client.Client, list runtime.Object, ...) error
- func DeleteAll(ctx context.Context, c client.Client, list runtime.Object, ...) error
- func DeleteMatching(ctx context.Context, c client.Client, list runtime.Object, ...) error
- func FinalizeAll(ctx context.Context, c client.Client, list runtime.Object) error
- func MustNewRequirement(key string, op selection.Operator, vals ...string) labels.Requirement
- func NewObjectsRemaining(remaining []runtime.Object) error
- func RemainingObjects(err error) []runtime.Object
- func RetryCleanMatchingUntil(ctx context.Context, interval time.Duration, c client.Client, ...) error
- type Botanist
- func (b *Botanist) CleanExtendedAPIs(ctx context.Context) error
- func (b *Botanist) CleanKubernetesResources(ctx context.Context) error
- func (b *Botanist) CleanWebhooks(ctx context.Context) error
- func (b *Botanist) DeleteBackupInfrastructure() error
- func (b *Botanist) DeleteBackupNamespace() error
- func (b *Botanist) DeleteClusterAutoscaler() error
- func (b *Botanist) DeleteDeprecatedCloudMetadataServiceNetworkPolicy(ctx context.Context) error
- func (b *Botanist) DeleteExtensionResources(ctx context.Context) error
- func (b *Botanist) DeleteGardenSecrets() error
- func (b *Botanist) DeleteKubeAPIServer() error
- func (b *Botanist) DeleteKubeAddonManager() error
- func (b *Botanist) DeleteNamespace() error
- func (b *Botanist) DeleteOrphanEtcdMainPVC(ctx context.Context) error
- func (b *Botanist) DeleteSeedMonitoring() error
- func (b *Botanist) DeployBackupInfrastructure(ctx context.Context) error
- func (b *Botanist) DeployBackupNamespace() error
- func (b *Botanist) DeployCloudProviderSecret() error
- func (b *Botanist) DeployClusterAutoscaler() error
- func (b *Botanist) DeployDependencyWatchdog(ctx context.Context) error
- func (b *Botanist) DeployExtensionResources(ctx context.Context) error
- func (b *Botanist) DeployExternalDomainDNSRecord(ctx context.Context) error
- func (b *Botanist) DeployInfrastructure(ctx context.Context) error
- func (b *Botanist) DeployInternalDomainDNSRecord(ctx context.Context) error
- func (b *Botanist) DeployNamespace() error
- func (b *Botanist) DeploySecrets() error
- func (b *Botanist) DeploySeedLogging() error
- func (b *Botanist) DeploySeedMonitoring() error
- func (b *Botanist) DeployWorker(ctx context.Context) error
- func (b *Botanist) DestroyExternalDomainDNSRecord(ctx context.Context) error
- func (b *Botanist) DestroyInfrastructure(ctx context.Context) error
- func (b *Botanist) DestroyIngressDNSRecord(ctx context.Context) error
- func (b *Botanist) DestroyInternalDomainDNSRecord(ctx context.Context) error
- func (b *Botanist) DestroyWorker(ctx context.Context) error
- func (b *Botanist) EnsureIngressDNSRecord(ctx context.Context) error
- func (b *Botanist) GenerateKubeLegoConfig() (map[string]interface{}, error)
- func (b *Botanist) GenerateKubernetesDashboardConfig() (map[string]interface{}, error)
- func (b *Botanist) HealthChecks(initializeShootClients func() error, ...) (gardencorev1alpha1.Condition, gardencorev1alpha1.Condition, ...)
- func (b *Botanist) HibernateControlPlane(ctx context.Context) error
- func (b *Botanist) MonitoringHealthChecks(checker *HealthChecker, inactiveAlerts gardencorev1alpha1.Condition) gardencorev1alpha1.Condition
- func (b *Botanist) PerformGarbageCollectionSeed() error
- func (b *Botanist) PerformGarbageCollectionShoot() error
- func (b *Botanist) RefreshCloudControllerManagerChecksums() error
- func (b *Botanist) RefreshKubeControllerManagerChecksums() error
- func (b *Botanist) RegisterAsSeed(protected, visible *bool, minimumVolumeSize *string, ...) error
- func (b *Botanist) RequiredExtensionsExist() error
- func (b *Botanist) SyncShootCredentialsToGarden() error
- func (b *Botanist) UnregisterAsSeed() error
- func (b *Botanist) WaitForControllersToBeActive() error
- func (b *Botanist) WaitUntilBackupInfrastructureReconciled(ctx context.Context) error
- func (b *Botanist) WaitUntilBackupNamespaceDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilClusterAutoscalerDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilEtcdReady(ctx context.Context) error
- func (b *Botanist) WaitUntilEtcdStatefulsetDeleted(ctx context.Context, role string) error
- func (b *Botanist) WaitUntilExtensionResourcesDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilExtensionResourcesReady(ctx context.Context) error
- func (b *Botanist) WaitUntilInfrastructureDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilInfrastructureReady(ctx context.Context) error
- func (b *Botanist) WaitUntilKubeAPIServerReady(ctx context.Context) error
- func (b *Botanist) WaitUntilKubeAPIServerServiceIsReady(ctx context.Context) error
- func (b *Botanist) WaitUntilKubeAddonManagerDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilNodesDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilSeedNamespaceDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilVPNConnectionExists(ctx context.Context) error
- func (b *Botanist) WaitUntilWorkerDeleted(ctx context.Context) error
- func (b *Botanist) WaitUntilWorkerReady(ctx context.Context) error
- func (b *Botanist) WakeUpControlPlane(ctx context.Context) error
- type CleanOptionFunc
- type CleanOptions
- type HealthChecker
- func (b *HealthChecker) CheckClusterNodes(namespace string, condition gardencorev1alpha1.Condition, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) CheckControlPlane(shoot *gardenv1beta1.Shoot, namespace string, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) CheckLoggingControlPlane(namespace string, condition gardencorev1alpha1.Condition, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) CheckMonitoringControlPlane(namespace string, wantsAlertmanager bool, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) CheckMonitoringSystemComponents(namespace string, condition gardencorev1alpha1.Condition, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) CheckOptionalAddonsSystemComponents(namespace string, condition gardencorev1alpha1.Condition, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) CheckSystemComponents(namespace string, condition gardencorev1alpha1.Condition, ...) (*gardencorev1alpha1.Condition, error)
- func (b *HealthChecker) FailedCondition(condition gardencorev1alpha1.Condition, reason, message string) gardencorev1alpha1.Condition
Constants ¶
const ( // DefaultInterval is the default interval for retry operations. DefaultInterval = 5 * time.Second // Provider is the kubernetes provider label. Provider = "provider" // KubernetesProvider is the 'kubernetes' value of the Provider label. KubernetesProvider = "kubernetes" // KubeAggregatorAutoManaged is the label whether an APIService is automanaged by kube-aggregator. KubeAggregatorAutoManaged = autoregister.AutoRegisterManagedLabel // MetadataNameField ist the `metadata.name` field for a field selector. MetadataNameField = "metadata.name" )
const ( // DNSPurposeInternal is a constant for a DNS record used for the internal domain name. DNSPurposeInternal = "internal" // DNSPurposeExternal is a constant for a DNS record used for the external domain name. DNSPurposeExternal = "external" )
const DNSPurposeIngress = "ingress"
DNSPurposeIngress is a constant for a DNS record used for the ingress domain name.
const InfrastructureDefaultTimeout = 10 * time.Minute
InfrastructureDefaultTimeout is the default timeout and defines how long Gardener should wait for a successful reconciliation of an infrastructure resource.
const WorkerDefaultTimeout = 30 * time.Minute
WorkerDefaultTimeout is the default timeout and defines how long Gardener should wait for a successful reconciliation of a worker resource.
Variables ¶
var ( // NotSystemComponent is a requirement that something doesn't have the GardenRole GardenRoleSystemComponent. NotSystemComponent = MustNewRequirement(common.GardenRole, selection.NotEquals, common.GardenRoleSystemComponent) // NotKubernetesProvider is a requirement that the Provider label of something is not KubernetesProvider. NotKubernetesProvider = MustNewRequirement(Provider, selection.NotEquals, KubernetesProvider) // NotKubeAggregatorAutoManaged is a requirement that something is not auto-managed by Kube-Aggregator. NotKubeAggregatorAutoManaged = MustNewRequirement(KubeAggregatorAutoManaged, selection.DoesNotExist) // NotSystemComponentSelector is a selector that excludes system components. NotSystemComponentSelector = labels.NewSelector().Add(NotSystemComponent) // NotSystemComponentListOptions are ListOptions that exclude system components. NotSystemComponentListOptions = client.ListOptions{ LabelSelector: NotSystemComponentSelector, } // MutatingWebhookConfigurationCleanOptions is the delete selector for MutatingWebhookConfigurations. MutatingWebhookConfigurationCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // ValidatingWebhookConfigurationCleanOptions is the delete selector for ValidatingWebhookConfigurations. ValidatingWebhookConfigurationCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // CustomResourceDefinitionCleanOptions is the delete selector for CustomResources. CustomResourceDefinitionCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // DaemonSetCleanOptions is the delete selector for DaemonSets. DaemonSetCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // DeploymentCleanOptions is the delete selector for Deployments. DeploymentCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // StatefulSetCleanOptions is the delete selector for StatefulSets. StatefulSetCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // ServiceCleanOptions is the delete selector for Services. ServiceCleanOptions = ListOptions(client.UseListOptions(&client.ListOptions{ LabelSelector: labels.NewSelector().Add(NotKubernetesProvider, NotSystemComponent), })) // NamespaceCleanOptions is the delete selector for Namespaces. NamespaceCleanOptions = ListOptions(client.UseListOptions(&client.ListOptions{ LabelSelector: NotSystemComponentSelector, FieldSelector: fields.AndSelectors( fields.OneTermNotEqualSelector(MetadataNameField, metav1.NamespacePublic), fields.OneTermNotEqualSelector(MetadataNameField, metav1.NamespaceSystem), fields.OneTermNotEqualSelector(MetadataNameField, metav1.NamespaceDefault), fields.OneTermNotEqualSelector(MetadataNameField, corev1.NamespaceNodeLease), ), })) // APIServiceCleanOptions is the delete selector for APIServices. APIServiceCleanOptions = ListOptions(client.UseListOptions(&client.ListOptions{ LabelSelector: labels.NewSelector().Add(NotSystemComponent, NotKubeAggregatorAutoManaged), })) // CronJobCleanOptions is the delete selector for CronJobs. CronJobCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // IngressCleanOptions is the delete selector for Ingresses. IngressCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // JobCleanOptions is the delete selector for Jobs. JobCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // PodCleanOptions is the delete selector for Pods. PodCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // ReplicaSetCleanOptions is the delete selector for ReplicaSets. ReplicaSetCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // ReplicationControllerCleanOptions is the delete selector for ReplicationControllers. ReplicationControllerCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) // PersistentVolumeClaimCleanOptions is the delete selector for PersistentVolumeClaims. PersistentVolumeClaimCleanOptions = ListOptions(client.UseListOptions(&NotSystemComponentListOptions)) )
var Finalize = func(o *CleanOptions) { o.Finalize = true }
Finalize enforces finalizing objects before cleaning them.
var Now = time.Now
Now determines the current time.
Functions ¶
func AreObjectsRemaining ¶
AreObjectsRemaining checks whether the given error is an 'objects remaining error'.
func CheckObjectsRemaining ¶
CheckObjectsRemaining checks if the given list is empty.
Iff it is not, returns a `NewObjectsRemaining` error with the remaining objects.
func CheckObjectsRemainingMatching ¶
func CheckObjectsRemainingMatching( ctx context.Context, c client.Client, list runtime.Object, opts ...client.ListOptionFunc, ) error
CheckObjectsRemainingMatching calls the client and checks if there are objects remaining matching the given opts.
func CleanMatching ¶
func CleanMatching( ctx context.Context, c client.Client, list runtime.Object, opts ...CleanOptionFunc, ) error
CleanMatching deletes all objects matching `deleteOpts`, then it checks if there are no objects left matching `checkOpts`.
func DeleteAll ¶
func DeleteAll(ctx context.Context, c client.Client, list runtime.Object, opts ...client.DeleteOptionFunc) error
DeleteAll calls delete for all objects in the given list.
Not found errors are being ignored.
func DeleteMatching ¶
func DeleteMatching( ctx context.Context, c client.Client, list runtime.Object, opts ...CleanOptionFunc, ) error
DeleteMatching issues DELETE calls to all remote objects that match the given selector.
If `finalize` is set, this also removes all finalizers from the matching objects before deleting them.
func FinalizeAll ¶
FinalizeAll iterates over the given list and removes the finalizers the individual objects, if any.
func MustNewRequirement ¶
MustNewRequirement creates a labels.Requirement with the given values and panics if there is an error.
func NewObjectsRemaining ¶
NewObjectsRemaining returns a new error with the remaining objects.
func RemainingObjects ¶
RemainingObjects retrieves the remaining objects of an `AreObjectsRemaining` error.
If the error does not match `AreObjectsRemaining`, this returns nil.
Types ¶
type Botanist ¶
type Botanist struct { *operation.Operation DefaultDomainSecret *corev1.Secret // contains filtered or unexported fields }
Botanist is a struct which has methods that perform cloud-independent operations for a Shoot cluster.
func New ¶
New takes an operation object <o> and creates a new Botanist object. It checks whether the given Shoot DNS domain is covered by a default domain, and if so, it sets the <DefaultDomainSecret> attribute on the Botanist object.
func (*Botanist) CleanExtendedAPIs ¶
CleanExtendedAPIs removes API extensions like CRDs and API services from the Shoot cluster.
func (*Botanist) CleanKubernetesResources ¶
CleanKubernetesResources deletes all the Kubernetes resources in the Shoot cluster other than those stored in the exceptions map. It will check whether all the Kubernetes resources in the Shoot cluster other than those stored in the exceptions map have been deleted. It will return an error in case it has not finished yet, and nil if all resources are gone.
func (*Botanist) CleanWebhooks ¶
CleanWebhooks deletes all Webhooks in the Shoot cluster that are not being managed by the addon manager.
func (*Botanist) DeleteBackupInfrastructure ¶
DeleteBackupInfrastructure deletes the sets deletionTimestamp on the backupInfrastructure resource in the Garden namespace which is responsible for actual deletion of cloud resource for Shoot's backup infrastructure.
func (*Botanist) DeleteBackupNamespace ¶
DeleteBackupNamespace deletes the namespace in the Seed cluster which holds the backup infrastructure state. The built-in garbage collection in Kubernetes will automatically delete all resources which belong to this namespace.
func (*Botanist) DeleteClusterAutoscaler ¶
DeleteClusterAutoscaler deletes the cluster-autoscaler deployment in the Seed cluster which holds the Shoot's control plane.
func (*Botanist) DeleteDeprecatedCloudMetadataServiceNetworkPolicy ¶
DeleteDeprecatedCloudMetadataServiceNetworkPolicy deletes old DEPRECATED Shoot network policy that allows access to the meta-data service only from the cloud-controller-manager and the kube-controller-manager DEPRECATED. TODO: Remove this after several releases.
func (*Botanist) DeleteExtensionResources ¶
DeleteExtensionResources deletes all extension resources from the Shoot namespace in the Seed.
func (*Botanist) DeleteGardenSecrets ¶
DeleteGardenSecrets deletes the Shoot-specific secrets from the project namespace in the Garden cluster. TODO: https://github.com/gardener/gardener/pull/353: This can be removed in a future version as we are now using owner references for the Garden secrets (also remove the actual invocation of the function in the deletion flow of a Shoot).
func (*Botanist) DeleteKubeAPIServer ¶
DeleteKubeAPIServer deletes the kube-apiserver deployment in the Seed cluster which holds the Shoot's control plane.
func (*Botanist) DeleteKubeAddonManager ¶
DeleteKubeAddonManager deletes the kube-addon-manager deployment in the Seed cluster which holds the Shoot's control plane. It needs to be deleted before trying to remove any resources in the Shoot cluster, otherwise it will automatically recreate them and block the infrastructure deletion.
func (*Botanist) DeleteNamespace ¶
DeleteNamespace deletes the namespace in the Seed cluster which holds the control plane components. The built-in garbage collection in Kubernetes will automatically delete all resources which belong to this namespace. This comprises volumes and load balancers as well.
func (*Botanist) DeleteOrphanEtcdMainPVC ¶
DeleteOrphanEtcdMainPVC delete the orphan PVC associated with old etcd-main statefulsets as a result of migration in Release 0.22.0 (https://github.com/gardener/gardener/releases/tag/0.22.0).
func (*Botanist) DeleteSeedMonitoring ¶
DeleteSeedMonitoring will delete the monitoring stack from the Seed cluster to avoid phantom alerts during the deletion process. More precisely, the Alertmanager and Prometheus StatefulSets will be deleted.
func (*Botanist) DeployBackupInfrastructure ¶
DeployBackupInfrastructure creates a BackupInfrastructure resource into the project namespace of shoot on garden cluster. BackupInfrastructure controller acting on resource will actually create required cloud resources and updates the status.
func (*Botanist) DeployBackupNamespace ¶
DeployBackupNamespace creates a namespace in the Seed cluster from info in shoot object, which is used to deploy all the backup infrastructure realted resources for shoot cluster. Moreover, the terraform configuration and all the secrets will be stored as ConfigMaps/Secrets.
func (*Botanist) DeployCloudProviderSecret ¶
DeployCloudProviderSecret creates or updates the cloud provider secret in the Shoot namespace in the Seed cluster.
func (*Botanist) DeployClusterAutoscaler ¶
DeployClusterAutoscaler deploys the cluster-autoscaler into the Shoot namespace in the Seed cluster. It is responsible for automatically scaling the worker pools of the Shoot.
func (*Botanist) DeployDependencyWatchdog ¶
DeployDependencyWatchdog deploys the dependency watchdog to the Shoot namespace in the Seed.
func (*Botanist) DeployExtensionResources ¶
DeployExtensionResources creates the `Extension` extension resource in the shoot namespace in the seed cluster. Gardener waits until an external controller did reconcile the cluster successfully.
func (*Botanist) DeployExternalDomainDNSRecord ¶
DeployExternalDomainDNSRecord deploys the DNS record for the external cluster domain.
func (*Botanist) DeployInfrastructure ¶
DeployInfrastructure creates the `Infrastructure` extension resource in the shoot namespace in the seed cluster. Gardener waits until an external controller did reconcile the cluster successfully.
func (*Botanist) DeployInternalDomainDNSRecord ¶
DeployInternalDomainDNSRecord deploys the DNS record for the internal cluster domain.
func (*Botanist) DeployNamespace ¶
DeployNamespace creates a namespace in the Seed cluster which is used to deploy all the control plane components for the Shoot cluster. Moreover, the cloud provider configuration and all the secrets will be stored as ConfigMaps/Secrets.
func (*Botanist) DeploySecrets ¶
DeploySecrets creates a CA certificate for the Shoot cluster and uses it to sign the server certificate used by the kube-apiserver, and all client certificates used for communcation. It also creates RSA key pairs for SSH connections to the nodes/VMs and for the VPN tunnel. Moreover, basic authentication credentials are computed which will be used to secure the Ingress resources and the kube-apiserver itself. Server certificates for the exposed monitoring endpoints (via Ingress) are generated as well.
func (*Botanist) DeploySeedLogging ¶
DeploySeedLogging will install the Helm release "seed-bootstrap/charts/elastic-kibana-curator" in the Seed clusters.
func (*Botanist) DeploySeedMonitoring ¶
DeploySeedMonitoring will install the Helm release "seed-monitoring" in the Seed clusters. It comprises components to monitor the Shoot cluster whose control plane runs in the Seed cluster.
func (*Botanist) DeployWorker ¶
DeployWorker creates the `Worker` extension resource in the shoot namespace in the seed cluster. Gardener waits until an external controller did reconcile the resource successfully.
func (*Botanist) DestroyExternalDomainDNSRecord ¶
DestroyExternalDomainDNSRecord destroys the DNS record for the external cluster domain.
func (*Botanist) DestroyInfrastructure ¶
DestroyInfrastructure deletes the `Infrastructure` extension resource in the shoot namespace in the seed cluster, and it waits for a maximum of 10m until it is deleted.
func (*Botanist) DestroyIngressDNSRecord ¶
DestroyIngressDNSRecord destroys the nginx-ingress resources created by Terraform.
func (*Botanist) DestroyInternalDomainDNSRecord ¶
DestroyInternalDomainDNSRecord destroys the DNS record for the internal cluster domain.
func (*Botanist) DestroyWorker ¶
DestroyWorker deletes the `Worker` extension resource in the shoot namespace in the seed cluster, and it waits for a maximum of 30m until it is deleted.
func (*Botanist) EnsureIngressDNSRecord ¶
EnsureIngressDNSRecord creates the respective wildcard DNS record for the nginx-ingress-controller.
func (*Botanist) GenerateKubeLegoConfig ¶
GenerateKubeLegoConfig generates the values which are required to render the chart of kube-lego properly.
func (*Botanist) GenerateKubernetesDashboardConfig ¶
GenerateKubernetesDashboardConfig generates the values which are required to render the chart of the kubernetes-dashboard properly.
func (*Botanist) HealthChecks ¶
func (b *Botanist) HealthChecks(initializeShootClients func() error, thresholdMappings map[gardencorev1alpha1.ConditionType]time.Duration, apiserverAvailability, controlPlane, nodes, systemComponents gardencorev1alpha1.Condition) (gardencorev1alpha1.Condition, gardencorev1alpha1.Condition, gardencorev1alpha1.Condition, gardencorev1alpha1.Condition)
HealthChecks conducts the health checks on all the given conditions.
func (*Botanist) HibernateControlPlane ¶
HibernateControlPlane hibernates the entire control plane if the shoot shall be hibernated.
func (*Botanist) MonitoringHealthChecks ¶
func (b *Botanist) MonitoringHealthChecks(checker *HealthChecker, inactiveAlerts gardencorev1alpha1.Condition) gardencorev1alpha1.Condition
MonitoringHealthChecks performs the monitoring related health checks.
func (*Botanist) PerformGarbageCollectionSeed ¶
PerformGarbageCollectionSeed performs garbage collection in the Shoot namespace in the Seed cluster, i.e., it deletes old machine sets which have a desired=actual=0 replica count.
func (*Botanist) PerformGarbageCollectionShoot ¶
PerformGarbageCollectionShoot performs garbage collection in the kube-system namespace in the Shoot cluster, i.e., it deletes evicted pods (mitigation for https://github.com/kubernetes/kubernetes/issues/55051).
func (*Botanist) RefreshCloudControllerManagerChecksums ¶
RefreshCloudControllerManagerChecksums updates the cloud provider checksum in the cloud-controller-manager pod spec template.
func (*Botanist) RefreshKubeControllerManagerChecksums ¶
RefreshKubeControllerManagerChecksums updates the cloud provider checksum in the kube-controller-manager pod spec template.
func (*Botanist) RegisterAsSeed ¶
func (b *Botanist) RegisterAsSeed(protected, visible *bool, minimumVolumeSize *string, blockCIDRs []gardencorev1alpha1.CIDR) error
RegisterAsSeed registers a Shoot cluster as a Seed in the Garden cluster.
func (*Botanist) RequiredExtensionsExist ¶
RequiredExtensionsExist checks whether all required extensions needed for an shoot operation exist.
func (*Botanist) SyncShootCredentialsToGarden ¶
SyncShootCredentialsToGarden copies the kubeconfig generated for the user, the SSH keypair to the project namespace in the Garden cluster and the monitoring credentials for the user-facing monitoring stack are also copied.
func (*Botanist) UnregisterAsSeed ¶
UnregisterAsSeed unregisters a Shoot cluster as a Seed in the Garden cluster.
func (*Botanist) WaitForControllersToBeActive ¶
WaitForControllersToBeActive checks whether the kube-controller-manager and the cloud-controller-manager have recently written to the Endpoint object holding the leader information. If yes, they are active.
func (*Botanist) WaitUntilBackupInfrastructureReconciled ¶
WaitUntilBackupInfrastructureReconciled waits until the backup infrastructure within the garden cluster has been reconciled.
func (*Botanist) WaitUntilBackupNamespaceDeleted ¶
WaitUntilBackupNamespaceDeleted waits until the namespace for the backup of Shoot cluster within the Seed cluster is deleted.
func (*Botanist) WaitUntilClusterAutoscalerDeleted ¶
WaitUntilClusterAutoscalerDeleted waits until the cluster-autoscaler deployment within the Seed cluster has been deleted.
func (*Botanist) WaitUntilEtcdReady ¶
WaitUntilEtcdReady waits until the etcd statefulsets indicate readiness in their statuses.
func (*Botanist) WaitUntilEtcdStatefulsetDeleted ¶
WaitUntilEtcdStatefulsetDeleted waits until the etcd statefulsets get deleted.
func (*Botanist) WaitUntilExtensionResourcesDeleted ¶
WaitUntilExtensionResourcesDeleted waits until all extension resources are gone or the context is cancelled.
func (*Botanist) WaitUntilExtensionResourcesReady ¶
WaitUntilExtensionResourcesReady waits until all extension resources report `Succeeded` in their last operation state. The state must be reported before the passed context is cancelled or an extension's timeout has been reached. As soon as one timeout has been overstepped the function returns an error, further waits on extensions will be aborted.
func (*Botanist) WaitUntilInfrastructureDeleted ¶
WaitUntilInfrastructureDeleted waits until the infrastructure resource has been deleted.
func (*Botanist) WaitUntilInfrastructureReady ¶
WaitUntilInfrastructureReady waits until the infrastructure resource has been reconciled successfully.
func (*Botanist) WaitUntilKubeAPIServerReady ¶
WaitUntilKubeAPIServerReady waits until the kube-apiserver pod(s) indicate readiness in their statuses.
func (*Botanist) WaitUntilKubeAPIServerServiceIsReady ¶
WaitUntilKubeAPIServerServiceIsReady waits until the external load balancer of the kube-apiserver has been created (i.e., its ingress information has been updated in the service status).
func (*Botanist) WaitUntilKubeAddonManagerDeleted ¶
WaitUntilKubeAddonManagerDeleted waits until the kube-addon-manager deployment within the Seed cluster has been deleted.
func (*Botanist) WaitUntilNodesDeleted ¶
WaitUntilNodesDeleted waits until no nodes exist in the shoot cluster anymore.
func (*Botanist) WaitUntilSeedNamespaceDeleted ¶
WaitUntilSeedNamespaceDeleted waits until the namespace of the Shoot cluster within the Seed cluster is deleted.
func (*Botanist) WaitUntilVPNConnectionExists ¶
WaitUntilVPNConnectionExists waits until a port forward connection to the vpn-shoot pod in the kube-system namespace of the Shoot cluster can be established.
func (*Botanist) WaitUntilWorkerDeleted ¶
WaitUntilWorkerDeleted waits until the worker extension resource has been deleted.
func (*Botanist) WaitUntilWorkerReady ¶
WaitUntilWorkerReady waits until the worker extension resource has been successfully reconciled.
func (*Botanist) WakeUpControlPlane ¶
WakeUpControlPlane scales the replicas to 1 for the following deployments which are needed in case of shoot deletion: * etcd-events * etcd-main * kube-apiserver * cloud-controller-manager * kube-controller-manager * csi-controllers
type CleanOptionFunc ¶
type CleanOptionFunc func(*CleanOptions)
CleanOptionFunc is a function that modifies the given CleanOptions.
func DeleteOptions ¶
func DeleteOptions(deleteOpts ...client.DeleteOptionFunc) CleanOptionFunc
DeleteOptions creates a CleanOptionFunc that adds all the DeleteOptionFuncs to the CleanOptions.
func ListOptions ¶
func ListOptions(listOpts ...client.ListOptionFunc) CleanOptionFunc
ListOptions creates a CleanOptionFunc that adds all the ListOptionFuncs to the CleanOptions.
type CleanOptions ¶
type CleanOptions struct { Finalize bool DeleteOpts []client.DeleteOptionFunc ListOpts []client.ListOptionFunc }
CleanOptions are options for cleaning a set of resources. TODO: Adapt / remove this once `DeleteCollection` is in the controller-runtime.
func (*CleanOptions) ApplyOptions ¶
func (o *CleanOptions) ApplyOptions(optFuncs []CleanOptionFunc)
ApplyOptions applies the given optFuncs to the CleanOptions.
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker contains the condition thresholds.
func NewHealthChecker ¶
func NewHealthChecker(conditionThresholds map[gardencorev1alpha1.ConditionType]time.Duration) *HealthChecker
NewHealthChecker creates a new health checker.
func (*HealthChecker) CheckClusterNodes ¶
func (b *HealthChecker) CheckClusterNodes( namespace string, condition gardencorev1alpha1.Condition, nodeLister kutil.NodeLister, machineDeploymentLister kutil.MachineDeploymentLister, ) (*gardencorev1alpha1.Condition, error)
CheckClusterNodes checks whether cluster nodes in the given listers are complete and healthy.
func (*HealthChecker) CheckControlPlane ¶
func (b *HealthChecker) CheckControlPlane( shoot *gardenv1beta1.Shoot, namespace string, seedCloudProvider gardenv1beta1.CloudProvider, condition gardencorev1alpha1.Condition, deploymentLister kutil.DeploymentLister, statefulSetLister kutil.StatefulSetLister, machineDeploymentLister kutil.MachineDeploymentLister, ) (*gardencorev1alpha1.Condition, error)
CheckControlPlane checks whether the control plane components in the given listers are complete and healthy.
func (*HealthChecker) CheckLoggingControlPlane ¶
func (b *HealthChecker) CheckLoggingControlPlane( namespace string, condition gardencorev1alpha1.Condition, deploymentLister kutil.DeploymentLister, statefulSetLister kutil.StatefulSetLister, ) (*gardencorev1alpha1.Condition, error)
CheckLoggingControlPlane checks whether the logging components in the given listers are complete and healthy.
func (*HealthChecker) CheckMonitoringControlPlane ¶
func (b *HealthChecker) CheckMonitoringControlPlane( namespace string, wantsAlertmanager bool, condition gardencorev1alpha1.Condition, deploymentLister kutil.DeploymentLister, statefulSetLister kutil.StatefulSetLister, ) (*gardencorev1alpha1.Condition, error)
CheckMonitoringControlPlane checks whether the monitoring in the given listers are complete and healthy.
func (*HealthChecker) CheckMonitoringSystemComponents ¶
func (b *HealthChecker) CheckMonitoringSystemComponents( namespace string, condition gardencorev1alpha1.Condition, daemonSetLister kutil.DaemonSetLister, ) (*gardencorev1alpha1.Condition, error)
CheckMonitoringSystemComponents checks whether the monitoring in the given listers are complete and healthy.
func (*HealthChecker) CheckOptionalAddonsSystemComponents ¶
func (b *HealthChecker) CheckOptionalAddonsSystemComponents( namespace string, condition gardencorev1alpha1.Condition, deploymentLister kutil.DeploymentLister, daemonSetLister kutil.DaemonSetLister, ) (*gardencorev1alpha1.Condition, error)
CheckOptionalAddonsSystemComponents checks whether the addons in the given listers are healthy.
func (*HealthChecker) CheckSystemComponents ¶
func (b *HealthChecker) CheckSystemComponents( namespace string, condition gardencorev1alpha1.Condition, deploymentLister kutil.DeploymentLister, daemonSetLister kutil.DaemonSetLister, ) (*gardencorev1alpha1.Condition, error)
CheckSystemComponents checks whether the system components in the given listers are complete and healthy.
func (*HealthChecker) FailedCondition ¶
func (b *HealthChecker) FailedCondition(condition gardencorev1alpha1.Condition, reason, message string) gardencorev1alpha1.Condition
FailedCondition returns a progressing or false condition depending on the progressing threshold.