# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "glorious.fullname" . }}-glorious
  labels:
  {{- include "glorious.labels" . | nindent 4 }}
data:
  ABSORBING_BOULEVARD: {{ .Values.glorious.absorbingBoulevard | quote }}
  DEPENDENT_FRESCO_ZOMBIE: {{ .Values.glorious.dependentFrescoZombie | quote }}
  HORSERADISH_FAT: {{ .Values.glorious.horseradishFat | quote }}
  INITIALISE_MOUSSE: {{ .Values.glorious.initialiseMousse | quote }}
  JEEP_MANY: {{ .Values.glorious.jeepMany | quote }}
  METHODOLOGY_CLOTHING_SUBSCRIPTION: {{ .Values.glorious.methodologyClothingSubscription
    | quote }}
  POLICEMAN: {{ .Values.glorious.policeman | quote }}
  SERVAL_WHEY_SPIRAL: {{ .Values.glorious.servalWheySpiral | quote }}
  TUTOR: {{ .Values.glorious.tutor | quote }}
  WEEKEND_GROUP: {{ .Values.glorious.weekendGroup | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "glorious.fullname" . }}-glorious
  labels:
  {{- include "glorious.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: glorious
spec:
  replicas: {{ .Values.glorious.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: glorious
      app.kubernetes.io/name: kneejerk
    {{- include "glorious.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: glorious
        app.kubernetes.io/name: kneejerk
      {{- include "glorious.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a26c710b1e1670b189d84fcf2d8ae480d187e6c5cc35c398659003da90cbcd95
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "glorious.fullname" . }}-glorious
        image: {{ .Values.glorious.glorious.image.repository }}:{{ .Values.glorious.glorious.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.glorious.glorious.imagePullPolicy }}
        name: glorious
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.glorious.glorious.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.glorious.glorious.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "glorious.fullname" . }}-glorious
  labels:
  {{- include "glorious.labels" . | nindent 4 }}
spec:
  type: {{ .Values.glorious.type }}
  selector:
    app.kubernetes.io/instance: glorious
    app.kubernetes.io/name: kneejerk
  {{- include "glorious.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.glorious.ports | toYaml | nindent 2 -}}
glorious:
  absorbingBoulevard: nucleotidase
  dependentFrescoZombie: crayfish
  glorious:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  horseradishFat: restored
  initialiseMousse: overt
  jeepMany: x-rated
  methodologyClothingSubscription: swear
  policeman: pizza
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  servalWheySpiral: technologist
  tutor: tuna
  type: ClusterIP
  weekendGroup: deal
kubernetesClusterDomain: cluster.local
