diff --git a/pkg/agent/config/config.go b/pkg/agent/config/config.go index 10d82ba53a..2813de631a 100644 --- a/pkg/agent/config/config.go +++ b/pkg/agent/config/config.go @@ -515,8 +515,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N if nodeConfig.FlannelBackend == config.FlannelBackendNone { nodeConfig.NoFlannel = true } else if envInfo.NoFlannel { - logrus.Warn("no-flannel is deprecated, it will be removed in v1.25. Use --flannel-backend=none instead.") - nodeConfig.NoFlannel = envInfo.NoFlannel + logrus.Fatal("no-flannel is deprecated. Use --flannel-backend=none instead.") } else { nodeConfig.NoFlannel = envInfo.NoFlannel } diff --git a/pkg/cli/agent/agent.go b/pkg/cli/agent/agent.go index 569a95fe9f..aeede9c91a 100644 --- a/pkg/cli/agent/agent.go +++ b/pkg/cli/agent/agent.go @@ -46,8 +46,7 @@ func Run(ctx *cli.Context) error { } if cmds.AgentConfig.Token == "" && cmds.AgentConfig.ClusterSecret != "" { - logrus.Warn("cluster-secret is deprecated, it will be removed in v1.25. Use --token instead.") - cmds.AgentConfig.Token = cmds.AgentConfig.ClusterSecret + logrus.Fatal("cluster-secret is deprecated. Use --token instead.") } if cmds.AgentConfig.Token == "" { diff --git a/pkg/cli/cmds/server.go b/pkg/cli/cmds/server.go index 3773267268..bf1d6f22ee 100644 --- a/pkg/cli/cmds/server.go +++ b/pkg/cli/cmds/server.go @@ -476,6 +476,12 @@ var ServerFlags = []cli.Flag{ PauseImageFlag, SnapshotterFlag, PrivateRegistryFlag, + cli.StringFlag{ + Name: "system-default-registry", + Usage: "(agent/runtime) Private registry to be used for all system images", + EnvVar: version.ProgramUpper + "_SYSTEM_DEFAULT_REGISTRY", + Destination: &ServerConfig.SystemDefaultRegistry, + }, AirgapExtraRegistryFlag, NodeIPFlag, NodeExternalIPFlag, @@ -501,12 +507,6 @@ var ServerFlags = []cli.Flag{ Usage: "(experimental) Enable Secret encryption at rest", Destination: &ServerConfig.EncryptSecrets, }, - cli.StringFlag{ - Name: "system-default-registry", - Usage: "(image) Private registry to be used for all system images", - EnvVar: version.ProgramUpper + "_SYSTEM_DEFAULT_REGISTRY", - Destination: &ServerConfig.SystemDefaultRegistry, - }, &SELinuxFlag, LBServerPortFlag, diff --git a/pkg/cli/server/server.go b/pkg/cli/server/server.go index caaa207092..d1ee245d68 100644 --- a/pkg/cli/server/server.go +++ b/pkg/cli/server/server.go @@ -88,8 +88,7 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont } if cfg.Token == "" && cfg.ClusterSecret != "" { - logrus.Warn("cluster-secret is deprecated, it will be removed in v1.25. Use --token instead.") - cfg.Token = cfg.ClusterSecret + logrus.Fatal("cluster-secret is deprecated. Use --token instead.") } agentReady := make(chan struct{}) @@ -348,12 +347,8 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont } serverConfig.ControlConfig.Skips = map[string]bool{} - for _, noDeploy := range app.StringSlice("no-deploy") { - logrus.Warn("no-deploy flag is deprecated, it will be removed in v1.25. Use --skip-deploy instead.") - for _, v := range strings.Split(noDeploy, ",") { - v = strings.TrimSpace(v) - serverConfig.ControlConfig.Skips[v] = true - } + if noDeploy := app.StringSlice("no-deploy"); len(noDeploy) > 0 { + logrus.Fatal("no-deploy flag is deprecated. Use --skip-deploy instead.") } serverConfig.ControlConfig.Disables = map[string]bool{} for _, disable := range app.StringSlice("disable") {