# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "foundation.fullname" . }}-foundation
  labels:
  {{- include "foundation.labels" . | nindent 4 }}
data:
  ARROW_ALIAS_GUITARIST: {{ .Values.foundation.arrowAliasGuitarist | quote }}
  COOL_BUCK_MINESHAFT: {{ .Values.foundation.coolBuckMineshaft | quote }}
  CRACKER: {{ .Values.foundation.cracker | quote }}
  DRILL: {{ .Values.foundation.drill | quote }}
  HIVE_DOORWAY: {{ .Values.foundation.hiveDoorway | quote }}
  NICK_BOOTEE_WARNING: {{ .Values.foundation.nickBooteeWarning | quote }}
  NONSENSE_PLENTY: {{ .Values.foundation.nonsensePlenty | quote }}
  RIDGE_AFFECT: {{ .Values.foundation.ridgeAffect | quote }}
  SILKWORM_GRUESOME: {{ .Values.foundation.silkwormGruesome | quote }}
  SOUR: {{ .Values.foundation.sour | quote }}
  UPTIGHT_PANORAMIC_BUNGHOLE: {{ .Values.foundation.uptightPanoramicBunghole | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "foundation.fullname" . }}-foundation
  labels:
  {{- include "foundation.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: foundation
spec:
  replicas: {{ .Values.foundation.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: foundation
      app.kubernetes.io/name: criteria
    {{- include "foundation.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: foundation
        app.kubernetes.io/name: criteria
      {{- include "foundation.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 814e31339748b5f4b9c5260c5a4923e208311e6061ba3142e2cb170411c5e5af
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "foundation.fullname" . }}-foundation
        image: {{ .Values.foundation.foundation.image.repository }}:{{ .Values.foundation.foundation.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.foundation.foundation.imagePullPolicy }}
        name: foundation
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.foundation.foundation.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.foundation.foundation.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "foundation.fullname" . }}-foundation
  labels:
  {{- include "foundation.labels" . | nindent 4 }}
spec:
  type: {{ .Values.foundation.type }}
  selector:
    app.kubernetes.io/instance: foundation
    app.kubernetes.io/name: criteria
  {{- include "foundation.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.foundation.ports | toYaml | nindent 2 -}}
foundation:
  arrowAliasGuitarist: organizing
  coolBuckMineshaft: minimum
  cracker: mezzanine
  drill: theism
  foundation:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  hiveDoorway: abstracted
  nickBooteeWarning: jicama
  nonsensePlenty: armrest
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  ridgeAffect: survivor
  silkwormGruesome: drawing
  sour: nectarine
  type: ClusterIP
  uptightPanoramicBunghole: molecule
kubernetesClusterDomain: cluster.local
