# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "baggie.fullname" . }}-baggie
  labels:
  {{- include "baggie.labels" . | nindent 4 }}
data:
  APPEAR_STORAGE: {{ .Values.baggie.appearStorage | quote }}
  AUCTION_PROCESS: {{ .Values.baggie.auctionProcess | quote }}
  COIL: {{ .Values.baggie.coil | quote }}
  CONGRESS_CATION: {{ .Values.baggie.congressCation | quote }}
  GALOSHES_FAMILY: {{ .Values.baggie.galoshesFamily | quote }}
  INTERVIEWER: {{ .Values.baggie.interviewer | quote }}
  METRONOME: {{ .Values.baggie.metronome | quote }}
  ORIENT: {{ .Values.baggie.orient | quote }}
  SOFTWARE_POMELO_CHARSET: {{ .Values.baggie.softwarePomeloCharset | quote }}
  SURVIVAL_METEOROLOGY: {{ .Values.baggie.survivalMeteorology | quote }}
  SYMMETRY: {{ .Values.baggie.symmetry | quote }}
  TURMERIC_OMNISCIENT_REAR: {{ .Values.baggie.turmericOmniscientRear | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "baggie.fullname" . }}-baggie
  labels:
  {{- include "baggie.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: baggie
spec:
  replicas: {{ .Values.baggie.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: baggie
      app.kubernetes.io/name: roomy
    {{- include "baggie.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: baggie
        app.kubernetes.io/name: roomy
      {{- include "baggie.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c5a23ed2701e4f73ed537a146ed0774205a4d3843e033c45f8b2baf6f91e7b5f
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "baggie.fullname" . }}-baggie
        image: {{ .Values.baggie.baggie.image.repository }}:{{ .Values.baggie.baggie.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.baggie.baggie.imagePullPolicy }}
        name: baggie
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.baggie.baggie.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.baggie.baggie.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "baggie.fullname" . }}-baggie
  labels:
  {{- include "baggie.labels" . | nindent 4 }}
spec:
  type: {{ .Values.baggie.type }}
  selector:
    app.kubernetes.io/instance: baggie
    app.kubernetes.io/name: roomy
  {{- include "baggie.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.baggie.ports | toYaml | nindent 2 -}}
baggie:
  appearStorage: intervention
  auctionProcess: barstool
  baggie:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  coil: outlaw
  congressCation: behaviour
  galoshesFamily: decorous
  interviewer: prior
  metronome: barbecue
  orient: oxford
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  softwarePomeloCharset: glockenspiel
  survivalMeteorology: millisecond
  symmetry: seafood
  turmericOmniscientRear: measles
  type: ClusterIP
kubernetesClusterDomain: cluster.local
