@@ -1286,28 +1286,28 @@ func (d *Driver) getFileShareClientForSub(subscriptionID string) (fileshareclien
12861286 return d .cloud .ComputeClientFactory .GetFileShareClientForSub (subscriptionID )
12871287}
12881288
1289- func getNodeInfoFromLabels (ctx context.Context , nodeID string , kubeClient clientset.Interface ) (string , string , error ) {
1289+ func getNodeInfoFromLabels (ctx context.Context , nodeID string , kubeClient clientset.Interface ) (string , string , string , error ) {
12901290 if kubeClient == nil || kubeClient .CoreV1 () == nil {
1291- return "" , "" , fmt .Errorf ("kubeClient is nil" )
1291+ return "" , "" , "" , fmt .Errorf ("kubeClient is nil" )
12921292 }
12931293
12941294 node , err := kubeClient .CoreV1 ().Nodes ().Get (ctx , nodeID , metav1.GetOptions {})
12951295 if err != nil {
1296- return "" , "" , fmt .Errorf ("get node(%s) failed with %v" , nodeID , err )
1296+ return "" , "" , "" , fmt .Errorf ("get node(%s) failed with %v" , nodeID , err )
12971297 }
12981298
12991299 if len (node .Labels ) == 0 {
1300- return "" , "" , fmt .Errorf ("node(%s) label is empty" , nodeID )
1300+ return "" , "" , "" , fmt .Errorf ("node(%s) label is empty" , nodeID )
13011301 }
1302- return node .Labels ["kubernetes.azure.com/kata-mshv-vm-isolation" ], node .Labels ["katacontainers.io/kata-runtime" ], nil
1302+ return node .Labels ["kubernetes.azure.com/kata-cc-isolation" ], node . Labels [ "kubernetes.azure.com/kata- mshv-vm-isolation" ], node .Labels ["katacontainers.io/kata-runtime" ], nil
13031303}
13041304
13051305func isKataNode (ctx context.Context , nodeID string , kubeClient clientset.Interface ) bool {
13061306 if nodeID == "" {
13071307 return false
13081308 }
13091309
1310- kataVMIsolationLabel , kataRuntimeLabel , err := getNodeInfoFromLabels (ctx , nodeID , kubeClient )
1310+ kataCCIsolationLabel , kataVMIsolationLabel , kataRuntimeLabel , err := getNodeInfoFromLabels (ctx , nodeID , kubeClient )
13111311
13121312 if err != nil {
13131313 klog .Warningf ("failed to get node info from labels: %v" , err )
@@ -1316,5 +1316,5 @@ func isKataNode(ctx context.Context, nodeID string, kubeClient clientset.Interfa
13161316
13171317 klog .V (4 ).Infof ("node(%s) labels: kataVMIsolationLabel(%s), kataRuntimeLabel(%s)" , nodeID , kataVMIsolationLabel , kataRuntimeLabel )
13181318
1319- return strings .EqualFold (kataVMIsolationLabel , "true" ) || strings .EqualFold (kataRuntimeLabel , "true" )
1319+ return strings .EqualFold (kataCCIsolationLabel , "true" ) || strings . EqualFold ( kataVMIsolationLabel , "true" ) || strings .EqualFold (kataRuntimeLabel , "true" )
13201320}
0 commit comments