# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "absorbed.fullname" . }}-absorbed
  labels:
  {{- include "absorbed.labels" . | nindent 4 }}
data:
  CREEK: {{ .Values.absorbed.creek | quote }}
  HELLCAT_ADVANCE: {{ .Values.absorbed.hellcatAdvance | quote }}
  HYPHENATION_TRANSLATE_ABANDONED: {{ .Values.absorbed.hyphenationTranslateAbandoned
    | quote }}
  MARKETING_TANDEM: {{ .Values.absorbed.marketingTandem | quote }}
  SENTENCE_ENCHANTING_DOWNFALL: {{ .Values.absorbed.sentenceEnchantingDownfall |
    quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "absorbed.fullname" . }}-absorbed
  labels:
  {{- include "absorbed.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: absorbed
spec:
  replicas: {{ .Values.absorbed.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: absorbed
      app.kubernetes.io/name: wok
    {{- include "absorbed.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: absorbed
        app.kubernetes.io/name: wok
      {{- include "absorbed.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 14a52c2be8850d7c7f7dfa8b7fdcd574ffce29ffa031b04baf28cc3a05f446f2
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "absorbed.fullname" . }}-absorbed
        image: {{ .Values.absorbed.absorbed.image.repository }}:{{ .Values.absorbed.absorbed.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.absorbed.absorbed.imagePullPolicy }}
        name: absorbed
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.absorbed.absorbed.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.absorbed.absorbed.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "absorbed.fullname" . }}-absorbed
  labels:
  {{- include "absorbed.labels" . | nindent 4 }}
spec:
  type: {{ .Values.absorbed.type }}
  selector:
    app.kubernetes.io/instance: absorbed
    app.kubernetes.io/name: wok
  {{- include "absorbed.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.absorbed.ports | toYaml | nindent 2 -}}
absorbed:
  absorbed:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  creek: dynamic
  hellcatAdvance: shampoo
  hyphenationTranslateAbandoned: project
  marketingTandem: server
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sentenceEnchantingDownfall: coupon
  type: ClusterIP
kubernetesClusterDomain: cluster.local
