gardener: Index | Files | Directories

package operation

import ""


Package Files

operation.go types.go

type Builder Uses

type Builder struct {
    // contains filtered or unexported fields

Builder is an object that builds Operation objects.

func NewBuilder Uses

func NewBuilder() *Builder

NewBuilder returns a new Builder.

func (*Builder) Build Uses

func (b *Builder) Build(ctx context.Context, clientMap clientmap.ClientMap) (*Operation, error)

Build initializes a new Operation object.

func (*Builder) WithChartsRootPath Uses

func (b *Builder) WithChartsRootPath(chartsRootPath string) *Builder

WithChartsRootPath sets the ChartsRootPath attribute at the Builder. Mainly used for testing. Optional.

func (*Builder) WithConfig Uses

func (b *Builder) WithConfig(cfg *config.GardenletConfiguration) *Builder

WithConfig sets the configFunc attribute at the Builder.

func (*Builder) WithGarden Uses

func (b *Builder) WithGarden(g *garden.Garden) *Builder

WithGarden sets the gardenFunc attribute at the Builder.

func (*Builder) WithGardenClusterIdentity Uses

func (b *Builder) WithGardenClusterIdentity(gardenClusterIdentity string) *Builder

WithGardenClusterIdentity sets the identity of the Garden cluster as attribute at the Builder.

func (*Builder) WithGardenFrom Uses

func (b *Builder) WithGardenFrom(k8sGardenCoreInformers gardencoreinformers.Interface, namespace string) *Builder

WithGardenFrom sets the gardenFunc attribute at the Builder which will build a new Garden object.

func (*Builder) WithGardenerInfo Uses

func (b *Builder) WithGardenerInfo(gardenerInfo *gardencorev1beta1.Gardener) *Builder

WithGardenerInfo sets the gardenerInfoFunc attribute at the Builder.

func (*Builder) WithImageVector Uses

func (b *Builder) WithImageVector(imageVector imagevector.ImageVector) *Builder

WithImageVector sets the imageVectorFunc attribute at the Builder.

func (*Builder) WithLogger Uses

func (b *Builder) WithLogger(logger *logrus.Entry) *Builder

WithLogger sets the loggerFunc attribute at the Builder.

func (*Builder) WithSecrets Uses

func (b *Builder) WithSecrets(secrets map[string]*corev1.Secret) *Builder

WithSecrets sets the secretsFunc attribute at the Builder.

func (*Builder) WithSeed Uses

func (b *Builder) WithSeed(s *seed.Seed) *Builder

WithSeed sets the seedFunc attribute at the Builder.

func (*Builder) WithSeedFrom Uses

func (b *Builder) WithSeedFrom(k8sGardenCoreInformers gardencoreinformers.Interface, seedName string) *Builder

WithSeedFrom sets the seedFunc attribute at the Builder which will build a new Seed object.

func (*Builder) WithShoot Uses

func (b *Builder) WithShoot(s *shoot.Shoot) *Builder

WithShoot sets the shootFunc attribute at the Builder.

func (*Builder) WithShootFrom Uses

func (b *Builder) WithShootFrom(k8sGardenCoreInformers gardencoreinformers.Interface, s *gardencorev1beta1.Shoot) *Builder

WithShootFrom sets the shootFunc attribute at the Builder which will build a new Shoot object.

func (*Builder) WithShootFromCluster Uses

func (b *Builder) WithShootFromCluster(k8sGardenCoreInformers gardencoreinformers.Interface, seedClient kubernetes.Interface, s *gardencorev1beta1.Shoot) *Builder

WithShootFromCluster sets the shootFunc attribute at the Builder which will build a new Shoot object constructed from the cluster resource. The shoot status is still taken from the passed `shoot`, though.

type Operation Uses

type Operation struct {
    Config                    *config.GardenletConfiguration
    Logger                    *logrus.Entry
    GardenerInfo              *gardencorev1beta1.Gardener
    GardenClusterIdentity     string
    Secrets                   map[string]*corev1.Secret
    CheckSums                 map[string]string
    ImageVector               imagevector.ImageVector
    Garden                    *garden.Garden
    Seed                      *seed.Seed
    Shoot                     *shoot.Shoot
    ShootState                *gardencorev1alpha1.ShootState
    ShootedSeed               *gardencorev1beta1helper.ShootedSeed
    ClientMap                 clientmap.ClientMap
    K8sGardenClient           kubernetes.Interface
    K8sSeedClient             kubernetes.Interface
    K8sShootClient            kubernetes.Interface
    ChartsRootPath            string
    APIServerAddress          string
    APIServerClusterIP        string
    APIServerHealthCheckToken string
    SeedNamespaceObject       *corev1.Namespace
    MonitoringClient          prometheusclient.API

    // ControlPlaneWildcardCert is a wildcard tls certificate which is issued for the seed's ingress domain.
    ControlPlaneWildcardCert *corev1.Secret

Operation contains all data required to perform an operation on a Shoot cluster.

func (*Operation) CleanShootTaskErrorAndUpdateStatusLabel Uses

func (o *Operation) CleanShootTaskErrorAndUpdateStatusLabel(ctx context.Context, taskID string)

CleanShootTaskErrorAndUpdateStatusLabel removes the error with taskID from the Shoot's status.LastErrors array. If the status.LastErrors array is empty then status.LastErrors is also removed. It also re-evaluates the shoot status in case the last error list is empty now, and if necessary, updates the status label on the shoot.

func (*Operation) ComputeAlertManagerHost Uses

func (o *Operation) ComputeAlertManagerHost() string

ComputeAlertManagerHost computes the host for alert manager.

func (*Operation) ComputeAlertManagerHosts Uses

func (o *Operation) ComputeAlertManagerHosts() []string

ComputeAlertManagerHosts computes the host for alert manager.

func (*Operation) ComputeGrafanaHosts Uses

func (o *Operation) ComputeGrafanaHosts() []string

ComputeGrafanaHosts computes the host for both grafanas.

func (*Operation) ComputeGrafanaOperatorsHost Uses

func (o *Operation) ComputeGrafanaOperatorsHost() string

ComputeGrafanaOperatorsHost computes the host for users Grafana.

func (*Operation) ComputeGrafanaUsersHost Uses

func (o *Operation) ComputeGrafanaUsersHost() string

ComputeGrafanaUsersHost computes the host for operators Grafana.

func (*Operation) ComputeIngressHost Uses

func (o *Operation) ComputeIngressHost(prefix string) string

ComputeIngressHost computes the host for a given prefix.

func (*Operation) ComputePrometheusHost Uses

func (o *Operation) ComputePrometheusHost() string

ComputePrometheusHost computes the host for prometheus.

func (*Operation) ComputePrometheusHosts Uses

func (o *Operation) ComputePrometheusHosts() []string

ComputePrometheusHosts computes the hosts for prometheus.

func (*Operation) DeleteClusterResourceFromSeed Uses

func (o *Operation) DeleteClusterResourceFromSeed(ctx context.Context) error

DeleteClusterResourceFromSeed deletes the `Cluster` extension resource for the shoot in the seed cluster.

func (*Operation) EnsureShootStateExists Uses

func (o *Operation) EnsureShootStateExists(ctx context.Context) error

EnsureShootStateExists creates the ShootState resource for the corresponding shoot and sets its ownerReferences to the Shoot.

func (*Operation) GetSecretKeysOfRole Uses

func (o *Operation) GetSecretKeysOfRole(kind string) []string

GetSecretKeysOfRole returns a list of keys which are present in the Garden Secrets map and which are prefixed with <kind>.

func (*Operation) InitializeSeedClients Uses

func (o *Operation) InitializeSeedClients(ctx context.Context) error

InitializeSeedClients will use the Garden Kubernetes client to read the Seed Secret in the Garden cluster which contains a Kubeconfig that can be used to authenticate against the Seed cluster. With it, a Kubernetes client as well as a Chart renderer for the Seed cluster will be initialized and attached to the already existing Operation object.

func (*Operation) InitializeShootClients Uses

func (o *Operation) InitializeShootClients(ctx context.Context) error

InitializeShootClients will use the Seed Kubernetes client to read the gardener Secret in the Seed cluster which contains a Kubeconfig that can be used to authenticate against the Shoot cluster. With it, a Kubernetes client as well as a Chart renderer for the Shoot cluster will be initialized and attached to the already existing Operation object.

func (*Operation) InjectSeedSeedImages Uses

func (o *Operation) InjectSeedSeedImages(values map[string]interface{}, names ...string) (map[string]interface{}, error)

InjectSeedSeedImages injects images that shall run on the Seed and target the Seed's Kubernetes version.

func (*Operation) InjectSeedShootImages Uses

func (o *Operation) InjectSeedShootImages(values map[string]interface{}, names ...string) (map[string]interface{}, error)

InjectSeedShootImages injects images that shall run on the Seed but target the Shoot's Kubernetes version.

func (*Operation) InjectShootShootImages Uses

func (o *Operation) InjectShootShootImages(values map[string]interface{}, names ...string) (map[string]interface{}, error)

InjectShootShootImages injects images that shall run on the Shoot and target the Shoot's Kubernetes version.

func (*Operation) IsAPIServerRunning Uses

func (o *Operation) IsAPIServerRunning(ctx context.Context) (bool, error)

IsAPIServerRunning checks if the API server of the Shoot currently running (not scaled-down/deleted).

func (*Operation) ReportShootProgress Uses

func (o *Operation) ReportShootProgress(ctx context.Context, stats *flow.Stats)

ReportShootProgress will update the last operation object in the Shoot manifest `status` section by the current progress of the Flow execution.

func (*Operation) SaveGardenerResourcesInShootState Uses

func (o *Operation) SaveGardenerResourcesInShootState(ctx context.Context, resourceList gardencorev1alpha1helper.GardenerResourceDataList) error

SaveGardenerResourcesInShootState saves the provided GardenerResourcesDataList in the ShootState's `gardener` field

func (*Operation) SeedVersion Uses

func (o *Operation) SeedVersion() string

SeedVersion is a shorthand for the kubernetes version of the K8sSeedClient.

func (*Operation) ShootVersion Uses

func (o *Operation) ShootVersion() string

ShootVersion is a shorthand for the desired kubernetes version of the operation's shoot.

func (*Operation) SwitchBackupEntryToTargetSeed Uses

func (o *Operation) SwitchBackupEntryToTargetSeed(ctx context.Context) error

SwitchBackupEntryToTargetSeed changes the BackupEntry in the Garden cluster to the Target Seed and removes it from the Source Seed


botanist/matchersthis file is copy of with some modifications for the webhook matching use-case.
seed/scheduler/configuratorPackage configurator contains the Configurator interface It is a separate package to avoid dependency cycle.
seed/scheduler/v18Package v18 a kube-scheduler specific configuration for 1.18 Kubernetes version.

Package operation imports 32 packages (graph) and is imported by 2 packages. Updated 2021-01-27. Refresh now. Tools for package owners.