apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-iam-operator
  labels:
     app.kubernetes.io/instance: ibm-iam-operator
     app.kubernetes.io/managed-by: ibm-iam-operator
     app.kubernetes.io/name: ibm-iam-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-iam-operator
  template:
    metadata:
      labels:
        name: ibm-iam-operator
        app.kubernetes.io/instance: ibm-iam-operator
        app.kubernetes.io/managed-by: ibm-iam-operator
        app.kubernetes.io/name: ibm-iam-operator
      annotations:
        productName: IBM Cloud Platform Common Services
        productID: "068a62892a1e4db39641342e592daa25"
        productMetric: FREE
    spec:
      serviceAccountName: ibm-iam-operator
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
        - name: ibm-iam-operator
          # Replace this with the built image name
          image: quay.io/opencloudio/ibm-iam-operator:latest
          command:
          - ibm-iam-operator
          imagePullPolicy: Always
          env:
            - name: AUTH_SERVICE_TAG_OR_SHA
              value: "sha256:1b11ea425a9daf84ba5e2170d0068bdbc0f679f438c49cdb9bab3e52e33da927"
            - name: IDENTITY_PROVIDER_TAG_OR_SHA
              value: "sha256:c5a0c7e1ef19e7a2b92f52d33ef2f295ffe155ce77210931b8cb8260a1aed9ac"
            - name: IDENTITY_MANAGER_TAG_OR_SHA
              value: "sha256:0e773cfc0083b4d6c76f35908962dd9ecf24e3a81951f7ee524c5a00fe06127c"
            - name: POLICY_ADMINISTRATION_TAG_OR_SHA
              value: "sha256:41c462f8197dfcd2b2f4619ff4c18925aa9c5eecc9bc590ab2182688057100c6"
            - name: POLICY_DECISION_TAG_OR_SHA
              value: "sha256:1f50fd868ede1353adc5be0049ffe90c732c331134168f4b1c8e5584cafb543c"
            - name: SECRET_WATCHER_TAG_OR_SHA
              value: "sha256:a5fb379da4456801e9f02cf828e23c2558e0c27af23f56cc77fe11383381f60f"
            - name: CLIENT_WATCHER_TAG_OR_SHA
              value: "sha256:be5ecfa577a47ec962e54166353b2d248b13625b367618c71cd58285ba47bd35"
            - name: POLICY_CONTROLLER_TAG_OR_SHA
              value: "sha256:47545b9aec9c8ecba544acc2b8994f1c2d364ccd24c65e785f2f1f5d2a612aa5"
            - name: IAM_ONBOARDING_TAG_OR_SHA
              value: "sha256:9c22743e703478d66d56b5fd74b05f56d620fdf404b7c6a25e24935e64351a64"
            - name: AUDIT_TAG_OR_SHA
              value: "sha256:3cfb9f3cc99379758f73f1cd2e6ad4dd4bc61e13cc55d7c34b0d0e280cb47421"
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-iam-operator"
          resources:
            limits:
              cpu: 25m
              memory: 320Mi
            requests:
              cpu: 10m
              memory: 80Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true