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

Auto Rollback functionality does not work in HelmRelease. #4772

Open
1 task done
akumari144088 opened this issue May 9, 2024 · 2 comments
Open
1 task done

Auto Rollback functionality does not work in HelmRelease. #4772

akumari144088 opened this issue May 9, 2024 · 2 comments

Comments

@akumari144088
Copy link

Describe the bug

I am updating kafka-service and it is failing. I have added rollback in the code, so ideally it should rollback the deployment if its failing. But its not rollingback. Its stuck in failed state.
Here is the code.

apiVersion: helm.toolkit.fluxcd.io/v2beta2 kind: HelmRelease metadata: name: kafka-service namespace: flux-system spec: interval: 1m chart: spec: chart: .xxxxx sourceRef: kind: GitRepository name: flux-git-repo namespace: flux-system interval: 1m releaseName: kafka-service targetNamespace: infra-test values: NAMESPACE: infra-test install: remediation: retries: 10 disableHooks: true replace: true upgrade: disableHooks: true remediation: retries: 2 remediateLastFailure: true strategy: rollback rollback: timeout: 5m driftDetection: mode: enabled

Steps to reproduce

Install Flux and Git Repository.
Prepare HelmRelease for kafka service.
Apply the HelmRelease in the flux-system

Expected behavior

If upgrade fails, it should rollback to previous version.

Screenshots and recordings

image

OS / Distro

centos

Flux version

NA

Flux check

[root@localhost .kube]# kubectl logs -f flux-cli-setup-dxzgn -n flux-system
► checking prerequisites
✔ Kubernetes 1.26.3 >=1.25.0-0
► checking controllers
✔ helm-controller: deployment ready
► artifactorycn.netcracker.com:17114/fluxcd/helm-controller:v0.37.4
✔ image-automation-controller: deployment ready
► artifactorycn.netcracker.com:17114/fluxcd/image-automation-controller:v0.37.1
✔ image-reflector-controller: deployment ready
► artifactorycn.netcracker.com:17114/fluxcd/image-reflector-controller:v0.31.2
✔ kustomize-controller: deployment ready
► artifactorycn.netcracker.com:17114/fluxcd/kustomize-controller:v1.2.2
✔ notification-controller: deployment ready
► artifactorycn.netcracker.com:17114/fluxcd/notification-controller:v1.2.4
✔ source-controller: deployment ready
► artifactorycn.netcracker.com:17114/fluxcd/source-controller:v1.2.4
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta2
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta2
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta2
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✔ all checks passed

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
@stefanprodan
Copy link
Member

stefanprodan commented May 9, 2024

Did you enabled rollback after the upgrade failed? Is so, then changes to the API spec take effect only for future upgrades. To unlock the release you can run flux reconcile hr --reset.

@akumari144088
Copy link
Author

I had enabled rollback before the upgrade failed. Still it didnt work.
and even the command flux reconcile hr kafka-service --reset is not resetting the helm release. It is still showing in failed state

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

2 participants