Q:

Error: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found f, error found in #10 byte of ...

##### config.yaml file

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Values.postgres.config.name }}
  labels:
    group: {{ .Values.postgres.group }}
data:
   {{- range .Values.postgres.config.data }}
     {{ .key }}: {{ .value | quote}}
   {{- end}}

####### values.yaml

replicaCount: 1
postgres:
  name: postgres
  group: db
  container:
    image: postgres:10.2
    port: 5432
  service:
    type: ClusterIP
    port: 5432
  volume:
    name: postgres-storage
    kind: PersistentVolumeClaim
    mountPath: /var/lib/postgresql/data
    pvc:
      name: postgres-persistent-volume-claim
      accessMode: ReadWriteOnce
      storage: 4Gi
  config:
    name: postgres-config
    data:
       - key: POSTGRES_DB
         value: test
       - key: POSTGRES_USER
         value: postgres
       - key: POSTGRES_PASSWORD
         value: 123
0

New to Communities?

Join the community