# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fold.fullname" . }}-fold
  labels:
  {{- include "fold.labels" . | nindent 4 }}
data:
  BEVERAGE_PARALLELOGRAM: {{ .Values.fold.beverageParallelogram | quote }}
  BORROW_TRANSFORMATION_VOICE: {{ .Values.fold.borrowTransformationVoice | quote
    }}
  HEARTWOOD_PORTER_GRANDPA: {{ .Values.fold.heartwoodPorterGrandpa | quote }}
  LIGHTING_THROW: {{ .Values.fold.lightingThrow | quote }}
  NOSY_REINSCRIPTION_BARRIER: {{ .Values.fold.nosyReinscriptionBarrier | quote }}
  PUNCTUATION: {{ .Values.fold.punctuation | quote }}
  SNOWBOARDING: {{ .Values.fold.snowboarding | quote }}
  TORSO_REDUCTION_PIMP: {{ .Values.fold.torsoReductionPimp | quote }}
  VINEGAR: {{ .Values.fold.vinegar | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fold.fullname" . }}-fold
  labels:
  {{- include "fold.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fold
spec:
  replicas: {{ .Values.fold.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fold
      app.kubernetes.io/name: extend
    {{- include "fold.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fold
        app.kubernetes.io/name: extend
      {{- include "fold.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9d0990380df35ae82e53d1361aab4d4e9d8163dcbff28cc6b6409c7ee653787b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fold.fullname" . }}-fold
        image: {{ .Values.fold.fold.image.repository }}:{{ .Values.fold.fold.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fold.fold.imagePullPolicy }}
        name: fold
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fold.fold.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fold.fold.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fold.fullname" . }}-fold
  labels:
  {{- include "fold.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fold.type }}
  selector:
    app.kubernetes.io/instance: fold
    app.kubernetes.io/name: extend
  {{- include "fold.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fold.ports | toYaml | nindent 2 -}}
fold:
  beverageParallelogram: summit
  borrowTransformationVoice: oval
  fold:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  heartwoodPorterGrandpa: bedroom
  lightingThrow: explode
  nosyReinscriptionBarrier: eddy
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  punctuation: saw
  replicas: 1
  snowboarding: business
  torsoReductionPimp: query
  type: ClusterIP
  vinegar: youngster
kubernetesClusterDomain: cluster.local
