# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "panda.fullname" . }}-panda
  labels:
  {{- include "panda.labels" . | nindent 4 }}
data:
  ARCHITECTURE_AIR: {{ .Values.panda.architectureAir | quote }}
  BARREL_KANGAROO_HYPHENATION: {{ .Values.panda.barrelKangarooHyphenation | quote
    }}
  BROKER_APE: {{ .Values.panda.brokerApe | quote }}
  HOMETOWN_SWAN: {{ .Values.panda.hometownSwan | quote }}
  MODELING: {{ .Values.panda.modeling | quote }}
  NEON_HABITAT: {{ .Values.panda.neonHabitat | quote }}
  OVERCOAT_SLIME_BEHEADING: {{ .Values.panda.overcoatSlimeBeheading | quote }}
  SCENERY_STRIPE_SLEEPY: {{ .Values.panda.sceneryStripeSleepy | quote }}
  SILENT: {{ .Values.panda.silent | quote }}
  WONDER_SAMOVAR: {{ .Values.panda.wonderSamovar | quote }}
  YACHT: {{ .Values.panda.yacht | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "panda.fullname" . }}-panda
  labels:
  {{- include "panda.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: panda
spec:
  replicas: {{ .Values.panda.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: panda
      app.kubernetes.io/name: compile
    {{- include "panda.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: panda
        app.kubernetes.io/name: compile
      {{- include "panda.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8018cbeb9057107fff79df36e56206d812d42cc3922de929d59cacadaf167006
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "panda.fullname" . }}-panda
        image: {{ .Values.panda.panda.image.repository }}:{{ .Values.panda.panda.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.panda.panda.imagePullPolicy }}
        name: panda
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.panda.panda.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.panda.panda.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "panda.fullname" . }}-panda
  labels:
  {{- include "panda.labels" . | nindent 4 }}
spec:
  type: {{ .Values.panda.type }}
  selector:
    app.kubernetes.io/instance: panda
    app.kubernetes.io/name: compile
  {{- include "panda.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.panda.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
panda:
  architectureAir: appetiser
  barrelKangarooHyphenation: cannibal
  brokerApe: concrete
  hometownSwan: sausage
  modeling: calculus
  neonHabitat: trove
  overcoatSlimeBeheading: anguish
  panda:
    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
  sceneryStripeSleepy: undress
  silent: hotdog
  type: ClusterIP
  wonderSamovar: paperwork
  yacht: change
