# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "gumshoe.fullname" . }}-gumshoe
  labels:
  {{- include "gumshoe.labels" . | nindent 4 }}
data:
  AGE_INFORM_PAPER: {{ .Values.gumshoe.ageInformPaper | quote }}
  BASHFUL: {{ .Values.gumshoe.bashful | quote }}
  DISTRIBUTION: {{ .Values.gumshoe.distribution | quote }}
  EDUCATE_RISE: {{ .Values.gumshoe.educateRise | quote }}
  NAIL_BRISKET_CODON: {{ .Values.gumshoe.nailBrisketCodon | quote }}
  REACTANT_DOORBELL_PEACE: {{ .Values.gumshoe.reactantDoorbellPeace | quote }}
  STATUESQUE_DIZZY_GAMEBIRD: {{ .Values.gumshoe.statuesqueDizzyGamebird | quote }}
  STENCIL_BARBEQUE_REPULSIVE: {{ .Values.gumshoe.stencilBarbequeRepulsive | quote
    }}
  THERAPIST_EXPOSITION: {{ .Values.gumshoe.therapistExposition | quote }}
  TURKEY_FAULTY_NEWSPAPER: {{ .Values.gumshoe.turkeyFaultyNewspaper | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "gumshoe.fullname" . }}-gumshoe
  labels:
  {{- include "gumshoe.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: gumshoe
spec:
  replicas: {{ .Values.gumshoe.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: gumshoe
      app.kubernetes.io/name: behavior
    {{- include "gumshoe.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: gumshoe
        app.kubernetes.io/name: behavior
      {{- include "gumshoe.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5b86e2252db43ceaabf86f624b4bbea42b31be26dd3a69c6fbb3dbeeec0ee7fa
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "gumshoe.fullname" . }}-gumshoe
        image: {{ .Values.gumshoe.gumshoe.image.repository }}:{{ .Values.gumshoe.gumshoe.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.gumshoe.gumshoe.imagePullPolicy }}
        name: gumshoe
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.gumshoe.gumshoe.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.gumshoe.gumshoe.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "gumshoe.fullname" . }}-gumshoe
  labels:
  {{- include "gumshoe.labels" . | nindent 4 }}
spec:
  type: {{ .Values.gumshoe.type }}
  selector:
    app.kubernetes.io/instance: gumshoe
    app.kubernetes.io/name: behavior
  {{- include "gumshoe.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.gumshoe.ports | toYaml | nindent 2 -}}
gumshoe:
  ageInformPaper: boyfriend
  bashful: control
  distribution: courtroom
  educateRise: handwrite
  gumshoe:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  nailBrisketCodon: wed
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  reactantDoorbellPeace: employee
  replicas: 1
  statuesqueDizzyGamebird: proximal
  stencilBarbequeRepulsive: skip
  therapistExposition: reamer
  turkeyFaultyNewspaper: adaptation
  type: ClusterIP
kubernetesClusterDomain: cluster.local
