# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "accent.fullname" . }}-accent
  labels:
  {{- include "accent.labels" . | nindent 4 }}
data:
  EXTREME: {{ .Values.accent.extreme | quote }}
  FIBER_REPLACEMENT: {{ .Values.accent.fiberReplacement | quote }}
  LOG: {{ .Values.accent.log | quote }}
  MOONLIGHT: {{ .Values.accent.moonlight | quote }}
  SAVAGE_HIGHWAY: {{ .Values.accent.savageHighway | quote }}
  VIRUS_CHINO_VEST: {{ .Values.accent.virusChinoVest | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "accent.fullname" . }}-accent
  labels:
  {{- include "accent.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: accent
spec:
  replicas: {{ .Values.accent.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: accent
      app.kubernetes.io/name: conductor
    {{- include "accent.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: accent
        app.kubernetes.io/name: conductor
      {{- include "accent.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 269bf0700da7d3a4f098c935cdad8fb793bb571b55f3d40b75af39fd123722be
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "accent.fullname" . }}-accent
        image: {{ .Values.accent.accent.image.repository }}:{{ .Values.accent.accent.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.accent.accent.imagePullPolicy }}
        name: accent
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.accent.accent.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.accent.accent.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "accent.fullname" . }}-accent
  labels:
  {{- include "accent.labels" . | nindent 4 }}
spec:
  type: {{ .Values.accent.type }}
  selector:
    app.kubernetes.io/instance: accent
    app.kubernetes.io/name: conductor
  {{- include "accent.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.accent.ports | toYaml | nindent 2 -}}
accent:
  accent:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  extreme: concrete
  fiberReplacement: buzzard
  log: gleaming
  moonlight: restoration
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  savageHighway: minute
  type: ClusterIP
  virusChinoVest: nourishment
kubernetesClusterDomain: cluster.local
