# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "tenor.fullname" . }}-tenor
  labels:
  {{- include "tenor.labels" . | nindent 4 }}
data:
  BOUNDARY_WILL: {{ .Values.tenor.boundaryWill | quote }}
  COMMONSENSE_CURLY: {{ .Values.tenor.commonsenseCurly | quote }}
  FIBERGLASS_NONCONFORMIST: {{ .Values.tenor.fiberglassNonconformist | quote }}
  GAUGE: {{ .Values.tenor.gauge | quote }}
  INNOCENCE: {{ .Values.tenor.innocence | quote }}
  POIGNANCE_EXAMINE: {{ .Values.tenor.poignanceExamine | quote }}
  REIGN_DIVIDER_EPONYM: {{ .Values.tenor.reignDividerEponym | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "tenor.fullname" . }}-tenor
  labels:
  {{- include "tenor.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: tenor
spec:
  replicas: {{ .Values.tenor.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: tenor
      app.kubernetes.io/name: roof
    {{- include "tenor.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: tenor
        app.kubernetes.io/name: roof
      {{- include "tenor.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7a41389dc0cdd024d4d099dd085f7bcc1731f3f6e9a557cd8baef221a1ee4a68
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "tenor.fullname" . }}-tenor
        image: {{ .Values.tenor.tenor.image.repository }}:{{ .Values.tenor.tenor.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.tenor.tenor.imagePullPolicy }}
        name: tenor
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.tenor.tenor.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.tenor.tenor.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "tenor.fullname" . }}-tenor
  labels:
  {{- include "tenor.labels" . | nindent 4 }}
spec:
  type: {{ .Values.tenor.type }}
  selector:
    app.kubernetes.io/instance: tenor
    app.kubernetes.io/name: roof
  {{- include "tenor.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.tenor.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
tenor:
  boundaryWill: brownie
  commonsenseCurly: constraint
  fiberglassNonconformist: injunction
  gauge: borrower
  innocence: thunderbolt
  poignanceExamine: asymmetry
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  reignDividerEponym: lambkin
  replicas: 1
  tenor:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
