fluxcd / image-automation-controller

GitOps Toolkit controller that patches container image tags in Git
https://fluxcd.io
Apache License 2.0
155 stars 67 forks source link

image-automation-controller commits symlink #620

Open niqniqniqq opened 6 months ago

niqniqniqq commented 6 months ago

Hello,

image-automation-controller commits the symlink when the following operation is performed.

  1. image-automation-controller detects image updates, checks out from the master branch and pushes to the sample-merge branch.
  2. Create and merge a PR from the sample-merge branch to the master branch.
  3. The developer checks out the feature branch from the master branch and pushes the file containing the symlink to the feature branch.
  4. Create and merge PR from feature branch to master branch
  5. Application image is updated
  6. image-automation-controller detects image updates, checks out from the master branch and pushes to the sample-merge branch.

At this time, the symlink committed by the developer in step 3 is pushed to the sample-merge branch.

Here is the flux configuration we are using flux version

flux: v0.38.2
image-automation-controller: v0.36.1
image-reflector-controller: v0.30.0
kustomize-controller: v1.1.0
notification-controller: v1.1.0
source-controller: v1.1.1

ImageUpdateAutomation

apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
  name: sample-api
spec:
  interval: 5m0s
  sourceRef:
    kind: GitRepository
    name: sample-api
    namespace: sample
  git:
    checkout:
      ref:
        branch: master
    commit:
      author:
        email: fluxbot@bot.com
        name: fluxbot
      messageTemplate: 'Automated image update'
    push:
      branch: sample-merge
  update:
    path: ./k8s/prd/sample-api
    strategy: Setters