Skip to content

Opt-in kustomization.yaml output for argocd-image-updater? #105

Description

@typedrat

argocd-image-updater can only write back to Helm or Kustomize sources — it patches spec.source.helm.parameters or spec.source.kustomize.images, and for a plain directory source it just logs not of supported source type and skips. Since nixidy renders everything to plain YAML directories, none of its apps can use image-updater at all, even with git write-back.

I know a kustomization.yaml in the output is the opposite of what the rendered-manifests pattern is going for, so I'm not suggesting changing the default. But would you take an opt-in option that emits one? Something like:

applications.my-app.output.images = [
  { name = "myregistry/my-app"; }
];

When it's set, nixidy also writes a kustomization.yaml into the app's output dir with resources: (the files it already renders) and that images: block. Argo detects Kustomize just from the file being there, so the generated Application.spec.source doesn't change. image-updater takes it from there via its usual git write-back. Empty/unset means no kustomization.yaml and nothing changes.

I'll probably generate the file in a post-render CI step for now, but keeping the resources: list in sync as the app's objects change is exactly the kind of thing that's nicer to have nixidy do.

If you're open to it I'm happy to send a PR — mostly wanted to check the direction first, and whether you'd prefer a different shape than output.images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions