Skip to content
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
⚠️ move declarative plugin to golang domain
  • Loading branch information
camilamacedo86 committed Mar 26, 2021
commit 9d1fd061e5edce38a62ccc353e7d5bff793eb1fc
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sigs.k8s.io/kubebuilder/v3/pkg/cli"
cfgv2 "sigs.k8s.io/kubebuilder/v3/pkg/config/v2"
cfgv3 "sigs.k8s.io/kubebuilder/v3/pkg/config/v3"
declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/declarative/v1"
declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1"
pluginv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2"
pluginv3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ limitations under the License.
package plugins

// DefaultNameQualifier is the suffix appended to all kubebuilder plugin names.
const DefaultNameQualifier = ".kubebuilder.io"
const DefaultNameQualifier = "kubebuilder.io"
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"sigs.k8s.io/kubebuilder/v3/pkg/model/resource"
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
"sigs.k8s.io/kubebuilder/v3/pkg/plugin/util"
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/declarative/v1/internal/templates"
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1/internal/templates"
goPluginV3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
cfgv3 "sigs.k8s.io/kubebuilder/v3/pkg/config/v3"
"sigs.k8s.io/kubebuilder/v3/pkg/model/resource"
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
"sigs.k8s.io/kubebuilder/v3/pkg/plugins"
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang"
)

const pluginName = "declarative" + plugins.DefaultNameQualifier
const pluginName = "declarative." + golang.DefaultGoNameQualifier

var (
pluginVersion = plugin.Version{Number: 1}
Expand Down
19 changes: 19 additions & 0 deletions pkg/plugins/golang/domain.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package golang

import "sigs.k8s.io/kubebuilder/v3/pkg/plugins"

// DefaultGoNameQualifier is the suffix appended to all kubebuilder plugin names for Golang operators.
const DefaultGoNameQualifier = "go." + plugins.DefaultNameQualifier
2 changes: 1 addition & 1 deletion pkg/plugins/golang/v2/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sigs.k8s.io/kubebuilder/v3/pkg/plugins"
)

const pluginName = "go" + plugins.DefaultNameQualifier
const pluginName = "go." + plugins.DefaultNameQualifier

var (
pluginVersion = plugin.Version{Number: 2}
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/golang/v3/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sigs.k8s.io/kubebuilder/v3/pkg/plugins"
)

const pluginName = "go" + plugins.DefaultNameQualifier
const pluginName = "go." + plugins.DefaultNameQualifier

var (
pluginVersion = plugin.Version{Number: 3}
Expand Down
4 changes: 2 additions & 2 deletions testdata/project-v2-addon/PROJECT
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
domain: testproject.org
layout:
- go.kubebuilder.io/v2
- declarative.kubebuilder.io/v1
- declarative.go.kubebuilder.io/v1
plugins:
declarative.kubebuilder.io/v1:
declarative.go.kubebuilder.io/v1:
resources:
- domain: testproject.org
group: crew
Expand Down
4 changes: 2 additions & 2 deletions testdata/project-v3-addon/PROJECT
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
domain: testproject.org
layout:
- go.kubebuilder.io/v3
- declarative.kubebuilder.io/v1
- declarative.go.kubebuilder.io/v1
plugins:
declarative.kubebuilder.io/v1:
declarative.go.kubebuilder.io/v1:
resources:
- domain: testproject.org
group: crew
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3-config/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ domain: testproject.org
layout:
- go.kubebuilder.io/v3
plugins:
declarative.kubebuilder.io/v1:
declarative.go.kubebuilder.io/v1:
resources:
- domain: testproject.org
group: crew
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ domain: testproject.org
layout:
- go.kubebuilder.io/v3
plugins:
declarative.kubebuilder.io/v1:
declarative.go.kubebuilder.io/v1:
resources:
- domain: testproject.org
group: crew
Expand Down