seed

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 33 Imported by: 0

Documentation

Index

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, numberOfAssociatedShoots int) error

BootstrapCluster bootstraps a Seed cluster and deploys various required manifests.

func DesiredExcessCapacity

func DesiredExcessCapacity(numberOfAssociatedShoots int) 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) 500m of CPU and 1200Mi of Memory. ReplicasRequiredToSupportSingleShoot is 4 which is 2000m of CPU and 4800Mi of RAM. The logic for computation of desired excess capacity corresponds to either deploying 2 new shoot control planes or 3% of existing shoot control planes of current number of shoots deployed in seed (3 if current shoots are 100), whichever of the two is larger

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.

func GetWildcardCertificate added in v0.34.0

func GetWildcardCertificate(ctx context.Context, c client.Client) (*corev1.Secret, error)

GetWildcardCertificate gets the wildcard certificate for the seed's ingress domain. Nil is returned if no wildcard certificate is configured.

Types

type Seed

type Seed struct {
	Info   *gardencorev1beta1.Seed
	Secret *corev1.Secret
	// contains filtered or unexported fields
}

Seed is an object containing information about a Seed cluster.

func List

func List(k8sGardenClient kubernetes.Interface, k8sGardenCoreInformers gardencoreinformers.Interface) ([]*Seed, error)

List returns a list of Seed clusters (along with the referenced secrets).

func New

func New(k8sGardenClient kubernetes.Interface, k8sGardenCoreInformers gardencoreinformers.Interface, seed *gardencorev1beta1.Seed) (*Seed, error)

New takes a <k8sGardenClient>, the <k8sGardenCoreInformers> and a <seed> manifest, and creates a new Seed representation. It will add the CloudProfile and identify the cloud provider.

func NewFromName

func NewFromName(k8sGardenClient kubernetes.Interface, k8sGardenCoreInformers gardencoreinformers.Interface, seedName string) (*Seed, error)

NewFromName creates a new Seed object based on the name of a Seed manifest.

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

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

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

func (s *Seed) GetIngressFQDNDeprecated(subDomain, shootName, projectName string) string

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

func (s *Seed) GetValidVolumeSize(size string) string

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.

func (*Seed) MustReserveExcessCapacity

func (s *Seed) MustReserveExcessCapacity(must bool)

MustReserveExcessCapacity configures whether we have to reserve excess capacity in the Seed cluster.

Jump to

Keyboard shortcuts

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