# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "archeology.fullname" . }}-archeology
  labels:
  {{- include "archeology.labels" . | nindent 4 }}
data:
  GOLD_CONFLICT: {{ .Values.archeology.goldConflict | quote }}
  LIKE: {{ .Values.archeology.like | quote }}
  POVERTY_CALCIFICATION: {{ .Values.archeology.povertyCalcification | quote }}
  ROUGH_LUCK_SEMICONDUCTOR: {{ .Values.archeology.roughLuckSemiconductor | quote
    }}
  STACKING_OBSIDIAN_RUSTIC: {{ .Values.archeology.stackingObsidianRustic | quote
    }}
  WISDOM_TESTAMENT: {{ .Values.archeology.wisdomTestament | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "archeology.fullname" . }}-archeology
  labels:
  {{- include "archeology.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: archeology
spec:
  replicas: {{ .Values.archeology.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: archeology
      app.kubernetes.io/name: highland
    {{- include "archeology.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: archeology
        app.kubernetes.io/name: highland
      {{- include "archeology.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: d243fc10c1becc84f8b9f11ed55db6cf74f8276384ac05552964f3ad0b6bf021
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "archeology.fullname" . }}-archeology
        image: {{ .Values.archeology.archeology.image.repository }}:{{ .Values.archeology.archeology.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.archeology.archeology.imagePullPolicy }}
        name: archeology
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.archeology.archeology.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.archeology.archeology.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "archeology.fullname" . }}-archeology
  labels:
  {{- include "archeology.labels" . | nindent 4 }}
spec:
  type: {{ .Values.archeology.type }}
  selector:
    app.kubernetes.io/instance: archeology
    app.kubernetes.io/name: highland
  {{- include "archeology.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.archeology.ports | toYaml | nindent 2 -}}
archeology:
  archeology:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  goldConflict: melodic
  like: candle
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  povertyCalcification: show-stopper
  replicas: 1
  roughLuckSemiconductor: treasury
  stackingObsidianRustic: competition
  type: ClusterIP
  wisdomTestament: stability
kubernetesClusterDomain: cluster.local
