helm-operator icon indicating copy to clipboard operation
helm-operator copied to clipboard

Freshly installed helm operator immediately gets helm release stuck in 'pending-upgrade' state

Open chainlink opened this issue 5 years ago • 3 comments

Describe the bug

Helm release gets stuck in pending-upgrade when first installing operator for a helm2 release pulling from a private git repository.

To Reproduce

Pre-condition:

  • helm operator doesn't exist on cluster
  • Helm release CRD installed
  • Release exists in helm 2/tiller in DEPLOYED state
  • Fresh copy of Helm release CR installed on cluster (see yaml below)
  1. Install Helm Operator
helm3 upgrade -i helm-operator fluxcd/helm-operator \
                                      --namespace flux \
                                      --set git.ssh.secretName=flux-git-deploy \
                                      --version 1.0.2

Helm release immediately gets stuck in pending-upgrade

Events:
  Type     Reason             Age   From           Message
  ----     ------             ----  ----           -------
  Warning  FailedReleaseSync  63s   helm-operator  synchronization of release 'blah' in namespace 'default' failed: failed to prepare chart for release: chart not ready: no existing git mirror found
 Warning  FailedReleaseSync  7s (x2 over 38s)  helm-operator  synchronization of release 'blah' in namespace 'default' failed: failed to determine sync action for release: status 'pending-upgrade' of release does not allow a safe upgrade

Expected behavior

Helm operator should come up and not get release stuck in pending-upgrade state.

Logs Relevant log lines

ts=2020-05-08T14:16:17.069516552Z caller=release.go:81 component=release release=blah targetNamespace=default resource=default:helmrelease/blah helmVersion=v2 error="failed to prepare chart for release: chart not ready: no existing git mirror found"
ts=2020-05-08T14:18:54.070709086Z caller=release.go:105 component=release release=blah targetNamespace=default resource=default:helmrelease/blah helmVersion=v2 error="failed to determine sync action for release: status 'pending-upgrade' of release does not allow a safe upgrade"

Additional context

Helm Release Yaml

apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: my-release
  namespace: default
  annotations:
    flux.weave.works/automated: "false"
spec:
  releaseName: blah
  helmVersion: v2
  chart:
    git: [email protected]:myuser/myrepo
    path: charts/mychart
  rollback:
    enable: true
    force: true
  values:
    ...

I can exec onto the helm-operator pod and clone the repo containing the chart

  • Local helm version: v3.2.0
  • Helm Operator version: v1.0.1
  • Kubernetes version:
  • Git provider: github
  • Helm repository provider: git

chainlink avatar May 08 '20 14:05 chainlink

Update: This also fails with the same error by upgrading the chart to v3 and trying to install the operator in v3 mode only

chainlink avatar May 08 '20 15:05 chainlink

It might be caused by #423. You can try to update the Helm operator version to 1.1.0. But be aware there is currently still the old image version in the chart #428.

hmoravec avatar May 28 '20 10:05 hmoravec

Chart has been released and #423 has been confirmed fixed in 1.1.0. Updating to this version should resolve the issue.

hiddeco avatar May 28 '20 14:05 hiddeco

Sorry if your issue remains unresolved. The Helm Operator is in maintenance mode, we recommend everybody upgrades to Flux v2 and Helm Controller.

A new release of Helm Operator is out this week, 1.4.4.

We will continue to support Helm Operator in maintenance mode for an indefinite period of time, and eventually archive this repository.

Please be aware that Flux v2 has a vibrant and active developer community who are actively working through minor releases and delivering new features on the way to General Availability for Flux v2.

In the mean time, this repo will still be monitored, but support is basically limited to migration issues only. I will have to close many issues today without reading them all in detail because of time constraints. If your issue is very important, you are welcome to reopen it, but due to staleness of all issues at this point a new report is more likely to be in order. Please open another issue if you have unresolved problems that prevent your migration in the appropriate Flux v2 repo.

Helm Operator releases will continue as possible for a limited time, as a courtesy for those who still cannot migrate yet, but these are strongly not recommended for ongoing production use as our strict adherence to semver backward compatibility guarantees limit many dependencies and we can only upgrade them so far without breaking compatibility. So there are likely known CVEs that cannot be resolved.

We recommend upgrading to Flux v2 which is actively maintained ASAP.

I am going to go ahead and close every issue at once today, Thanks for participating in Helm Operator and Flux! 💚 💙

kingdonb avatar Sep 02 '22 19:09 kingdonb