Skip to content

Re-applying unchanged HelmRelease YAML triggers helm upgrade action #403

@simingweng

Description

@simingweng

Here are the steps to reproduce the my observation.

  1. create a local KinD cluster as target for testing kind create cluster
  2. install FluxCD components flux install
  3. create a helm repository kubectl apply -f https://github.com/fluxcd/helm-controller/raw/main/config/samples/source_v1beta1_helmrepository.yaml
  4. create a helm release resource https://github.com/fluxcd/helm-controller/raw/main/config/samples/helm_v2beta1_helmrelease_helmrepository.yaml
  5. when the helm release becomes ready, the status shows lastReleaseRevision: 1
  6. now re-apply the same helm release kubectl apply -f https://github.com/fluxcd/helm-controller/raw/main/config/samples/helm_v2beta1_helmrelease_helmrepository.yaml
  7. it triggers a reconciliation, and a helm upgrade is performed, and results in lastReleaseRevision: 2
LAST SEEN   TYPE     REASON              OBJECT                               MESSAGE
17m         Normal   info                helmrelease/podinfo-helmrepository   HelmChart 'default/default-podinfo-helmrepository' is not ready
17m         Normal   info                helmrelease/podinfo-helmrepository   Helm install has started
17m         Normal   ScalingReplicaSet   deployment/podinfo-helmrepository    Scaled up replica set podinfo-helmrepository-7d5dc94c75 to 1
17m         Normal   info                helmrelease/podinfo-helmrepository   Helm install succeeded
7m25s       Normal   info                helmrelease/podinfo-helmrepository   Helm test succeeded
7m30s       Normal   info                helmrelease/podinfo-helmrepository   Helm upgrade has started
7m29s       Normal   info                helmrelease/podinfo-helmrepository   Helm upgrade succeeded

Is this behavior by design? Although the helm upgrade action doesn't modify any meaningful state in the cluster, does it make sense to advance the helm revision in such a scenario?

flux: v0.25.1
helm-controller: v0.15.0
kustomize-controller: v0.19.0
notification-controller: v0.20.1
source-controller: v0.20.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions