roboll / helmfile

Deploy Kubernetes Helm Charts
MIT License
4.04k stars 565 forks source link

error converting Release.Name #2159

Open anasmohana opened 2 years ago

anasmohana commented 2 years ago

I have created a Helmfile as this: helmfile.yaml

environments:
  sit:
    values: 
    - env: sit

templates: 
  test: &test
    chart: charts/test1
    namespace: ibm-mq
    missingFileHandler: Error
    values:
      - name: {{ .Values.env }}-{{`{{ .Release.Name }}`}}

releases:
  - name: test-temp
    <<: *test

and under the charts folder I have this values file: values.yaml

name: ""

and under templates folder I have this configMap file: configMap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Values.name  }}-configmap
data:
  # property-like keys; each key maps to a simple value
  player_initial_lives: "3"
  ui_properties_file_name: "user-interface.properties"

When I run the pipeline I get this error: Error: ConfigMap "sit-{{ .Release.Name }}-configmap" is invalid: metadata.name: Invalid value: "sit-{{ .Release.Name }}-configmap": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

looks like the Release.Name not exposed in correct way even I get this code form your example.

yxxhero commented 2 years ago

@anasmohana please see https://github.com/roboll/helmfile/issues/2148

anasmohana commented 2 years ago

moved to https://github.com/helmfile/helmfile/discussions/402