apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Release.Name }}"
spec:
  selector:
    matchLabels:
      app: "{{ .Chart.Name }}"
  template:
    metadata:
      labels:
        app: "{{ .Chart.Name }}"
    spec:
      serviceAccountName: "{{ .Release.Name }}"
      containers:
      - name: "{{ .Chart.Name }}"
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: "{{ .Values.image.pullPolicy }}"
        env:
        - name: DELAY_CORDON
          value: "{{ .Values.delayCordon }}"
        - name: TARGETLABELS
          value: "{{ .Values.targetLabels}}"
        - name: VALIDATEWAITTIME
          value: "{{ .Values.validateWaitTime }}"
        - name: VITALNAMESPACES
          value: "{{ .Values.vitalNamespaces }}"
        - name: EXEMPTPODLABELS
          value: "{{ .Values.eviction.exemptPodLabels }}"
        - name: EVICTIONSTRATEGY
          value: "{{ .Values.eviction.strategy }}"
        - name: RETRYTHRESHOLD
          value: "{{ .Values.eviction.threshold }}"
        - name: EVICTIONWAITTIME
          value: "{{ .Values.eviction.wait }}"
