# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "filter.fullname" . }}-filter
  labels:
  {{- include "filter.labels" . | nindent 4 }}
data:
  CRAVAT: {{ .Values.filter.cravat | quote }}
  GO-KART_LEG_KNOWING: {{ .Values.filter.goKartLegKnowing | quote }}
  IDEAL_PERPETUAL: {{ .Values.filter.idealPerpetual | quote }}
  MERIDIAN: {{ .Values.filter.meridian | quote }}
  OBSERVATION_SUGGESTION_COMPUTER: {{ .Values.filter.observationSuggestionComputer
    | quote }}
  SHAKEDOWN: {{ .Values.filter.shakedown | quote }}
  UNBIASED: {{ .Values.filter.unbiased | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "filter.fullname" . }}-filter
  labels:
  {{- include "filter.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: filter
spec:
  replicas: {{ .Values.filter.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: filter
      app.kubernetes.io/name: sash
    {{- include "filter.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: filter
        app.kubernetes.io/name: sash
      {{- include "filter.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 27eb76037be473eabb6ef7afdef934ed209bff21ea8df27e4df99c4ed384fbfe
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "filter.fullname" . }}-filter
        image: {{ .Values.filter.filter.image.repository }}:{{ .Values.filter.filter.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.filter.filter.imagePullPolicy }}
        name: filter
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.filter.filter.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.filter.filter.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "filter.fullname" . }}-filter
  labels:
  {{- include "filter.labels" . | nindent 4 }}
spec:
  type: {{ .Values.filter.type }}
  selector:
    app.kubernetes.io/instance: filter
    app.kubernetes.io/name: sash
  {{- include "filter.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.filter.ports | toYaml | nindent 2 -}}
filter:
  cravat: eyelash
  filter:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  goKartLegKnowing: album
  idealPerpetual: rehospitalization
  meridian: balalaika
  observationSuggestionComputer: frown
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shakedown: espadrille
  type: ClusterIP
  unbiased: headrest
kubernetesClusterDomain: cluster.local
