---
# SPDX-FileCopyrightText: Copyright (C) SchedMD LLC.
# SPDX-License-Identifier: Apache-2.0
# https://kind.sigs.k8s.io/docs/user/configuration/
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
featureGates:
  DynamicResourceAllocation: true
  DRAExtendedResource: true
  DRAResourceClaimDeviceStatus: true
  DRAConsumableCapacity: true
  GenericWorkload: true
  WorkloadWithJob: true
containerdConfigPatches:
  - |-
    [plugins."io.containerd.grpc.v1.cri"]
      enable_cdi = true
nodes:
  - role: control-plane
    kubeadmConfigPatches:
      - |
        kind: ClusterConfiguration
        controllerManager:
          extraArgs:
            v: "6"
            feature-gates: "GenericWorkload=true,WorkloadWithJob=true"
        scheduler:
          extraArgs:
            v: "5"
            vmodule: "allocator=6,dynamicresources=6"
            feature-gates: "GenericWorkload=true,WorkloadWithJob=true"
      - |
        kind: ClusterConfiguration
        apiServer:
          extraArgs:
            runtime-config: "resource.k8s.io/v1beta1=true,scheduling.k8s.io/v1alpha2=true"
            feature-gates: "GenericWorkload=true,WorkloadWithJob=true"
  - role: worker
  - role: worker
  - role: worker
  - role: worker
    labels:
      scheduler.slinky.slurm.net/slurm-bridge: worker
    kubeadmConfigPatches:
      - |
        kind: JoinConfiguration
        nodeRegistration:
          kubeletExtraArgs:
            register-with-taints: "slinky.slurm.net/managed-node=slurm-bridge-scheduler:NoExecute"
  - role: worker
    labels:
      scheduler.slinky.slurm.net/slurm-bridge: worker
    kubeadmConfigPatches:
      - |
        kind: JoinConfiguration
        nodeRegistration:
          kubeletExtraArgs:
            register-with-taints: "slinky.slurm.net/managed-node=slurm-bridge-scheduler:NoExecute"
  - role: worker
    labels:
      scheduler.slinky.slurm.net/slurm-bridge: worker
    kubeadmConfigPatches:
      - |
        kind: JoinConfiguration
        nodeRegistration:
          kubeletExtraArgs:
            register-with-taints: "slinky.slurm.net/managed-node=slurm-bridge-scheduler:NoExecute"
  - role: worker
    labels:
      scheduler.slinky.slurm.net/slurm-bridge: worker
    kubeadmConfigPatches:
      - |
        kind: JoinConfiguration
        nodeRegistration:
          kubeletExtraArgs:
            register-with-taints: "slinky.slurm.net/managed-node=slurm-bridge-scheduler:NoExecute"
  - role: worker
    labels:
      scheduler.slinky.slurm.net/slurm-bridge: worker
    kubeadmConfigPatches:
      - |
        kind: JoinConfiguration
        nodeRegistration:
          kubeletExtraArgs:
            register-with-taints: "slinky.slurm.net/managed-node=slurm-bridge-scheduler:NoExecute"
  - role: worker
    labels:
      scheduler.slinky.slurm.net/slurm-bridge: worker
    kubeadmConfigPatches:
      - |
        kind: JoinConfiguration
        nodeRegistration:
          kubeletExtraArgs:
            register-with-taints: "slinky.slurm.net/managed-node=slurm-bridge-scheduler:NoExecute"
