# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "atrium.fullname" . }}-atrium
  labels:
  {{- include "atrium.labels" . | nindent 4 }}
data:
  BALLPARK: {{ .Values.atrium.ballpark | quote }}
  DIALECT: {{ .Values.atrium.dialect | quote }}
  FROG_TUNIC: {{ .Values.atrium.frogTunic | quote }}
  LYRICS: {{ .Values.atrium.lyrics | quote }}
  OWNER_CLARIFY_PROBLEM: {{ .Values.atrium.ownerClarifyProblem | quote }}
  PROMOTE: {{ .Values.atrium.promote | quote }}
  PSYCHIATRIST_INEVITABLE: {{ .Values.atrium.psychiatristInevitable | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "atrium.fullname" . }}-atrium
  labels:
  {{- include "atrium.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: atrium
spec:
  replicas: {{ .Values.atrium.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: atrium
      app.kubernetes.io/name: statuesque
    {{- include "atrium.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: atrium
        app.kubernetes.io/name: statuesque
      {{- include "atrium.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4a6d1dc48a16bdc45bbbad5dc113652051eb1861dc5410babfac9dba006a278e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "atrium.fullname" . }}-atrium
        image: {{ .Values.atrium.atrium.image.repository }}:{{ .Values.atrium.atrium.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.atrium.atrium.imagePullPolicy }}
        name: atrium
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.atrium.atrium.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.atrium.atrium.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "atrium.fullname" . }}-atrium
  labels:
  {{- include "atrium.labels" . | nindent 4 }}
spec:
  type: {{ .Values.atrium.type }}
  selector:
    app.kubernetes.io/instance: atrium
    app.kubernetes.io/name: statuesque
  {{- include "atrium.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.atrium.ports | toYaml | nindent 2 -}}
atrium:
  atrium:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ballpark: diversity
  dialect: cohesion
  frogTunic: counsel
  lyrics: disability
  ownerClarifyProblem: veil
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  promote: digestive
  psychiatristInevitable: creature
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
