gardener: github.com/gardener/gardener/pkg/operation Index | Files | Directories

package operation

import "github.com/gardener/gardener/pkg/operation"

Index

Package Files

operation.go types.go

type Operation Uses

type Operation struct {
    Config                    *config.GardenletConfiguration
    Logger                    *logrus.Entry
    GardenerInfo              *gardencorev1beta1.Gardener
    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
    K8sGardenClient           kubernetes.Interface
    K8sGardenCoreInformers    gardencoreinformers.Interface
    K8sSeedClient             kubernetes.Interface
    K8sShootClient            kubernetes.Interface
    ChartApplierGarden        kubernetes.ChartApplier
    ChartApplierSeed          kubernetes.ChartApplier
    ChartApplierShoot         kubernetes.ChartApplier
    APIServerAddress          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 New Uses

func New(shoot *gardencorev1beta1.Shoot, config *config.GardenletConfiguration, logger *logrus.Entry, k8sGardenClient kubernetes.Interface, k8sGardenCoreInformers gardencoreinformers.Interface, gardenerInfo *gardencorev1beta1.Gardener, secretsMap map[string]*corev1.Secret, imageVector imagevector.ImageVector) (*Operation, error)

New creates a new operation object with a Shoot resource object.

func (*Operation) CleanShootTaskError Uses

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

CleanShootTaskError removes the error with taskID from the Shoot's status.LastErrors array. If the status.LastErrors array is empty then status.LastError is also removed.

func (*Operation) ComputeAlertManagerHost Uses

func (o *Operation) ComputeAlertManagerHost() string

ComputeAlertManagerHost computes the host for alert manager.

func (*Operation) ComputeAlertManagerHostDeprecated Uses

func (o *Operation) ComputeAlertManagerHostDeprecated() string

ComputeAlertManagerHostDeprecated computes the host for alert manager. TODO: timuthy - remove in the future. Old AlertManager host is retained for migration reasons.

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) ComputeGrafanaOperatorsHostDeprecated Uses

func (o *Operation) ComputeGrafanaOperatorsHostDeprecated() string

ComputeGrafanaOperatorsHostDeprecated computes the host for users Grafana. TODO: timuthy - remove in the future. Old Grafana host is retained for migration reasons.

func (*Operation) ComputeGrafanaUsersHost Uses

func (o *Operation) ComputeGrafanaUsersHost() string

ComputeGrafanaUsersHost computes the host for operators Grafana.

func (*Operation) ComputeGrafanaUsersHostDeprecated Uses

func (o *Operation) ComputeGrafanaUsersHostDeprecated() string

ComputeGrafanaUsersHostDeprecated computes the host for operators Grafana. TODO: timuthy - remove in the future. Old Grafana host is retained for migration reasons.

func (*Operation) ComputeIngressHost Uses

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

ComputeIngressHost computes the host for a given prefix.

func (*Operation) ComputeIngressHostDeprecated Uses

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

ComputeIngressHostDeprecated computes the host for a given prefix. TODO: timuthy - remove in the future. Only retained for migration reasons.

func (*Operation) ComputeKibanaHost Uses

func (o *Operation) ComputeKibanaHost() string

ComputeKibanaHost computes the host for kibana.

func (*Operation) ComputeKibanaHostDeprecated Uses

func (o *Operation) ComputeKibanaHostDeprecated() string

ComputeKibanaHostDeprecated computes the host for kibana. TODO: timuthy - remove in the future. Old Kibana host is retained for migration reasons.

func (*Operation) ComputeKibanaHosts Uses

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

ComputeKibanaHosts computes the hosts for kibana.

func (*Operation) ComputePrometheusHost Uses

func (o *Operation) ComputePrometheusHost() string

ComputePrometheusHost computes the host for prometheus.

func (*Operation) ComputePrometheusHostDeprecated Uses

func (o *Operation) ComputePrometheusHostDeprecated() string

ComputePrometheusHostDeprecated computes the host for prometheus. TODO: timuthy - remove in the future. Old Prometheus host is retained for migration reasons.

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) InitializeMonitoringClient Uses

func (o *Operation) InitializeMonitoringClient() error

InitializeMonitoringClient will read the Prometheus ingress auth and tls secrets from the Seed cluster, which are containing the cert to secure the connection and the credentials authenticate against the Shoot Prometheus. With those certs and credentials, a Prometheus client API will be created and attached to the existing Operation object.

func (*Operation) InitializeSeedClients Uses

func (o *Operation) InitializeSeedClients() 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() 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) 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) 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) SyncClusterResourceToSeed Uses

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

SyncClusterResourceToSeed creates or updates the `Cluster` extension resource for the shoot in the seed cluster. It contains the shoot, seed, and cloudprofile specification.

Directories

PathSynopsis
botanist
botanist/component
botanist/component/fakePackage fake is a generated GoMock package.
common
etcdencryption
garden
seed
shoot

Package operation imports 36 packages (graph) and is imported by 2 packages. Updated 2020-04-01. Refresh now. Tools for package owners.