Documentation ¶
Index ¶
- type Addons
- type Builder
- func (b *Builder) Build(ctx context.Context, c client.Reader) (*Shoot, error)
- func (b *Builder) WithCloudProfileObject(cloudProfileObject *gardencorev1beta1.CloudProfile) *Builder
- func (b *Builder) WithCloudProfileObjectFrom(reader client.Reader) *Builder
- func (b *Builder) WithCloudProfileObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
- func (b *Builder) WithDefaultDomains(defaultDomains []*gardenerutils.Domain) *Builder
- func (b *Builder) WithExposureClassObject(exposureClass *gardencorev1beta1.ExposureClass) *Builder
- func (b *Builder) WithInternalDomain(internalDomain *gardenerutils.Domain) *Builder
- func (b *Builder) WithProjectName(projectName string) *Builder
- func (b *Builder) WithSeedObject(seed *gardencorev1beta1.Seed) *Builder
- func (b *Builder) WithServiceAccountIssuerHostname(secret *corev1.Secret) *Builder
- func (b *Builder) WithShootCredentialsFrom(c client.Reader) *Builder
- func (b *Builder) WithShootObject(shootObject *gardencorev1beta1.Shoot) *Builder
- func (b *Builder) WithShootObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
- func (b *Builder) WithoutShootCredentials() *Builder
- type Components
- type ControlPlane
- type Extensions
- type Networks
- type Shoot
- func (s *Shoot) ComputeInClusterAPIServerAddress(runsInShootNamespace bool) string
- func (s *Shoot) ComputeOutOfClusterAPIServerAddress(useInternalClusterDomain bool) string
- func (s *Shoot) GetDNSRecordComponentsForMigration() []component.DeployMigrateWaiter
- func (s *Shoot) GetExtensionComponentsForParallelMigration() []component.DeployMigrateWaiter
- func (s *Shoot) GetInfo() *gardencorev1beta1.Shoot
- func (s *Shoot) GetIngressFQDN(subDomain string) string
- func (s *Shoot) GetMaxNodeCount() int32
- func (s *Shoot) GetMinNodeCount() int32
- func (s *Shoot) GetReplicas(wokenUp int32) int32
- func (s *Shoot) GetShootState() *gardencorev1beta1.ShootState
- func (s *Shoot) IPVSEnabled() bool
- func (s *Shoot) IsShootControlPlaneLoggingEnabled(c *config.GardenletConfiguration) bool
- func (s *Shoot) SetInfo(shoot *gardencorev1beta1.Shoot)
- func (s *Shoot) SetShootState(shootState *gardencorev1beta1.ShootState)
- func (s *Shoot) UpdateInfo(ctx context.Context, c client.Client, useStrategicMerge bool, ...) error
- func (s *Shoot) UpdateInfoStatus(ctx context.Context, c client.Client, useStrategicMerge bool, ...) error
- type SystemComponents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addons ¶
type Addons struct { KubernetesDashboard kubernetesdashboard.Interface NginxIngress component.Deployer }
Addons contains references for the addons.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is an object that builds Shoot objects.
func (*Builder) WithCloudProfileObject ¶
func (b *Builder) WithCloudProfileObject(cloudProfileObject *gardencorev1beta1.CloudProfile) *Builder
WithCloudProfileObject sets the cloudProfileFunc attribute at the Builder.
func (*Builder) WithCloudProfileObjectFrom ¶
WithCloudProfileObjectFrom sets the cloudProfileFunc attribute at the Builder after fetching it from the given reader.
func (*Builder) WithCloudProfileObjectFromCluster ¶
func (b *Builder) WithCloudProfileObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
WithCloudProfileObjectFromCluster sets the cloudProfileFunc attribute at the Builder.
func (*Builder) WithDefaultDomains ¶
func (b *Builder) WithDefaultDomains(defaultDomains []*gardenerutils.Domain) *Builder
WithDefaultDomains sets the defaultDomains attribute at the Builder.
func (*Builder) WithExposureClassObject ¶
func (b *Builder) WithExposureClassObject(exposureClass *gardencorev1beta1.ExposureClass) *Builder
WithExposureClassObject sets the exposureClass attribute at the Builder.
func (*Builder) WithInternalDomain ¶
func (b *Builder) WithInternalDomain(internalDomain *gardenerutils.Domain) *Builder
WithInternalDomain sets the internalDomain attribute at the Builder.
func (*Builder) WithProjectName ¶
WithProjectName sets the projectName attribute at the Builder.
func (*Builder) WithSeedObject ¶
func (b *Builder) WithSeedObject(seed *gardencorev1beta1.Seed) *Builder
WithSeedObject sets the seed attribute at the Builder.
func (*Builder) WithServiceAccountIssuerHostname ¶ added in v1.91.0
WithServiceAccountIssuerHostname prepares the Builder for initialization of the service account issuer hostname. Should be called before Builder.Build.
func (*Builder) WithShootCredentialsFrom ¶ added in v1.102.0
WithShootCredentialsFrom sets the shootCredentialsFunc attribute at the Builder after fetching it from the given reader.
func (*Builder) WithShootObject ¶
func (b *Builder) WithShootObject(shootObject *gardencorev1beta1.Shoot) *Builder
WithShootObject sets the shootObjectFunc attribute at the Builder.
func (*Builder) WithShootObjectFromCluster ¶
func (b *Builder) WithShootObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
WithShootObjectFromCluster sets the shootObjectFunc attribute at the Builder.
func (*Builder) WithoutShootCredentials ¶ added in v1.103.2
WithoutShootCredentials sets the shootCredentialsFunc attribute at the builder to return empty Secret as credentials.
type Components ¶
type Components struct { BackupEntry backupentry.Interface SourceBackupEntry backupentry.Interface ControlPlane *ControlPlane Extensions *Extensions SystemComponents *SystemComponents Addons *Addons GardenerAccess component.Deployer DependencyWatchdogAccess component.Deployer }
Components contains different components deployed in the Shoot cluster.
type ControlPlane ¶
type ControlPlane struct { Alertmanager alertmanager.Interface BlackboxExporter component.DeployWaiter ClusterAutoscaler clusterautoscaler.Interface EtcdMain etcd.Interface EtcdEvents etcd.Interface EtcdCopyBackupsTask etcdcopybackupstask.Interface EventLogger component.Deployer KubeAPIServerIngress component.Deployer KubeAPIServerService component.DeployWaiter KubeAPIServerSNI component.DeployWaiter KubeAPIServer kubeapiserver.Interface KubeScheduler component.DeployWaiter KubeControllerManager kubecontrollermanager.Interface KubeStateMetrics component.DeployWaiter MachineControllerManager machinecontrollermanager.Interface Plutono plutono.Interface Prometheus prometheus.Interface ResourceManager resourcemanager.Interface Vali component.Deployer VerticalPodAutoscaler vpa.Interface VPNSeedServer vpnseedserver.Interface }
ControlPlane contains references to K8S control plane components.
type Extensions ¶
type Extensions struct { ContainerRuntime containerruntime.Interface ControlPlane controlplane.Interface ControlPlaneExposure controlplane.Interface ExternalDNSRecord dnsrecord.Interface InternalDNSRecord dnsrecord.Interface IngressDNSRecord dnsrecord.Interface Extension extension.Interface Infrastructure infrastructure.Interface Network network.Interface OperatingSystemConfig operatingsystemconfig.Interface Worker worker.Interface }
Extensions contains references to extension resources.
type Networks ¶
type Networks struct { // Pods subnets Pods []net.IPNet // Services subnets Services []net.IPNet // Nodes subnets Nodes []net.IPNet // APIServer are the ClusterIPs of default/kubernetes Service APIServer []net.IP // CoreDNS are the ClusterIPs of kube-system/coredns Service CoreDNS []net.IP }
Networks contains pre-calculated subnets and IP address for various components.
func ToNetworks ¶
func ToNetworks(shoot *gardencorev1beta1.Shoot, workerless bool) (*Networks, error)
ToNetworks return a network with computed cidrs and ClusterIPs for a Shoot
type Shoot ¶
type Shoot struct { // Credentials is either [*corev1.Secret] or [*securityv1alpha1.WorkloadIdentity] Credentials client.Object CloudProfile *gardencorev1beta1.CloudProfile ExposureClass *gardencorev1beta1.ExposureClass SeedNamespace string KubernetesVersion *semver.Version GardenerVersion *semver.Version InternalClusterDomain string ExternalClusterDomain *string ExternalDomain *gardenerutils.Domain Purpose gardencorev1beta1.ShootPurpose IsWorkerless bool WantsClusterAutoscaler bool WantsVerticalPodAutoscaler bool WantsAlertmanager bool IgnoreAlerts bool HibernationEnabled bool UsesNewVPN bool VPNHighAvailabilityEnabled bool VPNHighAvailabilityNumberOfSeedServers int VPNHighAvailabilityNumberOfShootClients int VPNVPAUpdateDisabled bool NodeLocalDNSEnabled bool TopologyAwareRoutingEnabled bool Networks *Networks BackupEntryName string OSCSyncJitterPeriod *metav1.Duration ResourcesToEncrypt []string EncryptedResources []string ServiceAccountIssuerHostname *string Components *Components // contains filtered or unexported fields }
Shoot is an object containing information about a Shoot cluster.
func (*Shoot) ComputeInClusterAPIServerAddress ¶
ComputeInClusterAPIServerAddress returns the internal address for the shoot API server depending on whether the caller runs in the shoot namespace or not.
func (*Shoot) ComputeOutOfClusterAPIServerAddress ¶
ComputeOutOfClusterAPIServerAddress returns the external address for the shoot API server depending on whether the caller wants to use the internal cluster domain and whether DNS is disabled on this seed.
func (*Shoot) GetDNSRecordComponentsForMigration ¶
func (s *Shoot) GetDNSRecordComponentsForMigration() []component.DeployMigrateWaiter
GetDNSRecordComponentsForMigration returns a list of component.DeployMigrateWaiters of DNSRecord components that should be migrated by the shoot controller.
func (*Shoot) GetExtensionComponentsForParallelMigration ¶
func (s *Shoot) GetExtensionComponentsForParallelMigration() []component.DeployMigrateWaiter
GetExtensionComponentsForParallelMigration returns a list of component.DeployMigrateWaiters of extension components that should be migrated by the shoot controller in parallel. Note that this method does not return ControlPlane and Infrastructure components as they require specific handling during migration.
func (*Shoot) GetInfo ¶
func (s *Shoot) GetInfo() *gardencorev1beta1.Shoot
GetInfo returns the shoot resource of this Shoot in a concurrency safe way. This method should be used only for reading the data of the returned shoot resource. The returned shoot resource MUST NOT BE MODIFIED (except in test code) since this might interfere with other concurrent reads and writes. To properly update the shoot resource of this Shoot use UpdateInfo or UpdateInfoStatus.
func (*Shoot) GetIngressFQDN ¶
GetIngressFQDN returns the fully qualified domain name of ingress sub-resource for the Shoot cluster. The end result is '<subDomain>.<ingressPrefix>.<clusterDomain>'.
func (*Shoot) GetMaxNodeCount ¶
GetMaxNodeCount returns the sum of all 'maximum' fields of all worker groups of the Shoot.
func (*Shoot) GetMinNodeCount ¶
GetMinNodeCount returns the sum of all 'minimum' fields of all worker groups of the Shoot.
func (*Shoot) GetReplicas ¶
GetReplicas returns the given <wokenUp> number if the shoot is not hibernated, or zero otherwise.
func (*Shoot) GetShootState ¶
func (s *Shoot) GetShootState() *gardencorev1beta1.ShootState
GetShootState returns the shootstate resource of this Shoot in a concurrency safe way. This method should be used only for reading the data of the returned shootstate resource. The returned shootstate resource MUST NOT BE MODIFIED (except in test code) since this might interfere with other concurrent reads and writes. To properly update the shootstate resource of this Shoot use SaveGardenerResourceDataInShootState.
func (*Shoot) IPVSEnabled ¶
IPVSEnabled returns true if IPVS is enabled for the shoot.
func (*Shoot) IsShootControlPlaneLoggingEnabled ¶
func (s *Shoot) IsShootControlPlaneLoggingEnabled(c *config.GardenletConfiguration) bool
IsShootControlPlaneLoggingEnabled return true if the Shoot controlplane logging is enabled
func (*Shoot) SetInfo ¶
func (s *Shoot) SetInfo(shoot *gardencorev1beta1.Shoot)
SetInfo sets the shoot resource of this Shoot in a concurrency safe way. This method is not protected by a mutex and does not update the shoot resource in the cluster and so should be used only in exceptional situations, or as a convenience in test code. The shoot passed as a parameter MUST NOT BE MODIFIED after the call to SetInfo (except in test code) since this might interfere with other concurrent reads and writes. To properly update the shoot resource of this Shoot use UpdateInfo or UpdateInfoStatus.
func (*Shoot) SetShootState ¶
func (s *Shoot) SetShootState(shootState *gardencorev1beta1.ShootState)
SetShootState sets the shootstate resource of this Shoot in a concurrency safe way. This method is not protected by a mutex and does not update the shootstate resource in the cluster and so should be used only in exceptional situations, or as a convenience in test code. The shootstate passed as a parameter MUST NOT BE MODIFIED after the call to SetShootState (except in test code) since this might interfere with other concurrent reads and writes. To properly update the shootstate resource of this Shoot use SaveGardenerResourceDataInShootState.
func (*Shoot) UpdateInfo ¶
func (s *Shoot) UpdateInfo(ctx context.Context, c client.Client, useStrategicMerge bool, f func(*gardencorev1beta1.Shoot) error) error
UpdateInfo updates the shoot resource of this Shoot in a concurrency safe way, using the given context, client, and mutate function. It copies the current shoot resource and then uses the copy to patch the resource in the cluster using either client.MergeFrom or client.StrategicMergeFrom depending on useStrategicMerge. This method is protected by a mutex, so only a single UpdateInfo or UpdateInfoStatus operation can be executed at any point in time.
func (*Shoot) UpdateInfoStatus ¶
func (s *Shoot) UpdateInfoStatus(ctx context.Context, c client.Client, useStrategicMerge bool, f func(*gardencorev1beta1.Shoot) error) error
UpdateInfoStatus updates the status of the shoot resource of this Shoot in a concurrency safe way, using the given context, client, and mutate function. It copies the current shoot resource and then uses the copy to patch the resource in the cluster using either client.MergeFrom or client.StrategicMergeFrom depending on useStrategicMerge. This method is protected by a mutex, so only a single UpdateInfo or UpdateInfoStatus operation can be executed at any point in time.
type SystemComponents ¶
type SystemComponents struct { APIServerProxy apiserverproxy.Interface BlackboxExporter component.DeployWaiter ClusterIdentity clusteridentity.Interface CoreDNS coredns.Interface KubeProxy kubeproxy.Interface MetricsServer component.DeployWaiter Namespaces component.DeployWaiter NodeLocalDNS nodelocaldns.Interface NodeProblemDetector component.DeployWaiter NodeExporter component.DeployWaiter Resources shootsystem.Interface VPNShoot component.DeployWaiter }
SystemComponents contains references to system components.