# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "feel.fullname" . }}-feel
  labels:
  {{- include "feel.labels" . | nindent 4 }}
data:
  ABSENT_JOURNEY: {{ .Values.feel.absentJourney | quote }}
  ATTACK: {{ .Values.feel.attack | quote }}
  BROWSER_HONEYBEE: {{ .Values.feel.browserHoneybee | quote }}
  HACKSAW: {{ .Values.feel.hacksaw | quote }}
  HEARTACHE: {{ .Values.feel.heartache | quote }}
  RACIAL_VIOLATION: {{ .Values.feel.racialViolation | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "feel.fullname" . }}-feel
  labels:
  {{- include "feel.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: feel
spec:
  replicas: {{ .Values.feel.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: feel
      app.kubernetes.io/name: investment
    {{- include "feel.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: feel
        app.kubernetes.io/name: investment
      {{- include "feel.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 131c0e41ff6c87a1ac013f9e222ac8e16a4d1a78016316a4bceed5b5ff948b0c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "feel.fullname" . }}-feel
        image: {{ .Values.feel.feel.image.repository }}:{{ .Values.feel.feel.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.feel.feel.imagePullPolicy }}
        name: feel
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.feel.feel.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.feel.feel.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "feel.fullname" . }}-feel
  labels:
  {{- include "feel.labels" . | nindent 4 }}
spec:
  type: {{ .Values.feel.type }}
  selector:
    app.kubernetes.io/instance: feel
    app.kubernetes.io/name: investment
  {{- include "feel.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.feel.ports | toYaml | nindent 2 -}}
feel:
  absentJourney: duplexer
  attack: dispatch
  browserHoneybee: migrant
  feel:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  hacksaw: contention
  heartache: vegetation
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  racialViolation: cope
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
