Documentation ¶
Index ¶
- func BoolPtr(val bool) *booldeprecated
- func EnsureCustomResourceDefinitionV1(modified *bool, existing *apiextensionsv1.CustomResourceDefinition, ...)
- func EnsureCustomResourceDefinitionV1Beta1(modified *bool, existing *apiextensionsv1beta1.CustomResourceDefinition, ...)
- func EnsureObjectMeta(modified *bool, existing *metav1.ObjectMeta, required metav1.ObjectMeta)
- func EnsureObjectMetaForUnstructured(modified *bool, existing *unstructured.Unstructured, ...) error
- func ExpectedDaemonSetGeneration(required *appsv1.DaemonSet, previousGenerations []operatorsv1.GenerationStatus) int64
- func ExpectedDeploymentGeneration(required *appsv1.Deployment, ...) int64
- func ExpectedMutatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64
- func ExpectedValidatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64
- func GenerationFor(generations []operatorsv1.GenerationStatus, resource schema.GroupResource, ...) *operatorsv1.GenerationStatus
- func IsRequiredConfigPresent(config []byte, requiredPaths [][]string) error
- func MergeConfigMap(configMap *corev1.ConfigMap, configKey string, ...) (*corev1.ConfigMap, bool, error)
- func MergeMap(modified *bool, existing *map[string]string, required map[string]string)
- func MergeOwnerRefs(modified *bool, existing *[]metav1.OwnerReference, ...)
- func MergeProcessConfig(specialCases map[string]MergeFunc, configYAMLs ...[]byte) ([]byte, error)
- func MergePrunedConfigMap(schema runtime.Object, configMap *corev1.ConfigMap, configKey string, ...) (*corev1.ConfigMap, bool, error)
- func MergePrunedProcessConfig(schema runtime.Object, specialCases map[string]MergeFunc, ...) ([]byte, error)
- func RemoveConfig(dst, src interface{}, currentPath string) (interface{}, error)
- func SetBool(modified *bool, existing *bool, required bool)
- func SetDaemonSetGeneration(generations *[]operatorsv1.GenerationStatus, actual *appsv1.DaemonSet)
- func SetDeploymentGeneration(generations *[]operatorsv1.GenerationStatus, actual *appsv1.Deployment)
- func SetGeneration(generations *[]operatorsv1.GenerationStatus, ...)
- func SetInt32(modified *bool, existing *int32, required int32)
- func SetInt32IfSet(modified *bool, existing *int32, required int32)
- func SetInt64(modified *bool, existing *int64, required int64)
- func SetMapStringString(modified *bool, existing *map[string]string, required map[string]string)
- func SetMapStringStringIfSet(modified *bool, existing *map[string]string, required map[string]string)
- func SetMutatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, ...)
- func SetString(modified *bool, existing *string, required string)
- func SetStringIfSet(modified *bool, existing *string, required string)
- func SetStringSlice(modified *bool, existing *[]string, required []string)
- func SetStringSliceIfSet(modified *bool, existing *[]string, required []string)
- func SetValidatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, ...)
- func WithCleanLabelsAndAnnotations(obj metav1.Object) metav1.Object
- type MergeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCustomResourceDefinitionV1 ¶
func EnsureCustomResourceDefinitionV1(modified *bool, existing *apiextensionsv1.CustomResourceDefinition, required apiextensionsv1.CustomResourceDefinition)
EnsureCustomResourceDefinitionV1 ensures that the existing matches the required. modified is set to true when existing had to be updated with required.
func EnsureCustomResourceDefinitionV1Beta1 ¶
func EnsureCustomResourceDefinitionV1Beta1(modified *bool, existing *apiextensionsv1beta1.CustomResourceDefinition, required apiextensionsv1beta1.CustomResourceDefinition)
EnsureCustomResourceDefinitionV1Beta1 ensures that the existing matches the required. modified is set to true when existing had to be updated with required.
func EnsureObjectMeta ¶
func EnsureObjectMeta(modified *bool, existing *metav1.ObjectMeta, required metav1.ObjectMeta)
EnsureObjectMeta writes namespace, name, labels, and annotations. Don't set other things here. TODO finalizer support maybe?
func EnsureObjectMetaForUnstructured ¶
func EnsureObjectMetaForUnstructured(modified *bool, existing *unstructured.Unstructured, required *unstructured.Unstructured) error
func ExpectedDaemonSetGeneration ¶
func ExpectedDaemonSetGeneration(required *appsv1.DaemonSet, previousGenerations []operatorsv1.GenerationStatus) int64
func ExpectedDeploymentGeneration ¶
func ExpectedDeploymentGeneration(required *appsv1.Deployment, previousGenerations []operatorsv1.GenerationStatus) int64
func ExpectedMutatingWebhooksConfiguration ¶
func ExpectedMutatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64
ExpectedMutatingWebhooksConfiguration returns last applied generation for MutatingWebhookConfiguration resource registered in operator
func ExpectedValidatingWebhooksConfiguration ¶
func ExpectedValidatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64
ExpectedValidatingWebhooksConfiguration returns last applied generation for ValidatingWebhookConfiguration resource registered in operator
func GenerationFor ¶
func GenerationFor(generations []operatorsv1.GenerationStatus, resource schema.GroupResource, namespace, name string) *operatorsv1.GenerationStatus
func IsRequiredConfigPresent ¶
IsRequiredConfigPresent can check an observedConfig to see if certain required paths are present in that config. This allows operators to require certain configuration to be observed before proceeding to honor a configuration or roll it out.
func MergeConfigMap ¶
func MergeConfigMap(configMap *corev1.ConfigMap, configKey string, specialCases map[string]MergeFunc, configYAMLs ...[]byte) (*corev1.ConfigMap, bool, error)
MergeConfigMap takes a configmap, the target key, special overlay funcs a list of config configs to overlay on top of each other It returns the resultant configmap and a bool indicating if any changes were made to the configmap
func MergeOwnerRefs ¶
func MergeOwnerRefs(modified *bool, existing *[]metav1.OwnerReference, required []metav1.OwnerReference)
func MergeProcessConfig ¶
MergeProcessConfig merges a series of config yaml files together with each later one overlaying all previous
func MergePrunedConfigMap ¶
func MergePrunedConfigMap(schema runtime.Object, configMap *corev1.ConfigMap, configKey string, specialCases map[string]MergeFunc, configYAMLs ...[]byte) (*corev1.ConfigMap, bool, error)
MergePrunedConfigMap takes a configmap, the target key, special overlay funcs a list of config configs to overlay on top of each other It returns the resultant configmap and a bool indicating if any changes were made to the configmap. It roundtrips the config through the given schema.
func MergePrunedProcessConfig ¶
func MergePrunedProcessConfig(schema runtime.Object, specialCases map[string]MergeFunc, configYAMLs ...[]byte) ([]byte, error)
MergePrunedProcessConfig merges a series of config yaml files together with each later one overlaying all previous. The result is roundtripped through the given schema if it is non-nil.
func RemoveConfig ¶
RemoveConfig is a merge func that elimintes an entire path from the config
func SetDaemonSetGeneration ¶
func SetDaemonSetGeneration(generations *[]operatorsv1.GenerationStatus, actual *appsv1.DaemonSet)
func SetDeploymentGeneration ¶
func SetDeploymentGeneration(generations *[]operatorsv1.GenerationStatus, actual *appsv1.Deployment)
func SetGeneration ¶
func SetGeneration(generations *[]operatorsv1.GenerationStatus, newGeneration operatorsv1.GenerationStatus)
func SetInt32IfSet ¶
func SetMapStringString ¶
func SetMapStringStringIfSet ¶
func SetMutatingWebhooksConfigurationGeneration ¶
func SetMutatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, actual *admissionregistrationv1.MutatingWebhookConfiguration)
SetMutatingWebhooksConfigurationGeneration updates operator generation status list with last applied generation for provided MutatingWebhookConfiguration resource
func SetStringIfSet ¶
func SetStringSlice ¶
func SetStringSliceIfSet ¶
func SetValidatingWebhooksConfigurationGeneration ¶
func SetValidatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, actual *admissionregistrationv1.ValidatingWebhookConfiguration)
SetValidatingWebhooksConfigurationGeneration updates operator generation status list with last applied generation for provided ValidatingWebhookConfiguration resource