Added some initial daemonsets

This commit is contained in:
2026-04-01 22:55:22 +08:00
parent 3e6df38f45
commit 145b0a4662
12 changed files with 415 additions and 16 deletions

View File

@@ -17,6 +17,7 @@ func ApplyLocalNodeMetadataIfPossible(ctx context.Context, nctx *NodeContext) er
spec := nctx.Config.Spec
if len(spec.NodeAnnotations) == 0 && len(spec.NodeLabels) == 0 {
klog.V(4).Infof("No annotations or labels was defined")
return nil // nothing to do
}
@@ -60,6 +61,11 @@ func ApplyLocalNodeMetadataIfPossible(ctx context.Context, nctx *NodeContext) er
node.Labels[k] = v
}
// Additional Labels
if spec.EnableControlAgent {
node.Labels[controlAgentNodeSelectorKey] = controlAgentNodeSelectorValue
}
// Apply annotations
for k, v := range spec.NodeAnnotations {
node.Annotations[k] = v