{{ if .Values.pod_reloader.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: pod-reloader
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pod-reloader
  template:
    metadata:
      name: pod-reloader
      labels:
        app: pod-reloader
    spec:
      terminationGracePeriodSeconds: 1
      containers:
      - name: pod-reloader
        image: docker.io/goalprofit/pod-reloader:{{.Values.pod_reloader.version}}
        imagePullPolicy: Always

      imagePullSecrets:
      - name: regcred
{{ end }}