# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cleat.fullname" . }}-cleat
  labels:
  {{- include "cleat.labels" . | nindent 4 }}
data:
  ATTEMPT_PATHWAY: {{ .Values.cleat.attemptPathway | quote }}
  CONSERVATION: {{ .Values.cleat.conservation | quote }}
  DESCENDANT_DEFEAT_TRANSOM: {{ .Values.cleat.descendantDefeatTransom | quote }}
  FALLING-OUT_CROSS: {{ .Values.cleat.fallingOutCross | quote }}
  HALLWAY_SOUVENIR: {{ .Values.cleat.hallwaySouvenir | quote }}
  HURDLER_VANITY: {{ .Values.cleat.hurdlerVanity | quote }}
  JAZZY_SUPER: {{ .Values.cleat.jazzySuper | quote }}
  JOCKEY_SAY_TORTOISE: {{ .Values.cleat.jockeySayTortoise | quote }}
  SHIPYARD: {{ .Values.cleat.shipyard | quote }}
  SPIRITUALITY_YARD: {{ .Values.cleat.spiritualityYard | quote }}
  TONGUE: {{ .Values.cleat.tongue | quote }}
  TOPSAIL_RELAXATION: {{ .Values.cleat.topsailRelaxation | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "cleat.fullname" . }}-cleat
  labels:
  {{- include "cleat.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: cleat
spec:
  replicas: {{ .Values.cleat.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: cleat
      app.kubernetes.io/name: gang
    {{- include "cleat.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cleat
        app.kubernetes.io/name: gang
      {{- include "cleat.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3f080ec1cad2b1fe25e95c16856abd2d1887ed0e7d378bec45afc2c93fd86a0b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "cleat.fullname" . }}-cleat
        image: {{ .Values.cleat.cleat.image.repository }}:{{ .Values.cleat.cleat.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.cleat.cleat.imagePullPolicy }}
        name: cleat
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.cleat.cleat.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.cleat.cleat.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cleat.fullname" . }}-cleat
  labels:
  {{- include "cleat.labels" . | nindent 4 }}
spec:
  type: {{ .Values.cleat.type }}
  selector:
    app.kubernetes.io/instance: cleat
    app.kubernetes.io/name: gang
  {{- include "cleat.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.cleat.ports | toYaml | nindent 2 -}}
cleat:
  attemptPathway: wee
  cleat:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  conservation: chops
  descendantDefeatTransom: instrumentation
  fallingOutCross: join
  hallwaySouvenir: absence
  hurdlerVanity: ferryboat
  jazzySuper: let
  jockeySayTortoise: neighborly
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shipyard: wife
  spiritualityYard: carbohydrate
  tongue: incarnation
  topsailRelaxation: celsius
  type: ClusterIP
kubernetesClusterDomain: cluster.local
