Draft for OSUpgrade Spec

This commit is contained in:
2026-04-03 01:04:40 +08:00
parent e7b8e406a8
commit 3c0df319d7
7 changed files with 250 additions and 142 deletions

View File

@@ -16,11 +16,11 @@ import (
"undecided.project/monok8s/pkg/crds"
"undecided.project/monok8s/pkg/kube"
templates "undecided.project/monok8s/pkg/templates"
)
const (
controlAgentName = "control-agent"
controlAgentDefaultNamespace = "kube-system"
controlAgentNodeSelectorKey = "monok8s.io/control-agent"
controlAgentNodeSelectorValue = "true"
controlAgentImage = "localhost/monok8s/control-agent:dev"
@@ -84,7 +84,7 @@ func ApplyControlAgentDaemonSetResources(ctx context.Context, n *NodeContext) er
namespace := strings.TrimSpace(n.Config.Namespace)
if namespace == "" {
namespace = controlAgentDefaultNamespace
namespace = templates.DefaultNamespace
}
clients, err := kube.NewClientsFromKubeconfig(kubeconfig)