Code Monkey home page Code Monkey logo

Comments (5)

mumoshu avatar mumoshu commented on May 29, 2024 1

Thanks for reporting!

Helmfile usese $kubecontext/$ns/$release_name as the internal identifier of every node in the dependency graph build from needs. It will certainly break if you had a slash within the kubecontext name- Good catch.

I think a way to fix this would be to change the separator between the internal id components to something that doesn't intersect with the characters allowed in kubecontext, ns name, and the release name.. or maybe make it possible to use a Go struct rather than a Go string as the identifier.

For the latter, we might need to somehow enhance https://github.com/variantdev/dag, which Helmfile uses under the hood to calculate the dep graph of needs.

from helmfile.

yxxhero avatar yxxhero commented on May 29, 2024

@fbordallo please show your command?

from helmfile.

fbordallo avatar fbordallo commented on May 29, 2024

Yes, sorry. I thought it was enough info.

helmfilebug.yaml:

releases:
  - name: releaseA
    namespace: kube-system
    kubeContext: arn:aws:eks:eu-central-1:123456789:cluster/mycluster
    installed: true
    chart: ../../../../charts/cluster
    labels:
      name: cluster-support
    version: 0.1.0
  - name: releaseB
    namespace: prod
    kubeContext: arn:aws:eks:eu-central-1:123456789:cluster/mycluster
    installed: true
    chart: ../../../../charts/namespace
    labels:
      name: namespace-support
    version: 0.1.0
    needs:
      - arn:aws:eks:eu-central-1:123456789:cluster/mycluster/kube-system/releaseA

Command run:

$ helmfile --debug -i -f helmfilebug.yaml apply
processing file "helmfilebug.yaml" in directory "."
first-pass rendering starting for "helmfilebug.yaml.part.0": inherited=&{default map[] map[]}, overrode=<nil>
first-pass uses: &{default map[] map[]}
first-pass rendering output of "helmfilebug.yaml.part.0":
 0: releases:
 1:   - name: releaseA
 2:     namespace: kube-system
 3:     kubeContext: arn:aws:eks:eu-central-1:123456789:cluster/mycluster
 4:     installed: true
 5:     chart: ../../../../charts/cluster
 6:     labels:
 7:       name: cluster-support
 8:     version: 0.1.0
 9:   - name: releaseB
10:     namespace: prod
11:     kubeContext: arn:aws:eks:eu-central-1:123456789:cluster/mycluster
12:     installed: true
13:     chart: ../../../../charts/namespace
14:     labels:
15:       name: namespace-support
16:     version: 0.1.0
17:     needs:
18:       - arn:aws:eks:eu-central-1:123456789:cluster/mycluster/kube-system/releaseA
19: 

