# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "wasabi.fullname" . }}-wasabi
  labels:
  {{- include "wasabi.labels" . | nindent 4 }}
data:
  BLACKBIRD: {{ .Values.wasabi.blackbird | quote }}
  BLACKFISH: {{ .Values.wasabi.blackfish | quote }}
  EXTERIOR_EPIC: {{ .Values.wasabi.exteriorEpic | quote }}
  LISTEN: {{ .Values.wasabi.listen | quote }}
  SAND_COOPERATIVE_SNOWMOBILING: {{ .Values.wasabi.sandCooperativeSnowmobiling |
    quote }}
  SOMEPLACE_FUND: {{ .Values.wasabi.someplaceFund | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "wasabi.fullname" . }}-wasabi
  labels:
  {{- include "wasabi.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: wasabi
spec:
  replicas: {{ .Values.wasabi.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: wasabi
      app.kubernetes.io/name: hound
    {{- include "wasabi.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: wasabi
        app.kubernetes.io/name: hound
      {{- include "wasabi.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c4e3a0007fc749920543d7bd48f83564f61989289738310f5068afeefcbc4484
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "wasabi.fullname" . }}-wasabi
        image: {{ .Values.wasabi.wasabi.image.repository }}:{{ .Values.wasabi.wasabi.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.wasabi.wasabi.imagePullPolicy }}
        name: wasabi
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.wasabi.wasabi.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.wasabi.wasabi.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "wasabi.fullname" . }}-wasabi
  labels:
  {{- include "wasabi.labels" . | nindent 4 }}
spec:
  type: {{ .Values.wasabi.type }}
  selector:
    app.kubernetes.io/instance: wasabi
    app.kubernetes.io/name: hound
  {{- include "wasabi.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.wasabi.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
wasabi:
  blackbird: room
  blackfish: tease
  exteriorEpic: absurd
  listen: unsightly
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sandCooperativeSnowmobiling: salad
  someplaceFund: rudiment
  type: ClusterIP
  wasabi:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
