Skip to content
Snippets Groups Projects
Commit b03ca69e authored by kaiyou's avatar kaiyou
Browse files

Disable unused post-start hooks (breaks rbac currently)

parent 58471cb8
No related branches found
No related tags found
No related merge requests found
...@@ -94,6 +94,17 @@ func buildConfig(c *Cluster) (config *server.Config, clients *Clients, err error ...@@ -94,6 +94,17 @@ func buildConfig(c *Cluster) (config *server.Config, clients *Clients, err error
sets.NewString("attach", "exec", "proxy", "log", "portforward"), sets.NewString("attach", "exec", "proxy", "log", "portforward"),
) )
// Disable unneeded post start hooks, these cannot be easily disabled except at runtime, which still takes up
// space in the binary sadly
config.DisabledPostStartHooks = sets.NewString(
// bootstrap-controller : TODO replace endpoint reconciler logic if required
"generic-apiserver-start-informers", // they are started manually
"start-apiextensions-informers", // started manually also
"storage-object-count-tracker-hook", // unused
"start-legacy-token-tracking-controller", // legacy and unused
"rbac/bootstrap-roles", // TODO replaced with our own simpler RBAC
)
// Setup listener // Setup listener
listener, err := net.Listen("tcp6", fmt.Sprintf("[%s]:%d", c.networking.NodeAddress.IP.String(), apiserverPort)) listener, err := net.Listen("tcp6", fmt.Sprintf("[%s]:%d", c.networking.NodeAddress.IP.String(), apiserverPort))
if err != nil { if err != nil {
...@@ -328,6 +339,7 @@ var kubeApiserver = &Unit{ ...@@ -328,6 +339,7 @@ var kubeApiserver = &Unit{
// Finally start the apiserver // Finally start the apiserver
server := apiServer.GenericAPIServer.PrepareRun() server := apiServer.GenericAPIServer.PrepareRun()
go clients.Start(ctx)
return server.Run(ctx.Done()) return server.Run(ctx.Done())
}, },
Ready: func(u *Unit, c *Cluster) bool { Ready: func(u *Unit, c *Cluster) bool {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment