# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "confront.fullname" . }}-confront
  labels:
  {{- include "confront.labels" . | nindent 4 }}
data:
  BALLOON_WIT: {{ .Values.confront.balloonWit | quote }}
  CRAW_MAJORITY: {{ .Values.confront.crawMajority | quote }}
  DETENTION_CREDITOR: {{ .Values.confront.detentionCreditor | quote }}
  HEART: {{ .Values.confront.heart | quote }}
  INCOME: {{ .Values.confront.income | quote }}
  PEONY: {{ .Values.confront.peony | quote }}
  SQUEAK: {{ .Values.confront.squeak | quote }}
  VARIABLE: {{ .Values.confront.variable | quote }}
  VERSED: {{ .Values.confront.versed | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "confront.fullname" . }}-confront
  labels:
  {{- include "confront.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: confront
spec:
  replicas: {{ .Values.confront.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: confront
      app.kubernetes.io/name: start
    {{- include "confront.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: confront
        app.kubernetes.io/name: start
      {{- include "confront.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 012d6b6ee024c3843a96574e23f2cdff72ff2d9d25ad1868f91a11abfc032c74
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "confront.fullname" . }}-confront
        image: {{ .Values.confront.confront.image.repository }}:{{ .Values.confront.confront.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.confront.confront.imagePullPolicy }}
        name: confront
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.confront.confront.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.confront.confront.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "confront.fullname" . }}-confront
  labels:
  {{- include "confront.labels" . | nindent 4 }}
spec:
  type: {{ .Values.confront.type }}
  selector:
    app.kubernetes.io/instance: confront
    app.kubernetes.io/name: start
  {{- include "confront.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.confront.ports | toYaml | nindent 2 -}}
confront:
  balloonWit: utensil
  confront:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  crawMajority: commission
  detentionCreditor: aftershave
  heart: flat
  income: seal
  peony: fetus
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  squeak: vice
  type: ClusterIP
  variable: snarl
  versed: emphasis
kubernetesClusterDomain: cluster.local
