mirror of
https://github.com/vmware-tanzu/velero.git
synced 2025-12-23 06:15:21 +00:00
Use controller-gen to generate the deep copy methods for objects
As we are refactoring controllers with kubebuilder, use the controller-gen rather than code-generator to generate the deep copy methods for objects Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
@@ -51,7 +51,9 @@ controller-gen \
|
||||
paths=./pkg/apis/velero/v1/... \
|
||||
rbac:roleName=velero-perms \
|
||||
paths=./pkg/controller/... \
|
||||
output:crd:artifacts:config=config/crd/v1/bases
|
||||
output:crd:artifacts:config=config/crd/v1/bases \
|
||||
object \
|
||||
paths=./pkg/apis/velero/v1/...
|
||||
|
||||
# this is a super hacky workaround for https://github.com/kubernetes/kubernetes/issues/91395
|
||||
# which a result of fixing the validation on CRD objects. The validation ensures the fields that are list map keys, are either marked
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
HACK_DIR=$(dirname "${BASH_SOURCE}")
|
||||
|
||||
${HACK_DIR}/update-generated-crd-code.sh --verify-only
|
||||
${HACK_DIR}/update-generated-crd-code.sh
|
||||
|
||||
# ensure no changes to generated CRDs
|
||||
if ! git diff --exit-code config/crd/v1/crds/crds.go >/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user