# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "pillow.fullname" . }}-pillow
  labels:
  {{- include "pillow.labels" . | nindent 4 }}
data:
  ABSORBED: {{ .Values.pillow.absorbed | quote }}
  CITIZENSHIP: {{ .Values.pillow.citizenship | quote }}
  RETIRE_HYPOTHESIS_ABRASIVE: {{ .Values.pillow.retireHypothesisAbrasive | quote
    }}
  SPARE: {{ .Values.pillow.spare | quote }}
  SURFBOARD_MUSCAT_ANTLER: {{ .Values.pillow.surfboardMuscatAntler | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "pillow.fullname" . }}-pillow
  labels:
  {{- include "pillow.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: pillow
spec:
  replicas: {{ .Values.pillow.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: pillow
      app.kubernetes.io/name: ethyl
    {{- include "pillow.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: pillow
        app.kubernetes.io/name: ethyl
      {{- include "pillow.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: ec0a3fefbeadcf8535b2237a11cc1553dcacdd5880e00ccdd7e3c65db3f9d55d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "pillow.fullname" . }}-pillow
        image: {{ .Values.pillow.pillow.image.repository }}:{{ .Values.pillow.pillow.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.pillow.pillow.imagePullPolicy }}
        name: pillow
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.pillow.pillow.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.pillow.pillow.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "pillow.fullname" . }}-pillow
  labels:
  {{- include "pillow.labels" . | nindent 4 }}
spec:
  type: {{ .Values.pillow.type }}
  selector:
    app.kubernetes.io/instance: pillow
    app.kubernetes.io/name: ethyl
  {{- include "pillow.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.pillow.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
pillow:
  absorbed: male
  citizenship: discovery
  pillow:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  retireHypothesisAbrasive: signal
  spare: foam
  surfboardMuscatAntler: tense
  type: ClusterIP
