Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove api-config component flag #3941

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ users to build a minimal Kubernetes control plane and use what ever components
they need to fulfill their need for the control plane. Disabling the system
components happens through a command line flag for the controller process:

```sh
--disable-components strings disable components (valid items: api-config,autopilot,control-api,coredns,csr-approver,endpoint-reconciler,helm,konnectivity-server,kube-controller-manager,kube-proxy,kube-scheduler,metrics-server,network-provider,node-role,system-rbac,worker-config)
```text
--disable-components strings disable components (valid items: autopilot,control-api,coredns,csr-approver,endpoint-reconciler,helm,konnectivity-server,kube-controller-manager,kube-proxy,kube-scheduler,metrics-server,network-provider,node-role,system-rbac,worker-config)
```

**Note:** As of k0s 1.26, the kubelet-config component has been replaced by the
Expand Down
13 changes: 0 additions & 13 deletions pkg/config/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/k0sproject/k0s/pkg/constant"
"github.com/k0sproject/k0s/pkg/k0scloudprovider"

"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/exp/slices"
Expand Down Expand Up @@ -95,18 +94,6 @@ func (o *ControllerOptions) Normalize() error {
// Normalize component names
var disabledComponents []string
for _, disabledComponent := range o.DisableComponents {
switch disabledComponent {
case constant.APIConfigComponentName:
logrus.Warnf("Usage of deprecated component name %q, please switch to %q",
constant.APIConfigComponentName, "--enable-dynamic-config=false",
)
if o.EnableDynamicConfig {
logrus.Warnf("Cannot disable component %q, because %q is selected",
constant.APIConfigComponentName, "--enable-dynamic-config",
)
}
}

if !slices.Contains(availableComponents, disabledComponent) {
return fmt.Errorf("unknown component %s", disabledComponent)
}
Expand Down
1 change: 0 additions & 1 deletion pkg/constant/constant_shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const (

/* Controller component names */

APIConfigComponentName = "api-config" // Deprecated: just don't use dynamic config
APIEndpointReconcilerComponentName = "endpoint-reconciler"
ControlAPIComponentName = "control-api"
CoreDNSComponentname = "coredns"
Expand Down
Loading