# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "creepy.fullname" . }}-creepy
  labels:
  {{- include "creepy.labels" . | nindent 4 }}
data:
  CONSTELLATION_IMPARTIAL_BANDOLIER: {{ .Values.creepy.constellationImpartialBandolier
    | quote }}
  PEACOAT_FOOTSTOOL: {{ .Values.creepy.peacoatFootstool | quote }}
  PEASANT: {{ .Values.creepy.peasant | quote }}
  SAUCE_RADISH: {{ .Values.creepy.sauceRadish | quote }}
  SPORTSMAN: {{ .Values.creepy.sportsman | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "creepy.fullname" . }}-creepy
  labels:
  {{- include "creepy.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: creepy
spec:
  replicas: {{ .Values.creepy.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: creepy
      app.kubernetes.io/name: flint
    {{- include "creepy.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: creepy
        app.kubernetes.io/name: flint
      {{- include "creepy.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 94e3bc96e4eadc72bab5a7779dda783c7829d977d6d6e59850dbe78c814d589c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "creepy.fullname" . }}-creepy
        image: {{ .Values.creepy.creepy.image.repository }}:{{ .Values.creepy.creepy.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.creepy.creepy.imagePullPolicy }}
        name: creepy
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.creepy.creepy.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.creepy.creepy.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "creepy.fullname" . }}-creepy
  labels:
  {{- include "creepy.labels" . | nindent 4 }}
spec:
  type: {{ .Values.creepy.type }}
  selector:
    app.kubernetes.io/instance: creepy
    app.kubernetes.io/name: flint
  {{- include "creepy.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.creepy.ports | toYaml | nindent 2 -}}
creepy:
  constellationImpartialBandolier: mushy
  creepy:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  peacoatFootstool: ornament
  peasant: worth
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sauceRadish: pour
  sportsman: crocodile
  type: ClusterIP
kubernetesClusterDomain: cluster.local
