# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "sneakers.fullname" . }}-sneakers
  labels:
  {{- include "sneakers.labels" . | nindent 4 }}
data:
  ABROGATION_QUANTITY: {{ .Values.sneakers.abrogationQuantity | quote }}
  ARMCHAIR_PHOTOGRAPH_CLAUSE: {{ .Values.sneakers.armchairPhotographClause | quote
    }}
  DONUT_ABRASIVE_PATRON: {{ .Values.sneakers.donutAbrasivePatron | quote }}
  GOAL_THERAPY_PARTICLE: {{ .Values.sneakers.goalTherapyParticle | quote }}
  INVENTORY_DUST STORM: {{ .Values.sneakers.inventoryDustStorm | quote }}
  MONSTER_COMMON_ADULT: {{ .Values.sneakers.monsterCommonAdult | quote }}
  SOLICITOR_VETO: {{ .Values.sneakers.solicitorVeto | quote }}
  SPELT_METHANE: {{ .Values.sneakers.speltMethane | quote }}
  TOLERANT: {{ .Values.sneakers.tolerant | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "sneakers.fullname" . }}-sneakers
  labels:
  {{- include "sneakers.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: sneakers
spec:
  replicas: {{ .Values.sneakers.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: sneakers
      app.kubernetes.io/name: boom
    {{- include "sneakers.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: sneakers
        app.kubernetes.io/name: boom
      {{- include "sneakers.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 91bde09f2198c3b26ce3e42e1f0387d059439c58b7a1148758fe9ce9cef3bb22
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "sneakers.fullname" . }}-sneakers
        image: {{ .Values.sneakers.sneakers.image.repository }}:{{ .Values.sneakers.sneakers.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.sneakers.sneakers.imagePullPolicy }}
        name: sneakers
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.sneakers.sneakers.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.sneakers.sneakers.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "sneakers.fullname" . }}-sneakers
  labels:
  {{- include "sneakers.labels" . | nindent 4 }}
spec:
  type: {{ .Values.sneakers.type }}
  selector:
    app.kubernetes.io/instance: sneakers
    app.kubernetes.io/name: boom
  {{- include "sneakers.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.sneakers.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
sneakers:
  abrogationQuantity: accelerate
  armchairPhotographClause: sick
  donutAbrasivePatron: nasty
  goalTherapyParticle: invader
  inventoryDustStorm: possession
  monsterCommonAdult: rustic
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sneakers:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  solicitorVeto: processor
  speltMethane: pull
  tolerant: technician
  type: ClusterIP
