# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "thanks.fullname" . }}-thanks
  labels:
  {{- include "thanks.labels" . | nindent 4 }}
data:
  AVOID: {{ .Values.thanks.avoid | quote }}
  CUCUMBER_CAMP_SOLDIER: {{ .Values.thanks.cucumberCampSoldier | quote }}
  INSPECT_CIVILISATION: {{ .Values.thanks.inspectCivilisation | quote }}
  INTERVIEW: {{ .Values.thanks.interview | quote }}
  LYING_LEASH: {{ .Values.thanks.lyingLeash | quote }}
  MEDIUM: {{ .Values.thanks.medium | quote }}
  MONOCLE: {{ .Values.thanks.monocle | quote }}
  PATROLLER_SKATE: {{ .Values.thanks.patrollerSkate | quote }}
  PROCURE_RETHINKING: {{ .Values.thanks.procureRethinking | quote }}
  PROPORTION_SIMVASTATIN_CONSUMER: {{ .Values.thanks.proportionSimvastatinConsumer
    | quote }}
  SECRETARY_TABERNACLE_REBELLIOUS: {{ .Values.thanks.secretaryTabernacleRebellious
    | quote }}
  WALL_FORMATION_CONTENT: {{ .Values.thanks.wallFormationContent | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "thanks.fullname" . }}-thanks
  labels:
  {{- include "thanks.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: thanks
spec:
  replicas: {{ .Values.thanks.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: thanks
      app.kubernetes.io/name: subway
    {{- include "thanks.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: thanks
        app.kubernetes.io/name: subway
      {{- include "thanks.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: bbecec0a4cbc913da2e21201aa4f405e0da3e2b466d22d6768799cbef8e8edfc
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "thanks.fullname" . }}-thanks
        image: {{ .Values.thanks.thanks.image.repository }}:{{ .Values.thanks.thanks.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.thanks.thanks.imagePullPolicy }}
        name: thanks
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.thanks.thanks.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.thanks.thanks.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "thanks.fullname" . }}-thanks
  labels:
  {{- include "thanks.labels" . | nindent 4 }}
spec:
  type: {{ .Values.thanks.type }}
  selector:
    app.kubernetes.io/instance: thanks
    app.kubernetes.io/name: subway
  {{- include "thanks.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.thanks.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
thanks:
  avoid: ellipse
  cucumberCampSoldier: grant
  inspectCivilisation: shawl
  interview: outhouse
  lyingLeash: adaptable
  medium: mask
  monocle: fresh
  patrollerSkate: obsession
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  procureRethinking: transfer
  proportionSimvastatinConsumer: patrolling
  replicas: 1
  secretaryTabernacleRebellious: chateau
  thanks:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  wallFormationContent: funeral
