Documentation ¶
Index ¶
- type Operation
- func (o *Operation) ApplyChartGarden(chartPath, namespace, name string, ...) error
- func (o *Operation) ApplyChartSeed(chartPath, namespace, name string, ...) error
- func (o *Operation) ChartInitializer(chartName string, values map[string]interface{}) terraformer.Initializer
- func (o *Operation) ComputeAlertManagerHost() string
- func (o *Operation) ComputeGrafanaHosts() []string
- func (o *Operation) ComputeGrafanaOperatorsHost() string
- func (o *Operation) ComputeGrafanaUsersHost() string
- func (o *Operation) ComputeIngressHost(prefix string) string
- func (o *Operation) ComputeKibanaHost() string
- func (o *Operation) ComputePrometheusHost() string
- func (o *Operation) DeleteClusterResourceFromSeed(ctx context.Context) error
- func (o *Operation) GetSecretKeysOfRole(kind string) []string
- func (o *Operation) InitializeMonitoringClient() error
- func (o *Operation) InitializeSeedClients() error
- func (o *Operation) InitializeShootClients() error
- func (o *Operation) InjectSeedSeedImages(values map[string]interface{}, names ...string) (map[string]interface{}, error)
- func (o *Operation) InjectSeedShootImages(values map[string]interface{}, names ...string) (map[string]interface{}, error)
- func (o *Operation) InjectShootShootImages(values map[string]interface{}, names ...string) (map[string]interface{}, error)
- func (o *Operation) NewBackupInfrastructureTerraformer() (*terraformer.Terraformer, error)
- func (o *Operation) NewShootTerraformer(purpose string) (*terraformer.Terraformer, error)
- func (o *Operation) ReportBackupInfrastructureProgress(stats *flow.Stats)
- func (o *Operation) ReportShootProgress(stats *flow.Stats)
- func (o *Operation) SeedVersion() string
- func (o *Operation) ShootVersion() string
- func (o *Operation) SyncClusterResourceToSeed(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct { Logger *logrus.Entry GardenerInfo *gardenv1beta1.Gardener Secrets map[string]*corev1.Secret CheckSums map[string]string ImageVector imagevector.ImageVector Garden *garden.Garden Seed *seed.Seed Shoot *shoot.Shoot ShootedSeed *helper.ShootedSeed K8sGardenClient kubernetes.Interface K8sGardenInformers gardeninformers.Interface K8sSeedClient kubernetes.Interface K8sShootClient kubernetes.Interface ChartApplierGarden kubernetes.ChartApplier ChartApplierSeed kubernetes.ChartApplier ChartApplierShoot kubernetes.ChartApplier APIServerAddress string SeedNamespaceObject *corev1.Namespace BackupInfrastructure *gardenv1beta1.BackupInfrastructure ShootBackup *config.ShootBackup MonitoringClient prometheusclient.API }
Operation contains all data required to perform an operation on a Shoot cluster.
func New ¶
func New(shoot *gardenv1beta1.Shoot, logger *logrus.Entry, k8sGardenClient kubernetes.Interface, k8sGardenInformers gardeninformers.Interface, gardenerInfo *gardenv1beta1.Gardener, secretsMap map[string]*corev1.Secret, imageVector imagevector.ImageVector, shootBackup *config.ShootBackup) (*Operation, error)
New creates a new operation object with a Shoot resource object.
func NewWithBackupInfrastructure ¶
func NewWithBackupInfrastructure(backupInfrastructure *gardenv1beta1.BackupInfrastructure, logger *logrus.Entry, k8sGardenClient kubernetes.Interface, k8sGardenInformers gardeninformers.Interface, gardenerInfo *gardenv1beta1.Gardener, secretsMap map[string]*corev1.Secret, imageVector imagevector.ImageVector) (*Operation, error)
NewWithBackupInfrastructure creates a new operation object without a Shoot resource object but the BackupInfrastructure resource.
func (*Operation) ApplyChartGarden ¶
func (o *Operation) ApplyChartGarden(chartPath, namespace, name string, defaultValues, additionalValues map[string]interface{}) error
ApplyChartGarden takes a path to a chart <chartPath>, name of the release <name>, release's namespace <namespace> and two maps <defaultValues>, <additionalValues>, and renders the template based on the merged result of both value maps. The resulting manifest will be applied to the Garden cluster.
func (*Operation) ApplyChartSeed ¶
func (o *Operation) ApplyChartSeed(chartPath, namespace, name string, defaultValues, additionalValues map[string]interface{}) error
ApplyChartSeed takes a path to a chart <chartPath>, name of the release <name>, release's namespace <namespace> and two maps <defaultValues>, <additionalValues>, and renders the template based on the merged result of both value maps. The resulting manifest will be applied to the Seed cluster.
func (*Operation) ChartInitializer ¶
func (o *Operation) ChartInitializer(chartName string, values map[string]interface{}) terraformer.Initializer
ChartInitializer initializes a terraformer based on the given chart and values.
func (*Operation) ComputeAlertManagerHost ¶
ComputeAlertManagerHost computes the host for alert manager.
func (*Operation) ComputeGrafanaHosts ¶
ComputeGrafanaHosts computes the host for both grafanas.
func (*Operation) ComputeGrafanaOperatorsHost ¶
ComputeGrafanaOperatorsHost computes the host for users Grafana.
func (*Operation) ComputeGrafanaUsersHost ¶
ComputeGrafanaUsersHost computes the host for operators Grafana.
func (*Operation) ComputeIngressHost ¶
ComputeIngressHost computes the host for a given prefix.
func (*Operation) ComputeKibanaHost ¶
ComputeKibanaHost computes the host for kibana.
func (*Operation) ComputePrometheusHost ¶
ComputePrometheusHost computes the host for prometheus.
func (*Operation) DeleteClusterResourceFromSeed ¶
DeleteClusterResourceFromSeed deletes the `Cluster` extension resource for the shoot in the seed cluster.
func (*Operation) GetSecretKeysOfRole ¶
GetSecretKeysOfRole returns a list of keys which are present in the Garden Secrets map and which are prefixed with <kind>.
func (*Operation) InitializeMonitoringClient ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) NewBackupInfrastructureTerraformer ¶
func (o *Operation) NewBackupInfrastructureTerraformer() (*terraformer.Terraformer, error)
NewBackupInfrastructureTerraformer creates a new Terraformer for the matching BackupInfrastructure.
func (*Operation) NewShootTerraformer ¶
func (o *Operation) NewShootTerraformer(purpose string) (*terraformer.Terraformer, error)
NewShootTerraformer creates a new Terraformer for the current shoot with the given purpose.
func (*Operation) ReportBackupInfrastructureProgress ¶
ReportBackupInfrastructureProgress will update the phase and error in the BackupInfrastructure manifest `status` section by the current progress of the Flow execution.
func (*Operation) ReportShootProgress ¶
ReportShootProgress will update the last operation object in the Shoot manifest `status` section by the current progress of the Flow execution.
func (*Operation) SeedVersion ¶
SeedVersion is a shorthand for the kubernetes version of the K8sSeedClient.
func (*Operation) ShootVersion ¶
ShootVersion is a shorthand for the desired kubernetes version of the operation's shoot.