# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mammoth.fullname" . }}-mammoth
  labels:
  {{- include "mammoth.labels" . | nindent 4 }}
data:
  APPLICATION_CRIA: {{ .Values.mammoth.applicationCria | quote }}
  CUT_MISTER: {{ .Values.mammoth.cutMister | quote }}
  GOD_JELLYBEANS_MILEPOST: {{ .Values.mammoth.godJellybeansMilepost | quote }}
  LOCATE: {{ .Values.mammoth.locate | quote }}
  MAGGOT: {{ .Values.mammoth.maggot | quote }}
  NETWORKING_SHOE-HORN: {{ .Values.mammoth.networkingShoeHorn | quote }}
  OUTSIDE_CLOVE: {{ .Values.mammoth.outsideClove | quote }}
  SCHNITZEL_DIGIT: {{ .Values.mammoth.schnitzelDigit | quote }}
  SOCIALIST_HOST_OSMOSIS: {{ .Values.mammoth.socialistHostOsmosis | quote }}
  STATISTICS: {{ .Values.mammoth.statistics | quote }}
  THROW_PINCH_SABRE: {{ .Values.mammoth.throwPinchSabre | quote }}
  TREAD_STEP-SON_LEVERET: {{ .Values.mammoth.treadStepSonLeveret | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mammoth.fullname" . }}-mammoth
  labels:
  {{- include "mammoth.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: mammoth
spec:
  replicas: {{ .Values.mammoth.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: mammoth
      app.kubernetes.io/name: sorrow
    {{- include "mammoth.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: mammoth
        app.kubernetes.io/name: sorrow
      {{- include "mammoth.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 01ef033162cbc24209f2acc581f13ca9c044931af35400058da6d38102c9dbbe
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "mammoth.fullname" . }}-mammoth
        image: {{ .Values.mammoth.mammoth.image.repository }}:{{ .Values.mammoth.mammoth.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.mammoth.mammoth.imagePullPolicy }}
        name: mammoth
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.mammoth.mammoth.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.mammoth.mammoth.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "mammoth.fullname" . }}-mammoth
  labels:
  {{- include "mammoth.labels" . | nindent 4 }}
spec:
  type: {{ .Values.mammoth.type }}
  selector:
    app.kubernetes.io/instance: mammoth
    app.kubernetes.io/name: sorrow
  {{- include "mammoth.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.mammoth.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
mammoth:
  applicationCria: nonchalant
  cutMister: binoculars
  godJellybeansMilepost: ownership
  locate: smite
  maggot: burst
  mammoth:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  networkingShoeHorn: ascent
  outsideClove: health
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  schnitzelDigit: holiday
  socialistHostOsmosis: barley
  statistics: upgrade
  throwPinchSabre: tough-guy
  treadStepSonLeveret: attract
  type: ClusterIP
