# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "swim.fullname" . }}-swim
  labels:
  {{- include "swim.labels" . | nindent 4 }}
data:
  AIRSPACE: {{ .Values.swim.airspace | quote }}
  CHARMING_UNBIASED: {{ .Values.swim.charmingUnbiased | quote }}
  EMERGENCE: {{ .Values.swim.emergence | quote }}
  EXTERIOR_ENROLLMENT_COMPETITION: {{ .Values.swim.exteriorEnrollmentCompetition
    | quote }}
  HILL_VIVO_POOR: {{ .Values.swim.hillVivoPoor | quote }}
  LOSS_DAD_ENTERTAIN: {{ .Values.swim.lossDadEntertain | quote }}
  POPULATION_RADISH_MIXTURE: {{ .Values.swim.populationRadishMixture | quote }}
  PRONOUN_NOBODY_INTERCONNECTION: {{ .Values.swim.pronounNobodyInterconnection |
    quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "swim.fullname" . }}-swim
  labels:
  {{- include "swim.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: swim
spec:
  replicas: {{ .Values.swim.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: swim
      app.kubernetes.io/name: blogger
    {{- include "swim.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: swim
        app.kubernetes.io/name: blogger
      {{- include "swim.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 788768535227a670e2ea5bd7824905ced2da476eaed2d1b5485cee9dcf4dbe07
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "swim.fullname" . }}-swim
        image: {{ .Values.swim.swim.image.repository }}:{{ .Values.swim.swim.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.swim.swim.imagePullPolicy }}
        name: swim
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.swim.swim.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.swim.swim.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "swim.fullname" . }}-swim
  labels:
  {{- include "swim.labels" . | nindent 4 }}
spec:
  type: {{ .Values.swim.type }}
  selector:
    app.kubernetes.io/instance: swim
    app.kubernetes.io/name: blogger
  {{- include "swim.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.swim.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
swim:
  airspace: annoyed
  charmingUnbiased: utilisation
  emergence: pug
  exteriorEnrollmentCompetition: paste
  hillVivoPoor: zip
  lossDadEntertain: abusive
  populationRadishMixture: throat
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pronounNobodyInterconnection: spat
  replicas: 1
  swim:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
