# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "sepal.fullname" . }}-sepal
  labels:
  {{- include "sepal.labels" . | nindent 4 }}
data:
  ACCUSATION: {{ .Values.sepal.accusation | quote }}
  CLUSTER_DELIGHTFUL_CYLINDER: {{ .Values.sepal.clusterDelightfulCylinder | quote
    }}
  CROOK_BEAN: {{ .Values.sepal.crookBean | quote }}
  DANCING: {{ .Values.sepal.dancing | quote }}
  HORDE: {{ .Values.sepal.horde | quote }}
  LOVE: {{ .Values.sepal.love | quote }}
  MEAT_PERIODIC_KING: {{ .Values.sepal.meatPeriodicKing | quote }}
  OBJECTION: {{ .Values.sepal.objection | quote }}
  OCTOPUS_NODE: {{ .Values.sepal.octopusNode | quote }}
  PLACEBO_UNIFORM: {{ .Values.sepal.placeboUniform | quote }}
  SHOESTRING_OBESITY: {{ .Values.sepal.shoestringObesity | quote }}
  VAST_SAVING_POSTAGE: {{ .Values.sepal.vastSavingPostage | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "sepal.fullname" . }}-sepal
  labels:
  {{- include "sepal.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: sepal
spec:
  replicas: {{ .Values.sepal.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: sepal
      app.kubernetes.io/name: youth
    {{- include "sepal.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: sepal
        app.kubernetes.io/name: youth
      {{- include "sepal.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 82c6b82abdc81b64fe570d1f263c17c965f6629ccf49defaea6537ef092240fc
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "sepal.fullname" . }}-sepal
        image: {{ .Values.sepal.sepal.image.repository }}:{{ .Values.sepal.sepal.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.sepal.sepal.imagePullPolicy }}
        name: sepal
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.sepal.sepal.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.sepal.sepal.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "sepal.fullname" . }}-sepal
  labels:
  {{- include "sepal.labels" . | nindent 4 }}
spec:
  type: {{ .Values.sepal.type }}
  selector:
    app.kubernetes.io/instance: sepal
    app.kubernetes.io/name: youth
  {{- include "sepal.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.sepal.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
sepal:
  accusation: spume
  clusterDelightfulCylinder: estimate
  crookBean: nutritious
  dancing: skeleton
  horde: faucet
  love: alien
  meatPeriodicKing: yang
  objection: trainer
  octopusNode: consulate
  placeboUniform: skull
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sepal:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  shoestringObesity: postage
  type: ClusterIP
  vastSavingPostage: suite
