shoot

package
v1.81.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addons added in v1.63.0

type Addons struct {
	KubernetesDashboard kubernetesdashboard.Interface
	NginxIngress        component.Deployer
}

Addons contains references for the addons.

type Builder added in v1.4.0

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

Builder is an object that builds Shoot objects.

func NewBuilder added in v1.4.0

func NewBuilder() *Builder

NewBuilder returns a new Builder.

func (*Builder) Build added in v1.4.0

func (b *Builder) Build(ctx context.Context, c client.Reader) (*Shoot, error)

Build initializes a new Shoot object.

func (*Builder) WithCloudProfileObject added in v1.4.0

func (b *Builder) WithCloudProfileObject(cloudProfileObject *gardencorev1beta1.CloudProfile) *Builder

WithCloudProfileObject sets the cloudProfileFunc attribute at the Builder.

func (*Builder) WithCloudProfileObjectFrom added in v1.30.0

func (b *Builder) WithCloudProfileObjectFrom(reader client.Reader) *Builder

WithCloudProfileObjectFrom sets the cloudProfileFunc attribute at the Builder after fetching it from the given reader.

func (*Builder) WithCloudProfileObjectFromCluster added in v1.19.0

func (b *Builder) WithCloudProfileObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder

WithCloudProfileObjectFromCluster sets the cloudProfileFunc attribute at the Builder.

func (*Builder) WithDefaultDomains added in v1.4.0

func (b *Builder) WithDefaultDomains(defaultDomains []*gardenerutils.Domain) *Builder

WithDefaultDomains sets the defaultDomains attribute at the Builder.

func (*Builder) WithInternalDomain added in v1.4.0

func (b *Builder) WithInternalDomain(internalDomain *gardenerutils.Domain) *Builder

WithInternalDomain sets the internalDomain attribute at the Builder.

func (*Builder) WithProjectName added in v1.4.0

func (b *Builder) WithProjectName(projectName string) *Builder

WithProjectName sets the projectName attribute at the Builder.

func (*Builder) WithSeedObject added in v1.66.0

func (b *Builder) WithSeedObject(seed *gardencorev1beta1.Seed) *Builder

WithSeedObject sets the seed attribute at the Builder.

func (*Builder) WithShootObject added in v1.4.0

func (b *Builder) WithShootObject(shootObject *gardencorev1beta1.Shoot) *Builder

WithShootObject sets the shootObjectFunc attribute at the Builder.

func (*Builder) WithShootObjectFromCluster added in v1.16.0

func (b *Builder) WithShootObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder

WithShootObjectFromCluster sets the shootObjectFunc attribute at the Builder.

func (*Builder) WithShootSecret added in v1.4.0

func (b *Builder) WithShootSecret(secret *corev1.Secret) *Builder

WithShootSecret sets the shootSecretFunc attribute at the Builder.

func (*Builder) WithShootSecretFrom added in v1.30.0

func (b *Builder) WithShootSecretFrom(c client.Reader) *Builder

WithShootSecretFrom sets the shootSecretFunc attribute at the Builder after fetching it from the given reader.

type Components added in v1.5.0

type Components struct {
	BackupEntry              backupentry.Interface
	SourceBackupEntry        backupentry.Interface
	ControlPlane             *ControlPlane
	Extensions               *Extensions
	SystemComponents         *SystemComponents
	Logging                  *Logging
	Monitoring               *Monitoring
	Addons                   *Addons
	GardenerAccess           component.Deployer
	DependencyWatchdogAccess component.Deployer
}

Components contains different components deployed in the Shoot cluster.

type ControlPlane added in v1.7.0

type ControlPlane struct {
	ClusterAutoscaler        clusterautoscaler.Interface
	EtcdMain                 etcd.Interface
	EtcdEvents               etcd.Interface
	EtcdCopyBackupsTask      etcdcopybackupstask.Interface
	KubeAPIServerIngress     component.Deployer
	KubeAPIServerService     component.DeployWaiter
	KubeAPIServerSNI         component.DeployWaiter
	KubeAPIServer            kubeapiserver.Interface
	KubeScheduler            kubescheduler.Interface
	KubeControllerManager    kubecontrollermanager.Interface
	KubeStateMetrics         kubestatemetrics.Interface
	MachineControllerManager machinecontrollermanager.Interface
	Plutono                  plutono.Interface
	ResourceManager          resourcemanager.Interface
	VerticalPodAutoscaler    vpa.Interface
	VPNSeedServer            vpnseedserver.Interface
}

