consider default a system namespace to be managed by the namespace controller

Change-Id: I08d68c18234404c1258aa003211d82e2e72dadb1
This commit is contained in:
Antonio Ojea
2023-03-01 10:23:08 +00:00
parent eecfaf658e
commit 6e78e3279a
3 changed files with 15 additions and 4 deletions

View File

@@ -602,7 +602,7 @@ func (m *Instance) InstallLegacyAPI(c *completedConfig, restOptionsGetter generi
controllerName := "bootstrap-controller"
client := kubernetes.NewForConfigOrDie(c.GenericConfig.LoopbackClientConfig)
// Kubernetes clusters contains the following system namespaces:
// kube-system, kube-node-lease, kube-public
// kube-system, kube-node-lease, kube-public, default
m.GenericAPIServer.AddPostStartHookOrDie("start-system-namespaces-controller", func(hookContext genericapiserver.PostStartHookContext) error {
go systemnamespaces.NewController(client, c.ExtraConfig.VersionedInformers.Core().V1().Namespaces()).Run(hookContext.StopCh)
return nil