diff --git a/api/porch/doc.go b/api/porch/doc.go index 9a3e808c..aaf8afb9 100644 --- a/api/porch/doc.go +++ b/api/porch/doc.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate go run k8s.io/code-generator/cmd/deepcopy-gen --input-dirs ./... -O zz_generated.deepcopy --go-header-file ../../scripts/boilerplate.go.txt -//go:generate go run k8s.io/code-generator/cmd/openapi-gen --input-dirs github.com/nephio-project/porch/api/porch/v1alpha1 --input-dirs k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version --output-package github.com/nephio-project/porch/api/generated/openapi -O zz_generated.openapi --go-header-file ../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/deepcopy-gen --input-dirs ../porch,v1alpha1 -O zz_generated.deepcopy --go-header-file ../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/openapi-gen --input-dirs github.com/nephio-project/porch/api/porch/v1alpha1 --input-dirs k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version -p ../generated/openapi -O zz_generated.openapi --go-header-file ../../scripts/boilerplate.go.txt // +k8s:deepcopy-gen=package,register // +groupName=porch.kpt.dev diff --git a/api/porch/v1alpha1/doc.go b/api/porch/v1alpha1/doc.go index 95240825..4e77de1d 100644 --- a/api/porch/v1alpha1/doc.go +++ b/api/porch/v1alpha1/doc.go @@ -13,11 +13,11 @@ // limitations under the License. //go:generate go run k8s.io/code-generator/cmd/deepcopy-gen@v0.25.3 --input-dirs ../v1alpha1 -O zz_generated.deepcopy --go-header-file ../../../scripts/boilerplate.go.txt -//go:generate go run k8s.io/code-generator/cmd/defaulter-gen --input-dirs ./ -O zz_generated.defaults --go-header-file ../../../scripts/boilerplate.go.txt -//go:generate go run k8s.io/code-generator/cmd/client-gen --clientset-name versioned --input-base "" --input github.com/nephio-project/porch/api/porch/v1alpha1 --output-package github.com/nephio-project/porch/api/generated/clientset --plural-exceptions PackageRevisionResources:PackageRevisionResources --go-header-file ../../../scripts/boilerplate.go.txt -//go:generate go run k8s.io/code-generator/cmd/lister-gen --input-dirs github.com/nephio-project/porch/api/porch/v1alpha1 --output-package github.com/nephio-project/porch/api/generated/listers --go-header-file ../../../scripts/boilerplate.go.txt -//go:generate go run k8s.io/code-generator/cmd/informer-gen --input-dirs github.com/nephio-project/porch/api/porch/v1alpha1 --versioned-clientset-package github.com/nephio-project/porch/api/generated/clientset/versioned --listers-package github.com/nephio-project/porch/api/generated/listers --output-package github.com/nephio-project/porch/api/generated/informers --plural-exceptions PackageRevisionResources:PackageRevisionResources --go-header-file ../../../scripts/boilerplate.go.txt -//go:generate go run k8s.io/code-generator/cmd/conversion-gen --input-dirs github.com/nephio-project/porch/api/porch,github.com/nephio-project/porch/api/porch/v1alpha1 -O zz_generated.conversion --go-header-file ../../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/defaulter-gen --input-dirs ../v1alpha1 -O zz_generated.defaults --go-header-file ../../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/client-gen --clientset-name versioned --input-base "" --input porch/v1alpha1 -p ../../generated/clientset --plural-exceptions PackageRevisionResources:PackageRevisionResources --go-header-file ../../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/lister-gen --input-dirs github.com/nephio-project/porch/api/porch/v1alpha1 -p ../../generated/listers --go-header-file ../../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/informer-gen --input-dirs github.com/nephio-project/porch/api/porch/v1alpha1 --versioned-clientset-package github.com/nephio-project/porch/api/generated/clientset/versioned --listers-package github.com/nephio-project/porch/api/generated/listers --internal-clientset-package github.com/nephio-project/porch/api/generated/informers/internalversion -p github.com/nephio-project/porch/api/generated/informers --plural-exceptions PackageRevisionResources:PackageRevisionResources --go-header-file ../../../scripts/boilerplate.go.txt +//go:generate go run k8s.io/code-generator/cmd/conversion-gen --input-dirs ../../porch,../v1alpha1 -O zz_generated.conversion --go-header-file ../../../scripts/boilerplate.go.txt // Api versions allow the api contract for a resource to be changed while keeping // backward compatibility by support multiple concurrent versions diff --git a/api/porchconfig/v1alpha1/groupversion_info.go b/api/porchconfig/v1alpha1/groupversion_info.go index e702e23f..cbf6ad90 100644 --- a/api/porchconfig/v1alpha1/groupversion_info.go +++ b/api/porchconfig/v1alpha1/groupversion_info.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../scripts/boilerplate.go.txt" crd:crdVersions=v1 output:crd:artifacts:config=. paths=./... +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../scripts/boilerplate.go.txt" crd:crdVersions=v1 output:crd:artifacts:config=. paths=./... var ( // GroupVersion is group version used to register these objects diff --git a/controllers/fleetsyncs/api/v1alpha1/groupversion_info.go b/controllers/fleetsyncs/api/v1alpha1/groupversion_info.go index a122be38..6a5083fa 100644 --- a/controllers/fleetsyncs/api/v1alpha1/groupversion_info.go +++ b/controllers/fleetsyncs/api/v1alpha1/groupversion_info.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/scheme" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." var ( // GroupVersion is group version used to register these objects diff --git a/controllers/fleetsyncs/pkg/controllers/fleetsync/controller.go b/controllers/fleetsyncs/pkg/controllers/fleetsync/controller.go index e84e69a3..cd790151 100644 --- a/controllers/fleetsyncs/pkg/controllers/fleetsync/controller.go +++ b/controllers/fleetsyncs/pkg/controllers/fleetsync/controller.go @@ -71,7 +71,7 @@ type FleetSyncReconciler struct { recorder record.EventRecorder } -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 rbac:roleName=porch-controllers-fleetsyncs webhook paths="." output:rbac:artifacts:config=../../../config/rbac +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 rbac:roleName=porch-controllers-fleetsyncs webhook paths="." output:rbac:artifacts:config=../../../config/rbac //+kubebuilder:rbac:groups=config.porch.kpt.dev,resources=fleetsyncs,verbs=get;list;watch //+kubebuilder:rbac:groups=config.porch.kpt.dev,resources=fleetsyncs/status,verbs=get;update;patch diff --git a/controllers/main.go b/controllers/main.go index 4fe747a6..38b8cbcf 100644 --- a/controllers/main.go +++ b/controllers/main.go @@ -14,9 +14,9 @@ package main -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 rbac:roleName=porch-controllers webhook paths="." +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 rbac:roleName=porch-controllers webhook paths="." -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 crd paths="./..." output:crd:artifacts:config=config/crd/bases +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 crd paths="./..." output:crd:artifacts:config=config/crd/bases import ( "context" diff --git a/controllers/packagevariants/api/v1alpha1/groupversion_info.go b/controllers/packagevariants/api/v1alpha1/groupversion_info.go index 2fd54051..6efef156 100644 --- a/controllers/packagevariants/api/v1alpha1/groupversion_info.go +++ b/controllers/packagevariants/api/v1alpha1/groupversion_info.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/scheme" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." var ( // GroupVersion is group version used to register these objects diff --git a/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go b/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go index 58ac9b23..a2ca9ee8 100644 --- a/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go +++ b/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go @@ -64,7 +64,7 @@ const ( requeueDuration = 30 * time.Second ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 rbac:roleName=porch-controllers-packagevariants webhook paths="." output:rbac:artifacts:config=../../../config/rbac +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 rbac:roleName=porch-controllers-packagevariants webhook paths="." output:rbac:artifacts:config=../../../config/rbac //+kubebuilder:rbac:groups=config.porch.kpt.dev,resources=packagevariants,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=config.porch.kpt.dev,resources=packagevariants/status,verbs=get;update;patch diff --git a/controllers/packagevariantsets/api/v1alpha1/groupversion_info.go b/controllers/packagevariantsets/api/v1alpha1/groupversion_info.go index 2fd54051..6efef156 100644 --- a/controllers/packagevariantsets/api/v1alpha1/groupversion_info.go +++ b/controllers/packagevariantsets/api/v1alpha1/groupversion_info.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/scheme" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." var ( // GroupVersion is group version used to register these objects diff --git a/controllers/packagevariantsets/api/v1alpha2/groupversion_info.go b/controllers/packagevariantsets/api/v1alpha2/groupversion_info.go index 7d5e8725..e774c948 100644 --- a/controllers/packagevariantsets/api/v1alpha2/groupversion_info.go +++ b/controllers/packagevariantsets/api/v1alpha2/groupversion_info.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/scheme" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../../scripts/boilerplate.go.txt" paths="./..." var ( // GroupVersion is group version used to register these objects diff --git a/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go b/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go index 28a662bb..4c74742d 100644 --- a/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go +++ b/controllers/packagevariantsets/pkg/controllers/packagevariantset/packagevariantset_controller.go @@ -68,7 +68,7 @@ const ( PackageVariantNameHashLength = 8 ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 rbac:roleName=porch-controllers-packagevariantsets webhook paths="." output:rbac:artifacts:config=../../../config/rbac +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 rbac:roleName=porch-controllers-packagevariantsets webhook paths="." output:rbac:artifacts:config=../../../config/rbac //+kubebuilder:rbac:groups=config.porch.kpt.dev,resources=packagevariantsets,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=config.porch.kpt.dev,resources=packagevariantsets/status,verbs=get;update;patch diff --git a/internal/api/porchinternal/v1alpha1/groupversion_info.go b/internal/api/porchinternal/v1alpha1/groupversion_info.go index fda80d0e..37c317f6 100644 --- a/internal/api/porchinternal/v1alpha1/groupversion_info.go +++ b/internal/api/porchinternal/v1alpha1/groupversion_info.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../../scripts/boilerplate.go.txt" crd:crdVersions=v1 output:crd:artifacts:config=. paths=./... +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../../scripts/boilerplate.go.txt" crd:crdVersions=v1 output:crd:artifacts:config=. paths=./... var ( // GroupVersion is group version used to register these objects diff --git a/pkg/kpt/api/kptfile/v1/types.go b/pkg/kpt/api/kptfile/v1/types.go index ca51d7b8..2c3399aa 100644 --- a/pkg/kpt/api/kptfile/v1/types.go +++ b/pkg/kpt/api/kptfile/v1/types.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/kustomize/kyaml/yaml" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 object object:headerFile="../../../../porch/scripts/boilerplate.go.txt" +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 object:headerFile="../../../../porch/scripts/boilerplate.go.txt" const ( KptFileName = "Kptfile"