# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "utopian.fullname" . }}-utopian
  labels:
  {{- include "utopian.labels" . | nindent 4 }}
data:
  ANCESTOR_UNIBODY_DEDICATION: {{ .Values.utopian.ancestorUnibodyDedication | quote
    }}
  CONCLUDE_ZONE: {{ .Values.utopian.concludeZone | quote }}
  DEPRESSION_EVALUATE_RIDING: {{ .Values.utopian.depressionEvaluateRiding | quote
    }}
  GAUGE_BONE: {{ .Values.utopian.gaugeBone | quote }}
  GYNAECOLOGY_PUDDING_RUMOR: {{ .Values.utopian.gynaecologyPuddingRumor | quote }}
  MANTLE_ACADEMY: {{ .Values.utopian.mantleAcademy | quote }}
  PANTYHOSE: {{ .Values.utopian.pantyhose | quote }}
  PERFORM_BANJO: {{ .Values.utopian.performBanjo | quote }}
  RETIREMENT: {{ .Values.utopian.retirement | quote }}
  SCHOOL_TURKEY_ARCADE: {{ .Values.utopian.schoolTurkeyArcade | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "utopian.fullname" . }}-utopian
  labels:
  {{- include "utopian.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: utopian
spec:
  replicas: {{ .Values.utopian.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: utopian
      app.kubernetes.io/name: logic
    {{- include "utopian.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: utopian
        app.kubernetes.io/name: logic
      {{- include "utopian.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5c56edaf41cc1da7c1f8d1de0a499c8428ce972cf89a085bcd694dac35e8a843
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "utopian.fullname" . }}-utopian
        image: {{ .Values.utopian.utopian.image.repository }}:{{ .Values.utopian.utopian.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.utopian.utopian.imagePullPolicy }}
        name: utopian
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.utopian.utopian.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.utopian.utopian.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "utopian.fullname" . }}-utopian
  labels:
  {{- include "utopian.labels" . | nindent 4 }}
spec:
  type: {{ .Values.utopian.type }}
  selector:
    app.kubernetes.io/instance: utopian
    app.kubernetes.io/name: logic
  {{- include "utopian.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.utopian.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
utopian:
  ancestorUnibodyDedication: container
  concludeZone: amuse
  depressionEvaluateRiding: confidence
  gaugeBone: syndicate
  gynaecologyPuddingRumor: handicap
  mantleAcademy: behaviour
  pantyhose: placode
  performBanjo: mall
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  retirement: otter
  schoolTurkeyArcade: get
  type: ClusterIP
  utopian:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
