Skip to content

Commit

Permalink
chore(codegen): add helper generation to codegen script
Browse files Browse the repository at this point in the history
chore(gatewayapi/v1beta1): add deepcopy-gen annotations
run `make codegen`

Signed-off-by: kahirokunn <[email protected]>
  • Loading branch information
kahirokunn committed Dec 13, 2024
1 parent 30f4b25 commit febc327
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
4 changes: 4 additions & 0 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ chmod +x ${CODEGEN_PKG}/kube_codegen.sh

source ${CODEGEN_PKG}/kube_codegen.sh

kube::codegen::gen_helpers \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
./pkg/apis

kube::codegen::gen_client \
--output-dir "${TEMP_DIR}/${PACKAGE_PATH_BASE}/pkg/client" \
--output-pkg "${PACKAGE_PATH_BASE}/pkg/client" \
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/gatewayapi/v1beta1/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Package v1beta1 contains API Schema definitions for the
// gateway.networking.k8s.io API group.

// +k8s:deepcopy-gen=package

package v1beta1
2 changes: 2 additions & 0 deletions pkg/apis/gatewayapi/v1beta1/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=gateway-api
// +kubebuilder:storageversion
Expand All @@ -40,6 +41,7 @@ type HTTPRoute struct {
Status HTTPRouteStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// HTTPRouteList contains a list of HTTPRoute.
Expand Down
34 changes: 31 additions & 3 deletions pkg/apis/gatewayapi/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions pkg/apis/gloo/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit febc327

Please sign in to comment.