# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "octet.fullname" . }}-octet
  labels:
  {{- include "octet.labels" . | nindent 4 }}
data:
  GRAVITY_PEONY_SOCCER: {{ .Values.octet.gravityPeonySoccer | quote }}
  LANGUID_SIMPLICITY: {{ .Values.octet.languidSimplicity | quote }}
  OBTAINABLE_CLAN_HIT: {{ .Values.octet.obtainableClanHit | quote }}
  SCARE_PILLBOX_ILLITERACY: {{ .Values.octet.scarePillboxIlliteracy | quote }}
  TENDER_PERSUADE_GIT: {{ .Values.octet.tenderPersuadeGit | quote }}
  TEXTURE_VINYL: {{ .Values.octet.textureVinyl | quote }}
  TRAMP_ILLNESS: {{ .Values.octet.trampIllness | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "octet.fullname" . }}-octet
  labels:
  {{- include "octet.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: octet
spec:
  replicas: {{ .Values.octet.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: octet
      app.kubernetes.io/name: clammy
    {{- include "octet.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: octet
        app.kubernetes.io/name: clammy
      {{- include "octet.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2e7f30bc0e6cd9f345f6235d2733c18c67d47c550aa84e71d8cd484e34bcb54c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "octet.fullname" . }}-octet
        image: {{ .Values.octet.octet.image.repository }}:{{ .Values.octet.octet.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.octet.octet.imagePullPolicy }}
        name: octet
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.octet.octet.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.octet.octet.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "octet.fullname" . }}-octet
  labels:
  {{- include "octet.labels" . | nindent 4 }}
spec:
  type: {{ .Values.octet.type }}
  selector:
    app.kubernetes.io/instance: octet
    app.kubernetes.io/name: clammy
  {{- include "octet.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.octet.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
octet:
  gravityPeonySoccer: comment
  languidSimplicity: lining
  obtainableClanHit: info
  octet:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scarePillboxIlliteracy: pie
  tenderPersuadeGit: chasm
  textureVinyl: tramp
  trampIllness: casement
  type: ClusterIP
