# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "streamline.fullname" . }}-streamline
  labels:
  {{- include "streamline.labels" . | nindent 4 }}
data:
  BEAK_AUDIENCE_BOWL: {{ .Values.streamline.beakAudienceBowl | quote }}
  BEGIN_COURTROOM: {{ .Values.streamline.beginCourtroom | quote }}
  CROUP_DESIGN: {{ .Values.streamline.croupDesign | quote }}
  DEMOCRACY: {{ .Values.streamline.democracy | quote }}
  DISTURBED_POLLUTANT_FERRET: {{ .Values.streamline.disturbedPollutantFerret | quote
    }}
  HARBOR_SEAL: {{ .Values.streamline.harborSeal | quote }}
  LABOUR_STONEWORK_STEER: {{ .Values.streamline.labourStoneworkSteer | quote }}
  OBI_CHECK: {{ .Values.streamline.obiCheck | quote }}
  PRODUCTION_THEOLOGY_SNUCK: {{ .Values.streamline.productionTheologySnuck | quote
    }}
  ROPE_DATE_BAGGAGE: {{ .Values.streamline.ropeDateBaggage | quote }}
  THUMP: {{ .Values.streamline.thump | quote }}
  YEW_THUG_LYCRA: {{ .Values.streamline.yewThugLycra | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "streamline.fullname" . }}-streamline
  labels:
  {{- include "streamline.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: streamline
spec:
  replicas: {{ .Values.streamline.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: streamline
      app.kubernetes.io/name: cheque
    {{- include "streamline.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: streamline
        app.kubernetes.io/name: cheque
      {{- include "streamline.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 89e80bde3657511d45e30762eec6419cdca16f00ff216f0007d886e9a3486bf8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "streamline.fullname" . }}-streamline
        image: {{ .Values.streamline.streamline.image.repository }}:{{ .Values.streamline.streamline.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.streamline.streamline.imagePullPolicy }}
        name: streamline
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.streamline.streamline.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.streamline.streamline.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "streamline.fullname" . }}-streamline
  labels:
  {{- include "streamline.labels" . | nindent 4 }}
spec:
  type: {{ .Values.streamline.type }}
  selector:
    app.kubernetes.io/instance: streamline
    app.kubernetes.io/name: cheque
  {{- include "streamline.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.streamline.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
streamline:
  beakAudienceBowl: goodie
  beginCourtroom: diver
  croupDesign: individual
  democracy: profess
  disturbedPollutantFerret: kid
  harborSeal: ring
  labourStoneworkSteer: barrel
  obiCheck: differential
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  productionTheologySnuck: ideal
  replicas: 1
  ropeDateBaggage: rack
  streamline:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  thump: poncho
  type: ClusterIP
  yewThugLycra: reminder
