Skip to content

Commit

Permalink
Maybe need to allow the "clusterconfigs"?
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
  • Loading branch information
kke committed Dec 3, 2021
1 parent 166b35d commit 497f9aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/k0s.k0sproject.io/v1beta1/clusterconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/component/controller/clusterConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down

0 comments on commit 497f9aa

Please sign in to comment.