apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: '1'
  labels:
    app.kubernetes.io/name: ibmcloud-iam-operator
  name: ibmcloud-iam-operator
  namespace: ibmcloud-iam-operators
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibmcloud-iam-operator
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: ibmcloud-iam-operator
    spec:
      containers:
        - name: ibmcloud-iam-operator
          image: cloudoperators/ibmcloud-iam-operator:0.1.0
          command:
          - ibmcloud-iam-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibmcloud-iam-operator"
            - name: CONTROLLER_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace    
      serviceAccountName: ibmcloud-iam-operator