apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-commonui-operator
  labels:
    app.kubernetes.io/instance: ibm-commonui-operator
    app.kubernetes.io/managed-by: ibm-commonui-operator
    app.kubernetes.io/name: ibm-commonui-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-commonui-operator
  template:
    metadata:
      labels:
        name: ibm-commonui-operator
        app.kubernetes.io/instance: ibm-commonui-operator
        app.kubernetes.io/managed-by: ibm-commonui-operator
        app.kubernetes.io/name: ibm-commonui-operator
      annotations:
        productName: IBM Cloud Platform Common Services
        productID: "068a62892a1e4db39641342e592daa25"
        productVersion: "3.4.0"
        productMetric: FREE
        "openshift.io/scc": "restricted"
    spec:
      serviceAccountName: ibm-commonui-operator
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
        - name: ibm-commonui-operator
          # Replace this with the built image name
          image: quay.io/opencloudio/ibm-commonui-operator@sha256:29045ead929d394f42ebbb4279919597c3d137d0445fb12e075ab03be08c5e12
          command:
          - ibm-commonui-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-commonui-operator"
            - name: COMMON_WEB_UI_IMAGE_TAG_OR_SHA
              value: "sha256:d5fda83f0abd6deb8c484338d093255d32b29a3adde7c15300a695e9ec6a9e00"
            - name: LEGACYHEADER_IMAGE_TAG_OR_SHA
              value: "sha256:5c785b6c4dc2b53af8e0219415388e4bafcfce354c13c6ff62912a9e7c3abb46"
          resources:
            limits:
              cpu: 40m
              memory: 150Mi
            requests:
              cpu: 10m
              memory: 25Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
    
