# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "table.fullname" . }}-table
  labels:
  {{- include "table.labels" . | nindent 4 }}
data:
  ARBITRATE: {{ .Values.table.arbitrate | quote }}
  BEER_MEANDER_REVELATION: {{ .Values.table.beerMeanderRevelation | quote }}
  BROKER_DEEP_CLAN: {{ .Values.table.brokerDeepClan | quote }}
  CHEM_TENEMENT: {{ .Values.table.chemTenement | quote }}
  CLAMP_REINFORCE: {{ .Values.table.clampReinforce | quote }}
  ETHNICITY_HARPOONER: {{ .Values.table.ethnicityHarpooner | quote }}
  IMITATION: {{ .Values.table.imitation | quote }}
  LOT_COVERALL_ASTRONOMY: {{ .Values.table.lotCoverallAstronomy | quote }}
  NECKLACE_MAYONNAISE_RECOGNITION: {{ .Values.table.necklaceMayonnaiseRecognition
    | quote }}
  SMOG_INCREASE_SPIRITUALITY: {{ .Values.table.smogIncreaseSpirituality | quote }}
  WREN_BURRITO: {{ .Values.table.wrenBurrito | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "table.fullname" . }}-table
  labels:
  {{- include "table.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: table
spec:
  replicas: {{ .Values.table.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: table
      app.kubernetes.io/name: guideline
    {{- include "table.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: table
        app.kubernetes.io/name: guideline
      {{- include "table.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 962d2f956a1710a2e9f03451cf7c33f0e5ce7530c3dbcbf6a711e9dae7dff077
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "table.fullname" . }}-table
        image: {{ .Values.table.table.image.repository }}:{{ .Values.table.table.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.table.table.imagePullPolicy }}
        name: table
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.table.table.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.table.table.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "table.fullname" . }}-table
  labels:
  {{- include "table.labels" . | nindent 4 }}
spec:
  type: {{ .Values.table.type }}
  selector:
    app.kubernetes.io/instance: table
    app.kubernetes.io/name: guideline
  {{- include "table.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.table.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
table:
  arbitrate: normalization
  beerMeanderRevelation: test
  brokerDeepClan: upbeat
  chemTenement: beginning
  clampReinforce: readiness
  ethnicityHarpooner: inauguration
  imitation: overshoot
  lotCoverallAstronomy: thanks
  necklaceMayonnaiseRecognition: clavicle
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  smogIncreaseSpirituality: tender
  table:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  wrenBurrito: spacing
