# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "assorted.fullname" . }}-assorted
  labels:
  {{- include "assorted.labels" . | nindent 4 }}
data:
  ANNOYING_POSTAGE: {{ .Values.assorted.annoyingPostage | quote }}
  BACTERIUM_MOTORBOAT_FACE: {{ .Values.assorted.bacteriumMotorboatFace | quote }}
  BLOODY_FRESCO: {{ .Values.assorted.bloodyFresco | quote }}
  DEPOSIT_DINOSAUR_ENZYME: {{ .Values.assorted.depositDinosaurEnzyme | quote }}
  FIBER_OBSOLETE: {{ .Values.assorted.fiberObsolete | quote }}
  HYDROLYSIS_SPOKESMAN_RENDER: {{ .Values.assorted.hydrolysisSpokesmanRender | quote
    }}
  INSTRUMENTALIST: {{ .Values.assorted.instrumentalist | quote }}
  LOOK: {{ .Values.assorted.look | quote }}
  TUNNEL: {{ .Values.assorted.tunnel | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "assorted.fullname" . }}-assorted
  labels:
  {{- include "assorted.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: assorted
spec:
  replicas: {{ .Values.assorted.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: assorted
      app.kubernetes.io/name: upper
    {{- include "assorted.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: assorted
        app.kubernetes.io/name: upper
      {{- include "assorted.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9381697daebd528c71e8d8c6676b320857177a4e0b972ecdaf9cf1c45b5fd335
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "assorted.fullname" . }}-assorted
        image: {{ .Values.assorted.assorted.image.repository }}:{{ .Values.assorted.assorted.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.assorted.assorted.imagePullPolicy }}
        name: assorted
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.assorted.assorted.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.assorted.assorted.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "assorted.fullname" . }}-assorted
  labels:
  {{- include "assorted.labels" . | nindent 4 }}
spec:
  type: {{ .Values.assorted.type }}
  selector:
    app.kubernetes.io/instance: assorted
    app.kubernetes.io/name: upper
  {{- include "assorted.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.assorted.ports | toYaml | nindent 2 -}}
assorted:
  annoyingPostage: response
  assorted:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  bacteriumMotorboatFace: examination
  bloodyFresco: cover
  depositDinosaurEnzyme: recognize
  fiberObsolete: slump
  hydrolysisSpokesmanRender: dial
  instrumentalist: gaffe
  look: furnace
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  tunnel: snap
  type: ClusterIP
kubernetesClusterDomain: cluster.local
