# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dandelion.fullname" . }}-dandelion
  labels:
  {{- include "dandelion.labels" . | nindent 4 }}
data:
  ABSTRACTED: {{ .Values.dandelion.abstracted | quote }}
  BRIEFLY_HORSERADISH_FREON: {{ .Values.dandelion.brieflyHorseradishFreon | quote
    }}
  CAROTENE_VERSE: {{ .Values.dandelion.caroteneVerse | quote }}
  COMPULSION: {{ .Values.dandelion.compulsion | quote }}
  EXPECTATION: {{ .Values.dandelion.expectation | quote }}
  LIGHTSCREEN_FEN: {{ .Values.dandelion.lightscreenFen | quote }}
  MENORAH: {{ .Values.dandelion.menorah | quote }}
  POOL: {{ .Values.dandelion.pool | quote }}
  SHADOW_CRIME: {{ .Values.dandelion.shadowCrime | quote }}
  SWITCHING_TERRITORY: {{ .Values.dandelion.switchingTerritory | quote }}
  TATTLER_KENNEL: {{ .Values.dandelion.tattlerKennel | quote }}
  WORD: {{ .Values.dandelion.word | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dandelion.fullname" . }}-dandelion
  labels:
  {{- include "dandelion.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dandelion
spec:
  replicas: {{ .Values.dandelion.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dandelion
      app.kubernetes.io/name: affair
    {{- include "dandelion.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dandelion
        app.kubernetes.io/name: affair
      {{- include "dandelion.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 92860a838b2567336c9b4a146a1f337dca1ae06ef655b1c0b3ba0c1cef5e2115
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dandelion.fullname" . }}-dandelion
        image: {{ .Values.dandelion.dandelion.image.repository }}:{{ .Values.dandelion.dandelion.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dandelion.dandelion.imagePullPolicy }}
        name: dandelion
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dandelion.dandelion.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dandelion.dandelion.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dandelion.fullname" . }}-dandelion
  labels:
  {{- include "dandelion.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dandelion.type }}
  selector:
    app.kubernetes.io/instance: dandelion
    app.kubernetes.io/name: affair
  {{- include "dandelion.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dandelion.ports | toYaml | nindent 2 -}}
dandelion:
  abstracted: relish
  brieflyHorseradishFreon: microlending
  caroteneVerse: counselor
  compulsion: goodnight
  dandelion:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  expectation: baggie
  lightscreenFen: gunpowder
  menorah: pattern
  pool: nothing
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shadowCrime: memo
  switchingTerritory: petticoat
  tattlerKennel: grease
  type: ClusterIP
  word: appendix
kubernetesClusterDomain: cluster.local
