# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "tune.fullname" . }}-tune
  labels:
  {{- include "tune.labels" . | nindent 4 }}
data:
  ACCEPT: {{ .Values.tune.accept | quote }}
  APPOINT: {{ .Values.tune.appoint | quote }}
  CONTRACT_STEPPING-STONE: {{ .Values.tune.contractSteppingStone | quote }}
  EQUAL_SPINE: {{ .Values.tune.equalSpine | quote }}
  FESTIVAL_ILLITERACY_SUBCONTRACTOR: {{ .Values.tune.festivalIlliteracySubcontractor
    | quote }}
  PROMENADE_CHEST_PIGLET: {{ .Values.tune.promenadeChestPiglet | quote }}
  SEAT_ROTATION_ACCELERATE: {{ .Values.tune.seatRotationAccelerate | quote }}
  SHOCK: {{ .Values.tune.shock | quote }}
  STROKE_HANDMAIDEN_LUXURIANT: {{ .Values.tune.strokeHandmaidenLuxuriant | quote
    }}
  TALENT_CYST: {{ .Values.tune.talentCyst | quote }}
  TRADITION: {{ .Values.tune.tradition | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "tune.fullname" . }}-tune
  labels:
  {{- include "tune.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: tune
spec:
  replicas: {{ .Values.tune.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: tune
      app.kubernetes.io/name: directive
    {{- include "tune.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: tune
        app.kubernetes.io/name: directive
      {{- include "tune.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 689db6d2a1cbc2cef53f8dc14de8a463bc1f215fa79e42c4ce11edeb28354bc9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "tune.fullname" . }}-tune
        image: {{ .Values.tune.tune.image.repository }}:{{ .Values.tune.tune.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.tune.tune.imagePullPolicy }}
        name: tune
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.tune.tune.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.tune.tune.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "tune.fullname" . }}-tune
  labels:
  {{- include "tune.labels" . | nindent 4 }}
spec:
  type: {{ .Values.tune.type }}
  selector:
    app.kubernetes.io/instance: tune
    app.kubernetes.io/name: directive
  {{- include "tune.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.tune.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
tune:
  accept: sexuality
  appoint: sort
  contractSteppingStone: goldfish
  equalSpine: oxygen
  festivalIlliteracySubcontractor: tadpole
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  promenadeChestPiglet: visit
  replicas: 1
  seatRotationAccelerate: trash
  shock: hexagon
  strokeHandmaidenLuxuriant: clarity
  talentCyst: dhow
  tradition: carve
  tune:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
