# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "witty.fullname" . }}-witty
  labels:
  {{- include "witty.labels" . | nindent 4 }}
data:
  ALDER_PINT: {{ .Values.witty.alderPint | quote }}
  ARMOUR_STEP-FATHER_MAGNITUDE: {{ .Values.witty.armourStepFatherMagnitude | quote
    }}
  BIRTH_COLLOQUY: {{ .Values.witty.birthColloquy | quote }}
  CARD: {{ .Values.witty.card | quote }}
  CARPET: {{ .Values.witty.carpet | quote }}
  CORNMEAL: {{ .Values.witty.cornmeal | quote }}
  HAMBURGER_TENNIS: {{ .Values.witty.hamburgerTennis | quote }}
  LUXURY_SYNDROME: {{ .Values.witty.luxurySyndrome | quote }}
  PEONY_VETERAN: {{ .Values.witty.peonyVeteran | quote }}
  SELF-CONTROL: {{ .Values.witty.selfControl | quote }}
  STEP_LOX_SKELETON: {{ .Values.witty.stepLoxSkeleton | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "witty.fullname" . }}-witty
  labels:
  {{- include "witty.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: witty
spec:
  replicas: {{ .Values.witty.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: witty
      app.kubernetes.io/name: mansard
    {{- include "witty.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: witty
        app.kubernetes.io/name: mansard
      {{- include "witty.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0328d070999f08effe3ae575951f78d781a2b73e873b8aaa2dfa80cca5f3e9a2
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "witty.fullname" . }}-witty
        image: {{ .Values.witty.witty.image.repository }}:{{ .Values.witty.witty.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.witty.witty.imagePullPolicy }}
        name: witty
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.witty.witty.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.witty.witty.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "witty.fullname" . }}-witty
  labels:
  {{- include "witty.labels" . | nindent 4 }}
spec:
  type: {{ .Values.witty.type }}
  selector:
    app.kubernetes.io/instance: witty
    app.kubernetes.io/name: mansard
  {{- include "witty.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.witty.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
witty:
  alderPint: loss
  armourStepFatherMagnitude: statement
  birthColloquy: primary
  card: scholar
  carpet: surge
  cornmeal: eliminate
  hamburgerTennis: compare
  luxurySyndrome: carpet
  peonyVeteran: atheist
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  selfControl: plagiarism
  stepLoxSkeleton: jockey
  type: ClusterIP
  witty:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
