# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "venti.fullname" . }}-venti
  labels:
  {{- include "venti.labels" . | nindent 4 }}
data:
  ACCELERATE_FRINGE_CREWMEMBER: {{ .Values.venti.accelerateFringeCrewmember | quote
    }}
  ALLEGED: {{ .Values.venti.alleged | quote }}
  BEARD_PARCHMENT: {{ .Values.venti.beardParchment | quote }}
  CAMPUS: {{ .Values.venti.campus | quote }}
  CARTILAGE_BOULDER_THIRST: {{ .Values.venti.cartilageBoulderThirst | quote }}
  CONGRESS_SUSPECT_TIGHTS: {{ .Values.venti.congressSuspectTights | quote }}
  HAIRCUT_FRUIT: {{ .Values.venti.haircutFruit | quote }}
  HEAVY_LAUNDRY_CHESS: {{ .Values.venti.heavyLaundryChess | quote }}
  LAY_FOREGOING_STATUE: {{ .Values.venti.layForegoingStatue | quote }}
  PRINCIPLE_CUSTOM_ASSIGNMENT: {{ .Values.venti.principleCustomAssignment | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "venti.fullname" . }}-venti
  labels:
  {{- include "venti.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: venti
spec:
  replicas: {{ .Values.venti.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: venti
      app.kubernetes.io/name: hexagon
    {{- include "venti.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: venti
        app.kubernetes.io/name: hexagon
      {{- include "venti.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a6e789d9cce5e5c297b0d66a4e429bd8e3c312177d14a48dfe0cc3b369b39799
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "venti.fullname" . }}-venti
        image: {{ .Values.venti.venti.image.repository }}:{{ .Values.venti.venti.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.venti.venti.imagePullPolicy }}
        name: venti
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.venti.venti.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.venti.venti.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "venti.fullname" . }}-venti
  labels:
  {{- include "venti.labels" . | nindent 4 }}
spec:
  type: {{ .Values.venti.type }}
  selector:
    app.kubernetes.io/instance: venti
    app.kubernetes.io/name: hexagon
  {{- include "venti.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.venti.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
venti:
  accelerateFringeCrewmember: nothing
  alleged: hatchling
  beardParchment: painter
  campus: congressperson
  cartilageBoulderThirst: vaccine
  congressSuspectTights: center
  haircutFruit: scalp
  heavyLaundryChess: significance
  layForegoingStatue: armrest
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  principleCustomAssignment: stopsign
  replicas: 1
  type: ClusterIP
  venti:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
