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.21"
        productID: "b6fe4d9823294584822155cd2595445b"
        productName: "CP4MCM Advanced Monitoring"
        productVersion: "2.3.21"
        productMetric: "MANAGED_VIRTUAL_SERVER"
        productChargedContainers: "All"
        productCloudpakRatio: "1:1"
        olm.relatedImage.autconfigoperator: cp.icr.io/cp/cp4mcm/ibm-dc-autoconfig-operator@sha256:c9d0a100cfe8aec5eae512b6544aebdab4caa1b9ee87997f3f64e59bbaae24d8
        olm.relatedImage.k8monitor: cp.icr.io/cp/cp4mcm/k8-monitor@sha256:d725f6f0a5ae952b9dbbd7eeaa5831af9e58f7a979dcc22fb08f6f44a5fae8e8
        olm.relatedImage.k8operator: cp.icr.io/cp/cp4mcm/k8sdc-operator@sha256:f96ac073feff3db0dbbd47bdef0e01c2961408f6ca11150fad75f5f2d7d3212e
        olm.relatedImage.reloader: cp.icr.io/cp/cp4mcm/reloader@sha256:14e42e0dd53cd678b6f0951125e01c9fd8f881141e2dc1f786d41abdfa44dca9
        olm.relatedImage.uacloud: cp.icr.io/cp/cp4mcm/ua-cloud-monitoring@sha256:41c48a979e63dbc4bca39bdb23468a3436a2ec7f54c47ca386ddf58f2c8fa212
        olm.relatedImage.uaoperator: cp.icr.io/cp/cp4mcm/ua-operator@sha256:087f4e76b410f1adcc415ded109f884a5502fb585fb280ed22cabcd9d4294e04
        olm.relatedImage.uaplugins: cp.icr.io/cp/cp4mcm/ua-plugins@sha256:a1b25e8bebebd9278b3aed02a18b5115413a0182194b8f3f540ba12756bdf659
        olm.relatedImage.uarepo: cp.icr.io/cp/cp4mcm/ua-repo@sha256:50f5bfd94796a628619418e9be30aaedd797a499b3e76f6ef8bb45f0893daca3
    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:c2ae4ed7c68cafbcfe398104e555a220c57d3628f60e9db092cad0b4e34c2888
          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: {}
