# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "depth.fullname" . }}-depth
  labels:
  {{- include "depth.labels" . | nindent 4 }}
data:
  CARPET: {{ .Values.depth.carpet | quote }}
  COP-OUT_SECOND_BASIS: {{ .Values.depth.copOutSecondBasis | quote }}
  DECODER: {{ .Values.depth.decoder | quote }}
  INFORM_CONCRETE: {{ .Values.depth.informConcrete | quote }}
  PROOF-READER_ILLUSION_RELATION: {{ .Values.depth.proofReaderIllusionRelation |
    quote }}
  SPELT_DEPOSIT: {{ .Values.depth.speltDeposit | quote }}
  STAKE: {{ .Values.depth.stake | quote }}
  WARMTH: {{ .Values.depth.warmth | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "depth.fullname" . }}-depth
  labels:
  {{- include "depth.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: depth
spec:
  replicas: {{ .Values.depth.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: depth
      app.kubernetes.io/name: solidarity
    {{- include "depth.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: depth
        app.kubernetes.io/name: solidarity
      {{- include "depth.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f7fd235b1df3f5e2992ef182baffa8347c7a38eb7d602154cb49ca3b8532b497
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "depth.fullname" . }}-depth
        image: {{ .Values.depth.depth.image.repository }}:{{ .Values.depth.depth.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.depth.depth.imagePullPolicy }}
        name: depth
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.depth.depth.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.depth.depth.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "depth.fullname" . }}-depth
  labels:
  {{- include "depth.labels" . | nindent 4 }}
spec:
  type: {{ .Values.depth.type }}
  selector:
    app.kubernetes.io/instance: depth
    app.kubernetes.io/name: solidarity
  {{- include "depth.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.depth.ports | toYaml | nindent 2 -}}
depth:
  carpet: dive
  copOutSecondBasis: coverall
  decoder: saving
  depth:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  informConcrete: maniac
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  proofReaderIllusionRelation: stamen
  replicas: 1
  speltDeposit: earsplitting
  stake: stamina
  type: ClusterIP
  warmth: acid
kubernetesClusterDomain: cluster.local
