apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-auditlogging-operator
  labels:
    app.kubernetes.io/instance: "common-audit-logging"
    app.kubernetes.io/managed-by: "ibm-auditlogging-operator"
    app.kubernetes.io/name: "common-audit-logging"
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-auditlogging-operator
  template:
    metadata:
      labels:
        name: ibm-auditlogging-operator
        app.kubernetes.io/instance: "common-audit-logging"
        app.kubernetes.io/managed-by: "ibm-auditlogging-operator"
        app.kubernetes.io/name: "common-audit-logging"
      annotations:
        productName: IBM Cloud Platform Common Services
        productID: "068a62892a1e4db39641342e592daa25"
        productVersion: "3.4.0"
        productMetric: FREE
        openshift.io/scc: restricted
    spec:
      serviceAccountName: ibm-auditlogging-operator
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
        - name: ibm-auditlogging-operator
          # Replace this with the built image name
          image: quay.io/opencloudio/ibm-auditlogging-operator:latest
          command:
          - ibm-auditlogging-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-auditlogging-operator"
            # DO NOT DELETE. Add image SHAs here. See get_image_sha.sh
            - name: POLICY_CTRL_TAG_OR_SHA
              value: "sha256:6b681f6dee47b8c4cb3a54284d3112003fd6a88a4cdfff06eef7289f3fd2d409"
            - name: FLUENTD_TAG_OR_SHA
              value: "sha256:d9bbc6c3f8dc0299abd0927285c40b8f61878aafaae3928340991ce0436ff854"
          resources:
            limits:
              cpu: 100m
              memory: 300Mi
            requests:
              cpu: 50m
              memory: 150Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
