diff --git a/api/v2beta1/helmrelease_types.go b/api/v2beta1/helmrelease_types.go index 24d0e1d0e..8dbc52958 100644 --- a/api/v2beta1/helmrelease_types.go +++ b/api/v2beta1/helmrelease_types.go @@ -184,6 +184,12 @@ type HelmReleaseSpec struct { // of their definition. // +optional PostRenderers []PostRenderer `json:"postRenderers,omitempty"` + + // EventMetadata is an optional field for adding metadata to events emitted by the + // controller. Metadata fields added by the controller have priority over the fields + // added here. + // +optional + EventMetadata map[string]string `json:"eventMetadata,omitempty"` } // GetInstall returns the configuration for Helm install actions for the diff --git a/api/v2beta1/zz_generated.deepcopy.go b/api/v2beta1/zz_generated.deepcopy.go index 5fb7ee4db..5608f2543 100644 --- a/api/v2beta1/zz_generated.deepcopy.go +++ b/api/v2beta1/zz_generated.deepcopy.go @@ -276,6 +276,13 @@ func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.EventMetadata != nil { + in, out := &in.EventMetadata, &out.EventMetadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec. diff --git a/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml b/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml index 80dbdb60d..7b6ee77b1 100644 --- a/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml +++ b/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml @@ -198,6 +198,13 @@ spec: - name type: object type: array + eventMetadata: + additionalProperties: + type: string + description: EventMetadata is an optional field for adding metadata + to events emitted by the controller. Metadata fields added by the + controller have priority over the fields added here. + type: object install: description: Install holds the configuration for Helm install actions for this HelmRelease. diff --git a/docs/api/helmrelease.md b/docs/api/helmrelease.md index c1f5bcdc7..e912296ce 100644 --- a/docs/api/helmrelease.md +++ b/docs/api/helmrelease.md @@ -357,6 +357,20 @@ Kubernetes pkg/apis/apiextensions/v1.JSON of their definition.
+eventMetadata
EventMetadata is an optional field for adding metadata to events emitted by the +controller. Metadata fields added by the controller have priority over the fields +added here.
+eventMetadata
EventMetadata is an optional field for adding metadata to events emitted by the +controller. Metadata fields added by the controller have priority over the fields +added here.
+