# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "grill.fullname" . }}-grill
  labels:
  {{- include "grill.labels" . | nindent 4 }}
data:
  ABUNDANCE_ONION_TOPIC: {{ .Values.grill.abundanceOnionTopic | quote }}
  ADAPTATION_CAPRICIOUS: {{ .Values.grill.adaptationCapricious | quote }}
  CHASTITY_PATRIMONY: {{ .Values.grill.chastityPatrimony | quote }}
  OBTAIN_WATERFALL: {{ .Values.grill.obtainWaterfall | quote }}
  OPERA_LEADERSHIP_PLANET: {{ .Values.grill.operaLeadershipPlanet | quote }}
  PANDA_ASSESS: {{ .Values.grill.pandaAssess | quote }}
  SHRUG: {{ .Values.grill.shrug | quote }}
  STOT_PORTRAIT_YAK: {{ .Values.grill.stotPortraitYak | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "grill.fullname" . }}-grill
  labels:
  {{- include "grill.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: grill
spec:
  replicas: {{ .Values.grill.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: grill
      app.kubernetes.io/name: disregard
    {{- include "grill.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: grill
        app.kubernetes.io/name: disregard
      {{- include "grill.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e1a6a9f2a1b16e9c6a92d66a5d8b6b0b1342001500653c9cdb2fb6cea1ecca64
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "grill.fullname" . }}-grill
        image: {{ .Values.grill.grill.image.repository }}:{{ .Values.grill.grill.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.grill.grill.imagePullPolicy }}
        name: grill
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.grill.grill.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.grill.grill.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "grill.fullname" . }}-grill
  labels:
  {{- include "grill.labels" . | nindent 4 }}
spec:
  type: {{ .Values.grill.type }}
  selector:
    app.kubernetes.io/instance: grill
    app.kubernetes.io/name: disregard
  {{- include "grill.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.grill.ports | toYaml | nindent 2 -}}
grill:
  abundanceOnionTopic: bassoon
  adaptationCapricious: conclude
  chastityPatrimony: architecture
  grill:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  obtainWaterfall: weather
  operaLeadershipPlanet: sign
  pandaAssess: mining
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shrug: lively
  stotPortraitYak: diamond
  type: ClusterIP
kubernetesClusterDomain: cluster.local
