Documentation ¶
Index ¶
- func CreateOrPatchControllerInstallation(g gardencore.Interface, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerInstallation, error)
- func CreateOrUpdate(ctx context.Context, c client.Client, obj runtime.Object, ...) error
- func CreateTwoWayMergePatch(obj1 metav1.Object, obj2 metav1.Object) ([]byte, error)
- func HasMetaDataAnnotation(meta *metav1.ObjectMeta, key, value string) bool
- func IsEmptyPatch(patch []byte) bool
- func Key(namespaceOrName string, nameOpt ...string) client.ObjectKey
- func ObjectMeta(namespaceOrName string, nameOpt ...string) metav1.ObjectMeta
- func SetMetaDataLabel(meta *metav1.ObjectMeta, key, value string)
- func TryUpdateBackupInfrastructureAnnotations(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.BackupInfrastructure, error)
- func TryUpdateBackupInfrastructureStatus(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.BackupInfrastructure, error)
- func TryUpdateControllerInstallation(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerInstallation, error)
- func TryUpdateControllerInstallationStatus(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerInstallation, error)
- func TryUpdateControllerInstallationStatusWithEqualFunc(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerInstallation, error)
- func TryUpdateControllerInstallationWithEqualFunc(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerInstallation, error)
- func TryUpdateControllerRegistration(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerRegistration, error)
- func TryUpdateControllerRegistrationWithEqualFunc(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardencorev1alpha1.ControllerRegistration, error)
- func TryUpdateNamespace(k k8s.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*corev1.Namespace, error)
- func TryUpdateNamespaceLabels(k k8s.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*corev1.Namespace, error)
- func TryUpdateProject(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Project, error)
- func TryUpdateProjectStatus(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Project, error)
- func TryUpdateSeed(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Seed, error)
- func TryUpdateSeedWithEqualFunc(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Seed, error)
- func TryUpdateShoot(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Shoot, error)
- func TryUpdateShootAnnotations(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Shoot, error)
- func TryUpdateShootConditions(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Shoot, error)
- func TryUpdateShootHibernation(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Shoot, error)
- func TryUpdateShootLabels(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Shoot, error)
- func TryUpdateShootStatus(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, ...) (*gardenv1beta1.Shoot, error)
- func ValidDeploymentContainerImageVersion(deploymentToCheck *appsv1.Deployment, containerName, minimumVersion string) (bool, error)
- type DaemonSetLister
- type DaemonSetNamespaceLister
- type DaemonSetSource
- type DeploymentLister
- type DeploymentNamespaceLister
- type DeploymentSource
- type MachineDeploymentLister
- type MachineDeploymentNamespaceLister
- type MachineDeploymentSource
- type NodeLister
- type NodeSource
- type StatefulSetLister
- type StatefulSetNamespaceLister
- type StatefulSetSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrPatchControllerInstallation ¶
func CreateOrPatchControllerInstallation(g gardencore.Interface, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerInstallation) *gardencorev1alpha1.ControllerInstallation) (*gardencorev1alpha1.ControllerInstallation, error)
CreateOrPatchControllerInstallation either creates the object or patches the existing one with the strategic merge patch type.
func CreateOrUpdate ¶
func CreateOrUpdate(ctx context.Context, c client.Client, obj runtime.Object, transform func() error) error
CreateOrUpdate creates or updates the object. Optionally, it executes a transformation function before the request is made.
func CreateTwoWayMergePatch ¶
CreateTwoWayMergePatch creates a two way merge patch of the given objects. The two objects have to be pointers implementing the interfaces.
func HasMetaDataAnnotation ¶
func HasMetaDataAnnotation(meta *metav1.ObjectMeta, key, value string) bool
HasMetaDataAnnotation checks if the passed meta object has the given key, value set in the annotations section.
func IsEmptyPatch ¶
IsEmptyPatch checks if the given patch is empty. A patch is considered empty if it is the empty string or if it json-decodes to an empty json map.
func Key ¶
Key creates a new client.ObjectKey from the given parameters. There are only two ways to call this function:
- If only namespaceOrName is set, then a client.ObjectKey with name set to namespaceOrName is returned.
- If namespaceOrName and one nameOpt is given, then a client.ObjectKey with namespace set to namespaceOrName and name set to nameOpt[0] is returned.
For all other cases, this method panics.
func ObjectMeta ¶
func ObjectMeta(namespaceOrName string, nameOpt ...string) metav1.ObjectMeta
ObjectMeta creates a new metav1.ObjectMeta from the given parameters. There are only two ways to call this function:
- If only namespaceOrName is set, then a metav1.ObjectMeta with name set to namespaceOrName is returned.
- If namespaceOrName and one nameOpt is given, then a metav1.ObjectMeta with namespace set to namespaceOrName and name set to nameOpt[0] is returned.
For all other cases, this method panics.
func SetMetaDataLabel ¶
func SetMetaDataLabel(meta *metav1.ObjectMeta, key, value string)
SetMetaDataLabel sets the key value pair in the labels section of the given ObjectMeta. If the given ObjectMeta did not yet have labels, they are initialized.
func TryUpdateBackupInfrastructureAnnotations ¶
func TryUpdateBackupInfrastructureAnnotations(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.BackupInfrastructure) (*gardenv1beta1.BackupInfrastructure, error)) (*gardenv1beta1.BackupInfrastructure, error)
TryUpdateBackupInfrastructureAnnotations tries to update a BackupInfrastructure's annotations and retries the operation with the given <backoff>.
func TryUpdateBackupInfrastructureStatus ¶
func TryUpdateBackupInfrastructureStatus(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.BackupInfrastructure) (*gardenv1beta1.BackupInfrastructure, error)) (*gardenv1beta1.BackupInfrastructure, error)
TryUpdateBackupInfrastructureStatus tries to update a BackupInfrastructure's status and retries the operation with the given <backoff>.
func TryUpdateControllerInstallation ¶
func TryUpdateControllerInstallation(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerInstallation) (*gardencorev1alpha1.ControllerInstallation, error)) (*gardencorev1alpha1.ControllerInstallation, error)
TryUpdateControllerInstallation tries to update the status of the controllerInstallation matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the ControllerInstallation object. If the transformation yields a semantically equal ControllerInstallation, no update is done and the operation returns normally.
func TryUpdateControllerInstallationStatus ¶
func TryUpdateControllerInstallationStatus(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerInstallation) (*gardencorev1alpha1.ControllerInstallation, error)) (*gardencorev1alpha1.ControllerInstallation, error)
TryUpdateControllerInstallationStatus tries to update the status of the controllerInstallation matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the ControllerInstallation object. If the transformation yields a semantically equal ControllerInstallation, no update is done and the operation returns normally.
func TryUpdateControllerInstallationStatusWithEqualFunc ¶
func TryUpdateControllerInstallationStatusWithEqualFunc(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerInstallation) (*gardencorev1alpha1.ControllerInstallation, error), equal func(cur, updated *gardencorev1alpha1.ControllerInstallation) bool) (*gardencorev1alpha1.ControllerInstallation, error)
TryUpdateControllerInstallationStatusWithEqualFunc tries to update the status of the controllerInstallation matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the ControllerInstallation object. If the equal func concludes a semantically equal ControllerInstallation, no update is done and the operation returns normally.
func TryUpdateControllerInstallationWithEqualFunc ¶
func TryUpdateControllerInstallationWithEqualFunc(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerInstallation) (*gardencorev1alpha1.ControllerInstallation, error), equal func(cur, updated *gardencorev1alpha1.ControllerInstallation) bool) (*gardencorev1alpha1.ControllerInstallation, error)
TryUpdateControllerInstallationWithEqualFunc tries to update the status of the controllerInstallation matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the ControllerInstallation object. If the equal func concludes a semantically equal ControllerInstallation, no update is done and the operation returns normally.
func TryUpdateControllerRegistration ¶
func TryUpdateControllerRegistration(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerRegistration) (*gardencorev1alpha1.ControllerRegistration, error)) (*gardencorev1alpha1.ControllerRegistration, error)
TryUpdateControllerRegistration tries to update the status of the controllerRegistration matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the ControllerRegistration object. If the transformation yields a semantically equal ControllerRegistration, no update is done and the operation returns normally.
func TryUpdateControllerRegistrationWithEqualFunc ¶
func TryUpdateControllerRegistrationWithEqualFunc(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.ControllerRegistration) (*gardencorev1alpha1.ControllerRegistration, error), equal func(cur, updated *gardencorev1alpha1.ControllerRegistration) bool) (*gardencorev1alpha1.ControllerRegistration, error)
TryUpdateControllerRegistrationWithEqualFunc tries to update the status of the controllerRegistration matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the ControllerRegistration object. If the equal func concludes a semantically equal ControllerRegistration, no update is done and the operation returns normally.
func TryUpdateNamespace ¶
func TryUpdateNamespace(k k8s.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*corev1.Namespace) (*corev1.Namespace, error)) (*corev1.Namespace, error)
TryUpdateNamespace tries to update a namespace and retries the operation with the given <backoff>.
func TryUpdateNamespaceLabels ¶
func TryUpdateNamespaceLabels(k k8s.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*corev1.Namespace) (*corev1.Namespace, error)) (*corev1.Namespace, error)
TryUpdateNamespaceLabels tries to update a namespace's labels and retries the operation with the given <backoff>.
func TryUpdateProject ¶
func TryUpdateProject(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Project) (*gardenv1beta1.Project, error)) (*gardenv1beta1.Project, error)
TryUpdateProject tries to update a project and retries the operation with the given <backoff>.
func TryUpdateProjectStatus ¶
func TryUpdateProjectStatus(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Project) (*gardenv1beta1.Project, error)) (*gardenv1beta1.Project, error)
TryUpdateProjectStatus tries to update a project's status and retries the operation with the given <backoff>.
func TryUpdateSeed ¶
func TryUpdateSeed(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Seed) (*gardenv1beta1.Seed, error)) (*gardenv1beta1.Seed, error)
TryUpdateSeed tries to update the status of the seed matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Seed object. If the transformation yields a semantically equal Seed, no update is done and the operation returns normally.
func TryUpdateSeedWithEqualFunc ¶
func TryUpdateSeedWithEqualFunc(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Seed) (*gardenv1beta1.Seed, error), equal func(cur, updated *gardenv1beta1.Seed) bool) (*gardenv1beta1.Seed, error)
TryUpdateSeedWithEqualFunc tries to update the status of the seed matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Seed object. If the equal func concludes a semantically equal Seed, no update is done and the operation returns normally.
func TryUpdateShoot ¶
func TryUpdateShoot(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Shoot) (*gardenv1beta1.Shoot, error)) (*gardenv1beta1.Shoot, error)
TryUpdateShoot tries to update the status of the shoot matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Shoot object. If the transformation yields a semantically equal Shoot, no update is done and the operation returns normally.
func TryUpdateShootAnnotations ¶
func TryUpdateShootAnnotations(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Shoot) (*gardenv1beta1.Shoot, error)) (*gardenv1beta1.Shoot, error)
TryUpdateShootAnnotations tries to update the annotations of the shoot matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Shoot object. If the transformation yields a semantically equal Shoot (regarding conditions), no update is done and the operation returns normally.
func TryUpdateShootConditions ¶
func TryUpdateShootConditions(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Shoot) (*gardenv1beta1.Shoot, error)) (*gardenv1beta1.Shoot, error)
TryUpdateShootConditions tries to update the status of the shoot matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Shoot object. If the transformation yields a semantically equal Shoot (regarding conditions), no update is done and the operation returns normally.
func TryUpdateShootHibernation ¶
func TryUpdateShootHibernation(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Shoot) (*gardenv1beta1.Shoot, error)) (*gardenv1beta1.Shoot, error)
TryUpdateShootHibernation tries to update the status of the shoot matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Shoot object. If the transformation yields a semantically equal Shoot, no update is done and the operation returns normally.
func TryUpdateShootLabels ¶
func TryUpdateShootLabels(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Shoot) (*gardenv1beta1.Shoot, error)) (*gardenv1beta1.Shoot, error)
TryUpdateShootLabels tries to update the status of the shoot matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Shoot object. If the transformation yields a semantically equal Shoot (regarding labels), no update is done and the operation returns normally.
func TryUpdateShootStatus ¶
func TryUpdateShootStatus(g garden.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardenv1beta1.Shoot) (*gardenv1beta1.Shoot, error)) (*gardenv1beta1.Shoot, error)
TryUpdateShootStatus tries to update the status of the shoot matching the given <meta>. It retries with the given <backoff> characteristics as long as it gets Conflict errors. The transformation function is applied to the current state of the Shoot object. If the transformation yields a semantically equal Shoot (regarding Status), no update is done and the operation returns normally.
func ValidDeploymentContainerImageVersion ¶
func ValidDeploymentContainerImageVersion(deploymentToCheck *appsv1.Deployment, containerName, minimumVersion string) (bool, error)
ValidDeploymentContainerImageVersion validates compliance of a deployment container image to a minimum version
Types ¶
type DaemonSetLister ¶
type DaemonSetLister interface { // List lists all DaemonSets that match the given selector. List(selector labels.Selector) ([]*appsv1.DaemonSet, error) // DaemonSets yields a DaemonSetNamespaceLister for the given namespace. DaemonSets(namespace string) DaemonSetNamespaceLister }
DaemonSetLister is a lister of DaemonSets.
func NewDaemonSetLister ¶
func NewDaemonSetLister(source DaemonSetSource) DaemonSetLister
NewDaemonSetLister creates a new DaemonSetLister from the given DaemonSetSource.
type DaemonSetNamespaceLister ¶
type DaemonSetNamespaceLister interface { // List lists all DaemonSets that match the given selector in the current namespace. List(selector labels.Selector) ([]*appsv1.DaemonSet, error) // Get retrieves the DaemonSet with the given name in the current namespace. Get(name string) (*appsv1.DaemonSet, error) }
DaemonSetNamespaceLister is a lister of deployments for a specific namespace.
type DaemonSetSource ¶
DaemonSetSource is a function that produces a slice of DaemonSets or an error.
type DeploymentLister ¶
type DeploymentLister interface { // List lists all Deployments that match the given selector. List(selector labels.Selector) ([]*appsv1.Deployment, error) // Deployments yields a DeploymentNamespaceLister for the given namespace. Deployments(namespace string) DeploymentNamespaceLister }
DeploymentLister is a lister of Deployments.
func NewDeploymentLister ¶
func NewDeploymentLister(source DeploymentSource) DeploymentLister
NewDeploymentLister creates a new DeploymentLister from the given DeploymentSource.
type DeploymentNamespaceLister ¶
type DeploymentNamespaceLister interface { // List lists all Deployments that match the given selector in the current namespace. List(selector labels.Selector) ([]*appsv1.Deployment, error) // Get retrieves the Deployment with the given name in the current namespace. Get(name string) (*appsv1.Deployment, error) }
DeploymentNamespaceLister is a lister of deployments for a specific namespace.
type DeploymentSource ¶
type DeploymentSource func() ([]*appsv1.Deployment, error)
DeploymentSource is a function that produces a slice of Deployments or an error.
type MachineDeploymentLister ¶
type MachineDeploymentLister interface { // List lists all MachineDeployments that match the given selector in the current namespace. List(selector labels.Selector) ([]*machinev1alpha1.MachineDeployment, error) // MachineDeployments yields a MachineDeploymentNamespaceLister for the given namespace. MachineDeployments(namespace string) MachineDeploymentNamespaceLister }
MachineDeploymentLister is a lister of MachineDeployments for a specific namespace.
func NewMachineDeploymentLister ¶
func NewMachineDeploymentLister(source MachineDeploymentSource) MachineDeploymentLister
NewMachineDeploymentLister creates a new MachineDeploymentLister from the given MachineDeploymentSource.
type MachineDeploymentNamespaceLister ¶
type MachineDeploymentNamespaceLister interface { // List lists all MachineDeployments that match the given selector in the current namespace. List(selector labels.Selector) ([]*machinev1alpha1.MachineDeployment, error) // Get retrieves the MachineDeployment with the given name in the current namespace. Get(name string) (*machinev1alpha1.MachineDeployment, error) }
MachineDeploymentNamespaceLister is a lister of MachineDeployments for a specific namespace.
type MachineDeploymentSource ¶
type MachineDeploymentSource func() ([]*machinev1alpha1.MachineDeployment, error)
MachineDeploymentSource is a function that produces a slice of MachineDeployments or an error.
type NodeLister ¶
type NodeLister interface { // List lists all Nodes that match the given selector. List(selector labels.Selector) ([]*corev1.Node, error) }
NodeLister is a lister of Nodes.
func NewNodeLister ¶
func NewNodeLister(source NodeSource) NodeLister
NewNodeLister creates a new NodeLister from the given NodeSource.
type NodeSource ¶
NodeSource is a function that produces a slice of Nodes or an error.
type StatefulSetLister ¶
type StatefulSetLister interface { // List lists all StatefulSets that match the given selector. List(selector labels.Selector) ([]*appsv1.StatefulSet, error) // StatefulSets yields a StatefulSetNamespaceLister for the given namespace. StatefulSets(namespace string) StatefulSetNamespaceLister }
StatefulSetLister is a lister of StatefulSets.
func NewStatefulSetLister ¶
func NewStatefulSetLister(source StatefulSetSource) StatefulSetLister
NewStatefulSetLister creates a new StatefulSetLister form the given StatefulSetSource.
type StatefulSetNamespaceLister ¶
type StatefulSetNamespaceLister interface { // List lists all StatefulSets that match the given selector in the current namespace. List(selector labels.Selector) ([]*appsv1.StatefulSet, error) // Get retrieves the StatefulSet with the given name in the current namespace. Get(name string) (*appsv1.StatefulSet, error) }
StatefulSetNamespaceLister is a lister of StatefulSets for a specific namespace.
type StatefulSetSource ¶
type StatefulSetSource func() ([]*appsv1.StatefulSet, error)
StatefulSetSource is a function that produces a slice of StatefulSets or an error.