Search code examples
kubernetesyamlkubernetes-helm

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"

Solution

  • 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.