# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cruise.fullname" . }}-cruise
  labels:
  {{- include "cruise.labels" . | nindent 4 }}
data:
  AIRMAIL_COUSIN: {{ .Values.cruise.airmailCousin | quote }}
  CONDEMNED_CONNECTION_BOAST: {{ .Values.cruise.condemnedConnectionBoast | quote
    }}
  FREAK_GENE_BOYFRIEND: {{ .Values.cruise.freakGeneBoyfriend | quote }}
  FUEL_LUNG: {{ .Values.cruise.fuelLung | quote }}
  LAWSUIT: {{ .Values.cruise.lawsuit | quote }}
  PAINT_CRISIS: {{ .Values.cruise.paintCrisis | quote }}
  PRIDE_MILK: {{ .Values.cruise.prideMilk | quote }}
  SCARCE: {{ .Values.cruise.scarce | quote }}
  THONG: {{ .Values.cruise.thong | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "cruise.fullname" . }}-cruise
  labels:
  {{- include "cruise.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: cruise
spec:
  replicas: {{ .Values.cruise.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: cruise
      app.kubernetes.io/name: pastoralist
    {{- include "cruise.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cruise
        app.kubernetes.io/name: pastoralist
      {{- include "cruise.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4022263a4cf58c82b9e19a7a08c5557e366bc7233f2c0c8668511a9bec561242
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "cruise.fullname" . }}-cruise
        image: {{ .Values.cruise.cruise.image.repository }}:{{ .Values.cruise.cruise.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.cruise.cruise.imagePullPolicy }}
        name: cruise
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.cruise.cruise.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.cruise.cruise.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cruise.fullname" . }}-cruise
  labels:
  {{- include "cruise.labels" . | nindent 4 }}
spec:
  type: {{ .Values.cruise.type }}
  selector:
    app.kubernetes.io/instance: cruise
    app.kubernetes.io/name: pastoralist
  {{- include "cruise.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.cruise.ports | toYaml | nindent 2 -}}
cruise:
  airmailCousin: chicken
  condemnedConnectionBoast: unfasten
  cruise:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  freakGeneBoyfriend: polliwog
  fuelLung: spectrum
  lawsuit: wilderness
  paintCrisis: jackal
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prideMilk: login
  replicas: 1
  scarce: degree
  thong: concern
  type: ClusterIP
kubernetesClusterDomain: cluster.local
