Skip to content

Commit 72a6f85

Browse files
committed
keep the state added, but return false on the enabled call
Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
1 parent 06dd32b commit 72a6f85

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

controllers/object_controls.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5162,6 +5162,11 @@ func RuntimeClasses(n ClusterPolicyController) (gpuv1.State, error) {
51625162
status := gpuv1.Ready
51635163
state := n.idx
51645164

5165+
if n.stateNames[state] == "state-kata-manager" {
5166+
// Kata Manager is deprecated, no need to process anything
5167+
return gpuv1.Ready, nil
5168+
}
5169+
51655170
nvidiaRuntimeClasses := n.resources[state].RuntimeClasses
51665171
if n.stateNames[state] == "pre-requisites" && !n.isStateEnabled(n.stateNames[state]) {
51675172
err := clearRuntimeClasses(n, nvidiaRuntimeClasses)

controllers/state_manager.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ var gpuStateLabels = map[string]map[string]string{
100100
"nvidia.com/gpu.deploy.sandbox-device-plugin": "true",
101101
"nvidia.com/gpu.deploy.sandbox-validator": "true",
102102
"nvidia.com/gpu.deploy.vfio-manager": "true",
103+
"nvidia.com/gpu.deploy.kata-manager": "true",
103104
"nvidia.com/gpu.deploy.cc-manager": "true",
104105
},
105106
gpuWorkloadConfigVMVgpu: {
@@ -1124,7 +1125,9 @@ func (n ClusterPolicyController) isStateEnabled(stateName string) bool {
11241125
case "state-kata-device-plugin":
11251126
return n.sandboxEnabled && clusterPolicySpec.KataSandboxDevicePlugin.IsEnabled() && clusterPolicySpec.SandboxWorkloads.Mode == string(gpuv1.Kata)
11261127
case "state-kata-manager":
1127-
return n.sandboxEnabled && clusterPolicySpec.KataManager.IsEnabled()
1128+
// always return false for kata manager as it stands deprecated
1129+
// this means that any changes to the cluster policy CRD wrt kata manager will not be honored
1130+
return false
11281131
case "state-vfio-manager":
11291132
return n.sandboxEnabled && clusterPolicySpec.VFIOManager.IsEnabled()
11301133
case "state-vgpu-device-manager":

0 commit comments

Comments
 (0)