# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "hummus.fullname" . }}-hummus
  labels:
  {{- include "hummus.labels" . | nindent 4 }}
data:
  FLAT: {{ .Values.hummus.flat | quote }}
  HASSOCK_REJECT: {{ .Values.hummus.hassockReject | quote }}
  MAPPING_PROCEDURE: {{ .Values.hummus.mappingProcedure | quote }}
  NUTRITION_BABUSHKA_RING: {{ .Values.hummus.nutritionBabushkaRing | quote }}
  PROPONENT_PUMA: {{ .Values.hummus.proponentPuma | quote }}
  SCENERY_LIBIDO: {{ .Values.hummus.sceneryLibido | quote }}
  SLAP_COURTROOM_RUBY: {{ .Values.hummus.slapCourtroomRuby | quote }}
  SNOW_APRICOT_SUBSCRIPTION: {{ .Values.hummus.snowApricotSubscription | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "hummus.fullname" . }}-hummus
  labels:
  {{- include "hummus.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: hummus
spec:
  replicas: {{ .Values.hummus.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: hummus
      app.kubernetes.io/name: hail
    {{- include "hummus.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hummus
        app.kubernetes.io/name: hail
      {{- include "hummus.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3de540a04b168be47f02d891b085516854eeb0470e0fcf2e5b7f79134a6aa130
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "hummus.fullname" . }}-hummus
        image: {{ .Values.hummus.hummus.image.repository }}:{{ .Values.hummus.hummus.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.hummus.hummus.imagePullPolicy }}
        name: hummus
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.hummus.hummus.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.hummus.hummus.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "hummus.fullname" . }}-hummus
  labels:
  {{- include "hummus.labels" . | nindent 4 }}
spec:
  type: {{ .Values.hummus.type }}
  selector:
    app.kubernetes.io/instance: hummus
    app.kubernetes.io/name: hail
  {{- include "hummus.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.hummus.ports | toYaml | nindent 2 -}}
hummus:
  flat: grade
  hassockReject: civilisation
  hummus:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  mappingProcedure: attitude
  nutritionBabushkaRing: promise
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  proponentPuma: restaurant
  replicas: 1
  sceneryLibido: lark
  slapCourtroomRuby: insure
  snowApricotSubscription: copywriter
  type: ClusterIP
kubernetesClusterDomain: cluster.local
