# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "lemon.fullname" . }}-lemon
  labels:
  {{- include "lemon.labels" . | nindent 4 }}
data:
  ACCORDION: {{ .Values.lemon.accordion | quote }}
  BEAVER_SPITE: {{ .Values.lemon.beaverSpite | quote }}
  BOTTOM: {{ .Values.lemon.bottom | quote }}
  CHANNEL_PANNIER: {{ .Values.lemon.channelPannier | quote }}
  CHARLATAN: {{ .Values.lemon.charlatan | quote }}
  COHESION_DAME: {{ .Values.lemon.cohesionDame | quote }}
  FAITH_LOGIC_GOING: {{ .Values.lemon.faithLogicGoing | quote }}
  FOLKLORE_DISH: {{ .Values.lemon.folkloreDish | quote }}
  MEMBRANE: {{ .Values.lemon.membrane | quote }}
  OMEGA: {{ .Values.lemon.omega | quote }}
  WASTEFUL: {{ .Values.lemon.wasteful | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "lemon.fullname" . }}-lemon
  labels:
  {{- include "lemon.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: lemon
spec:
  replicas: {{ .Values.lemon.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: lemon
      app.kubernetes.io/name: visor
    {{- include "lemon.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: lemon
        app.kubernetes.io/name: visor
      {{- include "lemon.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f890b9ebe4a1cee71ed95db17aebb9615ab725b96d097e6fbf076a7423d7061f
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "lemon.fullname" . }}-lemon
        image: {{ .Values.lemon.lemon.image.repository }}:{{ .Values.lemon.lemon.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.lemon.lemon.imagePullPolicy }}
        name: lemon
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.lemon.lemon.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.lemon.lemon.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "lemon.fullname" . }}-lemon
  labels:
  {{- include "lemon.labels" . | nindent 4 }}
spec:
  type: {{ .Values.lemon.type }}
  selector:
    app.kubernetes.io/instance: lemon
    app.kubernetes.io/name: visor
  {{- include "lemon.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.lemon.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
lemon:
  accordion: pigsty
  beaverSpite: perform
  bottom: saving
  channelPannier: epauliere
  charlatan: butcher
  cohesionDame: voice
  faithLogicGoing: eavesdropper
  folkloreDish: daily
  lemon:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  membrane: sensibility
  omega: pentagon
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  wasteful: gaiters
