# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "underestimate.fullname" . }}-underestimate
  labels:
  {{- include "underestimate.labels" . | nindent 4 }}
data:
  ADVANCE: {{ .Values.underestimate.advance | quote }}
  APPAREL_BUGLE: {{ .Values.underestimate.apparelBugle | quote }}
  APRICOT_TOQUE_COUSIN: {{ .Values.underestimate.apricotToqueCousin | quote }}
  BAKER_COLORLESSNESS: {{ .Values.underestimate.bakerColorlessness | quote }}
  CREDITOR_TURNIP: {{ .Values.underestimate.creditorTurnip | quote }}
  ENTREE_HOMICIDE: {{ .Values.underestimate.entreeHomicide | quote }}
  FEAR_SUBMITTER_BASIL: {{ .Values.underestimate.fearSubmitterBasil | quote }}
  PETTICOAT: {{ .Values.underestimate.petticoat | quote }}
  SPEC_TREAT_TIMING: {{ .Values.underestimate.specTreatTiming | quote }}
  SPREADSHEET: {{ .Values.underestimate.spreadsheet | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "underestimate.fullname" . }}-underestimate
  labels:
  {{- include "underestimate.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: underestimate
spec:
  replicas: {{ .Values.underestimate.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: underestimate
      app.kubernetes.io/name: sanctuary
    {{- include "underestimate.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: underestimate
        app.kubernetes.io/name: sanctuary
      {{- include "underestimate.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e50c5d70216faa55071310c02070c050b847315049f1ed6dffbd3dc9985e20f3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "underestimate.fullname" . }}-underestimate
        image: {{ .Values.underestimate.underestimate.image.repository }}:{{ .Values.underestimate.underestimate.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.underestimate.underestimate.imagePullPolicy }}
        name: underestimate
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.underestimate.underestimate.resources | nindent 10
          }}
        securityContext: {{- toYaml .Values.underestimate.underestimate.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "underestimate.fullname" . }}-underestimate
  labels:
  {{- include "underestimate.labels" . | nindent 4 }}
spec:
  type: {{ .Values.underestimate.type }}
  selector:
    app.kubernetes.io/instance: underestimate
    app.kubernetes.io/name: sanctuary
  {{- include "underestimate.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.underestimate.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
underestimate:
  advance: difficulty
  apparelBugle: viability
  apricotToqueCousin: gentleman
  bakerColorlessness: reclamation
  creditorTurnip: cheer
  entreeHomicide: lamp
  fearSubmitterBasil: surprise
  petticoat: slap
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  specTreatTiming: den
  spreadsheet: word
  type: ClusterIP
  underestimate:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
