apiVersion: apps/v1
kind: Deployment
metadata:
  name: topolvm-operator
  namespace: topolvm-system
  labels:
    operator: topolvm
spec:
  selector:
    matchLabels:
      app: topolvm-operator
  replicas: 1
  template:
    metadata:
      labels:
        app: topolvm-operator
    spec:
      serviceAccountName: topolvm-operator
      containers:
        - name: topolvm-operator
          # set the stable version
          image: alaudapublic/topolvm-operator:2.2.0
          command:
            - /topolvm
          args:
            - operator
          env:
            - name: TOPOLVM_LOG_LEVEL
              value: "DEBUG"
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: IS_OPERATOR_HUB
              value: "0"
