# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "peony.fullname" . }}-peony
  labels:
  {{- include "peony.labels" . | nindent 4 }}
data:
  ATTENDANCE: {{ .Values.peony.attendance | quote }}
  CIVILIZATION_RECOGNIZE: {{ .Values.peony.civilizationRecognize | quote }}
  FUSARIUM: {{ .Values.peony.fusarium | quote }}
  KNOWLEDGEABLE_DUNE_INSIDE: {{ .Values.peony.knowledgeableDuneInside | quote }}
  NUTTY: {{ .Values.peony.nutty | quote }}
  ORGANIZATION_AARDVARK_THISTLE: {{ .Values.peony.organizationAardvarkThistle | quote
    }}
  PANTS: {{ .Values.peony.pants | quote }}
  PEDAL_NUMERACY_CORD: {{ .Values.peony.pedalNumeracyCord | quote }}
  PUMP_MEDDLE_HYDROLYSE: {{ .Values.peony.pumpMeddleHydrolyse | quote }}
  SET: {{ .Values.peony.set | quote }}
  STEPSON: {{ .Values.peony.stepson | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "peony.fullname" . }}-peony
  labels:
  {{- include "peony.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: peony
spec:
  replicas: {{ .Values.peony.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: peony
      app.kubernetes.io/name: diversity
    {{- include "peony.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: peony
        app.kubernetes.io/name: diversity
      {{- include "peony.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c916535222855a316e2d697503dae726b515123b04e4b399f07923e7978e205b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "peony.fullname" . }}-peony
        image: {{ .Values.peony.peony.image.repository }}:{{ .Values.peony.peony.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.peony.peony.imagePullPolicy }}
        name: peony
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.peony.peony.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.peony.peony.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "peony.fullname" . }}-peony
  labels:
  {{- include "peony.labels" . | nindent 4 }}
spec:
  type: {{ .Values.peony.type }}
  selector:
    app.kubernetes.io/instance: peony
    app.kubernetes.io/name: diversity
  {{- include "peony.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.peony.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
peony:
  attendance: derby
  civilizationRecognize: drip
  fusarium: shareholder
  knowledgeableDuneInside: copyright
  nutty: armoire
  organizationAardvarkThistle: guy
  pants: verse
  pedalNumeracyCord: chef
  peony:
    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
  pumpMeddleHydrolyse: spoon
  replicas: 1
  set: enforce
  stepson: muscle
  type: ClusterIP
