Add server CLI flag and config fields for embedded registry

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2023-12-05 18:30:38 +00:00 committed by Brad Davidson
parent b8f3967ad1
commit ef90da5c6e
4 changed files with 10 additions and 0 deletions

View File

@ -502,6 +502,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
SELinux: envInfo.EnableSELinux, SELinux: envInfo.EnableSELinux,
ContainerRuntimeEndpoint: envInfo.ContainerRuntimeEndpoint, ContainerRuntimeEndpoint: envInfo.ContainerRuntimeEndpoint,
ImageServiceEndpoint: envInfo.ImageServiceEndpoint, ImageServiceEndpoint: envInfo.ImageServiceEndpoint,
EmbeddedRegistry: controlConfig.EmbeddedRegistry,
FlannelBackend: controlConfig.FlannelBackend, FlannelBackend: controlConfig.FlannelBackend,
FlannelIPv6Masq: controlConfig.FlannelIPv6Masq, FlannelIPv6Masq: controlConfig.FlannelIPv6Masq,
FlannelExternalIP: controlConfig.FlannelExternalIP, FlannelExternalIP: controlConfig.FlannelExternalIP,

View File

@ -76,6 +76,7 @@ type Server struct {
DisableAPIServer bool DisableAPIServer bool
DisableControllerManager bool DisableControllerManager bool
DisableETCD bool DisableETCD bool
EmbeddedRegistry bool
ClusterInit bool ClusterInit bool
ClusterReset bool ClusterReset bool
ClusterResetRestorePath string ClusterResetRestorePath string
@ -483,6 +484,11 @@ var ServerFlags = []cli.Flag{
Usage: "(experimental/components) Disable running etcd", Usage: "(experimental/components) Disable running etcd",
Destination: &ServerConfig.DisableETCD, Destination: &ServerConfig.DisableETCD,
}, },
&cli.BoolFlag{
Name: "embedded-registry",
Usage: "(experimental/components) Enable embedded distributed container registry; requires use of embedded containerd",
Destination: &ServerConfig.EmbeddedRegistry,
},
NodeNameFlag, NodeNameFlag,
WithNodeIDFlag, WithNodeIDFlag,
NodeLabels, NodeLabels,

View File

@ -165,6 +165,7 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont
serverConfig.ControlConfig.DisableAPIServer = cfg.DisableAPIServer serverConfig.ControlConfig.DisableAPIServer = cfg.DisableAPIServer
serverConfig.ControlConfig.DisableScheduler = cfg.DisableScheduler serverConfig.ControlConfig.DisableScheduler = cfg.DisableScheduler
serverConfig.ControlConfig.DisableControllerManager = cfg.DisableControllerManager serverConfig.ControlConfig.DisableControllerManager = cfg.DisableControllerManager
serverConfig.ControlConfig.EmbeddedRegistry = cfg.EmbeddedRegistry
serverConfig.ControlConfig.ClusterInit = cfg.ClusterInit serverConfig.ControlConfig.ClusterInit = cfg.ClusterInit
serverConfig.ControlConfig.EncryptSecrets = cfg.EncryptSecrets serverConfig.ControlConfig.EncryptSecrets = cfg.EncryptSecrets
serverConfig.ControlConfig.EtcdExposeMetrics = cfg.EtcdExposeMetrics serverConfig.ControlConfig.EtcdExposeMetrics = cfg.EtcdExposeMetrics

View File

@ -41,6 +41,7 @@ type Node struct {
ImageServiceEndpoint string ImageServiceEndpoint string
NoFlannel bool NoFlannel bool
SELinux bool SELinux bool
EmbeddedRegistry bool
FlannelBackend string FlannelBackend string
FlannelConfFile string FlannelConfFile string
FlannelConfOverride bool FlannelConfOverride bool
@ -185,6 +186,7 @@ type Control struct {
DisableKubeProxy bool DisableKubeProxy bool
DisableScheduler bool DisableScheduler bool
DisableServiceLB bool DisableServiceLB bool
EmbeddedRegistry bool
Rootless bool Rootless bool
ServiceLBNamespace string ServiceLBNamespace string
EnablePProf bool EnablePProf bool