apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: ibm-monitoring
    app.kubernetes.io/instance: common-monitoring
    app.kubernetes.io/managed-by: ibm-monitoring-exporters-operator
    operatorframework.io/arch.s390x: supported
    operatorframework.io/os.linux: supported
    operatorframework.io/arch.amd64: supported
    operatorframework.io/arch.ppc64le: supported
  name: ibm-monitoring-exporters-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-monitoring-exporters-operator
  template:
    metadata:
      labels:
        app.kubernetes.io/name: ibm-monitoring
        app.kubernetes.io/instance: common-monitoring
        app.kubernetes.io/managed-by: ibm-monitoring-exporters-operator
        name: ibm-monitoring-exporters-operator
      annotations:
        productName: IBM Cloud Platform Common Services
        productID: "068a62892a1e4db39641342e592daa25"
        productMetric: FREE
    spec:
      serviceAccountName: ibm-monitoring-exporters-operator
      hostIPC: false
      hostNetwork: false
      hostPID: false
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/arch
                    operator: In
                    values:
                      - amd64
                      - ppc64le
                      - s390x
      containers:
        - name: ibm-monitoring-exporters-operator
          # Replace this with the built image name
          image: quay.io/opencloudio/ibm-monitoring-exporters-operator
          command:
            - ibm-monitoring-exporters-operator
          imagePullPolicy: Always
          securityContext:
            privileged: false
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL
          resources:
            limits:
              cpu: 50m
              memory: 512Mi
            requests:
              cpu: 20m
              memory: 64Mi
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-monitoring-exporters-operator"
            - name: ROUTER_IMAGE
              value: quay.io/opencloudio/icp-management-ingress@sha256:6641653b351901eb9352e06479d75a4babaf746bcd63381a09a58d9192b0953c
            - name: COLLECTD_IMAGE
              value: quay.io/opencloudio/collectd-exporter@sha256:b7e7bd91a3794d1008163c1569ec9c7973d1424ee46a429a110f3fcf9a107f50
            - name: NODE_IMAGE
              value: quay.io/opencloudio/node-exporter@sha256:0951bb4901f2cf0da5d80c6e6e74cbb1bb084b1c7c9b56e32b72ab8f955ca3b3
            - name: KUBESTATE_IMAGE
              value: quay.io/opencloudio/kube-state-metrics@sha256:738fb9718d139f63925c55cb5f6f59eef16170fa25d4c5772c9e98432419236f
