Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build(ctx context.Context, gardenClient client.Client, ...) (*Operation, error)
- func (b *Builder) WithConfig(cfg *config.GardenletConfiguration) *Builder
- func (b *Builder) WithGarden(g *garden.Garden) *Builder
- func (b *Builder) WithGardenClusterIdentity(gardenClusterIdentity string) *Builder
- func (b *Builder) WithGardenFrom(reader client.Reader, namespace string) *Builder
- func (b *Builder) WithGardenerInfo(gardenerInfo *gardencorev1beta1.Gardener) *Builder
- func (b *Builder) WithLogger(log logr.Logger) *Builder
- func (b *Builder) WithSecrets(secrets map[string]*corev1.Secret) *Builder
- func (b *Builder) WithSeed(s *seed.Seed) *Builder
- func (b *Builder) WithSeedFrom(gardenClient client.Reader, seedName string) *Builder
- func (b *Builder) WithShoot(s *shootpkg.Shoot) *Builder
- func (b *Builder) WithShootFromCluster(gardenClient client.Client, seedClientSet kubernetes.Interface, ...) *Builder
- type Operation
- func (o *Operation) AllSecretKeys() []string
- func (o *Operation) CleanShootTaskError(ctx context.Context, taskID string)
- func (o *Operation) ComputeAlertManagerHost() string
- func (o *Operation) ComputeIngressHost(prefix string) string
- func (o *Operation) ComputeKubeAPIServerHost() string
- func (o *Operation) ComputePlutonoHost() string
- func (o *Operation) ComputePrometheusHost() string
- func (o *Operation) ComputeValiHost() string
- func (o *Operation) DefaultIstioLabels() map[string]string
- func (o *Operation) DefaultIstioNamespace() string
- func (o *Operation) DeleteClusterResourceFromSeed(ctx context.Context) error
- func (o *Operation) DeleteSecret(key string)
- func (o *Operation) GetSecretKeysOfRole(kind string) []string
- func (o *Operation) InitializeDesiredShootClients(ctx context.Context) error
- func (o *Operation) InitializeShootClients(ctx context.Context) error
- func (o *Operation) IsAPIServerRunning(ctx context.Context) (bool, error)
- func (o *Operation) IsShootMonitoringEnabled() bool
- func (o *Operation) IstioLabels() map[string]string
- func (o *Operation) IstioLoadBalancerAnnotations() map[string]string
- func (o *Operation) IstioNamespace() string
- func (o *Operation) IstioServiceName() string
- func (o *Operation) LoadSecret(key string) *corev1.Secret
- func (o *Operation) ReportShootProgress(ctx context.Context, stats *flow.Stats)
- func (o *Operation) SeedVersion() string
- func (o *Operation) ShootVersion() string
- func (o *Operation) StoreSecret(key string, secret *corev1.Secret)
- func (o *Operation) WantsObservabilityComponents() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is an object that builds Operation objects.
func (*Builder) Build ¶
func (b *Builder) Build( ctx context.Context, gardenClient client.Client, seedClientSet kubernetes.Interface, shootClientMap clientmap.ClientMap, ) ( *Operation, error, )
Build initializes a new Operation object.
func (*Builder) WithConfig ¶
func (b *Builder) WithConfig(cfg *config.GardenletConfiguration) *Builder
WithConfig sets the configFunc attribute at the Builder.
func (*Builder) WithGarden ¶
WithGarden sets the gardenFunc attribute at the Builder.
func (*Builder) WithGardenClusterIdentity ¶
WithGardenClusterIdentity sets the identity of the Garden cluster as attribute at the Builder.
func (*Builder) WithGardenFrom ¶
WithGardenFrom sets the gardenFunc attribute at the Builder which will build a new Garden object.
func (*Builder) WithGardenerInfo ¶
func (b *Builder) WithGardenerInfo(gardenerInfo *gardencorev1beta1.Gardener) *Builder
WithGardenerInfo sets the gardenerInfoFunc attribute at the Builder.
func (*Builder) WithLogger ¶
WithLogger sets the loggerFunc attribute at the Builder.
func (*Builder) WithSecrets ¶
WithSecrets sets the secretsFunc attribute at the Builder.
func (*Builder) WithSeedFrom ¶
WithSeedFrom sets the seedFunc attribute at the Builder which will build a new Seed object.
func (*Builder) WithShootFromCluster ¶
func (b *Builder) WithShootFromCluster(gardenClient client.Client, seedClientSet 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 ¶
type Operation struct { SecretsManager secretsmanager.Interface Config *config.GardenletConfiguration Logger logr.Logger GardenerInfo *gardencorev1beta1.Gardener GardenClusterIdentity string Garden *garden.Garden Seed *seed.Seed Shoot *shoot.Shoot ManagedSeed *seedmanagementv1alpha1.ManagedSeed ManagedSeedAPIServer *v1beta1helper.ManagedSeedAPIServer GardenClient client.Client SeedClientSet kubernetes.Interface ShootClientMap clientmap.ClientMap ShootClientSet kubernetes.Interface APIServerAddress string APIServerClusterIP string SeedNamespaceObject *corev1.Namespace // ControlPlaneWildcardCert is a wildcard tls certificate which is issued for the seed's ingress domain. ControlPlaneWildcardCert *corev1.Secret // contains filtered or unexported fields }
Operation contains all data required to perform an operation on a Shoot cluster.
func (*Operation) AllSecretKeys ¶
AllSecretKeys returns all stored secret keys from the operation. Calling this function is thread-safe.
func (*Operation) CleanShootTaskError ¶
CleanShootTaskError 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.
func (*Operation) ComputeAlertManagerHost ¶
ComputeAlertManagerHost computes the host for alert manager.
func (*Operation) ComputeIngressHost ¶
ComputeIngressHost computes the host for a given prefix.
func (*Operation) ComputeKubeAPIServerHost ¶
ComputeKubeAPIServerHost computes the host with a TLS certificate from a trusted origin for KubeAPIServer.
func (*Operation) ComputePlutonoHost ¶
ComputePlutonoHost computes the host for Plutono.
func (*Operation) ComputePrometheusHost ¶
ComputePrometheusHost computes the host for prometheus.
func (*Operation) ComputeValiHost ¶
ComputeValiHost computes the host for vali.
func (*Operation) DefaultIstioLabels ¶ added in v1.91.0
DefaultIstioLabels contain the labels to be used for the default istio ingress gateway entities disregarding zonal affinities.
func (*Operation) DefaultIstioNamespace ¶ added in v1.91.0
DefaultIstioNamespace is the default namespace of the istio ingress gateway disregarding zonal affinities of the shoot cluster.
func (*Operation) DeleteClusterResourceFromSeed ¶
DeleteClusterResourceFromSeed deletes the `Cluster` extension resource for the shoot in the seed cluster.
func (*Operation) DeleteSecret ¶
DeleteSecret deleted the secret under the given key from the operation. Calling this function is thread-safe.
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) InitializeDesiredShootClients ¶
InitializeDesiredShootClients 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. In contrast to InitializeShootClients, InitializeDesiredShootClients returns an error if the discovered version via the client does not match the desired Kubernetes version from the shoot spec. This is especially useful, if the client is initialized after a rolling update of the Kube-Apiserver and you want to ensure that the discovered version matches the expected version.
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) IsAPIServerRunning ¶
IsAPIServerRunning checks if the API server of the Shoot currently running (not scaled-down/deleted).
func (*Operation) IsShootMonitoringEnabled ¶
IsShootMonitoringEnabled returns true if shoot monitoring is enabled and shoot is not of purpose testing.
func (*Operation) IstioLabels ¶
IstioLabels contain the labels to be used for the istio ingress gateway entities.
func (*Operation) IstioLoadBalancerAnnotations ¶
IstioLoadBalancerAnnotations contain the annotation to be used for the istio ingress service load balancer.
func (*Operation) IstioNamespace ¶
IstioNamespace is the currently used namespace of the istio ingress gateway, which is responsible for the shoot cluster.
func (*Operation) IstioServiceName ¶
IstioServiceName is the currently used name of the istio ingress service, which is responsible for the shoot cluster.
func (*Operation) LoadSecret ¶
LoadSecret loads the secret under the given key from the operation. Calling this function is thread-safe. Be aware that the returned pointer and the underlying secret map refer to the same secret object. If you need to modify the returned secret, copy it first and store the changes via `StoreSecret`.
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 SeedClientSet.
func (*Operation) ShootVersion ¶
ShootVersion is a shorthand for the desired kubernetes version of the operation's shoot.
func (*Operation) StoreSecret ¶
StoreSecret stores the passed secret under the given key from the operation. Calling this function is thread-safe.
func (*Operation) WantsObservabilityComponents ¶
WantsObservabilityComponents returns true if shoot is not of purpose testing and either shoot monitoring or vali is enabled.
Directories ¶
Path | Synopsis |
---|---|
matchers
this file is copy of https://github.com/kubernetes/kubernetes/blob/f247e75980061d7cf83c63c0fb1f12c7060c599f/staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go with some modifications for the webhook matching use-case.
|
this file is copy of https://github.com/kubernetes/kubernetes/blob/f247e75980061d7cf83c63c0fb1f12c7060c599f/staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go with some modifications for the webhook matching use-case. |