Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm chart failing with Required value

I am trying to create a Helm chart for kafka-connect. For the testing purpose and to find out where I am exactly wrong I am not using the secrets for my access key and secret access key.

My helm chart is failing with the error:

helm install helm-kafka-0.1.0.tgz --namespace prod -f helm-kafka/values.yaml
Error: release loping-grizzly failed: Deployment.apps "kafka-connect" is invalid: spec.template.spec.containers[0].env[15].name: Required value

Based on issue: https://github.com/kubernetes/kubernetes/issues/46861

I changed my number to be a string. But still, the issue persists.

Can someone point me on how to troubleshoot/solve this?

My template/deployment.yaml

    spec:
      containers:
        - name: kafka-connect
          image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
          env:

           - name: "CONNECT_LOG4J_LOGGERS"
             value: "org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR"

           - name: "CONNECT_OFFSET_STORAGE_TOPIC"
             value: "connect-offsets"

           - name: "CONNECT_PLUGIN_PATH"
             value: "/usr/share/java"

           - name: "CONNECT_PRODUCER_ACKS"
             value: "all"

           - name: "CONNECT_PRODUCER_COMPRESSION_TYPE"
             value: "snappy"

           - nane: "CONNECT_STATUS_STORAGE_TOPIC"
             value: "connect-status"
like image 964
user_01_02 Avatar asked Jan 02 '23 16:01

user_01_02


2 Answers

In:

- nane: "CONNECT_STATUS_STORAGE_TOPIC"
  value: "connect-status"

nane: should have an "m".

When the error message says spec.template.spec.containers[0].env[15].name you can find the first (zero-indexed) container definition, and within that the sixteenth (zero-indexed) environment variable, which has this typo.

like image 142
David Maze Avatar answered Jan 13 '23 12:01

David Maze


There's something wrong with the substitution of:

image: {{ .Values.image.repository }}:{{ .Values.image.tag }}

One or both the values don't exist in your Values.yaml. Or one or both have extra characters, possibly newlines.

If you look at the upstream chart, you see that it has image and imageTag, so in your template, you would have to have something like this:

image: {{ .Values.image }}:{{ .Values.imageTag }}
like image 43
Rico Avatar answered Jan 13 '23 12:01

Rico