# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "bore.fullname" . }}-bore
  labels:
  {{- include "bore.labels" . | nindent 4 }}
data:
  ACTED: {{ .Values.bore.acted | quote }}
  CHECKING_MUDDLE: {{ .Values.bore.checkingMuddle | quote }}
  FROST_FAINT: {{ .Values.bore.frostFaint | quote }}
  JUMP: {{ .Values.bore.jump | quote }}
  MAMMOTH: {{ .Values.bore.mammoth | quote }}
  OVERT: {{ .Values.bore.overt | quote }}
  PATHOGENESIS_CARDBOARD_SUICIDE: {{ .Values.bore.pathogenesisCardboardSuicide |
    quote }}
  PORTER_CHICORY: {{ .Values.bore.porterChicory | quote }}
  PROBLEM_PEASANT_ABLAZE: {{ .Values.bore.problemPeasantAblaze | quote }}
  SQUID: {{ .Values.bore.squid | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "bore.fullname" . }}-bore
  labels:
  {{- include "bore.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: bore
spec:
  replicas: {{ .Values.bore.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: bore
      app.kubernetes.io/name: killer
    {{- include "bore.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: bore
        app.kubernetes.io/name: killer
      {{- include "bore.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 088db612974e492459f667aec18345229626519396f0a837e440cf46f58d9f48
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "bore.fullname" . }}-bore
        image: {{ .Values.bore.bore.image.repository }}:{{ .Values.bore.bore.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.bore.bore.imagePullPolicy }}
        name: bore
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.bore.bore.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.bore.bore.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "bore.fullname" . }}-bore
  labels:
  {{- include "bore.labels" . | nindent 4 }}
spec:
  type: {{ .Values.bore.type }}
  selector:
    app.kubernetes.io/instance: bore
    app.kubernetes.io/name: killer
  {{- include "bore.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.bore.ports | toYaml | nindent 2 -}}
bore:
  acted: bedrock
  bore:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  checkingMuddle: test
  frostFaint: known
  jump: length
  mammoth: restaurant
  overt: expose
  pathogenesisCardboardSuicide: heron
  porterChicory: banjo
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  problemPeasantAblaze: humor
  replicas: 1
  squid: billing
  type: ClusterIP
kubernetesClusterDomain: cluster.local
