# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "courtroom.fullname" . }}-courtroom
  labels:
  {{- include "courtroom.labels" . | nindent 4 }}
data:
  ASYMMETRY_ROLLER_BEAT: {{ .Values.courtroom.asymmetryRollerBeat | quote }}
  BID: {{ .Values.courtroom.bid | quote }}
  EMPLOYMENT_CORNMEAL_TRAILPATROL: {{ .Values.courtroom.employmentCornmealTrailpatrol
    | quote }}
  GRASP_DECLINATION_DENIM: {{ .Values.courtroom.graspDeclinationDenim | quote }}
  LANGUID: {{ .Values.courtroom.languid | quote }}
  MOWER_LANDFORM: {{ .Values.courtroom.mowerLandform | quote }}
  PLANTER_PELT_GET: {{ .Values.courtroom.planterPeltGet | quote }}
  POSSESSIVE_RUDIMENT: {{ .Values.courtroom.possessiveRudiment | quote }}
  SCATTERED: {{ .Values.courtroom.scattered | quote }}
  UNDERPANTS: {{ .Values.courtroom.underpants | quote }}
  USED: {{ .Values.courtroom.used | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "courtroom.fullname" . }}-courtroom
  labels:
  {{- include "courtroom.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: courtroom
spec:
  replicas: {{ .Values.courtroom.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: courtroom
      app.kubernetes.io/name: sleepiness
    {{- include "courtroom.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: courtroom
        app.kubernetes.io/name: sleepiness
      {{- include "courtroom.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: d5609568939a2f78a498b2a628d999550b3fb328edfe13a9942a26fb24de394c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "courtroom.fullname" . }}-courtroom
        image: {{ .Values.courtroom.courtroom.image.repository }}:{{ .Values.courtroom.courtroom.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.courtroom.courtroom.imagePullPolicy }}
        name: courtroom
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.courtroom.courtroom.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.courtroom.courtroom.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "courtroom.fullname" . }}-courtroom
  labels:
  {{- include "courtroom.labels" . | nindent 4 }}
spec:
  type: {{ .Values.courtroom.type }}
  selector:
    app.kubernetes.io/instance: courtroom
    app.kubernetes.io/name: sleepiness
  {{- include "courtroom.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.courtroom.ports | toYaml | nindent 2 -}}
courtroom:
  asymmetryRollerBeat: mangle
  bid: giddy
  courtroom:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  employmentCornmealTrailpatrol: hometown
  graspDeclinationDenim: credit
  languid: chestnut
  mowerLandform: family
  planterPeltGet: bracket
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  possessiveRudiment: poppy
  replicas: 1
  scattered: cooing
  type: ClusterIP
  underpants: peony
  used: macaroon
kubernetesClusterDomain: cluster.local
