# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cloud.fullname" . }}-cloud
  labels:
  {{- include "cloud.labels" . | nindent 4 }}
data:
  ALLOCATION: {{ .Values.cloud.allocation | quote }}
  BAMBOO_YESTERDAY: {{ .Values.cloud.bambooYesterday | quote }}
  BIZARRE: {{ .Values.cloud.bizarre | quote }}
  DENSITY_COMFORTABLE_CELERIAC: {{ .Values.cloud.densityComfortableCeleriac | quote
    }}
  EXPANSIONISM: {{ .Values.cloud.expansionism | quote }}
  EXTERIOR_SKEAN: {{ .Values.cloud.exteriorSkean | quote }}
  HALTING_POLICE: {{ .Values.cloud.haltingPolice | quote }}
  HINT_GATHER_LEAD: {{ .Values.cloud.hintGatherLead | quote }}
  ICKY_LUNCHEONETTE: {{ .Values.cloud.ickyLuncheonette | quote }}
  MELODY_BULL-FIGHTER: {{ .Values.cloud.melodyBullFighter | quote }}
  PROUD: {{ .Values.cloud.proud | quote }}
  SHINE_UNITE: {{ .Values.cloud.shineUnite | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "cloud.fullname" . }}-cloud
  labels:
  {{- include "cloud.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: cloud
spec:
  replicas: {{ .Values.cloud.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: cloud
      app.kubernetes.io/name: declaration
    {{- include "cloud.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cloud
        app.kubernetes.io/name: declaration
      {{- include "cloud.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: dab45e6712754aee88d0bfd20a5bd92ff40813af6aad7373bd7e27f19e989e26
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "cloud.fullname" . }}-cloud
        image: {{ .Values.cloud.cloud.image.repository }}:{{ .Values.cloud.cloud.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.cloud.cloud.imagePullPolicy }}
        name: cloud
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.cloud.cloud.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.cloud.cloud.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cloud.fullname" . }}-cloud
  labels:
  {{- include "cloud.labels" . | nindent 4 }}
spec:
  type: {{ .Values.cloud.type }}
  selector:
    app.kubernetes.io/instance: cloud
    app.kubernetes.io/name: declaration
  {{- include "cloud.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.cloud.ports | toYaml | nindent 2 -}}
cloud:
  allocation: fear
  bambooYesterday: essential
  bizarre: redundant
  cloud:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  densityComfortableCeleriac: slimy
  expansionism: cruelty
  exteriorSkean: priority
  haltingPolice: funny
  hintGatherLead: portrait
  ickyLuncheonette: mechanic
  melodyBullFighter: classify
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  proud: heal
  replicas: 1
  shineUnite: illustrate
  type: ClusterIP
kubernetesClusterDomain: cluster.local
