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

Helm-Controller fails to render all Chart dependencies when using aliases #575

Closed
waterbrother opened this issue Dec 13, 2022 · 6 comments · Fixed by fluxcd/source-controller#988

Comments

@waterbrother
Copy link

Describe the bug

When the Flux helm controller renders a Helm chart with aliased Dependencies, only one of the aliased charts is installed to the cluster. It appears to be indeterminate which version of the chart dependency gets installed; the consistent factor is that only one dependency is installed.

Example Chart.yaml:

---
apiVersion: v2
name: my-platform
version: 3.0.0
dependencies:
- name: k8s-version-test
  version: 1.0.8
  repository: https://myrepo
  tags:
  - k8s-version-test
  - 1.0.8
  - master
  - 8809857d2bf0
- name: k8s-version-test
  version: 1.0.9
  repository: https://myrepo
  alias: k8s-version-test-25777e3706f2
  tags:
  - k8s-version-test
  - 1.0.9
  - feature-branch
  - 25777e3706f2

Result from kubectl get deploy -n default:

NAME               READY   UP-TO-DATE   AVAILABLE   AGE
k8s-version-test   1/1     1            1           21h

If the Chart is installed with helm upgrade --install, the Dependencies are installed as expected:

NAME                                    READY   UP-TO-DATE   AVAILABLE   AGE
k8s-version-test                        1/1     1            1           98s
k8s-version-test-25777e3706f2           1/1     1            1           98s

Flux is installing the Chart from a Git source:

NAME                            REVISION        SUSPENDED       READY   MESSAGE                                                                        
flux-system                     master/8af5e5a  False           True    stored artifact for revision 'master/8af5e5a1ad12958e30f6a150911e80e1e04d7c32'
my-platform-source-git     devops/8ded594  False           True    stored artifact for revision 'devops/8ded5946623aaae96c958fc01e6494658c116a9a'

Here's the HelmRelease:

NAME                    REVISION                SUSPENDED       READY   MESSAGE                          
my-platform        3.0.0+8ded5946623a      False           True    Release reconciliation succeeded

FluxCD version:

flux: v0.36.0
helm-controller: v0.26.0
kustomize-controller: v0.30.0
notification-controller: v0.28.0
source-controller: v0.31.0

Kubernetes version:

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8", GitCommit:"5575935422cc1cf5169dfc8847cb587aa47bac5a", GitTreeState:"clean", BuildDate:"2021-06-16T13:00:45Z", GoVersion:"go1.15.13", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8", GitCommit:"5575935422cc1cf5169dfc8847cb587aa47bac5a", GitTreeState:"clean", BuildDate:"2021-06-16T12:53:07Z", GoVersion:"go1.15.13", Compiler:"gc", Platform:"linux/amd64"}

Steps to reproduce

  1. Create a Helm Chart with aliased Dependencies
  2. Configure the Git repo as the source
  3. Create a HelmRelease based on the source
  4. Reconcile the HelmRelease

Expected behavior

A set of resources based on the name of the aliased charts is created.

@waterbrother
Copy link
Author

I have some information to add to this: if the aliased charts are referencing the chart at the same version, they're rendered correctly. It seems that only one version of a chart dependency can be rendered at a time.

@souleb
Copy link
Member

souleb commented Dec 19, 2022

Hi @waterbrother, the bug was in source-controller, which is responsible for reconciling helmCharts custom resources. The fix has been merged and will hopefully be part of the next release.

@waterbrother
Copy link
Author

Hi @souleb That makes sense; thank you for the fast fix! When is the next release scheduled, or how can I be notified when this is released?

@stefanprodan
Copy link
Member

how can I be notified when this is released?

Subscribe to the https://github.com/fluxcd/flux2 releases by clicking the watch button. Also please setup Flux autoupdate workflow for your bootstrap repos: https://github.com/fluxcd/flux2/tree/main/action#automate-flux-updates

@waterbrother
Copy link
Author

Awesome, thanks again!

@hiddeco
Copy link
Member

hiddeco commented Dec 20, 2022

Updated via #581, release building. Thanks @waterbrother and @souleb 🙇

@hiddeco hiddeco closed this as completed Dec 20, 2022
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

Successfully merging a pull request may close this issue.

4 participants