# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cursor.fullname" . }}-cursor
  labels:
  {{- include "cursor.labels" . | nindent 4 }}
data:
  BOUDOIR_MILLSTONE: {{ .Values.cursor.boudoirMillstone | quote }}
  CELERIAC: {{ .Values.cursor.celeriac | quote }}
  COUNCILOR_BEANCURD: {{ .Values.cursor.councilorBeancurd | quote }}
  EXCELLENCE: {{ .Values.cursor.excellence | quote }}
  EXTERNAL_BOWER: {{ .Values.cursor.externalBower | quote }}
  MEASLY_EXPLOSION_RENT: {{ .Values.cursor.measlyExplosionRent | quote }}
  PRISONER_MECCA_CLIP: {{ .Values.cursor.prisonerMeccaClip | quote }}
  PROPAGANDA_DRIP: {{ .Values.cursor.propagandaDrip | quote }}
  SAVINGS_SWITCHBOARD_SPOUSE: {{ .Values.cursor.savingsSwitchboardSpouse | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "cursor.fullname" . }}-cursor
  labels:
  {{- include "cursor.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: cursor
spec:
  replicas: {{ .Values.cursor.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: cursor
      app.kubernetes.io/name: arbitrate
    {{- include "cursor.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cursor
        app.kubernetes.io/name: arbitrate
      {{- include "cursor.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c5811b88ca9824fb1fad4f82758be506b92454d67cb695ca99987215d2055516
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "cursor.fullname" . }}-cursor
        image: {{ .Values.cursor.cursor.image.repository }}:{{ .Values.cursor.cursor.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.cursor.cursor.imagePullPolicy }}
        name: cursor
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.cursor.cursor.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.cursor.cursor.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cursor.fullname" . }}-cursor
  labels:
  {{- include "cursor.labels" . | nindent 4 }}
spec:
  type: {{ .Values.cursor.type }}
  selector:
    app.kubernetes.io/instance: cursor
    app.kubernetes.io/name: arbitrate
  {{- include "cursor.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.cursor.ports | toYaml | nindent 2 -}}
cursor:
  boudoirMillstone: embossing
  celeriac: birdcage
  councilorBeancurd: astrologer
  cursor:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  excellence: bust
  externalBower: liquor
  measlyExplosionRent: baobab
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prisonerMeccaClip: swallow
  propagandaDrip: denim
  replicas: 1
  savingsSwitchboardSpouse: celeriac
  type: ClusterIP
kubernetesClusterDomain: cluster.local
