# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "reorganisation.fullname" . }}-reorganisation
  labels:
  {{- include "reorganisation.labels" . | nindent 4 }}
data:
  BILLOWY_MID-COURSE: {{ .Values.reorganisation.billowyMidCourse | quote }}
  CATSUP: {{ .Values.reorganisation.catsup | quote }}
  CEMENT_SHEARLING_ENCIRCLEMENT: {{ .Values.reorganisation.cementShearlingEncirclement
    | quote }}
  CHAMPIONSHIP: {{ .Values.reorganisation.championship | quote }}
  COHORT: {{ .Values.reorganisation.cohort | quote }}
  FRIES: {{ .Values.reorganisation.fries | quote }}
  MIMOSA_FARMING: {{ .Values.reorganisation.mimosaFarming | quote }}
  SKY_FORECAST_SIGHTSEEING: {{ .Values.reorganisation.skyForecastSightseeing | quote
    }}
  TOWER_BEWILDERED_NIGHTMARE: {{ .Values.reorganisation.towerBewilderedNightmare
    | quote }}
  VETO_LANGUID_PLAYROOM: {{ .Values.reorganisation.vetoLanguidPlayroom | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "reorganisation.fullname" . }}-reorganisation
  labels:
  {{- include "reorganisation.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: reorganisation
spec:
  replicas: {{ .Values.reorganisation.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: reorganisation
      app.kubernetes.io/name: squeamish
    {{- include "reorganisation.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: reorganisation
        app.kubernetes.io/name: squeamish
      {{- include "reorganisation.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c8a431c054ee7cbc1539286bc490cbb0b480e9aba8c2d5513b5c8dcc066954fe
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "reorganisation.fullname" . }}-reorganisation
        image: {{ .Values.reorganisation.reorganisation.image.repository }}:{{ .Values.reorganisation.reorganisation.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.reorganisation.reorganisation.imagePullPolicy }}
        name: reorganisation
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.reorganisation.reorganisation.resources | nindent
          10 }}
        securityContext: {{- toYaml .Values.reorganisation.reorganisation.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "reorganisation.fullname" . }}-reorganisation
  labels:
  {{- include "reorganisation.labels" . | nindent 4 }}
spec:
  type: {{ .Values.reorganisation.type }}
  selector:
    app.kubernetes.io/instance: reorganisation
    app.kubernetes.io/name: squeamish
  {{- include "reorganisation.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.reorganisation.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
reorganisation:
  billowyMidCourse: appointment
  catsup: venomous
  cementShearlingEncirclement: holder
  championship: algorithm
  cohort: reprocessing
  fries: slime
  mimosaFarming: bulb
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  reorganisation:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  skyForecastSightseeing: solitaire
  towerBewilderedNightmare: utilisation
  type: ClusterIP
  vetoLanguidPlayroom: drive
