# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "play.fullname" . }}-play
  labels:
  {{- include "play.labels" . | nindent 4 }}
data:
  FAME: {{ .Values.play.fame | quote }}
  INFLUX_CRITERIA: {{ .Values.play.influxCriteria | quote }}
  MOUSE_EUROCENTRISM_ALTITUDE: {{ .Values.play.mouseEurocentrismAltitude | quote
    }}
  PECAN_CERTAINTY: {{ .Values.play.pecanCertainty | quote }}
  SADNESS_ART_HUTCH: {{ .Values.play.sadnessArtHutch | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "play.fullname" . }}-play
  labels:
  {{- include "play.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: play
spec:
  replicas: {{ .Values.play.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: play
      app.kubernetes.io/name: coffin
    {{- include "play.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: play
        app.kubernetes.io/name: coffin
      {{- include "play.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9c8d7d6eebad951780261fb92793ad578295a29a0413937caf4205f094c45bce
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "play.fullname" . }}-play
        image: {{ .Values.play.play.image.repository }}:{{ .Values.play.play.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.play.play.imagePullPolicy }}
        name: play
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.play.play.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.play.play.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "play.fullname" . }}-play
  labels:
  {{- include "play.labels" . | nindent 4 }}
spec:
  type: {{ .Values.play.type }}
  selector:
    app.kubernetes.io/instance: play
    app.kubernetes.io/name: coffin
  {{- include "play.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.play.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
play:
  fame: capability
  influxCriteria: divorce
  mouseEurocentrismAltitude: uneven
  pecanCertainty: painting
  play:
    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
  sadnessArtHutch: underweight
  type: ClusterIP
