apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-monitoring-dataprovider-mgmt-operator
  labels:
    app.kubernetes.io/name: ibm-monitoring-dataprovider-mgmt-operator
    app.kubernetes.io/instance: ibm-monitoring-dataprovider-mgmt-operator
    app.kubernetes.io/managed-by: ibm-monitoring-dataprovider-mgmt-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-monitoring-dataprovider-mgmt-operator
  template:
    metadata:
      labels:
        name: ibm-monitoring-dataprovider-mgmt-operator
        app.kubernetes.io/name: ibm-monitoring-dataprovider-mgmt-operator
        app.kubernetes.io/instance: ibm-monitoring-dataprovider-mgmt-operator
        app.kubernetes.io/managed-by: ibm-monitoring-dataprovider-mgmt-operator
      annotations:
        cloudpakId: "7f6eda41081c4e08a255be1f0b4aef2d"
        cloudpakName: "IBM Cloud Pak for Multicloud Management"
        cloudpakVersion: "2.3"
        productID: "b6fe4d9823294584822155cd2595445b"
        productName: "CP4MCM Advanced Monitoring"
        productVersion: "2.3"
        productMetric: "MANAGED_VIRTUAL_SERVER"
        productChargedContainers: "All"
        productCloudpakRatio: "1:1"
        olm.relatedImage.autconfigoperator: cp.icr.io/cp/cp4mcm/ibm-dc-autoconfig-operator@sha256:d0b291bf07751a3bc80284c6c59d103a82b2edc4d781cecc18b0d946846f9a48
        olm.relatedImage.k8monitor: cp.icr.io/cp/cp4mcm/k8-monitor@sha256:dcfd98dbeb242f29656d5209d82478886dc4ed07f887ab7cfe333c21c2075e4e
        olm.relatedImage.k8operator: cp.icr.io/cp/cp4mcm/k8sdc-operator@sha256:01a703a4d13d452867a971f33638b37df8fb34c67759244ed8e9c9ba7bcbc1b1
        olm.relatedImage.reloader: cp.icr.io/cp/cp4mcm/reloader@sha256:4db59ec2851d601a5de6b95f444c700cd4a10417fe9d15d9be7d0fafa91c5baa
        olm.relatedImage.uacloud: cp.icr.io/cp/cp4mcm/ua-cloud-monitoring@sha256:edd6d8423509b8700d4d9511b03228f682428046618d2c87d275581117b66bbe
        olm.relatedImage.uaoperator: cp.icr.io/cp/cp4mcm/ua-operator@sha256:b0981e9fda02041b87fbb0e34c74917f59f8cb286d35371e0289b9a96a1c0a28
        olm.relatedImage.uaplugins: cp.icr.io/cp/cp4mcm/ua-plugins@sha256:9e6d0f9aad513548abd7691576b0eae3f43579c68cc1c98bed80befe985c8ee5
        olm.relatedImage.uarepo: cp.icr.io/cp/cp4mcm/ua-repo@sha256:6ec8ed8cb421fa5879ded166ac562eee743f5648049c6faaa0cd2547a599668b
    spec:
      serviceAccountName: ibm-monitoring-dataprovider-mgmt-operator
      hostNetwork: false
      hostPID: false
      hostIPC: false
      securityContext:
        runAsNonRoot: true
        runAsUser: 1001
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
        - name: operator
          # Replace this with the built image name
          image: cp.icr.io/cp/cp4mcm/ibm-monitoring-dataprovider-mgmt-operator@sha256:59ac9304999708a2bdc5ed01fe430067dfec4f002be26b5741a00ac2b4b2c66d
          imagePullPolicy: "IfNotPresent"
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-monitoring-dataprovider-mgmt-operator"
            - name: ANSIBLE_GATHERING
              value: explicit
            - name: AUTO_CONFIG
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.autconfigoperator']
            - name: K8MONITOR
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.k8monitor']
            - name: K8SDC_OPERATOR
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.k8operator']
            - name: RELOADER
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.reloader']
            - name: UACLOUD
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.uacloud']
            - name: UAOPERATOR
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.uaoperator']
            - name: UAREPO
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.uarepo']
            - name: UAPLUGINS
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['olm.relatedImage.uaplugins']
          livenessProbe:
            httpGet:
              path: /healthz
              port: 6789
            failureThreshold: 3
            initialDelaySeconds: 20
            periodSeconds: 20
            successThreshold: 1
            timeoutSeconds: 1
          readinessProbe:
            httpGet:
              path: /readyz
              port: 6789
            failureThreshold: 3
            initialDelaySeconds: 15
            periodSeconds: 15
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 1500m
              memory: 768Mi
            requests:
              cpu: 800m
              memory: 512Mi
          securityContext:
            privileged: false
            readOnlyRootFilesystem: false
            allowPrivilegeEscalation: false
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL
      volumes:
        - name: runner
          emptyDir: {}
