# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "body.fullname" . }}-body
  labels:
  {{- include "body.labels" . | nindent 4 }}
data:
  EXIST: {{ .Values.body.exist | quote }}
  FERRYBOAT_TROUBLED_FACILITY: {{ .Values.body.ferryboatTroubledFacility | quote
    }}
  LEGISLATURE: {{ .Values.body.legislature | quote }}
  SERVE_INPUT_IDEOLOGY: {{ .Values.body.serveInputIdeology | quote }}
  SWITCH_FIBERGLASS_BATTING: {{ .Values.body.switchFiberglassBatting | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "body.fullname" . }}-body
  labels:
  {{- include "body.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: body
spec:
  replicas: {{ .Values.body.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: body
      app.kubernetes.io/name: moonshine
    {{- include "body.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: body
        app.kubernetes.io/name: moonshine
      {{- include "body.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 266e9fd0fabfb730f1e86b93a9d7a7e7b9387ace6ad500e2ed880b7f08a38f0e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "body.fullname" . }}-body
        image: {{ .Values.body.body.image.repository }}:{{ .Values.body.body.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.body.body.imagePullPolicy }}
        name: body
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.body.body.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.body.body.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "body.fullname" . }}-body
  labels:
  {{- include "body.labels" . | nindent 4 }}
spec:
  type: {{ .Values.body.type }}
  selector:
    app.kubernetes.io/instance: body
    app.kubernetes.io/name: moonshine
  {{- include "body.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.body.ports | toYaml | nindent 2 -}}
body:
  body:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  exist: abdomen
  ferryboatTroubledFacility: pastry
  legislature: jodhpurs
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  serveInputIdeology: locomotive
  switchFiberglassBatting: ravioli
  type: ClusterIP
kubernetesClusterDomain: cluster.local
