Documentation ¶
Index ¶
- Variables
- func GetControlPlaneReplicas(cluster *Cluster, scaledDown bool, wokenUp int) int
- func GetObjectByReference(ctx context.Context, c client.Client, ...) error
- func GetPodNetwork(cluster *Cluster) string
- func GetReplicas(cluster *Cluster, wokenUp int) int
- func GetServiceNetwork(cluster *Cluster) string
- func GetVerticalPodAutoscalerObject() *unstructured.Unstructured
- func IsCreationInProcess(cluster *Cluster) bool
- func IsFailed(cluster *Cluster) bool
- func IsHibernated(cluster *Cluster) bool
- func IsHibernatingOrWakingUp(cluster *Cluster) bool
- func IsHibernationEnabled(cluster *Cluster) bool
- func IsMigrated(obj extensionsv1alpha1.Object) bool
- func IsShootFailed(shoot *gardencorev1beta1.Shoot) bool
- func IsUnmanagedDNSProvider(cluster *Cluster) bool
- func LastError(description string, codes ...gardencorev1beta1.ErrorCode) *gardencorev1beta1.LastError
- func LastOperation(t gardencorev1beta1.LastOperationType, ...) *gardencorev1beta1.LastOperation
- func NewStatusUpdater(client client.Client) *statusUpdater
- func ReconcileError(t gardencorev1beta1.LastOperationType, description string, progress int32, ...) (*gardencorev1beta1.LastOperation, *gardencorev1beta1.LastError)
- func ReconcileSucceeded(t gardencorev1beta1.LastOperationType, description string) (*gardencorev1beta1.LastOperation, *gardencorev1beta1.LastError)
- func RemoveAnnotation(ctx context.Context, c client.Client, obj client.Object, annotation string) error
- func ShouldSkipOperation(operationType gardencorev1beta1.LastOperationType, ...) bool
- func UnsafeGuessKind(obj runtime.Object) string
- type AddToManagerBuilder
- type ChartRendererFactory
- type ChartRendererFactoryFunc
- type Cluster
- type StatusUpdater
- type StatusUpdaterCustom
- type UpdaterFunc
- type WatchBuilder
Constants ¶
This section is empty.
Variables ¶
var ( // GetCluster tries to read Gardener's Cluster extension resource in the given namespace. GetCluster = extensions.GetCluster // CloudProfileFromCluster returns the CloudProfile resource inside the Cluster resource. CloudProfileFromCluster = extensions.CloudProfileFromCluster // SeedFromCluster returns the Seed resource inside the Cluster resource. SeedFromCluster = extensions.SeedFromCluster // ShootFromCluster returns the Shoot resource inside the Cluster resource. ShootFromCluster = extensions.ShootFromCluster // GetShoot tries to read Gardener's Cluster extension resource in the given namespace and return the embedded Shoot resource. GetShoot = extensions.GetShoot // GenericTokenKubeconfigSecretNameFromCluster reads the generic-token-kubeconfig.secret.gardener.cloud/name annotation // and returns its value. If the annotation is not present then it falls back to the deprecated // SecretNameGenericTokenKubeconfig. GenericTokenKubeconfigSecretNameFromCluster = extensions.GenericTokenKubeconfigSecretNameFromCluster )
var ( // AddToScheme adds the Kubernetes and extension scheme to the given scheme. AddToScheme = localSchemeBuilder.AddToScheme // ExtensionsScheme is the default scheme for extensions, consisting of all Kubernetes built-in // schemes (client-go/kubernetes/scheme) and the extensions/v1alpha1 scheme. ExtensionsScheme = runtime.NewScheme() )
var GetSecretByReference = kubernetesutils.GetSecretByReference
GetSecretByReference returns the Secret object matching the given SecretReference.
Functions ¶
func GetControlPlaneReplicas ¶
GetControlPlaneReplicas returns the woken up replicas for controlplane components of the given Shoot that should only be scaled down at the end of the flow.
func GetObjectByReference ¶ added in v1.6.0
func GetObjectByReference(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string, obj client.Object) error
GetObjectByReference gets an object by the given reference, in the given namespace. If the object kind doesn't match the given reference kind this will result in an error.
func GetPodNetwork ¶
GetPodNetwork returns the pod network CIDR of the given Shoot.
func GetReplicas ¶
GetReplicas returns the woken up replicas of the given Shoot.
func GetServiceNetwork ¶
GetServiceNetwork returns the service network CIDR of the given Shoot.
func GetVerticalPodAutoscalerObject ¶
func GetVerticalPodAutoscalerObject() *unstructured.Unstructured
GetVerticalPodAutoscalerObject returns unstructured.Unstructured representing vpaautoscalingv1.VerticalPodAutoscaler
func IsCreationInProcess ¶ added in v1.49.0
IsCreationInProcess returns true if the cluster is in the process of getting created, false otherwise
func IsFailed ¶ added in v1.5.0
IsFailed returns true if the embedded shoot is failed, or false otherwise.
func IsHibernated ¶
IsHibernated returns true if shoot spec indicates that it is marked for hibernation and its status indicates that the hibernation is complete or false otherwise
func IsHibernatingOrWakingUp ¶ added in v1.49.0
IsHibernatingOrWakingUp returns true if the cluster either wakes up from hibernation or is going into hibernation but not yet hibernated
func IsHibernationEnabled ¶ added in v1.49.0
IsHibernationEnabled returns true if the shoot is marked for hibernation, or false otherwise.
func IsMigrated ¶ added in v1.4.0
func IsMigrated(obj extensionsv1alpha1.Object) bool
IsMigrated checks if an extension object has been migrated
func IsShootFailed ¶ added in v1.5.0
func IsShootFailed(shoot *gardencorev1beta1.Shoot) bool
IsShootFailed returns true if the shoot is failed, or false otherwise.
func IsUnmanagedDNSProvider ¶
IsUnmanagedDNSProvider returns true if the shoot uses an unmanaged DNS provider.
func LastError ¶
func LastError(description string, codes ...gardencorev1beta1.ErrorCode) *gardencorev1beta1.LastError
LastError creates a new LastError from the given parameters.
func LastOperation ¶
func LastOperation(t gardencorev1beta1.LastOperationType, state gardencorev1beta1.LastOperationState, progress int32, description string) *gardencorev1beta1.LastOperation
LastOperation creates a new LastOperation from the given parameters.
func NewStatusUpdater ¶ added in v1.21.0
NewStatusUpdater returns a new status updater.
func ReconcileError ¶
func ReconcileError(t gardencorev1beta1.LastOperationType, description string, progress int32, codes ...gardencorev1beta1.ErrorCode) (*gardencorev1beta1.LastOperation, *gardencorev1beta1.LastError)
ReconcileError returns a LastOperation with state error and a LastError with the given description and codes.
func ReconcileSucceeded ¶
func ReconcileSucceeded(t gardencorev1beta1.LastOperationType, description string) (*gardencorev1beta1.LastOperation, *gardencorev1beta1.LastError)
ReconcileSucceeded returns a LastOperation with state succeeded at 100 percent and a nil LastError.
func RemoveAnnotation ¶ added in v1.4.0
func RemoveAnnotation(ctx context.Context, c client.Client, obj client.Object, annotation string) error
RemoveAnnotation removes an annotation key passed as annotation
func ShouldSkipOperation ¶ added in v1.31.4
func ShouldSkipOperation(operationType gardencorev1beta1.LastOperationType, obj extensionsv1alpha1.Object) bool
ShouldSkipOperation checks if the current operation should be skipped depending on the lastOperation of the extension object.
func UnsafeGuessKind ¶
UnsafeGuessKind makes an unsafe guess what is the kind of the given object.
The argument to this method _has_ to be a pointer, otherwise it panics.
Types ¶
type AddToManagerBuilder ¶
AddToManagerBuilder aggregates various AddToManager functions.
func NewAddToManagerBuilder ¶
func NewAddToManagerBuilder(funcs ...func(context.Context, manager.Manager) error) AddToManagerBuilder
NewAddToManagerBuilder creates a new AddToManagerBuilder and registers the given functions.
func (*AddToManagerBuilder) AddToManager ¶
AddToManager traverses over all AddToManager-functions of this builder, sequentially applying them. It exits on the first error and returns it.
type ChartRendererFactory ¶
type ChartRendererFactory interface { // NewChartRendererForShoot creates a new chartrenderer.Interface for the shoot cluster. NewChartRendererForShoot(string) (chartrenderer.Interface, error) }
ChartRendererFactory creates chartrenderer.Interface to be used by this actuator.
type ChartRendererFactoryFunc ¶
type ChartRendererFactoryFunc func(string) (chartrenderer.Interface, error)
ChartRendererFactoryFunc is a function that satisfies ChartRendererFactory.
func (ChartRendererFactoryFunc) NewChartRendererForShoot ¶
func (f ChartRendererFactoryFunc) NewChartRendererForShoot(version string) (chartrenderer.Interface, error)
NewChartRendererForShoot creates a new chartrenderer.Interface for the shoot cluster.
type Cluster ¶
type Cluster = extensions.Cluster
Cluster contains the decoded resources of Gardener's extension Cluster resource.
type StatusUpdater ¶ added in v1.21.0
type StatusUpdater interface { // Processing updates the last operation of an extension resource when an operation is started. Processing(context.Context, logr.Logger, extensionsv1alpha1.Object, gardencorev1beta1.LastOperationType, string) error // Error updates the last operation of an extension resource when an operation was erroneous. Error(context.Context, logr.Logger, extensionsv1alpha1.Object, error, gardencorev1beta1.LastOperationType, string) error // Success updates the last operation of an extension resource when an operation was successful. Success(context.Context, logr.Logger, extensionsv1alpha1.Object, gardencorev1beta1.LastOperationType, string) error }
StatusUpdater contains functions for updating statuses of extension resources after a controller operation.
type StatusUpdaterCustom ¶ added in v1.39.0
type StatusUpdaterCustom interface { // ProcessingCustom updates the last operation of an extension resource when an operation is started. ProcessingCustom(context.Context, logr.Logger, extensionsv1alpha1.Object, gardencorev1beta1.LastOperationType, string, UpdaterFunc) error // ErrorCustom updates the last operation of an extension resource when an operation was erroneous. ErrorCustom(context.Context, logr.Logger, extensionsv1alpha1.Object, error, gardencorev1beta1.LastOperationType, string, UpdaterFunc) error // SuccessCustom updates the last operation of an extension resource when an operation was successful. SuccessCustom(context.Context, logr.Logger, extensionsv1alpha1.Object, gardencorev1beta1.LastOperationType, string, UpdaterFunc) error }
StatusUpdaterCustom contains functions for customized updating statuses of extension resources after a controller operation.
type UpdaterFunc ¶ added in v1.39.0
type UpdaterFunc func(extensionsv1alpha1.Status) error
UpdaterFunc is a function to perform additional updates of the status.
type WatchBuilder ¶
type WatchBuilder []func(controller.Controller) error
WatchBuilder holds various functions which add watch controls to the passed Controller.
func NewWatchBuilder ¶
func NewWatchBuilder(funcs ...func(controller.Controller) error) WatchBuilder
NewWatchBuilder creates a new WatchBuilder and registers the given functions.
func (*WatchBuilder) AddToController ¶
func (w *WatchBuilder) AddToController(ctrl controller.Controller) error
AddToController adds the registered watches to the passed controller.
func (*WatchBuilder) Register ¶
func (w *WatchBuilder) Register(funcs ...func(controller.Controller) error)
Register adds a function which add watch controls to the passed Controller to the WatchBuilder.
Directories ¶
Path | Synopsis |
---|---|
genericactuator/mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
genericactuator/mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |