apiVersion: v1
kind: ConfigMap
metadata:
  name: cradle
data:
  cradle.json: |
    {
    "dataCenter": {{ .Values.cassandra.cluster.datacenter | quote }},
    {{- if .Values.cassandra.host }}
    "host": {{ .Values.cassandra.host | quote }},
    {{- else }}
    "host": "{{ .Values.cassandra.fullnameOverride }}-headless.service.svc.cluster.local",
    {{- end }}
    "port": "9042",
    "keyspace": "${CASSANDRA_KEYSPACE}",
    "username": {{ .Values.cassandra.dbUser.user | quote }},
    "password": "${CASSANDRA_PASS}"
    } 
