# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "scent.fullname" . }}-scent
  labels:
  {{- include "scent.labels" . | nindent 4 }}
data:
  APRICOT_CANNON_HERMIT: {{ .Values.scent.apricotCannonHermit | quote }}
  COMMITMENT_ALUMINUM: {{ .Values.scent.commitmentAluminum | quote }}
  FLINTLOCK_BUN: {{ .Values.scent.flintlockBun | quote }}
  FONDUE_MEND_GUN: {{ .Values.scent.fondueMendGun | quote }}
  LAD: {{ .Values.scent.lad | quote }}
  MALLARD: {{ .Values.scent.mallard | quote }}
  MOTIONLESS: {{ .Values.scent.motionless | quote }}
  PRESSURISATION_ATTACHMENT: {{ .Values.scent.pressurisationAttachment | quote }}
  ROWING_SLOTH_CONTRACT: {{ .Values.scent.rowingSlothContract | quote }}
  RUNNING_SHAVE_GENIE: {{ .Values.scent.runningShaveGenie | quote }}
  THRUST: {{ .Values.scent.thrust | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "scent.fullname" . }}-scent
  labels:
  {{- include "scent.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: scent
spec:
  replicas: {{ .Values.scent.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: scent
      app.kubernetes.io/name: damaging
    {{- include "scent.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: scent
        app.kubernetes.io/name: damaging
      {{- include "scent.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 43aa5e065cb0135da1be26b62e72a04274bc869aed8b2e7bf4fca9b85a8b49df
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "scent.fullname" . }}-scent
        image: {{ .Values.scent.scent.image.repository }}:{{ .Values.scent.scent.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.scent.scent.imagePullPolicy }}
        name: scent
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.scent.scent.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.scent.scent.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "scent.fullname" . }}-scent
  labels:
  {{- include "scent.labels" . | nindent 4 }}
spec:
  type: {{ .Values.scent.type }}
  selector:
    app.kubernetes.io/instance: scent
    app.kubernetes.io/name: damaging
  {{- include "scent.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.scent.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
scent:
  apricotCannonHermit: rheumatism
  commitmentAluminum: contractor
  flintlockBun: option
  fondueMendGun: longitude
  lad: millisecond
  mallard: cashew
  motionless: sailor
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pressurisationAttachment: seller
  replicas: 1
  rowingSlothContract: market
  runningShaveGenie: bricklaying
  scent:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  thrust: player
  type: ClusterIP
