apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-catalog-ui-operator
  labels:
      name: ibm-catalog-ui-operator
      app.kubernetes.io/instance: catalog-ui
      app.kubernetes.io/managed-by: cataloguis.operator.ibm.com
      app.kubernetes.io/name: cataloguis.operator.ibm.com
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-catalog-ui-operator
  template:
    metadata:
      labels:
        name: ibm-catalog-ui-operator
        app.kubernetes.io/instance: cataloguis.operator.ibm.com
        app.kubernetes.io/managed-by: cataloguis.operator.ibm.com
        app.kubernetes.io/name: cataloguis.operator.ibm.com
      annotations:
        productName: IBM Cloud Platform Common Services
        productID: "068a62892a1e4db39641342e592daa25"
        productMetric: FREE
    spec:
      serviceAccountName: ibm-catalog-ui-operator
      hostNetwork: false
      hostPID: false
      hostIPC: false
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                  - amd64
                  - ppc64le
                  - s390x
      containers:
        - name: ibm-catalog-ui-operator
          # Replace this with the built image name
          image: quay.io/opencloudio/ibm-catalog-ui-operator:latest
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-catalog-ui-operator"
            - name: OPERAND_CATALOG_UI_IMAGE
              value: "quay.io/opencloudio/icp-catalog-ui@sha256:83c3c5794bc89510869a30d6d1029a0d36b3419158e6d2d97bd038070f922302"
          resources:
            limits:
              cpu: 50m
              memory: 256Mi
            requests:
              cpu: 20m
              memory: 256Mi
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            privileged: false
            capabilities:
              drop:
              - ALL