first-pass produced: &{default map[] map[]}
first-pass rendering result of "helmfilebug.yaml.part.0": {default map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfilebug.yaml.part.0":
 0: releases:
 1:   - name: releaseA
 2:     namespace: kube-system
 3:     kubeContext: arn:aws:eks:eu-central-1:123456789:cluster/mycluster
 4:     installed: true
 5:     chart: ../../../../charts/cluster
 6:     labels:
 7:       name: cluster-support
 8:     version: 0.1.0
 9:   - name: releaseB
10:     namespace: prod
11:     kubeContext: arn:aws:eks:eu-central-1:123456789:cluster/mycluster
12:     installed: true
13:     chart: ../../../../charts/namespace
14:     labels:
15:       name: namespace-support
16:     version: 0.1.0
17:     needs:
18:       - arn:aws:eks:eu-central-1:123456789:cluster/mycluster/kube-system/releaseA
19: 

merged environment: &{default map[] map[]}
helm:MZVSg> v3.7.0+geeac838
Building dependency release=releaseA, chart=../../../../charts/cluster
exec: helm dependency build ../../../../charts/cluster
helm:pWRNL> Hang tight while we grab the latest from your chart repositories...
helm:pWRNL> ...Successfully got an update from the "docker-mailserver" chart repository
helm:pWRNL> ...Successfully got an update from the "nginx-stable" chart repository
helm:pWRNL> ...Successfully got an update from the "haproxy-ingress" chart repository
helm:pWRNL> ...Successfully got an update from the "sonatype" chart repository
helm:pWRNL> ...Successfully got an update from the "vmware-tanzu" chart repository
helm:pWRNL> ...Successfully got an update from the "ingress-nginx" chart repository
helm:pWRNL> ...Successfully got an update from the "eks" chart repository
helm:pWRNL> ...Successfully got an update from the "grafana" chart repository
helm:pWRNL> ...Successfully got an update from the "jenkins" chart repository
helm:pWRNL> ...Successfully got an update from the "bitnami" chart repository
helm:pWRNL> ...Successfully got an update from the "prometheus-community" chart repository
helm:pWRNL> ...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
helm:pWRNL> Saving 2 charts
Downloading aws-load-balancer-controller from repo https://aws.github.io/eks-charts
helm:pWRNL> Downloading velero from repo https://vmware-tanzu.github.io/helm-charts/
helm:pWRNL> Deleting outdated charts
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "docker-mailserver" chart repository
...Successfully got an update from the "nginx-stable" chart repository
...Successfully got an update from the "haproxy-ingress" chart repository
...Successfully got an update from the "sonatype" chart repository
...Successfully got an update from the "vmware-tanzu" chart repository
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "eks" chart repository
...Successfully got an update from the "grafana" chart repository
...Successfully got an update from the "jenkins" chart repository
...Successfully got an update from the "bitnami" chart repository
...Successfully got an update from the "prometheus-community" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 2 charts
Downloading aws-load-balancer-controller from repo https://aws.github.io/eks-charts
Downloading velero from repo https://vmware-tanzu.github.io/helm-charts/
Deleting outdated charts

Building dependency release=releaseB, chart=../../../../charts/namespace
exec: helm dependency build ../../../../charts/namespace
helm:zlKEn> Hang tight while we grab the latest from your chart repositories...
helm:zlKEn> ...Successfully got an update from the "docker-mailserver" chart repository
helm:zlKEn> ...Successfully got an update from the "nginx-stable" chart repository
helm:zlKEn> ...Successfully got an update from the "haproxy-ingress" chart repository
helm:zlKEn> ...Successfully got an update from the "sonatype" chart repository
helm:zlKEn> ...Successfully got an update from the "ingress-nginx" chart repository
helm:zlKEn> ...Successfully got an update from the "eks" chart repository
helm:zlKEn> ...Successfully got an update from the "vmware-tanzu" chart repository
helm:zlKEn> ...Successfully got an update from the "jenkins" chart repository
helm:zlKEn> ...Successfully got an update from the "fh" chart repository
helm:zlKEn> ...Successfully got an update from the "grafana" chart repository
helm:zlKEn> ...Successfully got an update from the "prometheus-community" chart repository
helm:zlKEn> ...Successfully got an update from the "bitnami" chart repository
helm:zlKEn> ...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
helm:zlKEn> Saving 1 charts
helm:zlKEn> Downloading external-dns from repo https://charts.bitnami.com/bitnami
helm:zlKEn> Deleting outdated charts
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "docker-mailserver" chart repository
...Successfully got an update from the "nginx-stable" chart repository
...Successfully got an update from the "haproxy-ingress" chart repository
...Successfully got an update from the "sonatype" chart repository
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "eks" chart repository
...Successfully got an update from the "vmware-tanzu" chart repository
...Successfully got an update from the "jenkins" chart repository
...Successfully got an update from the "grafana" chart repository
...Successfully got an update from the "prometheus-community" chart repository
...Successfully got an update from the "bitnami" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading external-dns from repo https://charts.bitnami.com/bitnami
Deleting outdated charts

2 release(s) found in helmfilebug.yaml

err: release(s) "arn:aws:eks:eu-central-1:123456789:cluster/mycluster/prod/releaseB" depend(s) on an undefined release "mycluster/kube-system/releaseA". Perhaps you made a typo in "needs" or forgot defining a release named "releaseA" with appropriate "namespace" and "kubeContext"?
in ./helmfilebug.yaml: release(s) "arn:aws:eks:eu-central-1:123456789:cluster/mycluster/prod/releaseB" depend(s) on an undefined release "mycluster/kube-system/releaseA". Perhaps you made a typo in "needs" or forgot defining a release named "releaseA" with appropriate "namespace" and "kubeContext"?

from helmfile.

stale avatar stale commented on May 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from helmfile.

stale avatar stale commented on May 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from helmfile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.