Documentation ¶
Index ¶
- Constants
- func ComputeRequiredExtensions(shoot *gardencorev1beta1.Shoot, seed *gardencorev1beta1.Seed, ...) sets.String
- func ComputeTechnicalID(projectName string, shoot *gardencorev1beta1.Shoot) string
- func ConstructExternalClusterDomain(shoot *gardencorev1beta1.Shoot) *string
- func ConstructExternalDomain(ctx context.Context, client client.Client, shoot *gardencorev1beta1.Shoot, ...) (*garden.Domain, error)
- func ConstructInternalClusterDomain(shootName, shootProject string, internalDomain *garden.Domain) string
- func IsIncompleteDNSConfigError(err error) bool
- func StatusValue(s Status) int
- type Builder
- func (b *Builder) Build(ctx context.Context, c client.Client) (*Shoot, error)
- func (b *Builder) WithCloudProfileObject(cloudProfileObject *gardencorev1beta1.CloudProfile) *Builder
- func (b *Builder) WithCloudProfileObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
- func (b *Builder) WithCloudProfileObjectFromReader(reader client.Reader) *Builder
- func (b *Builder) WithDefaultDomains(defaultDomains []*garden.Domain) *Builder
- func (b *Builder) WithDisableDNS(disableDNS bool) *Builder
- func (b *Builder) WithInternalDomain(internalDomain *garden.Domain) *Builder
- func (b *Builder) WithProjectName(projectName string) *Builder
- func (b *Builder) WithShootObject(shootObject *gardencorev1beta1.Shoot) *Builder
- func (b *Builder) WithShootObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
- func (b *Builder) WithShootObjectFromLister(shootLister gardencorelisters.ShootLister, namespace, name string) *Builder
- func (b *Builder) WithShootSecret(secret *corev1.Secret) *Builder
- func (b *Builder) WithShootSecretFromReader(c client.Reader) *Builder
- type Components
- type ControlPlane
- type DNS
- type Extensions
- type IncompleteDNSConfigError
- type Networks
- type Shoot
- func (s *Shoot) ComputeInClusterAPIServerAddress(runsInShootNamespace bool) string
- func (s *Shoot) ComputeOutOfClusterAPIServerAddress(apiServerAddress string, useInternalClusterDomain bool) string
- func (s *Shoot) GetExtensionComponents() []component.DeployMigrateWaiter
- func (s *Shoot) GetIngressFQDN(subDomain string) string
- func (s *Shoot) GetMaxNodeCount() int32
- func (s *Shoot) GetMinNodeCount() int32
- func (s *Shoot) GetNodeNetwork() *string
- func (s *Shoot) GetReplicas(wokenUp int32) int32
- func (s *Shoot) GetWorkerNames() []string
- func (s *Shoot) IPVSEnabled() bool
- type Status
- type SystemComponents
Constants ¶
const TechnicalIDPrefix = "shoot--"
TechnicalIDPrefix is a prefix used for a shoot's technical id.
Variables ¶
This section is empty.
Functions ¶
func ComputeRequiredExtensions ¶
func ComputeRequiredExtensions(shoot *gardencorev1beta1.Shoot, seed *gardencorev1beta1.Seed, controllerRegistrationList []*gardencorev1beta1.ControllerRegistration, internalDomain, externalDomain *garden.Domain) sets.String
ComputeRequiredExtensions compute the extension kind/type combinations that are required for the reconciliation flow.
func ComputeTechnicalID ¶
func ComputeTechnicalID(projectName string, shoot *gardencorev1beta1.Shoot) string
ComputeTechnicalID determines the technical id of that Shoot which is later used for the name of the namespace and for tagging all the resources created in the infrastructure.
func ConstructExternalClusterDomain ¶
func ConstructExternalClusterDomain(shoot *gardencorev1beta1.Shoot) *string
ConstructExternalClusterDomain constructs the external Shoot cluster domain, i.e. the domain which will be put into the Kubeconfig handed out to the user.
func ConstructExternalDomain ¶
func ConstructExternalDomain(ctx context.Context, client client.Client, shoot *gardencorev1beta1.Shoot, shootSecret *corev1.Secret, defaultDomains []*garden.Domain) (*garden.Domain, error)
ConstructExternalDomain constructs an object containing all relevant information of the external domain that shall be used for a shoot cluster - based on the configuration of the Garden cluster and the shoot itself.
func ConstructInternalClusterDomain ¶
func ConstructInternalClusterDomain(shootName, shootProject string, internalDomain *garden.Domain) string
ConstructInternalClusterDomain constructs the internal base domain pof this shoot cluster. It is only used for internal purposes (all kubeconfigs except the one which is received by the user will only talk with the kube-apiserver via a DNS record of domain). In case the given <internalDomain> already contains "internal", the result is constructed as "<shootName>.<shootProject>.<internalDomain>." In case it does not, the word "internal" will be appended, resulting in "<shootName>.<shootProject>.internal.<internalDomain>".
func IsIncompleteDNSConfigError ¶
IsIncompleteDNSConfigError returns true if the error indicates that not the DNS config is incomplete.
func StatusValue ¶
StatusValue returns the value of the given Status.
Types ¶
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) WithCloudProfileObjectFromCluster ¶
func (b *Builder) WithCloudProfileObjectFromCluster(seedClient kubernetes.Interface, shootNamespace string) *Builder
WithCloudProfileObjectFromCluster sets the cloudProfileFunc attribute at the Builder.
func (*Builder) WithCloudProfileObjectFromReader ¶
WithCloudProfileObjectFromReader sets the cloudProfileFunc attribute at the Builder after fetching it from the given API reader.
func (*Builder) WithDefaultDomains ¶
WithDefaultDomains sets the defaultDomains attribute at the Builder.
func (*Builder) WithDisableDNS ¶
WithDisableDNS sets the disableDNS attribute at the Builder.
func (*Builder) WithInternalDomain ¶
WithInternalDomain sets the internalDomain attribute at the Builder.
func (*Builder) WithProjectName ¶
WithProjectName sets the projectName attribute at the Builder.
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) WithShootObjectFromLister ¶
func (b *Builder) WithShootObjectFromLister(shootLister gardencorelisters.ShootLister, namespace, name string) *Builder
WithShootObjectFromLister sets the shootObjectFunc attribute at the Builder after fetching it from the given lister.
func (*Builder) WithShootSecret ¶
WithShootSecret sets the shootSecretFunc attribute at the Builder.
type Components ¶
type Components struct { BackupEntry component.DeployWaiter ClusterIdentity component.Deployer Extensions *Extensions ControlPlane *ControlPlane SystemComponents *SystemComponents }
Components contains different components deployed in the Shoot cluster.
type ControlPlane ¶
type ControlPlane struct { EtcdMain etcd.Etcd EtcdEvents etcd.Etcd KubeAPIServerService component.DeployWaiter KubeAPIServerSNI component.DeployWaiter KubeAPIServerSNIPhase component.Phase KubeScheduler kubescheduler.KubeScheduler KubeControllerManager kubecontrollermanager.KubeControllerManager ClusterAutoscaler clusterautoscaler.ClusterAutoscaler ResourceManager resourcemanager.ResourceManager KonnectivityServer konnectivity.KonnectivityServer }
ControlPlane contains references to K8S control plane components.
type DNS ¶
type DNS struct { ExternalOwner component.DeployWaiter ExternalProvider component.DeployWaiter ExternalEntry component.DeployWaiter InternalOwner component.DeployWaiter InternalProvider component.DeployWaiter InternalEntry component.DeployWaiter AdditionalProviders map[string]component.DeployWaiter NginxOwner component.DeployWaiter NginxEntry component.DeployWaiter }
DNS contains references to internal and external DNSProvider and DNSEntry deployers.
type Extensions ¶
type Extensions struct { BackupEntry extensionsbackupentry.Interface ContainerRuntime containerruntime.Interface ControlPlane controlplane.Interface ControlPlaneExposure controlplane.Interface DNS *DNS Extension extension.Interface Infrastructure infrastructure.Interface Network component.DeployMigrateWaiter OperatingSystemConfig operatingsystemconfig.Interface Worker worker.Interface }
Extensions contains references to extension resources.
type IncompleteDNSConfigError ¶
type IncompleteDNSConfigError struct{}
IncompleteDNSConfigError is a custom error type.
func (*IncompleteDNSConfigError) Error ¶
func (e *IncompleteDNSConfigError) Error() string
Error prints the error message of the IncompleteDNSConfigError error.
type Networks ¶
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 ¶
func ToNetworks(s *gardencorev1beta1.Shoot) (*Networks, error)
ToNetworks return a network with computed cidrs and ClusterIPs for a Shoot
type Shoot ¶
type Shoot struct { Info *gardencorev1beta1.Shoot Secret *corev1.Secret CloudProfile *gardencorev1beta1.CloudProfile SeedNamespace string KubernetesVersion *semver.Version GardenerVersion *semver.Version DisableDNS bool InternalClusterDomain string ExternalClusterDomain *string ExternalDomain *garden.Domain Purpose gardencorev1beta1.ShootPurpose WantsClusterAutoscaler bool WantsVerticalPodAutoscaler bool WantsAlertmanager bool IgnoreAlerts bool HibernationEnabled bool KonnectivityTunnelEnabled bool NodeLocalDNSEnabled bool Networks *Networks Components *Components ETCDEncryption *etcdencryption.EncryptionConfig }
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 ¶
func (s *Shoot) ComputeOutOfClusterAPIServerAddress(apiServerAddress string, 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) GetExtensionComponents ¶
func (s *Shoot) GetExtensionComponents() []component.DeployMigrateWaiter
GetExtensionComponents returns a list of component.DeployMigrateWaiters of all extension components.
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) GetNodeNetwork ¶
GetNodeNetwork returns the nodes network CIDR for the Shoot cluster. If the infrastructure extension controller has generated a nodes network then this CIDR will take priority. Otherwise, the nodes network CIDR specified in the shoot will be returned (if possible). If no CIDR was specified then nil is returned.
func (*Shoot) GetReplicas ¶
GetReplicas returns the given <wokenUp> number if the shoot is not hibernated, or zero otherwise.
func (*Shoot) GetWorkerNames ¶
GetWorkerNames returns a list of names of the worker groups in the Shoot manifest.
func (*Shoot) IPVSEnabled ¶
IPVSEnabled returns true if IPVS is enabled for the shoot.
type Status ¶
type Status string
Status is the status of a shoot used in the common.ShootStatus label.
const ( // StatusHealthy indicates that a shoot is considered healthy. StatusHealthy Status = "healthy" // StatusProgressing indicates that a shoot was once healthy, currently experienced an issue // but is still within a predefined grace period. StatusProgressing Status = "progressing" // StatusUnhealthy indicates that a shoot is considered unhealthy. StatusUnhealthy Status = "unhealthy" )
func BoolToStatus ¶
BoolToStatus converts the given boolean to a Status. For true values, it returns StatusHealthy. Otherwise, it returns StatusUnhealthy.
func ComputeConditionStatus ¶
func ComputeConditionStatus(conditions ...gardencorev1beta1.Condition) Status
ComputeConditionStatus computes a shoot Label Status from the given Conditions. By default, the Status is StatusHealthy. The condition status is converted to a Status by using ConditionStatusToStatus. Always the worst status of the combined states wins.
func ComputeStatus ¶
func ComputeStatus(lastOperation *gardencorev1beta1.LastOperation, lastErrors []gardencorev1beta1.LastError, conditions ...gardencorev1beta1.Condition) Status
ComputeStatus computes the label Status of a shoot depending on the given lastOperation, lastError and conditions.
func ConditionStatusToStatus ¶
func ConditionStatusToStatus(status gardencorev1beta1.ConditionStatus) Status
ConditionStatusToStatus converts the given ConditionStatus to a shoot label Status.
type SystemComponents ¶
type SystemComponents struct { Namespaces component.DeployWaiter MetricsServer metricsserver.MetricsServer }
SystemComponents contains references to system components.