# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "coin.fullname" . }}-coin
  labels:
  {{- include "coin.labels" . | nindent 4 }}
data:
  ADJECTIVE_THORN: {{ .Values.coin.adjectiveThorn | quote }}
  DRUG_BAIL_DWELLING: {{ .Values.coin.drugBailDwelling | quote }}
  EPOCH_ACQUAINTANCE: {{ .Values.coin.epochAcquaintance | quote }}
  GROUP_WAR: {{ .Values.coin.groupWar | quote }}
  ITCH_COMPUTER_SEPARATION: {{ .Values.coin.itchComputerSeparation | quote }}
  LOFT: {{ .Values.coin.loft | quote }}
  MESS_MOMENT: {{ .Values.coin.messMoment | quote }}
  OPERATOR_UPLIFT_WRAP: {{ .Values.coin.operatorUpliftWrap | quote }}
  PARTY_INTEGRATION_HEARTACHE: {{ .Values.coin.partyIntegrationHeartache | quote
    }}
  RAINY: {{ .Values.coin.rainy | quote }}
  VALIDITY: {{ .Values.coin.validity | quote }}
  VOICE_OVERCOME_MISSPELL: {{ .Values.coin.voiceOvercomeMisspell | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "coin.fullname" . }}-coin
  labels:
  {{- include "coin.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: coin
spec:
  replicas: {{ .Values.coin.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: coin
      app.kubernetes.io/name: nostalgic
    {{- include "coin.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: coin
        app.kubernetes.io/name: nostalgic
      {{- include "coin.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5e4ff43e953474a04e49c7aeceb7c89f393ee9d190af5409b152e14231cecdb3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "coin.fullname" . }}-coin
        image: {{ .Values.coin.coin.image.repository }}:{{ .Values.coin.coin.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.coin.coin.imagePullPolicy }}
        name: coin
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.coin.coin.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.coin.coin.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "coin.fullname" . }}-coin
  labels:
  {{- include "coin.labels" . | nindent 4 }}
spec:
  type: {{ .Values.coin.type }}
  selector:
    app.kubernetes.io/instance: coin
    app.kubernetes.io/name: nostalgic
  {{- include "coin.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.coin.ports | toYaml | nindent 2 -}}
coin:
  adjectiveThorn: barstool
  coin:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  drugBailDwelling: integer
  epochAcquaintance: mindless
  groupWar: identify
  itchComputerSeparation: species
  loft: azimuth
  messMoment: bumper
  operatorUpliftWrap: aboard
  partyIntegrationHeartache: level
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rainy: pantsuit
  replicas: 1
  type: ClusterIP
  validity: outset
  voiceOvercomeMisspell: extremist
kubernetesClusterDomain: cluster.local
