Skip to content

Commit 9d1fd06

Browse files
⚠️ move declarative plugin to golang domain
1 parent b828d86 commit 9d1fd06

File tree

15 files changed

+32
-13
lines changed

15 files changed

+32
-13
lines changed

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"sigs.k8s.io/kubebuilder/v3/pkg/cli"
2323
cfgv2 "sigs.k8s.io/kubebuilder/v3/pkg/config/v2"
2424
cfgv3 "sigs.k8s.io/kubebuilder/v3/pkg/config/v3"
25-
declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/declarative/v1"
25+
declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1"
2626
pluginv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2"
2727
pluginv3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
2828
)

pkg/plugins/domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ limitations under the License.
1717
package plugins
1818

1919
// DefaultNameQualifier is the suffix appended to all kubebuilder plugin names.
20-
const DefaultNameQualifier = ".kubebuilder.io"
20+
const DefaultNameQualifier = "kubebuilder.io"

pkg/plugins/declarative/v1/api.go renamed to pkg/plugins/golang/declarative/v1/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"sigs.k8s.io/kubebuilder/v3/pkg/model/resource"
2929
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
3030
"sigs.k8s.io/kubebuilder/v3/pkg/plugin/util"
31-
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/declarative/v1/internal/templates"
31+
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1/internal/templates"
3232
goPluginV3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
3333
)
3434

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

pkg/plugins/declarative/v1/plugin.go renamed to pkg/plugins/golang/declarative/v1/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import (
2222
cfgv3 "sigs.k8s.io/kubebuilder/v3/pkg/config/v3"
2323
"sigs.k8s.io/kubebuilder/v3/pkg/model/resource"
2424
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
25-
"sigs.k8s.io/kubebuilder/v3/pkg/plugins"
25+
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang"
2626
)
2727

28-
const pluginName = "declarative" + plugins.DefaultNameQualifier
28+
const pluginName = "declarative." + golang.DefaultGoNameQualifier
2929

3030
var (
3131
pluginVersion = plugin.Version{Number: 1}

pkg/plugins/golang/domain.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
Copyright 2020 The Kubernetes Authors.
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
14+
package golang
15+
16+
import "sigs.k8s.io/kubebuilder/v3/pkg/plugins"
17+
18+
// DefaultGoNameQualifier is the suffix appended to all kubebuilder plugin names for Golang operators.
19+
const DefaultGoNameQualifier = "go." + plugins.DefaultNameQualifier

pkg/plugins/golang/v2/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"sigs.k8s.io/kubebuilder/v3/pkg/plugins"
2525
)
2626

27-
const pluginName = "go" + plugins.DefaultNameQualifier
27+
const pluginName = "go." + plugins.DefaultNameQualifier
2828

2929
var (
3030
pluginVersion = plugin.Version{Number: 2}

0 commit comments

Comments
 (0)