# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "helium.fullname" . }}-helium
  labels:
  {{- include "helium.labels" . | nindent 4 }}
data:
  COURSE_VIOLIN_MAGNIFICENT: {{ .Values.helium.courseViolinMagnificent | quote }}
  LIKENESS_GARTER_SONG: {{ .Values.helium.likenessGarterSong | quote }}
  PRESTIGE_URGENCY_PLANNING: {{ .Values.helium.prestigeUrgencyPlanning | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "helium.fullname" . }}-helium
  labels:
  {{- include "helium.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: helium
spec:
  replicas: {{ .Values.helium.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: helium
      app.kubernetes.io/name: counter
    {{- include "helium.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: helium
        app.kubernetes.io/name: counter
      {{- include "helium.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2b54a8c8f6be86ba83672a23625945c387b124a37d2a69159f8091af269ea75b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "helium.fullname" . }}-helium
        image: {{ .Values.helium.helium.image.repository }}:{{ .Values.helium.helium.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.helium.helium.imagePullPolicy }}
        name: helium
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.helium.helium.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.helium.helium.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "helium.fullname" . }}-helium
  labels:
  {{- include "helium.labels" . | nindent 4 }}
spec:
  type: {{ .Values.helium.type }}
  selector:
    app.kubernetes.io/instance: helium
    app.kubernetes.io/name: counter
  {{- include "helium.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.helium.ports | toYaml | nindent 2 -}}
helium:
  courseViolinMagnificent: find
  helium:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  likenessGarterSong: lunge
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prestigeUrgencyPlanning: missile
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
