# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "junket.fullname" . }}-junket
  labels:
  {{- include "junket.labels" . | nindent 4 }}
data:
  COORDINATOR: {{ .Values.junket.coordinator | quote }}
  CRABBY: {{ .Values.junket.crabby | quote }}
  DISLIKE: {{ .Values.junket.dislike | quote }}
  HANDBALL_PINWORM_BREAKDOWN: {{ .Values.junket.handballPinwormBreakdown | quote
    }}
  ZOOLOGIST_ESTROGEN_NONDISCLOSURE: {{ .Values.junket.zoologistEstrogenNondisclosure
    | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "junket.fullname" . }}-junket
  labels:
  {{- include "junket.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: junket
spec:
  replicas: {{ .Values.junket.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: junket
      app.kubernetes.io/name: universe
    {{- include "junket.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: junket
        app.kubernetes.io/name: universe
      {{- include "junket.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 862cd51e7dd71726ebd662fba3ddb887bba7137a068b52ca1cfe1ebeb728ad2b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "junket.fullname" . }}-junket
        image: {{ .Values.junket.junket.image.repository }}:{{ .Values.junket.junket.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.junket.junket.imagePullPolicy }}
        name: junket
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.junket.junket.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.junket.junket.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "junket.fullname" . }}-junket
  labels:
  {{- include "junket.labels" . | nindent 4 }}
spec:
  type: {{ .Values.junket.type }}
  selector:
    app.kubernetes.io/instance: junket
    app.kubernetes.io/name: universe
  {{- include "junket.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.junket.ports | toYaml | nindent 2 -}}
junket:
  coordinator: nanoparticle
  crabby: statute
  dislike: childhood
  handballPinwormBreakdown: instrument
  junket:
    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
  type: ClusterIP
  zoologistEstrogenNondisclosure: anarchy
kubernetesClusterDomain: cluster.local
