Moved all custom naming into one place

This commit is contained in:
2026-04-03 01:48:07 +08:00
parent 3c0df319d7
commit 1ce15e9ac5
27 changed files with 87 additions and 103 deletions

View File

@@ -9,6 +9,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"
monov1alpah1 "example.com/monok8s/pkg/apis/monok8s/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubernetes "k8s.io/client-go/kubernetes"
)
@@ -63,7 +64,7 @@ func ApplyLocalNodeMetadataIfPossible(ctx context.Context, nctx *NodeContext) er
// Additional Labels
if spec.EnableControlAgent {
node.Labels[controlAgentNodeSelectorKey] = controlAgentNodeSelectorValue
node.Labels[monov1alpah1.ControlAgentKey] = controlAgentNodeSelectorValue
}
// Apply annotations