# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "accelerate.fullname" . }}-accelerate
  labels:
  {{- include "accelerate.labels" . | nindent 4 }}
data:
  ELIXIR_WOODEN: {{ .Values.accelerate.elixirWooden | quote }}
  ENTER_LAG_DRAMATIC: {{ .Values.accelerate.enterLagDramatic | quote }}
  FEATHER_LEASH_KITSCH: {{ .Values.accelerate.featherLeashKitsch | quote }}
  GEAR_SIZE: {{ .Values.accelerate.gearSize | quote }}
  GRAPE_PURRING: {{ .Values.accelerate.grapePurring | quote }}
  LATITUDE_COLESLAW: {{ .Values.accelerate.latitudeColeslaw | quote }}
  LIVING_GLIB_MILLIMETER: {{ .Values.accelerate.livingGlibMillimeter | quote }}
  RENAISSANCE_LUDICROUS: {{ .Values.accelerate.renaissanceLudicrous | quote }}
  SUSPENDERS: {{ .Values.accelerate.suspenders | quote }}
  SYNONYMOUS: {{ .Values.accelerate.synonymous | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "accelerate.fullname" . }}-accelerate
  labels:
  {{- include "accelerate.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: accelerate
spec:
  replicas: {{ .Values.accelerate.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: accelerate
      app.kubernetes.io/name: burly
    {{- include "accelerate.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: accelerate
        app.kubernetes.io/name: burly
      {{- include "accelerate.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 77e6085cc721c294f995573c2866fea22c3d7d10fdbd4d0fba48c9772d68454f
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "accelerate.fullname" . }}-accelerate
        image: {{ .Values.accelerate.accelerate.image.repository }}:{{ .Values.accelerate.accelerate.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.accelerate.accelerate.imagePullPolicy }}
        name: accelerate
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.accelerate.accelerate.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.accelerate.accelerate.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "accelerate.fullname" . }}-accelerate
  labels:
  {{- include "accelerate.labels" . | nindent 4 }}
spec:
  type: {{ .Values.accelerate.type }}
  selector:
    app.kubernetes.io/instance: accelerate
    app.kubernetes.io/name: burly
  {{- include "accelerate.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.accelerate.ports | toYaml | nindent 2 -}}
accelerate:
  accelerate:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  elixirWooden: lout
  enterLagDramatic: spice
  featherLeashKitsch: throw
  gearSize: flexibility
  grapePurring: victim
  latitudeColeslaw: shiver
  livingGlibMillimeter: clutch
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  renaissanceLudicrous: goodwill
  replicas: 1
  suspenders: eyelash
  synonymous: revascularization
  type: ClusterIP
kubernetesClusterDomain: cluster.local
