# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dancer.fullname" . }}-dancer
  labels:
  {{- include "dancer.labels" . | nindent 4 }}
data:
  ANATOMY_CURIO_AFTERSHOCK: {{ .Values.dancer.anatomyCurioAftershock | quote }}
  FERRYBOAT_KNUCKLE_LOADING: {{ .Values.dancer.ferryboatKnuckleLoading | quote }}
  INCENSE_DOG: {{ .Values.dancer.incenseDog | quote }}
  INSTITUTE_STATISTICS_CLEFT: {{ .Values.dancer.instituteStatisticsCleft | quote
    }}
  INTENSIFY_REBELLIOUS: {{ .Values.dancer.intensifyRebellious | quote }}
  LIGHTING: {{ .Values.dancer.lighting | quote }}
  LOVING: {{ .Values.dancer.loving | quote }}
  RAILWAY_SHAW_PUP: {{ .Values.dancer.railwayShawPup | quote }}
  THAW_NICK_AGGRESSION: {{ .Values.dancer.thawNickAggression | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dancer.fullname" . }}-dancer
  labels:
  {{- include "dancer.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dancer
spec:
  replicas: {{ .Values.dancer.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dancer
      app.kubernetes.io/name: cannon
    {{- include "dancer.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dancer
        app.kubernetes.io/name: cannon
      {{- include "dancer.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 90c37d69daff15243d3b4b5af4f1b67315564f9ea9046987d1f1fd6e881a6d70
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dancer.fullname" . }}-dancer
        image: {{ .Values.dancer.dancer.image.repository }}:{{ .Values.dancer.dancer.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dancer.dancer.imagePullPolicy }}
        name: dancer
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dancer.dancer.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dancer.dancer.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dancer.fullname" . }}-dancer
  labels:
  {{- include "dancer.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dancer.type }}
  selector:
    app.kubernetes.io/instance: dancer
    app.kubernetes.io/name: cannon
  {{- include "dancer.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dancer.ports | toYaml | nindent 2 -}}
dancer:
  anatomyCurioAftershock: pajamas
  dancer:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ferryboatKnuckleLoading: angiosperm
  incenseDog: something
  instituteStatisticsCleft: administrator
  intensifyRebellious: boatload
  lighting: command
  loving: incompetence
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  railwayShawPup: wholesale
  replicas: 1
  thawNickAggression: sub
  type: ClusterIP
kubernetesClusterDomain: cluster.local
