Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for other values for ImageUpdateAutomation spec.sourceRef field #788

Open
applike-ss opened this issue Nov 11, 2024 · 0 comments

Comments

@applike-ss
Copy link

I would love to see other reference options for the ImageUpdateAutomation spec.sourceRef field.

I do see use for a ConfigMap reference that holds image values.

Imagine these resources to be valid:

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-configmap # This resource would not be managed by flux, as flux iua would update it and a kustomization would revert that.
  namespace: default
  annotations:
    image.toolkit.fluxcd.io/image=imageField
    image.toolkit.fluxcd.io/image-tag=imageTag
    image.toolkit.fluxcd.io/image-repository=imageRepository
data:
  imageField: xyz
  imageTag: v0
  imageRepository: index.docker.io
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository
metadata:
  name: podinfo
  namespace: default
spec:
  image: ghcr.io/stefanprodan/podinfo
  interval: 5h
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
  name: podinfo-policy
  namespace: default
spec:
  imageRepositoryRef:
    name: podinfo
  policy:
    semver:
      range: 5.0.x
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
metadata:
  name: podinfo-update
  namespace: default
spec:
  interval: 30m
  sourceRef:
    kind: ConfigMap
    name: podinfo

In this scenario we are creating a non-managed configmap and a set of flux resources updating it.

I could also imagine enhancing the reconcile annotation to support a case to define action that are disabled, e.g.:

kustomize.toolkit.fluxcd.io/reconcile: disabled=patch
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

No branches or pull requests

1 participant