seed

package
v1.56.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 86 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeNginxIngressClass added in v1.41.0

func ComputeNginxIngressClass(seed *Seed, kubernetesVersion *string) (string, error)

ComputeNginxIngressClass returns the IngressClass for the Nginx Ingress controller

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.

func ResizeOrDeleteLokiDataVolumeIfStorageNotTheSame added in v1.43.0

func ResizeOrDeleteLokiDataVolumeIfStorageNotTheSame(ctx context.Context, log logr.Logger, k8sClient client.Client, newStorageQuantity resource.Quantity) error

ResizeOrDeleteLokiDataVolumeIfStorageNotTheSame updates the garden Loki PVC if passed storage value is not the same as the current one. Caution: If the passed storage capacity is less than the current one the existing PVC and its PV will be deleted.

func RunDeleteSeedFlow added in v1.20.0

func RunDeleteSeedFlow(
	ctx context.Context,
	log logr.Logger,
	gardenClient client.Client,
	seedClientSet kubernetes.Interface,
	seed *Seed,
	conf *config.GardenletConfiguration,
) error

RunDeleteSeedFlow deletes certain resources from the seed cluster.

func RunReconcileSeedFlow added in v1.20.0

func RunReconcileSeedFlow(
	ctx context.Context,
	log logr.Logger,
	gardenClient client.Client,
	seedClientSet kubernetes.Interface,
	seed *Seed,
	secrets map[string]*corev1.Secret,
	imageVector imagevector.ImageVector,
	componentImageVectors imagevector.ComponentImageVectors,
	conf *config.GardenletConfiguration,
) error

RunReconcileSeedFlow bootstraps a Seed cluster and deploys various required manifests.

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 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) (*Seed, error)

Build initializes a new Seed object.

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) WithSeedObjectFrom added in v1.30.0

func (b *Builder) WithSeedObjectFrom(gardenClient client.Reader, seedName string) *Builder

WithSeedObjectFrom sets the seedObjectFunc attribute at the Builder after fetching it from the given lister.

type Components added in v1.50.0

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

Components contains different components deployed in the Seed cluster.

type Seed

type Seed struct {
	LoadBalancerServiceAnnotations map[string]string
	// contains filtered or unexported fields
}

Seed is an object containing information about a Seed cluster.

func (*Seed) CheckMinimumK8SVersion

func (s *Seed) CheckMinimumK8SVersion(version string) (string, error)

CheckMinimumK8SVersion checks whether the Kubernetes version of the Seed cluster fulfills the minimal requirements.

func (*Seed) GetInfo added in v1.31.0

func (s *Seed) GetInfo() *gardencorev1beta1.Seed

GetInfo returns the seed resource of this Seed in a concurrency safe way. This method should be used only for reading the data of the returned seed resource. The returned seed resource MUST NOT BE MODIFIED (except in test code) since this might interfere with other concurrent reads and writes. To properly update the seed resource of this Seed use UpdateInfo or UpdateInfoStatus.

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) 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) IngressDomain added in v1.15.0

func (s *Seed) IngressDomain() string

IngressDomain returns the ingress domain for the seed.

func (*Seed) SetInfo added in v1.31.0

func (s *Seed) SetInfo(seed *gardencorev1beta1.Seed)

SetInfo sets the seed resource of this Seed in a concurrency safe way. This method is not protected by a mutex and does not update the seed resource in the cluster and so should be used only in exceptional situations, or as a convenience in test code. The seed 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 seed resource of this Seed use UpdateInfo or UpdateInfoStatus.

func (*Seed) UpdateInfo added in v1.31.0

func (s *Seed) UpdateInfo(ctx context.Context, c client.Client, useStrategicMerge bool, f func(*gardencorev1beta1.Seed) error) error

UpdateInfo updates the seed resource of this Seed in a concurrency safe way, using the given context, client, and mutate function. It copies the current seed 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 (*Seed) UpdateInfoStatus added in v1.31.0

func (s *Seed) UpdateInfoStatus(ctx context.Context, c client.Client, useStrategicMerge bool, f func(*gardencorev1beta1.Seed) error) error

UpdateInfoStatus updates the status of the seed resource of this Seed in a concurrency safe way, using the given context, client, and mutate function. It copies the current seed 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.

Jump to

Keyboard shortcuts

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