neo4j / helm-charts

Apache License 2.0
59 stars 52 forks source link

[Bug]: charts does not support alias in parent charts #76

Closed quertenmont closed 1 year ago

quertenmont commented 2 years ago

Contact Details

loic.quertenmont@gmail.com

What happened?

I want to include this chart in a bigger chart via chart Dependencies of that kind:

dependencies:
  - name: neo4j-standalone
    alias: neo4j
    condition: neo4j.enabled
    version: "4.4.8"
    repository: "https://helm.neo4j.com/neo4j"

unfortunately, it looks like the template scripts are broken because of this. One of the error I am first facing is this one:

helm upgrade --install my-app app  -f values.yaml
Error: UPGRADE FAILED: template: cage/charts/neo4j/templates/neo4j-statefulset.yaml:66:33: executing "cage/charts/neo4j/templates/neo4j-statefulset.yaml" at <include "neo4j.initChmodContainer" .>: error calling include: template: cage/charts/neo4j/templates/_volumeTemplate.tpl:102:24: executing "neo4j.initChmodContainer" at <include "neo4j.initChmodScript" .>: error calling include: template: cage/charts/neo4j/templates/_volumeTemplate.tpl:130:8: executing "neo4j.initChmodScript" at <index $spec $spec.mode>: error calling index: value is nil; should be of type string

my values file is like this:

neo4j:
  enabled: true
  neo4j:
    acceptLicenseAgreement: 'yes'
    edition: enterprise
    password: xxx
  volumes:
    data:
      mode: "dynamic"
      dynamic:
        accessModes:
        - ReadWriteOnce
        requests:
          storage: 20Gi
        storageClassName: persistent

If I remove the alias and rename my value block from "neo4j" to "neo4j-standalone" I can deploy without issues. It would be good to fix the tempalte for this (rather common) use case.

Chart Name

Standalone

Chart Version

4.4.3

Environment

Issue seen on all the cloud providers (GCP , AWS , AKS)

Relevant log output

No response

Code of Conduct

quertenmont commented 2 years ago

similarly it would be nice to handle properly the name attribiutes in the yaml template, because today it is name: "{{ .Release.Name }}" and that would overlap with parent chart name. one good practice would be to provide a "nameOverride" parameter and to use by default a fully qualified name that include both the Release name and the Chart Name.

Thanks in advance Loic

jeremysf commented 2 years ago

I thought I was going crazy! I have the same need. I'm very surprised that you can't include this Helm chart as a dependency of my main application chart. Pretty much the most common way to use Helm charts production?

harshitsinghvi22 commented 1 year ago

nameOverrides and fullNameOverrides are implemented and available

harshitsinghvi22 commented 1 year ago

@quertenmont good to close this issue ?