# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fob.fullname" . }}-fob
  labels:
  {{- include "fob.labels" . | nindent 4 }}
data:
  ALCOHOL: {{ .Values.fob.alcohol | quote }}
  DERRICK: {{ .Values.fob.derrick | quote }}
  GAMMA-RAY_GRAVEL_FELONY: {{ .Values.fob.gammaRayGravelFelony | quote }}
  GIANT_REGIME_MAT: {{ .Values.fob.giantRegimeMat | quote }}
  INCUBATION: {{ .Values.fob.incubation | quote }}
  JIFFY: {{ .Values.fob.jiffy | quote }}
  REMINISCENT_BLINKER: {{ .Values.fob.reminiscentBlinker | quote }}
  RUGBY_MODIFICATION_COMMON: {{ .Values.fob.rugbyModificationCommon | quote }}
  SPROUT_CARPET_DELIVER: {{ .Values.fob.sproutCarpetDeliver | quote }}
  STEALTH: {{ .Values.fob.stealth | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fob.fullname" . }}-fob
  labels:
  {{- include "fob.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fob
spec:
  replicas: {{ .Values.fob.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fob
      app.kubernetes.io/name: daddy
    {{- include "fob.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fob
        app.kubernetes.io/name: daddy
      {{- include "fob.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: fcdc9be9ced74c39ef1ab2ff6ab5e814ee1577dcfbfc3c5a1e0c2d55cb138195
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fob.fullname" . }}-fob
        image: {{ .Values.fob.fob.image.repository }}:{{ .Values.fob.fob.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fob.fob.imagePullPolicy }}
        name: fob
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fob.fob.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fob.fob.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fob.fullname" . }}-fob
  labels:
  {{- include "fob.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fob.type }}
  selector:
    app.kubernetes.io/instance: fob
    app.kubernetes.io/name: daddy
  {{- include "fob.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fob.ports | toYaml | nindent 2 -}}
fob:
  alcohol: azimuth
  derrick: obedience
  fob:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  gammaRayGravelFelony: know-how
  giantRegimeMat: help
  incubation: mindless
  jiffy: rite
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  reminiscentBlinker: sordid
  replicas: 1
  rugbyModificationCommon: howitzer
  sproutCarpetDeliver: uttermost
  stealth: eggplant
  type: ClusterIP
kubernetesClusterDomain: cluster.local
