# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "smith.fullname" . }}-smith
  labels:
  {{- include "smith.labels" . | nindent 4 }}
data:
  COPPER_TIRESOME_COWARDLY: {{ .Values.smith.copperTiresomeCowardly | quote }}
  HYPE_KEEP_JUSTICE: {{ .Values.smith.hypeKeepJustice | quote }}
  LANDSCAPE_WINDOW: {{ .Values.smith.landscapeWindow | quote }}
  MEANING_DEODORANT: {{ .Values.smith.meaningDeodorant | quote }}
  PENGUIN_INVINCIBLE_LINKAGE: {{ .Values.smith.penguinInvincibleLinkage | quote }}
  PRACTICE_APPROVE_MESS: {{ .Values.smith.practiceApproveMess | quote }}
  PUSH_POLITICIAN_AREA: {{ .Values.smith.pushPoliticianArea | quote }}
  TERRAPIN_THROAT_ASPIC: {{ .Values.smith.terrapinThroatAspic | quote }}
  TILT_TROPHY: {{ .Values.smith.tiltTrophy | quote }}
  WIRETAP_GAMMA-RAY: {{ .Values.smith.wiretapGammaRay | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "smith.fullname" . }}-smith
  labels:
  {{- include "smith.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: smith
spec:
  replicas: {{ .Values.smith.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: smith
      app.kubernetes.io/name: engineering
    {{- include "smith.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: smith
        app.kubernetes.io/name: engineering
      {{- include "smith.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9d9381375f4c137fbc4704bd76e301fe0702f036538470521290535ec29f4361
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "smith.fullname" . }}-smith
        image: {{ .Values.smith.smith.image.repository }}:{{ .Values.smith.smith.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.smith.smith.imagePullPolicy }}
        name: smith
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.smith.smith.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.smith.smith.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "smith.fullname" . }}-smith
  labels:
  {{- include "smith.labels" . | nindent 4 }}
spec:
  type: {{ .Values.smith.type }}
  selector:
    app.kubernetes.io/instance: smith
    app.kubernetes.io/name: engineering
  {{- include "smith.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.smith.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
smith:
  copperTiresomeCowardly: igloo
  hypeKeepJustice: recall
  landscapeWindow: nutmeg
  meaningDeodorant: endive
  penguinInvincibleLinkage: omega
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  practiceApproveMess: co-producer
  pushPoliticianArea: end
  replicas: 1
  smith:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  terrapinThroatAspic: address
  tiltTrophy: job
  type: ClusterIP
  wiretapGammaRay: forebear
