Skip to content

Include exported inputs into drift event for ResourceSetInputProvider#852

Open
Mik4sa wants to merge 1 commit intocontrolplaneio-fluxcd:mainfrom
Mik4sa:feat-850
Open

Include exported inputs into drift event for ResourceSetInputProvider#852
Mik4sa wants to merge 1 commit intocontrolplaneio-fluxcd:mainfrom
Mik4sa:feat-850

Conversation

@Mik4sa
Copy link
Copy Markdown
Contributor

@Mik4sa Mik4sa commented May 4, 2026

Fixes #850

Adds the new annotation fluxcd.controlplane.io/eventMetadataExportedInputKeys. With it the user can control which fields from exported inputs are included in the event metadata for the Flux event (alert). Optionally the name of event metadata fields can be customized.

What would it look like (for example for ResourceSetInputProvider type: OCIArtifactTag and Microsoft Teams provider):

No annotation

No behaviour change.
image

Annotation value: "tag,digest"

image

What I just realized. Here is the "digest" field missing. Is this a reserved name or so?

Annotation value: "tag=image-tag,digest=manifest-digest"

image

Multiple exported inputs

When there are multiple exported inputs (more than a single) then the index of the exported input is automatically added to the event metadata key:
image

image

Questions I ask myself but need feedback and guidance from you

  1. Do we need a different name for the annotation than eventMetadataExportedInputKeys?
  2. Do we need an addiotional annotation to enable and disable this? Like reconcile: enabled?
  3. Is there anything else I haven't thought of?

Note: The code changes aren't final yet but functional complete in my eyes.

  • I would add a "const" for the new annotation(s)
  • Maybe there is a "better" way in retrieving the actual value from the exported input (json)
  • Dropping the fallback, when the value can't be nnmarshaled from json and adding error handling instead
  • Adding error handling in general

@matheuscscp maybe you can have a look at this and give me your honest opinion?

@matheuscscp
Copy link
Copy Markdown
Member

Let's wait and see what @stefanprodan says about this when he's back next week

@Mik4sa Mik4sa marked this pull request as ready for review May 5, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include exported inputs into drift event for ResourceSetInputProvider

2 participants