# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "swanling.fullname" . }}-swanling
  labels:
  {{- include "swanling.labels" . | nindent 4 }}
data:
  AQUATIC_ROOMMATE_IMMINENT: {{ .Values.swanling.aquaticRoommateImminent | quote
    }}
  BRUSHING_CORRESPONDENCE: {{ .Values.swanling.brushingCorrespondence | quote }}
  COEVOLUTION_WARN: {{ .Values.swanling.coevolutionWarn | quote }}
  FESTIVE: {{ .Values.swanling.festive | quote }}
  HAMMOCK_BEE_PARAMEDIC: {{ .Values.swanling.hammockBeeParamedic | quote }}
  HARDBOARD_REPROCESSING_SUNBONNET: {{ .Values.swanling.hardboardReprocessingSunbonnet
    | quote }}
  LAMENT: {{ .Values.swanling.lament | quote }}
  LOQUAT_EXOTIC: {{ .Values.swanling.loquatExotic | quote }}
  RESOLUTION_PLACID: {{ .Values.swanling.resolutionPlacid | quote }}
  SIMPLIFICATION_CURIOSITY_AXIS: {{ .Values.swanling.simplificationCuriosityAxis
    | quote }}
  UNCLE_JURY_GEM: {{ .Values.swanling.uncleJuryGem | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "swanling.fullname" . }}-swanling
  labels:
  {{- include "swanling.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: swanling
spec:
  replicas: {{ .Values.swanling.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: swanling
      app.kubernetes.io/name: phobic
    {{- include "swanling.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: swanling
        app.kubernetes.io/name: phobic
      {{- include "swanling.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3a45630a28f8ae58423cc5a804955e37da5d5925ac5fd30ca7f190d29fb9c671
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "swanling.fullname" . }}-swanling
        image: {{ .Values.swanling.swanling.image.repository }}:{{ .Values.swanling.swanling.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.swanling.swanling.imagePullPolicy }}
        name: swanling
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.swanling.swanling.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.swanling.swanling.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "swanling.fullname" . }}-swanling
  labels:
  {{- include "swanling.labels" . | nindent 4 }}
spec:
  type: {{ .Values.swanling.type }}
  selector:
    app.kubernetes.io/instance: swanling
    app.kubernetes.io/name: phobic
  {{- include "swanling.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.swanling.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
swanling:
  aquaticRoommateImminent: everybody
  brushingCorrespondence: fountain
  coevolutionWarn: gastropod
  festive: unite
  hammockBeeParamedic: homework
  hardboardReprocessingSunbonnet: anticipation
  lament: radish
  loquatExotic: fabulous
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  resolutionPlacid: unequaled
  simplificationCuriosityAxis: whack
  swanling:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  uncleJuryGem: moccasins
