# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "spurious.fullname" . }}-spurious
  labels:
  {{- include "spurious.labels" . | nindent 4 }}
data:
  BALLPARK: {{ .Values.spurious.ballpark | quote }}
  CANOPY: {{ .Values.spurious.canopy | quote }}
  ELEVENTH_BAKER_COLLECTIVISATION: {{ .Values.spurious.eleventhBakerCollectivisation
    | quote }}
  FURTIVE_OFFICIATE: {{ .Values.spurious.furtiveOfficiate | quote }}
  LAVA_REPROCESSING_SURGEON: {{ .Values.spurious.lavaReprocessingSurgeon | quote
    }}
  LOOK_GIANT: {{ .Values.spurious.lookGiant | quote }}
  OMELET_LAUNCH: {{ .Values.spurious.omeletLaunch | quote }}
  PUDDLE_CHIP_TOUGH: {{ .Values.spurious.puddleChipTough | quote }}
  SHAKE_RANGER: {{ .Values.spurious.shakeRanger | quote }}
  THISTLE: {{ .Values.spurious.thistle | quote }}
  WEBSITE: {{ .Values.spurious.website | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "spurious.fullname" . }}-spurious
  labels:
  {{- include "spurious.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: spurious
spec:
  replicas: {{ .Values.spurious.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: spurious
      app.kubernetes.io/name: neighborhood
    {{- include "spurious.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: spurious
        app.kubernetes.io/name: neighborhood
      {{- include "spurious.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 215ca237e04e140f482bb94713dd650668daaa4319951d0589af40b1f0958d67
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "spurious.fullname" . }}-spurious
        image: {{ .Values.spurious.spurious.image.repository }}:{{ .Values.spurious.spurious.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.spurious.spurious.imagePullPolicy }}
        name: spurious
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.spurious.spurious.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.spurious.spurious.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "spurious.fullname" . }}-spurious
  labels:
  {{- include "spurious.labels" . | nindent 4 }}
spec:
  type: {{ .Values.spurious.type }}
  selector:
    app.kubernetes.io/instance: spurious
    app.kubernetes.io/name: neighborhood
  {{- include "spurious.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.spurious.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
spurious:
  ballpark: property
  canopy: mindless
  eleventhBakerCollectivisation: thesis
  furtiveOfficiate: patriot
  lavaReprocessingSurgeon: sociology
  lookGiant: trigonometry
  omeletLaunch: amazon
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  puddleChipTough: examination
  replicas: 1
  shakeRanger: regime
  spurious:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  thistle: tinkle
  type: ClusterIP
  website: whip
