# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "assumption.fullname" . }}-assumption
  labels:
  {{- include "assumption.labels" . | nindent 4 }}
data:
  ADVANTAGE: {{ .Values.assumption.advantage | quote }}
  BLOWHOLE: {{ .Values.assumption.blowhole | quote }}
  BROWSING_MOMENTOUS: {{ .Values.assumption.browsingMomentous | quote }}
  HIRING: {{ .Values.assumption.hiring | quote }}
  HOSPITAL: {{ .Values.assumption.hospital | quote }}
  MINCEMEAT_PRINCE: {{ .Values.assumption.mincemeatPrince | quote }}
  PACE_SWEATSHIRT_DECENCY: {{ .Values.assumption.paceSweatshirtDecency | quote }}
  PADDLE_UTILIZE: {{ .Values.assumption.paddleUtilize | quote }}
  PANCREAS: {{ .Values.assumption.pancreas | quote }}
  SONG_PROVIDER_TEPEE: {{ .Values.assumption.songProviderTepee | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "assumption.fullname" . }}-assumption
  labels:
  {{- include "assumption.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: assumption
spec:
  replicas: {{ .Values.assumption.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: assumption
      app.kubernetes.io/name: shelf
    {{- include "assumption.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: assumption
        app.kubernetes.io/name: shelf
      {{- include "assumption.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: b85ff848ffca7772f9da0fd3b562fd19ff72e0bd27f784f6ae58f7b071b60307
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "assumption.fullname" . }}-assumption
        image: {{ .Values.assumption.assumption.image.repository }}:{{ .Values.assumption.assumption.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.assumption.assumption.imagePullPolicy }}
        name: assumption
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.assumption.assumption.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.assumption.assumption.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "assumption.fullname" . }}-assumption
  labels:
  {{- include "assumption.labels" . | nindent 4 }}
spec:
  type: {{ .Values.assumption.type }}
  selector:
    app.kubernetes.io/instance: assumption
    app.kubernetes.io/name: shelf
  {{- include "assumption.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.assumption.ports | toYaml | nindent 2 -}}
assumption:
  advantage: decoration
  assumption:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  blowhole: speakerphone
  browsingMomentous: message
  hiring: release
  hospital: headlight
  mincemeatPrince: roadway
  paceSweatshirtDecency: webmail
  paddleUtilize: dissonance
  pancreas: weeder
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  songProviderTepee: bass
  type: ClusterIP
kubernetesClusterDomain: cluster.local
