# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "ideal.fullname" . }}-ideal
  labels:
  {{- include "ideal.labels" . | nindent 4 }}
data:
  BOSOM_BUCKLE: {{ .Values.ideal.bosomBuckle | quote }}
  CASTLE_CREWMATE_COMIC: {{ .Values.ideal.castleCrewmateComic | quote }}
  CRIMINAL: {{ .Values.ideal.criminal | quote }}
  DASHING_LANDFORM: {{ .Values.ideal.dashingLandform | quote }}
  DONKEY_HEARING_LYRE: {{ .Values.ideal.donkeyHearingLyre | quote }}
  KICK: {{ .Values.ideal.kick | quote }}
  LIKEABLE: {{ .Values.ideal.likeable | quote }}
  MACADAMIA: {{ .Values.ideal.macadamia | quote }}
  ORIENTATION: {{ .Values.ideal.orientation | quote }}
  REMNANT: {{ .Values.ideal.remnant | quote }}
  YEAR_MARIONBERRY: {{ .Values.ideal.yearMarionberry | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ideal.fullname" . }}-ideal
  labels:
  {{- include "ideal.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: ideal
spec:
  replicas: {{ .Values.ideal.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: ideal
      app.kubernetes.io/name: bankbook
    {{- include "ideal.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ideal
        app.kubernetes.io/name: bankbook
      {{- include "ideal.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5587660517df0eb14545d30181aaa92a9b8faa08c66b823cedc9ea00b9aece1d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "ideal.fullname" . }}-ideal
        image: {{ .Values.ideal.ideal.image.repository }}:{{ .Values.ideal.ideal.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.ideal.ideal.imagePullPolicy }}
        name: ideal
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.ideal.ideal.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.ideal.ideal.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "ideal.fullname" . }}-ideal
  labels:
  {{- include "ideal.labels" . | nindent 4 }}
spec:
  type: {{ .Values.ideal.type }}
  selector:
    app.kubernetes.io/instance: ideal
    app.kubernetes.io/name: bankbook
  {{- include "ideal.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.ideal.ports | toYaml | nindent 2 -}}
ideal:
  bosomBuckle: debris
  castleCrewmateComic: double
  criminal: idiotic
  dashingLandform: doctorate
  donkeyHearingLyre: reasoning
  ideal:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  kick: terrapin
  likeable: glider
  macadamia: end
  orientation: saloon
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  remnant: bed
  replicas: 1
  type: ClusterIP
  yearMarionberry: destroy
kubernetesClusterDomain: cluster.local
