{{ if .Values.save.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: save
spec:
  replicas: 1
  selector:
    matchLabels:
      app: save
  template:
    metadata:
      name: save
      labels:
        app: save
    spec:
      containers:
      - name: save
        image: goalprofit/env:1.1
        imagePullPolicy: Always
        args:
          - bash
          - -c
          - |
            while true
            do
            curl -s -X POST server:8080/save
            echo
            sleep 1m
            done
      imagePullSecrets:
      - name: regcred
      {{ include "app.affinity" . | nindent 6}}
{{ end }}