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

Upgrading, unable to force overwrite upgrade #4944

Open
1 task done
njuptlzf opened this issue Aug 22, 2024 · 0 comments
Open
1 task done

Upgrading, unable to force overwrite upgrade #4944

njuptlzf opened this issue Aug 22, 2024 · 0 comments

Comments

@njuptlzf
Copy link

njuptlzf commented Aug 22, 2024

Describe the bug

Using force upgrade annotation cannot trigger force upgrade

Steps to reproduce

hr.yaml

apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
  annotations:
    reconcile.fluxcd.io/forceAt: "a"  # <------------ force upgrade
    reconcile.fluxcd.io/requestedAt: "a" # <--------- force upgrade
  labels:
    kapp-name: test-migration
  name: test-migration
  namespace: test-ops
spec:
  chart:
    spec:
      chart: test-migration
      interval: 87600h
      reconcileStrategy: ChartVersion
      sourceRef:
        kind: HelmRepository
        name: kapp-test-migration
      version: 0.0.1
  install:
    createNamespace: true
    remediation:
      retries: 3
    timeout: 90m
  interval: 87600h
  maxHistory: 4
  releaseName: test-migration
  rollback:
    cleanupOnFail: false
    timeout: 20m
  targetNamespace: test-ops
  test:
    enable: false
  upgrade:
    remediation:
      retries: 3
      strategy: rollback
    timeout: 90m
    force: true
  values:
    a: b
  1. kubectl apply -f hr.yaml
    event
0s          Normal    SuccessfulCreate         job/init                              Created pod: init-svv5p
0s          Normal    Scheduled                pod/init-svv5p                        Successfully assigned test-ops/init-svv5p to zbbb2005c-0009
0s          Normal    Pulled                   pod/init-svv5p                        Container image "test1:2.0.012" already present on machine
0s          Normal    Created                  pod/init-svv5p                        Created container galaxy-dumps
0s          Normal    Started                  pod/init-svv5p                        Started container galaxy-dumps
0s          Normal    Pulled                   pod/init-svv5p                        Container image "test2:0.1.0" already present on machine
0s          Normal    Created                  pod/init-svv5p                        Created container init
0s          Normal    Started                  pod/init-svv5p                        Started container init

helm controller log

{"level":"info","ts":"2024-08-22T06:27:56.301Z","msg":"HelmChart/test-ops/test-ops-test-migration with SourceRef 'HelmRepository/test-ops/kapp-test-migration' is in-sync","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"deefe002-654e-4ac3-ae24-d7d48b6576c7"}
{"level":"info","ts":"2024-08-22T06:27:56.328Z","msg":"release in-sync with desired state","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"deefe002-654e-4ac3-ae24-d7d48b6576c7"}
{"level":"info","ts":"2024-08-22T06:27:56.328Z","msg":"forcing upgrade for in-sync release: force requested through annotation","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"deefe002-654e-4ac3-ae24-d7d48b6576c7"}
{"level":"info","ts":"2024-08-22T06:27:56.358Z","msg":"running 'upgrade' action with timeout of 1h30m0s","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"deefe002-654e-4ac3-ae24-d7d48b6576c7"}
  1. modified hr.yaml
    reconcile.fluxcd.io/forceAt: "b"
    reconcile.fluxcd.io/requestedAt: "b"
  1. kubectl apply -f hr.yaml
  2. no changes
  3. After the current upgrade is completed, the second upgrade will automatically start. (For me, either overwrite the current task or simply do not execute it, otherwise it will be very confusing. Because it is not a scheduled task and does not need to be queued)
    helm controller log
... ...

{"level":"info","ts":"2024-08-22T06:43:14.263Z","msg":"release in-sync with desired state","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"deefe002-654e-4ac3-ae24-d7d48b6576c7"}
{"level":"info","ts":"2024-08-22T06:43:14.298Z","msg":"HelmChart/test-ops/test-ops-test-migration with SourceRef 'HelmRepository/test-ops/kapp-test-migration' is in-sync","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"d6c3c652-ee0f-48c6-b128-d5f0906fbf4f"}
{"level":"info","ts":"2024-08-22T06:43:14.333Z","msg":"release in-sync with desired state","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"d6c3c652-ee0f-48c6-b128-d5f0906fbf4f"}
{"level":"info","ts":"2024-08-22T06:43:14.333Z","msg":"forcing upgrade for in-sync release: force requested through annotation","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"d6c3c652-ee0f-48c6-b128-d5f0906fbf4f"}
{"level":"info","ts":"2024-08-22T06:43:14.355Z","msg":"running 'upgrade' action with timeout of 1h30m0s","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"test-migration","namespace":"test-ops"},"namespace":"test-ops","name":"test-migration","reconcileID":"d6c3c652-ee0f-48c6-b128-d5f0906fbf4f"}

Expected behavior

Re-triggering upgrades may be a new feature and requires adding another note.

Screenshots and recordings

No response

OS / Distro

Ubuntu 22.04.3 LTS

Flux version

fluxcd/helm-controller:v0.37.4

Flux check

N/A

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
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