# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "lieu.fullname" . }}-lieu
  labels:
  {{- include "lieu.labels" . | nindent 4 }}
data:
  EXPENSE_CUMMERBUND: {{ .Values.lieu.expenseCummerbund | quote }}
  MOLAR_FRANTIC: {{ .Values.lieu.molarFrantic | quote }}
  NUDGE_LIPID: {{ .Values.lieu.nudgeLipid | quote }}
  QUESTIONNAIRE: {{ .Values.lieu.questionnaire | quote }}
  SMITE_HEXAGON_MARCH: {{ .Values.lieu.smiteHexagonMarch | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "lieu.fullname" . }}-lieu
  labels:
  {{- include "lieu.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: lieu
spec:
  replicas: {{ .Values.lieu.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: lieu
      app.kubernetes.io/name: pantologist
    {{- include "lieu.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: lieu
        app.kubernetes.io/name: pantologist
      {{- include "lieu.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2b8c2e8f5cc3f87eb560d879a3eeeb04a6b5d3cfbc84faf12b7783987483c53f
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "lieu.fullname" . }}-lieu
        image: {{ .Values.lieu.lieu.image.repository }}:{{ .Values.lieu.lieu.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.lieu.lieu.imagePullPolicy }}
        name: lieu
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.lieu.lieu.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.lieu.lieu.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "lieu.fullname" . }}-lieu
  labels:
  {{- include "lieu.labels" . | nindent 4 }}
spec:
  type: {{ .Values.lieu.type }}
  selector:
    app.kubernetes.io/instance: lieu
    app.kubernetes.io/name: pantologist
  {{- include "lieu.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.lieu.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
lieu:
  expenseCummerbund: meteor
  lieu:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  molarFrantic: swell
  nudgeLipid: killer
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  questionnaire: broom
  replicas: 1
  smiteHexagonMarch: rice
  type: ClusterIP
