diff --git a/cmd/main.go b/cmd/main.go index bf8411c0659..5b9e3e9adac 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugin" kustomizecommonv1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v1" - kustomizecommonv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2" + kustomizecommonv2alpha "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha" "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang" declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1" golangv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2" @@ -58,7 +58,7 @@ func main() { golangv3.Plugin{}, gov3Bundle, &kustomizecommonv1.Plugin{}, - &kustomizecommonv2.Plugin{}, + &kustomizecommonv2alpha.Plugin{}, &declarativev1.Plugin{}, ), cli.WithPlugins(externalPlugins...), diff --git a/docs/book/src/plugins/kustomize-v2-alpha.md b/docs/book/src/plugins/kustomize-v2-alpha.md index ef40fca5340..236ee41329a 100644 --- a/docs/book/src/plugins/kustomize-v2-alpha.md +++ b/docs/book/src/plugins/kustomize-v2-alpha.md @@ -44,7 +44,7 @@ all that is language specific and kustomize for its configuration, see: ```go import ( ... - kustomizecommonv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2" + kustomizecommonv2alpha "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha" golangv3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3" ... ) @@ -53,7 +53,7 @@ import ( // The follow code is creating a new plugin with its name and version via composition // You can define that one plugin is composite by 1 or Many others plugins gov3Bundle, _ := plugin.NewBundle(golang.DefaultNameQualifier, plugin.Version{Number: 3}, - kustomizecommonv2.Plugin{}, // scaffold the config/ directory and all kustomize files + kustomizecommonv2alpha.Plugin{}, // scaffold the config/ directory and all kustomize files golangv3.Plugin{}, // Scaffold the Golang files and all that specific for the language e.g. go.mod, apis, controllers ) ``` diff --git a/pkg/plugins/common/kustomize/v2/api.go b/pkg/plugins/common/kustomize/v2-alpha/api.go similarity index 91% rename from pkg/plugins/common/kustomize/v2/api.go rename to pkg/plugins/common/kustomize/v2-alpha/api.go index 98059f0ae32..23a36fc855c 100644 --- a/pkg/plugins/common/kustomize/v2/api.go +++ b/pkg/plugins/common/kustomize/v2-alpha/api.go @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2 +package v2_alpha import ( "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugin" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds" ) var _ plugin.CreateAPISubcommand = &createAPISubcommand{} diff --git a/pkg/plugins/common/kustomize/v2/create.go b/pkg/plugins/common/kustomize/v2-alpha/create.go similarity index 98% rename from pkg/plugins/common/kustomize/v2/create.go rename to pkg/plugins/common/kustomize/v2-alpha/create.go index a0aac27649a..933f112c2f2 100644 --- a/pkg/plugins/common/kustomize/v2/create.go +++ b/pkg/plugins/common/kustomize/v2-alpha/create.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2 +package v2_alpha import ( "strconv" diff --git a/pkg/plugins/common/kustomize/v2/init.go b/pkg/plugins/common/kustomize/v2-alpha/init.go similarity index 96% rename from pkg/plugins/common/kustomize/v2/init.go rename to pkg/plugins/common/kustomize/v2-alpha/init.go index 418b9f1c0fc..330318cae40 100644 --- a/pkg/plugins/common/kustomize/v2/init.go +++ b/pkg/plugins/common/kustomize/v2-alpha/init.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2 +package v2_alpha import ( "fmt" @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/internal/validation" "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugin" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds" ) var _ plugin.InitSubcommand = &initSubcommand{} diff --git a/pkg/plugins/common/kustomize/v2/plugin.go b/pkg/plugins/common/kustomize/v2-alpha/plugin.go similarity index 99% rename from pkg/plugins/common/kustomize/v2/plugin.go rename to pkg/plugins/common/kustomize/v2-alpha/plugin.go index 8cd87eb81a6..3acaf4b3a13 100644 --- a/pkg/plugins/common/kustomize/v2/plugin.go +++ b/pkg/plugins/common/kustomize/v2-alpha/plugin.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2 +package v2_alpha import ( "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/api.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/api.go similarity index 84% rename from pkg/plugins/common/kustomize/v2/scaffolds/api.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/api.go index 9c90c8bf168..5d14ccf99f6 100644 --- a/pkg/plugins/common/kustomize/v2/scaffolds/api.go +++ b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/api.go @@ -23,10 +23,10 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" "sigs.k8s.io/kubebuilder/v3/pkg/plugins" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/patches" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/samples" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/patches" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/samples" ) var _ plugins.Scaffolder = &apiScaffolder{} diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/init.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/init.go similarity index 82% rename from pkg/plugins/common/kustomize/v2/scaffolds/init.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/init.go index d43bee9279c..5eba7a17b8b 100644 --- a/pkg/plugins/common/kustomize/v2/scaffolds/init.go +++ b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/init.go @@ -22,10 +22,10 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/config" "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugins" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/prometheus" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/prometheus" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac" ) const ( diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager/certificate.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/certificate.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager/certificate.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/certificate.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomizeconfig.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/kustomizeconfig.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomizeconfig.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/kustomizeconfig.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/patches/enablecainjection_patch.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/patches/enablecainjection_patch.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/patches/enablecainjection_patch.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/patches/enablecainjection_patch.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/enablecainection_patch.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/enablecainection_patch.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/enablecainection_patch.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/enablecainection_patch.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/manager_auth_proxy_patch.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/manager_auth_proxy_patch.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/manager_auth_proxy_patch.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/manager_auth_proxy_patch.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/manager_config_patch.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/manager_config_patch.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/manager_config_patch.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/manager_config_patch.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/webhook_manager_patch.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/webhook_manager_patch.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/webhook_manager_patch.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault/webhook_manager_patch.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/config.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/config.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/config.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/config.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/controller_manager_config.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/controller_manager_config.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/controller_manager_config.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/controller_manager_config.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/prometheus/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/prometheus/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/prometheus/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/prometheus/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/prometheus/monitor.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/prometheus/monitor.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/prometheus/monitor.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/prometheus/monitor.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_client_role.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_client_role.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_client_role.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_client_role.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_role.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_role.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_role.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_role.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_role_binding.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_role_binding.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_role_binding.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_role_binding.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_service.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_service.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/auth_proxy_service.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/auth_proxy_service.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/crd_editor_role.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/crd_editor_role.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/crd_editor_role.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/crd_editor_role.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/crd_viewer_role.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/crd_viewer_role.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/crd_viewer_role.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/crd_viewer_role.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/leader_election_role.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/leader_election_role.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/leader_election_role.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/leader_election_role.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/leader_election_role_binding.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/leader_election_role_binding.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/leader_election_role_binding.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/leader_election_role_binding.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/role_binding.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/role_binding.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/role_binding.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/role_binding.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/service_account.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/service_account.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/rbac/service_account.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/rbac/service_account.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/samples/crd_sample.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/samples/crd_sample.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/samples/crd_sample.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/samples/crd_sample.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/kustomization.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/kustomization.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/kustomization.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/kustomization.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/kustomizeconfig.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/kustomizeconfig.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/kustomizeconfig.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/kustomizeconfig.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/service.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/service.go similarity index 100% rename from pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook/service.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook/service.go diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/webhook.go b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/webhook.go similarity index 87% rename from pkg/plugins/common/kustomize/v2/scaffolds/webhook.go rename to pkg/plugins/common/kustomize/v2-alpha/scaffolds/webhook.go index 422e198fc8d..a859d03f071 100644 --- a/pkg/plugins/common/kustomize/v2/scaffolds/webhook.go +++ b/pkg/plugins/common/kustomize/v2-alpha/scaffolds/webhook.go @@ -23,9 +23,9 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" "sigs.k8s.io/kubebuilder/v3/pkg/plugins" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/certmanager" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/webhook" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/kdefault" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/webhook" ) var _ plugins.Scaffolder = &webhookScaffolder{} diff --git a/pkg/plugins/common/kustomize/v2/webhook.go b/pkg/plugins/common/kustomize/v2-alpha/webhook.go similarity index 91% rename from pkg/plugins/common/kustomize/v2/webhook.go rename to pkg/plugins/common/kustomize/v2-alpha/webhook.go index d7964b2c086..9b5a3107f74 100644 --- a/pkg/plugins/common/kustomize/v2/webhook.go +++ b/pkg/plugins/common/kustomize/v2-alpha/webhook.go @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2 +package v2_alpha import ( "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugin" - "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2/scaffolds" + "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha/scaffolds" ) var _ plugin.CreateWebhookSubcommand = &createWebhookSubcommand{} diff --git a/pkg/plugins/golang/v3/scaffolds/init.go b/pkg/plugins/golang/v3/scaffolds/init.go index 9c8bfd43456..9e80728da76 100644 --- a/pkg/plugins/golang/v3/scaffolds/init.go +++ b/pkg/plugins/golang/v3/scaffolds/init.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/machinery" "sigs.k8s.io/kubebuilder/v3/pkg/plugins" kustomizecommonv1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v1" - kustomizecommonv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2" + kustomizecommonv2alpha "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2-alpha" "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3/scaffolds/internal/templates" "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3/scaffolds/internal/templates/hack" ) @@ -115,12 +115,12 @@ func (s *initScaffolder) Scaffold() error { // we need to ensure that we use its supported Kustomize Version // in order to support it kustomizeVersion = kustomizecommonv1.KustomizeVersion - kustomizev2 := kustomizecommonv2.Plugin{} + kustomizev2 := kustomizecommonv2alpha.Plugin{} pluginKeyForKustomizeV2 := plugin.KeyFor(kustomizev2) for _, pluginKey := range s.config.GetPluginChain() { if pluginKey == pluginKeyForKustomizeV2 { - kustomizeVersion = kustomizecommonv2.KustomizeVersion + kustomizeVersion = kustomizecommonv2alpha.KustomizeVersion break } }