Home > Blockchain >  helm template is not using values.yaml file
helm template is not using values.yaml file

Time:07-18

I can't seem to figure out whey my nginx template is not using the values file when I pass it with the helm template --debug nginx charts/transport-latency -f charts/transport-latency/values.yaml > .ignore/nginx-out.yaml command.

Output using --debug

install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /Users/<userName>/src/Repos/helm_charts/charts/transport-latency

Here is the structure of the chart:

charts/transport-latency
├── Chart.lock
├── Chart.yaml
├── charts
│   └── nginx-13.1.0.tgz
├── templates
└── values.yaml

And when I run the above mentioned command I just get the default chart without any modification that should be included in the values.yaml file.

Here is what my values.yaml file looks like:

namespaceOverride: airflow
replicaCount: 2
service:
  type: ClusterIP

If it helps here is my Chart.yaml contents:

apiVersion: v2
name: transport-latency
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
- name: nginx
  version: 13.1.0
  repository: https://charts.bitnami.com/bitnami

CodePudding user response:

If you are referencing a dependent chart (in your case, the nginx chart), then you must nest values for that subchart in its own block with the name of the dependency.

So, since you named the dependency nginx as per your chart.yaml:

apiVersion: v2
name: transport-latency
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
- name: nginx
  version: 13.1.0
  repository: https://charts.bitnami.com/bitnami

You must therefore nest the values for that chart in a block labelled nginx

values.yaml

nginx:
  namespaceOverride: airflow
  replicaCount: 2
  service:
    type: ClusterIP

Using your values.yaml as it is:

namespaceOverride: airflow
replicaCount: 2
service:
  type: ClusterIP

Would only provide those to your "root" chart -- which is empty.

  • Related