# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "era.fullname" . }}-era
  labels:
  {{- include "era.labels" . | nindent 4 }}
data:
  AFOUL: {{ .Values.era.afoul | quote }}
  BLUE-EYED_SCANNER: {{ .Values.era.blueEyedScanner | quote }}
  CREATIVE_HULKING_DOUGH: {{ .Values.era.creativeHulkingDough | quote }}
  DECENCY_WOODEN_POUNDING: {{ .Values.era.decencyWoodenPounding | quote }}
  EVALUATION_CLUMSY: {{ .Values.era.evaluationClumsy | quote }}
  FIGURINE_SCRIPTURE: {{ .Values.era.figurineScripture | quote }}
  NOTION_CAMERA: {{ .Values.era.notionCamera | quote }}
  RINGWORM: {{ .Values.era.ringworm | quote }}
  SUCCINCT_PRAISE_PAT: {{ .Values.era.succinctPraisePat | quote }}
  TRAIT: {{ .Values.era.trait | quote }}
  WORTHLESS_JOLLY: {{ .Values.era.worthlessJolly | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "era.fullname" . }}-era
  labels:
  {{- include "era.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: era
spec:
  replicas: {{ .Values.era.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: era
      app.kubernetes.io/name: sill
    {{- include "era.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: era
        app.kubernetes.io/name: sill
      {{- include "era.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c210b40be645657033a3805f9eab7f316162b12a01000b26a5457b1ea58056d1
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "era.fullname" . }}-era
        image: {{ .Values.era.era.image.repository }}:{{ .Values.era.era.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.era.era.imagePullPolicy }}
        name: era
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.era.era.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.era.era.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "era.fullname" . }}-era
  labels:
  {{- include "era.labels" . | nindent 4 }}
spec:
  type: {{ .Values.era.type }}
  selector:
    app.kubernetes.io/instance: era
    app.kubernetes.io/name: sill
  {{- include "era.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.era.ports | toYaml | nindent 2 -}}
era:
  afoul: subway
  blueEyedScanner: innovation
  creativeHulkingDough: lot
  decencyWoodenPounding: perch
  era:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  evaluationClumsy: mother-in-law
  figurineScripture: supervision
  notionCamera: girl
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  ringworm: suspect
  succinctPraisePat: verb
  trait: puritan
  type: ClusterIP
  worthlessJolly: pelican
kubernetesClusterDomain: cluster.local
