apiVersion: apps/v1
kind: Deployment
metadata:
  name: openmcp-pvc-controller
  namespace: openmcp
spec:
  replicas: 1
  selector:
    matchLabels:
      name: openmcp-pvc-controller
  template:
    metadata:
      labels:
        name: openmcp-pvc-controller
    spec:
      serviceAccountName: openmcp-pvc-controller
      imagePullSecrets:
        - name: regcred
      containers:
        - name: openmcp-pvc-controller
          # Replace this with the built image name
          image: ketidevit2/openmcp-pvc-controller:v0.0.1
          command:
          - openmcp-pvc-controller
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              #value: ""
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "openmcp-pvc-controller"
      tolerations:
        - key: node.kubernetes.io/not-ready
          effect: NoExecute
          tolerationSeconds: 0
        - key: node.kubernetes.io/unreachable
          effect: NoExecute
          tolerationSeconds: 0