apiVersion: apps/v1
kind: Deployment
metadata:
  name: operator
  namespace: kubevirt
  labels:
    control-plane: ssp-operator
spec:
  selector:
    matchLabels:
      control-plane: ssp-operator
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: ssp-operator
    spec:
      serviceAccountName: ssp-operator
      priorityClassName: system-cluster-critical
      securityContext:
        runAsUser: 1000
      containers:
      - command:
        - /manager
        args: ["--leader-elect"]
        env:
          - name: KVM_INFO_IMAGE
          - name: VALIDATOR_IMAGE
            value: "$VALIDATOR_IMG"
          - name: VIRT_LAUNCHER_IMAGE
          - name: NODE_LABELLER_IMAGE
          - name: CPU_PLUGIN_IMAGE
          - name: OPERATOR_VERSION
        image: controller:latest
        name: manager
        resources:
          requests:
            memory: "150Mi"
            cpu: "100m"
        securityContext:
          allowPrivilegeEscalation: false
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
      terminationGracePeriodSeconds: 10
