---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: gpushare-schd-extender
spec:
  selector:
    matchLabels:
      app: gpushare
      component: gpushare-schd-extender
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: gpushare
        component: gpushare-schd-extender
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ''
    spec:
      hostNetwork: true
      tolerations:
      - effect: NoSchedule
        operator: Exists
        key: node-role.kubernetes.io/master
      - effect: NoSchedule
        operator: Exists
        key: node.cloudprovider.kubernetes.io/uninitialized
      - effect: NoSchedule
        operator: Exists
        key: node-role.kubernetes.io/controlplane
      - effect: NoExecute
        operator: Exists
        key: node-role.kubernetes.io/etcd
      nodeSelector:
        node-role.kubernetes.io/controlplane: "true"
      serviceAccount: gpushare-schd-extender
      containers:
        - name: gpushare-schd-extender
          image: "{{ .Values.image.schedulerextender.repository }}:{{ .Values.image.schedulerextender.tag }}"
          env:
          - name: LOG_LEVEL
            value: debug
          - name: PORT
            value: "{{ .Values.schedulerextender.ports.targetport }}"
