Documentation ¶
Index ¶
- func BootstrapCluster(k8sGardenClient kubernetes.Interface, seed *Seed, ...) error
- func DesiredExcessCapacity() int
- func GetFluentdReplicaCount(k8sSeedClient kubernetes.Interface) (int32, error)
- func GetSeedClient(ctx context.Context, gardenClient client.Client, ...) (kubernetes.Interface, error)
- func GetWildcardCertificate(ctx context.Context, c client.Client) (*corev1.Secret, error)
- type Builder
- func (b *Builder) Build() (*Seed, error)
- func (b *Builder) WithSeedObject(seedObject *gardencorev1beta1.Seed) *Builder
- func (b *Builder) WithSeedObjectFromLister(seedLister gardencorelisters.SeedLister, seedName string) *Builder
- func (b *Builder) WithSeedSecret(seedSecret *corev1.Secret) *Builder
- func (b *Builder) WithSeedSecretFromClient(ctx context.Context, c client.Client) *Builder
- type Seed
- func (s *Seed) CheckMinimumK8SVersion(ctx context.Context, k8sGardenClient client.Client, ...) (string, error)
- func (s *Seed) GetIngressFQDN(subDomain string) string
- func (s *Seed) GetIngressFQDNDeprecated(subDomain, shootName, projectName string) string
- func (s *Seed) GetValidVolumeSize(size string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapCluster ¶
func BootstrapCluster(k8sGardenClient kubernetes.Interface, seed *Seed, config *config.GardenletConfiguration, secrets map[string]*corev1.Secret, imageVector imagevector.ImageVector, componentImageVectors imagevector.ComponentImageVectors) error
BootstrapCluster bootstraps a Seed cluster and deploys various required manifests.
func DesiredExcessCapacity ¶
func DesiredExcessCapacity() int
DesiredExcessCapacity computes the required resources (CPU and memory) required to deploy new shoot control planes (on the seed) in terms of reserve-excess-capacity deployment replicas. Each deployment replica currently corresponds to resources of (request/limits) 2 cores of CPU and 6Gi of RAM. This roughly corresponds to a single, moderately large control-plane. The logic for computation of desired excess capacity corresponds to deploying 2 such shoot control planes. This excess capacity can be used for hosting new control planes or newly vertically scaled old control-planes.
func GetFluentdReplicaCount ¶
func GetFluentdReplicaCount(k8sSeedClient kubernetes.Interface) (int32, error)
GetFluentdReplicaCount returns fluentd stateful set replica count if it exists, otherwise - the default (1). As fluentd HPA manages the number of replicas, we have to make sure to do not override HPA scaling.
func GetSeedClient ¶ added in v0.33.0
func GetSeedClient(ctx context.Context, gardenClient client.Client, clientConnection componentbaseconfig.ClientConnectionConfiguration, inCluster bool, seedName string) (kubernetes.Interface, error)
GetSeedClient returns the Kubernetes client for the seed cluster. If `inCluster` is set to true then the in-cluster client is returned, otherwise the secret reference of the given `seedName` is read and a client with the stored kubeconfig is created.
Types ¶
type Builder ¶ added in v1.4.0
type Builder struct {
// contains filtered or unexported fields
}
Builder is an object that builds Seed objects.
func (*Builder) WithSeedObject ¶ added in v1.4.0
func (b *Builder) WithSeedObject(seedObject *gardencorev1beta1.Seed) *Builder
WithSeedObject sets the seedObjectFunc attribute at the Builder.
func (*Builder) WithSeedObjectFromLister ¶ added in v1.4.0
func (b *Builder) WithSeedObjectFromLister(seedLister gardencorelisters.SeedLister, seedName string) *Builder
WithSeedObjectFromLister sets the seedObjectFunc attribute at the Builder after fetching it from the given lister.
func (*Builder) WithSeedSecret ¶ added in v1.4.0
WithSeedSecret sets the seedSecretFunc attribute at the Builder.
type Seed ¶
type Seed struct { Info *gardencorev1beta1.Seed Secret *corev1.Secret }
Seed is an object containing information about a Seed cluster.
func (*Seed) CheckMinimumK8SVersion ¶
func (s *Seed) CheckMinimumK8SVersion(ctx context.Context, k8sGardenClient client.Client, clientConnection componentbaseconfig.ClientConnectionConfiguration, inCluster bool) (string, error)
CheckMinimumK8SVersion checks whether the Kubernetes version of the Seed cluster fulfills the minimal requirements.
func (*Seed) GetIngressFQDN ¶
GetIngressFQDN returns the fully qualified domain name of ingress sub-resource for the Seed cluster. The end result is '<subDomain>.<shootName>.<projectName>.<seed-ingress-domain>'.
func (*Seed) GetIngressFQDNDeprecated ¶ added in v0.34.0
GetIngressFQDNDeprecated returns the fully qualified domain name of ingress sub-resource for the Seed cluster. The end result is '<subDomain>.<shootName>.<projectName>.<seed-ingress-domain>'. Only necessary to renew certificates for Alertmanager, Grafana, Kibana, Prometheus TODO: (timuthy) remove in future version.
func (*Seed) GetValidVolumeSize ¶
GetValidVolumeSize is to get a valid volume size. If the given size is smaller than the minimum volume size permitted by cloud provider on which seed cluster is running, it will return the minimum size.