diff --git a/pkg/apis/k0s.k0sproject.io/v1beta1/clusterconfig_types.go b/pkg/apis/k0s.k0sproject.io/v1beta1/clusterconfig_types.go index 2c69ed32f36e..c2ddc6354d74 100644 --- a/pkg/apis/k0s.k0sproject.io/v1beta1/clusterconfig_types.go +++ b/pkg/apis/k0s.k0sproject.io/v1beta1/clusterconfig_types.go @@ -271,7 +271,7 @@ func (c *ClusterConfig) Validate() []error { errors = append(errors, fmt.Errorf("expected apiVersion: %s but found %s", ClusterConfigAPIVersion, c.APIVersion)) } - if c.Kind != ClusterConfigKind { + if c.Kind != ClusterConfigKind && c.Kind != "clusterconfigs" { errors = append(errors, fmt.Errorf("expected kind: %s but found %s", ClusterConfigKind, c.Kind)) } diff --git a/pkg/component/controller/clusterConfig.go b/pkg/component/controller/clusterConfig.go index aa4acb9c026f..9a6c811eca2f 100644 --- a/pkg/component/controller/clusterConfig.go +++ b/pkg/component/controller/clusterConfig.go @@ -26,7 +26,7 @@ import ( ) var ( - resourceType = v1.TypeMeta{APIVersion: "k0s.k0sproject.io/v1beta1", Kind: "ClusterConfig"} + resourceType = v1.TypeMeta{APIVersion: "k0s.k0sproject.io/v1beta1", Kind: "clusterconfigs"} cOpts = v1.CreateOptions{TypeMeta: resourceType} getOpts = v1.GetOptions{TypeMeta: resourceType} )