apiVersion: apps/v1
kind: Deployment
metadata:
  name: ibm-helm-repo-operator
  labels:
    name: ibm-helm-repo-operator
    app.kubernetes.io/instance: helm-repo
    app.kubernetes.io/managed-by: helmrepos.operator.ibm.com
    app.kubernetes.io/name: helmrepos.operator.ibm.com
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ibm-helm-repo-operator
  template:
    metadata:
      name: ibm-helm-repo-operator
      labels:
        name: ibm-helm-repo-operator
        app.kubernetes.io/instance: helm-repo
        app.kubernetes.io/managed-by: helmrepos.operator.ibm.com
        app.kubernetes.io/name: helmrepos.operator.ibm.com
      annotations:
        productName: IBM Cloud Platform Common Services
        productID: "068a62892a1e4db39641342e592daa25"
        productVersion: "3.4.0"
        productMetric: FREE
    spec:
      hostNetwork: false
      hostPID: false
      hostIPC: false
      serviceAccountName: ibm-helm-repo-operator
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                  - amd64
                  - ppc64le
                  - s390x
      containers:
        - name: ibm-helm-repo-operator
          # Replace this with the built image name
          image: quay.io/opencloudio/ibm-helm-repo-operator:latest
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "ibm-helm-repo-operator"
            - name: OPERAND_AUDIT_SERVICE_ENABLED
              value: "false"
            - name: OPERAND_AUDIT_SERVICE_IMAGE
              value: "quay.io/opencloudio/icp-audit-service@sha256:24a220374c39652f8b031637d852995bfaec5be2601f9e4c41eb1925531f466d"
            - name: OPERAND_HELM_REPO_IMAGE
              value: "quay.io/opencloudio/icp-helm-repo@sha256:bc95dc9703c0d26ad3af1004bbe4b236781ebd84082df430108948897dfabfe2"
          resources:
            limits:
              cpu: 150m
              memory: 256Mi
            requests:
              cpu: 150m
              memory: 256Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true