# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "hepatitis.fullname" . }}-hepatitis
  labels:
  {{- include "hepatitis.labels" . | nindent 4 }}
data:
  ARMOIRE_ENHANCE_AQUARIUM: {{ .Values.hepatitis.armoireEnhanceAquarium | quote }}
  CLASSROOM_SALESMAN: {{ .Values.hepatitis.classroomSalesman | quote }}
  SLINK: {{ .Values.hepatitis.slink | quote }}
  SPUR: {{ .Values.hepatitis.spur | quote }}
  TENT_VIRTUE_HAPPEN: {{ .Values.hepatitis.tentVirtueHappen | quote }}
  TRAPDOOR: {{ .Values.hepatitis.trapdoor | quote }}
  WRAPPER_BOTHER: {{ .Values.hepatitis.wrapperBother | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "hepatitis.fullname" . }}-hepatitis
  labels:
  {{- include "hepatitis.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: hepatitis
spec:
  replicas: {{ .Values.hepatitis.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: hepatitis
      app.kubernetes.io/name: vintage
    {{- include "hepatitis.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hepatitis
        app.kubernetes.io/name: vintage
      {{- include "hepatitis.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9df4aab5c93516c245f5cd57c00f78dbf4f485801b96c4573bec0ac4f4cdd71a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "hepatitis.fullname" . }}-hepatitis
        image: {{ .Values.hepatitis.hepatitis.image.repository }}:{{ .Values.hepatitis.hepatitis.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.hepatitis.hepatitis.imagePullPolicy }}
        name: hepatitis
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.hepatitis.hepatitis.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.hepatitis.hepatitis.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "hepatitis.fullname" . }}-hepatitis
  labels:
  {{- include "hepatitis.labels" . | nindent 4 }}
spec:
  type: {{ .Values.hepatitis.type }}
  selector:
    app.kubernetes.io/instance: hepatitis
    app.kubernetes.io/name: vintage
  {{- include "hepatitis.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.hepatitis.ports | toYaml | nindent 2 -}}
hepatitis:
  armoireEnhanceAquarium: blame
  classroomSalesman: scenery
  hepatitis:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  slink: originality
  spur: petitioner
  tentVirtueHappen: serve
  trapdoor: icing
  type: ClusterIP
  wrapperBother: bulb
kubernetesClusterDomain: cluster.local
