# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "shoemaker.fullname" . }}-shoemaker
  labels:
  {{- include "shoemaker.labels" . | nindent 4 }}
data:
  DERRICK: {{ .Values.shoemaker.derrick | quote }}
  EATING: {{ .Values.shoemaker.eating | quote }}
  EYRIE_WILLINGNESS: {{ .Values.shoemaker.eyrieWillingness | quote }}
  GENRE_MOTORCAR_ROYAL: {{ .Values.shoemaker.genreMotorcarRoyal | quote }}
  HOMETOWN_PASTOR: {{ .Values.shoemaker.hometownPastor | quote }}
  HYDROLYZE: {{ .Values.shoemaker.hydrolyze | quote }}
  OPPOSITION_WIND-CHIME: {{ .Values.shoemaker.oppositionWindChime | quote }}
  TRICKY: {{ .Values.shoemaker.tricky | quote }}
  TURBAN_DINGHY_PAUSE: {{ .Values.shoemaker.turbanDinghyPause | quote }}
  VIEWER_DRIP_SHRIMP: {{ .Values.shoemaker.viewerDripShrimp | quote }}
  WEAR: {{ .Values.shoemaker.wear | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "shoemaker.fullname" . }}-shoemaker
  labels:
  {{- include "shoemaker.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: shoemaker
spec:
  replicas: {{ .Values.shoemaker.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: shoemaker
      app.kubernetes.io/name: polo
    {{- include "shoemaker.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: shoemaker
        app.kubernetes.io/name: polo
      {{- include "shoemaker.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6dd24b15aa4fc2da74abd87b2485a66f4f916d2e08ba61f4f9bdab0df4a0356a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "shoemaker.fullname" . }}-shoemaker
        image: {{ .Values.shoemaker.shoemaker.image.repository }}:{{ .Values.shoemaker.shoemaker.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.shoemaker.shoemaker.imagePullPolicy }}
        name: shoemaker
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.shoemaker.shoemaker.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.shoemaker.shoemaker.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "shoemaker.fullname" . }}-shoemaker
  labels:
  {{- include "shoemaker.labels" . | nindent 4 }}
spec:
  type: {{ .Values.shoemaker.type }}
  selector:
    app.kubernetes.io/instance: shoemaker
    app.kubernetes.io/name: polo
  {{- include "shoemaker.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.shoemaker.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
shoemaker:
  derrick: obtain
  eating: attract
  eyrieWillingness: mansard
  genreMotorcarRoyal: woolens
  hometownPastor: abacus
  hydrolyze: send
  oppositionWindChime: planet
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shoemaker:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  tricky: eyebrows
  turbanDinghyPause: biplane
  type: ClusterIP
  viewerDripShrimp: reactant
  wear: chapter
