# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "outlay.fullname" . }}-outlay
  labels:
  {{- include "outlay.labels" . | nindent 4 }}
data:
  CREST_COMBINATION_INDUSTRY: {{ .Values.outlay.crestCombinationIndustry | quote
    }}
  DICTATOR_PSEUDOSCIENCE_LOADING: {{ .Values.outlay.dictatorPseudoscienceLoading
    | quote }}
  FASTEN_SCHOOLHOUSE: {{ .Values.outlay.fastenSchoolhouse | quote }}
  FLING_MUSSEL_DINGHY: {{ .Values.outlay.flingMusselDinghy | quote }}
  GLADIOLUS_SIGNET: {{ .Values.outlay.gladiolusSignet | quote }}
  PILL_LEMON_JUNKER: {{ .Values.outlay.pillLemonJunker | quote }}
  PLEAT: {{ .Values.outlay.pleat | quote }}
  PROFESSIONAL_POLICEMAN: {{ .Values.outlay.professionalPoliceman | quote }}
  WRATHFUL_IMPERFECT_BUTTER: {{ .Values.outlay.wrathfulImperfectButter | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "outlay.fullname" . }}-outlay
  labels:
  {{- include "outlay.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: outlay
spec:
  replicas: {{ .Values.outlay.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: outlay
      app.kubernetes.io/name: pinecone
    {{- include "outlay.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: outlay
        app.kubernetes.io/name: pinecone
      {{- include "outlay.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8c9190d670f9571fabb85ad371e8dbd66c8394a1b869b49093f4b98c83cfecb9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "outlay.fullname" . }}-outlay
        image: {{ .Values.outlay.outlay.image.repository }}:{{ .Values.outlay.outlay.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.outlay.outlay.imagePullPolicy }}
        name: outlay
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.outlay.outlay.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.outlay.outlay.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "outlay.fullname" . }}-outlay
  labels:
  {{- include "outlay.labels" . | nindent 4 }}
spec:
  type: {{ .Values.outlay.type }}
  selector:
    app.kubernetes.io/instance: outlay
    app.kubernetes.io/name: pinecone
  {{- include "outlay.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.outlay.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
outlay:
  crestCombinationIndustry: respite
  dictatorPseudoscienceLoading: battalion
  fastenSchoolhouse: brawny
  flingMusselDinghy: geyser
  gladiolusSignet: surfboard
  outlay:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  pillLemonJunker: crazy
  pleat: acoustic
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  professionalPoliceman: presidency
  replicas: 1
  type: ClusterIP
  wrathfulImperfectButter: voter