ControlPlane contains references to K8S control plane components.

type Extensions added in v1.8.0

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               component.DeployMigrateWaiter
	OperatingSystemConfig operatingsystemconfig.Interface
	Worker                worker.Interface
}

Extensions contains references to extension resources.

type Logging added in v1.27.0

type Logging struct {
	EventLogger component.Deployer
	Vali        vali.Interface
}

Logging contains references to logging deployers.

type Monitoring added in v1.76.0

type Monitoring struct {
	Monitoring monitoring.Interface
}

Monitoring contains references to monitoring deployers.

type Networks added in v1.1.0

type Networks struct {
	// Pods subnet
	Pods *net.IPNet
	// Services subnet
	Services *net.IPNet
	// APIServer is the ClusterIP of default/kubernetes Service
	APIServer net.IP
	// CoreDNS is the ClusterIP of kube-system/coredns Service
	CoreDNS net.IP
}

Networks contains pre-calculated subnets and IP address for various components.

func ToNetworks added in v1.1.0

func ToNetworks(s *gardencorev1beta1.Shoot, workerless bool) (*Networks, error)

ToNetworks return a network with computed cidrs and ClusterIPs for a Shoot

type Shoot

type Shoot struct {
	Secret       *corev1.Secret
	CloudProfile *gardencorev1beta1.CloudProfile

	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
	VPNHighAvailabilityEnabled              bool
	VPNHighAvailabilityNumberOfSeedServers  int
	VPNHighAvailabilityNumberOfShootClients int
	NodeLocalDNSEnabled                     bool
	PSPDisabled                             bool
	TopologyAwareRoutingEnabled             bool
	Networks                                *Networks
	BackupEntryName                         string
	CloudConfigExecutionMaxDelaySeconds     int

	Components *Components
	// contains filtered or unexported fields
}

Shoot is an object containing information about a Shoot cluster.

func (*Shoot) ComputeInClusterAPIServerAddress added in v1.1.0

func (s *Shoot) ComputeInClusterAPIServerAddress(runsInShootNamespace bool) string

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 added in v1.1.0

func (s *Shoot) ComputeOutOfClusterAPIServerAddress(useInternalClusterDomain bool) string

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 added in v1.29.0

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 added in v1.40.0

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 added in v1.29.0

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

func (s *Shoot) GetIngressFQDN(subDomain string) string

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 added in v1.1.0

func (s *Shoot) GetMaxNodeCount() int32

GetMaxNodeCount returns the sum of all 'maximum' fields of all worker groups of the Shoot.

func (*Shoot) GetMinNodeCount added in v1.1.0

func (s *Shoot) GetMinNodeCount() int32

GetMinNodeCount returns the sum of all 'minimum' fields of all worker groups of the Shoot.

func (*Shoot) GetReplicas

func (s *Shoot) GetReplicas(wokenUp int32) int32

GetReplicas returns the given <wokenUp> number if the shoot is not hibernated, or zero otherwise.

func (*Shoot) GetShootState added in v1.74.0

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

func (s *Shoot) IPVSEnabled() bool

IPVSEnabled returns true if IPVS is enabled for the shoot.

func (*Shoot) IsShootControlPlaneLoggingEnabled added in v1.41.0

func (s *Shoot) IsShootControlPlaneLoggingEnabled(c *config.GardenletConfiguration) bool

IsShootControlPlaneLoggingEnabled return true if the Shoot controlplane logging is enabled

func (*Shoot) SetInfo added in v1.29.0

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 added in v1.74.0

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 added in v1.29.0

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 added in v1.29.0

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 added in v1.13.0

type SystemComponents struct {
	APIServerProxy      apiserverproxy.Interface
	BlackboxExporter    blackboxexporter.Interface
	ClusterIdentity     clusteridentity.Interface
	CoreDNS             coredns.Interface
	KubeProxy           kubeproxy.Interface
	MetricsServer       component.DeployWaiter
	Namespaces          component.DeployWaiter
	NodeLocalDNS        nodelocaldns.Interface
	NodeProblemDetector component.DeployWaiter
	NodeExporter        nodeexporter.Interface
	Resources           component.DeployWaiter
	VPNShoot            vpnshoot.Interface
}

SystemComponents contains references to system components.

Jump to

Keyboard shortcuts

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