apiVersion: v1
kind: Pod
metadata:
  name: cp-notifier
  namespace: default
  labels:
    cloud-pipeline/cp-notifier: "true"
spec:
  nodeSelector:
    cloud-pipeline/cp-notifier: "true"
  tolerations:
  - key: node-role.kubernetes.io/master
    effect: NoSchedule
  containers:
    - name: cp-notifier
      image: lifescience/cloud-pipeline:notifier-$CP_VERSION
      imagePullPolicy: "Always"
      command: ["/init"]
      envFrom:
      - configMapRef:
          name: cp-config-global
      volumeMounts:
        - mountPath: /opt/notifier/logs
          name: notifier-logs
      lifecycle:
        preStop:
          exec:
            command: ["/bin/sh", "-c", "kill -9 $(pgrep -f notifier.jar); sleep 1"]
  volumes:
    - name: notifier-logs
      hostPath:
        path: /opt/notifier/logs
  imagePullSecrets:
    - name: cp-distr-docker-registry-secret
    