# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "flowery.fullname" . }}-flowery
  labels:
  {{- include "flowery.labels" . | nindent 4 }}
data:
  ADMISSION_BECK: {{ .Values.flowery.admissionBeck | quote }}
  BALANCE: {{ .Values.flowery.balance | quote }}
  GLOCKENSPIEL_MARKETER: {{ .Values.flowery.glockenspielMarketer | quote }}
  INTESTINE_WIDE-EYED: {{ .Values.flowery.intestineWideEyed | quote }}
  MENTION_GRIT: {{ .Values.flowery.mentionGrit | quote }}
  PARTICIPANT_PRUNE_NUTRITIOUS: {{ .Values.flowery.participantPruneNutritious | quote
    }}
  PHILOSOPHY: {{ .Values.flowery.philosophy | quote }}
  POET_STEER_AGREEABLE: {{ .Values.flowery.poetSteerAgreeable | quote }}
  TECH: {{ .Values.flowery.tech | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "flowery.fullname" . }}-flowery
  labels:
  {{- include "flowery.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: flowery
spec:
  replicas: {{ .Values.flowery.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: flowery
      app.kubernetes.io/name: ex-husband
    {{- include "flowery.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: flowery
        app.kubernetes.io/name: ex-husband
      {{- include "flowery.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: cf5e21b107fa9d791cf97c2b4c0a54a8203291c8edc4c3f4b87842ecedc6c8c0
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "flowery.fullname" . }}-flowery
        image: {{ .Values.flowery.flowery.image.repository }}:{{ .Values.flowery.flowery.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.flowery.flowery.imagePullPolicy }}
        name: flowery
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.flowery.flowery.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.flowery.flowery.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "flowery.fullname" . }}-flowery
  labels:
  {{- include "flowery.labels" . | nindent 4 }}
spec:
  type: {{ .Values.flowery.type }}
  selector:
    app.kubernetes.io/instance: flowery
    app.kubernetes.io/name: ex-husband
  {{- include "flowery.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.flowery.ports | toYaml | nindent 2 -}}
flowery:
  admissionBeck: suicide
  balance: profess
  flowery:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  glockenspielMarketer: anguish
  intestineWideEyed: disarmament
  mentionGrit: playground
  participantPruneNutritious: collateral
  philosophy: bulk
  poetSteerAgreeable: outfielder
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  tech: spend
  type: ClusterIP
kubernetesClusterDomain: cluster.local
