apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-common-service-operator
  namespace: ibm-common-services
  labels:
    app.kubernetes.io/instance: "ibm-common-service-operator"
    app.kubernetes.io/managed-by: "ibm-common-service-operator"
    app.kubernetes.io/name: "ibm-common-service-operator"
spec:
  selector:
    matchLabels:
      name: ibm-common-service-operator
  replicas: 1
  template:
    metadata:
      labels:
        name: ibm-common-service-operator
        app.kubernetes.io/instance: ibm-common-service-operator
        app.kubernetes.io/managed-by: "ibm-common-service-operator"
        app.kubernetes.io/name: "ibm-common-service-operator"
      annotations:
        productName: "IBM Cloud Platform Common Services"
        productID: "068a62892a1e4db39641342e592daa25"
        productMetric: "FREE"
    spec:
      serviceAccountName: ibm-common-service-operator
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
      - command:
        - /manager
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 3
          timeoutSeconds: 3
          periodSeconds: 20
          failureThreshold: 10
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 120
          timeoutSeconds: 10
          periodSeconds: 60
          failureThreshold: 10
        image: quay.io/opencloudio/common-service-operator:latest
        imagePullPolicy: Always
        name: ibm-common-service-operator
        env:
        - name: OPERATOR_NAME
          value: "ibm-common-service-operator"
        - name: IBM_CS_WEBHOOK_IMAGE
          value: quay.io/opencloudio/ibm-cs-webhook:1.8.0
        - name: IBM_SECRETSHARE_OPERATOR_IMAGE
          value: quay.io/opencloudio/ibm-secretshare-operator:1.9.0
        resources:
          limits:
            cpu: 500m
            memory: 512Mi
          requests:
            cpu: 100m
            memory: 200Mi
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          privileged: false
          readOnlyRootFilesystem: true
          runAsNonRoot: true
      terminationGracePeriodSeconds: 10
