Skip to content

Commit

Permalink
Add server CLI flag and config fields for embedded registry
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Dec 8, 2023
1 parent 15d9e01 commit d264ce2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
ContainerRuntimeEndpoint: envInfo.ContainerRuntimeEndpoint,
ImageServiceEndpoint: envInfo.ImageServiceEndpoint,
MultiClusterCIDR: controlConfig.MultiClusterCIDR,
EmbeddedRegistry: controlConfig.EmbeddedRegistry,
FlannelBackend: controlConfig.FlannelBackend,
FlannelIPv6Masq: controlConfig.FlannelIPv6Masq,
FlannelExternalIP: controlConfig.FlannelExternalIP,
Expand Down
6 changes: 6 additions & 0 deletions pkg/cli/cmds/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type Server struct {
DisableAPIServer bool
DisableControllerManager bool
DisableETCD bool
EmbeddedRegistry bool
ClusterInit bool
ClusterReset bool
ClusterResetRestorePath string
Expand Down Expand Up @@ -489,6 +490,11 @@ var ServerFlags = []cli.Flag{
Usage: "(experimental/components) Disable running etcd",
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,
WithNodeIDFlag,
NodeLabels,
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont
serverConfig.ControlConfig.DisableAPIServer = cfg.DisableAPIServer
serverConfig.ControlConfig.DisableScheduler = cfg.DisableScheduler
serverConfig.ControlConfig.DisableControllerManager = cfg.DisableControllerManager
serverConfig.ControlConfig.EmbeddedRegistry = cfg.EmbeddedRegistry
serverConfig.ControlConfig.ClusterInit = cfg.ClusterInit
serverConfig.ControlConfig.EncryptSecrets = cfg.EncryptSecrets
serverConfig.ControlConfig.EtcdExposeMetrics = cfg.EtcdExposeMetrics
Expand Down
2 changes: 2 additions & 0 deletions pkg/daemons/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Node struct {
NoFlannel bool
SELinux bool
MultiClusterCIDR bool
EmbeddedRegistry bool
FlannelBackend string
FlannelConfFile string
FlannelConfOverride bool
Expand Down Expand Up @@ -182,6 +183,7 @@ type Control struct {
DisableKubeProxy bool
DisableScheduler bool
DisableServiceLB bool
EmbeddedRegistry bool
Rootless bool
ServiceLBNamespace string
EnablePProf bool
Expand Down

0 comments on commit d264ce2

Please sign in to comment.