# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mimosa.fullname" . }}-mimosa
  labels:
  {{- include "mimosa.labels" . | nindent 4 }}
data:
  ABNORMAL_BRING: {{ .Values.mimosa.abnormalBring | quote }}
  BASE: {{ .Values.mimosa.base | quote }}
  DISTURBED_HUNGRY_DREAMER: {{ .Values.mimosa.disturbedHungryDreamer | quote }}
  EXCUSE_MIN: {{ .Values.mimosa.excuseMin | quote }}
  LARYNGITIS: {{ .Values.mimosa.laryngitis | quote }}
  MAMBO_PRAYER: {{ .Values.mimosa.mamboPrayer | quote }}
  PARSER_SIDING: {{ .Values.mimosa.parserSiding | quote }}
  STIMULUS_QUALIFY: {{ .Values.mimosa.stimulusQualify | quote }}
  VACATION: {{ .Values.mimosa.vacation | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mimosa.fullname" . }}-mimosa
  labels:
  {{- include "mimosa.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: mimosa
spec:
  replicas: {{ .Values.mimosa.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: mimosa
      app.kubernetes.io/name: vinegar
    {{- include "mimosa.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: mimosa
        app.kubernetes.io/name: vinegar
      {{- include "mimosa.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3128281cb5b29ad1e65ce61a8c6e9a3846d8b97beb9cea03eacf4e6555771364
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "mimosa.fullname" . }}-mimosa
        image: {{ .Values.mimosa.mimosa.image.repository }}:{{ .Values.mimosa.mimosa.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.mimosa.mimosa.imagePullPolicy }}
        name: mimosa
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.mimosa.mimosa.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.mimosa.mimosa.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "mimosa.fullname" . }}-mimosa
  labels:
  {{- include "mimosa.labels" . | nindent 4 }}
spec:
  type: {{ .Values.mimosa.type }}
  selector:
    app.kubernetes.io/instance: mimosa
    app.kubernetes.io/name: vinegar
  {{- include "mimosa.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.mimosa.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
mimosa:
  abnormalBring: tenet
  base: vaulting
  disturbedHungryDreamer: inspiration
  excuseMin: duplexer
  laryngitis: empty
  mamboPrayer: mayonnaise
  mimosa:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  parserSiding: moonshine
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  stimulusQualify: toothsome
  type: ClusterIP
  vacation: equinox
