Documentation ¶
Index ¶
- type Operation
- func (o *Operation) ApplyChartGarden(chartPath, name, namespace string, ...) error
- func (o *Operation) ApplyChartSeed(chartPath, name, namespace string, ...) error
- func (o *Operation) ApplyChartShoot(chartPath, name, namespace string, ...) error
- func (o *Operation) EnsureImagePullSecretsGarden() error
- func (o *Operation) EnsureImagePullSecretsSeed() error
- func (o *Operation) EnsureImagePullSecretsShoot() error
- func (o *Operation) GetImagePullSecretsMap() []map[string]interface{}
- func (o *Operation) GetSecretKeysOfRole(kind string) []string
- func (o *Operation) InitializeSeedClients() error
- func (o *Operation) InitializeShootClients() error
- func (o *Operation) ReportShootProgress(progress int, currentFunctions string)
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 Garden *garden.Garden Seed *seed.Seed Shoot *shoot.Shoot K8sGardenClient kubernetes.Client K8sGardenInformers gardeninformers.Interface K8sSeedClient kubernetes.Client K8sShootClient kubernetes.Client ChartGardenRenderer chartrenderer.ChartRenderer ChartSeedRenderer chartrenderer.ChartRenderer ChartShootRenderer chartrenderer.ChartRenderer APIServerIngresses []corev1.LoadBalancerIngress APIServerAddress string }
Operation contains all data required to perform an operation on a Shoot cluster.
func New ¶
func New(shoot *gardenv1beta1.Shoot, shootLogger *logrus.Entry, k8sGardenClient kubernetes.Client, k8sGardenInformers gardeninformers.Interface, gardenerInfo *gardenv1beta1.Gardener, secretsMap map[string]*corev1.Secret) (*Operation, error)
New creates a new operation object.
func (*Operation) ApplyChartGarden ¶
func (o *Operation) ApplyChartGarden(chartPath, name, namespace 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, name, namespace 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) ApplyChartShoot ¶
func (o *Operation) ApplyChartShoot(chartPath, name, namespace string, defaultValues, additionalValues map[string]interface{}) error
ApplyChartShoot 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 Shoot cluster.
func (*Operation) EnsureImagePullSecretsGarden ¶
EnsureImagePullSecretsGarden ensures that the image pull secrets do exist in the Garden cluster namespace in which the Shoot resource has been created, and that the default service account in that namespace contains the respective .imagePullSecrets[] field.
func (*Operation) EnsureImagePullSecretsSeed ¶
EnsureImagePullSecretsSeed ensures that the image pull secrets do exist in the Seed cluster's Shoot namespace and that the default service account in that namespace contains the respective .imagePullSecrets[] field.
func (*Operation) EnsureImagePullSecretsShoot ¶
EnsureImagePullSecretsShoot ensures that the image pull secrets do exist in the Shoot cluster's kube-system namespace and that the default service account in that namespace contains the respective .imagePullSecrets[] field.
func (*Operation) GetImagePullSecretsMap ¶
GetImagePullSecretsMap returns all known image pull secrets as map whereas the key is "name" and the value is the respective name of the image pull secret. The map can be used to specify a list of image pull secrets on a Kubernetes PodTemplateSpec object.
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) 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) ReportShootProgress ¶
ReportShootProgress will update the last operation object in the Shoot manifest `status` section by the current progress of the Flow execution.