resourceapply

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPodDisruptionBudget

ApplyPodDisruptionBudget will apply the PodDisruptionBudget to match the required object. forceOwnership allows to apply objects without an ownerReference. Normally such objects would be adopted but the old objects may not have correct labels that we need to fix in the new version.

func ApplySecret

func ApplySecret(
	ctx context.Context,
	client appv1client.SecretsGetter,
	lister appv1listers.SecretLister,
	recorder record.EventRecorder,
	required *corev1.Secret,
	forceOwnership bool,
) (*corev1.Secret, bool, error)

ApplySecret will apply the Secret to match the required object. forceOwnership allows to apply objects without an ownerReference. Normally such objects would be adopted but the old objects may not have correct labels that we need to fix in the new version.

func ApplyService

func ApplyService(
	ctx context.Context,
	client appv1client.ServicesGetter,
	lister appv1listers.ServiceLister,
	recorder record.EventRecorder,
	required *corev1.Service,
	forceOwnership bool,
) (*corev1.Service, bool, error)

ApplyService will apply the Service to match the required object. forceOwnership allows to apply objects without an ownerReference. Normally such objects would be adopted but the old objects may not have correct labels that we need to fix in the new version.

func ApplyStatefulSet

func ApplyStatefulSet(
	ctx context.Context,
	client appv1client.StatefulSetsGetter,
	lister appv1listers.StatefulSetLister,
	recorder record.EventRecorder,
	required *appsv1.StatefulSet,
	forceOwnership bool,
) (*appsv1.StatefulSet, bool, error)

ApplyStatefulSet will apply the StatefulSet to match the required object. forceOwnership allows to apply objects without an ownerReference. Normally such objects would be adopted but the old objects may not have correct labels that we need to fix in the new version.

func HashObjects

func HashObjects(objs ...interface{}) (string, error)

func ReportCreateEvent

func ReportCreateEvent(recorder record.EventRecorder, obj runtime.Object, operationErr error)

func ReportDeleteEvent

func ReportDeleteEvent(recorder record.EventRecorder, obj runtime.Object, operationErr error)

func ReportUpdateEvent

func ReportUpdateEvent(recorder record.EventRecorder, obj runtime.Object, operationErr error)

func SetHashAnnotation

func SetHashAnnotation(obj metav1.Object) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL