Skip to content

Commit

Permalink
generate runtime.Object interface as well
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Stefurishin <[email protected]>
  • Loading branch information
Alexandr Stefurishin committed Oct 19, 2024
1 parent cd40278 commit 023dc8a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/lvm_logical_volume_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
)

// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type LVMLogicalVolumeSnapshotList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Expand All @@ -29,6 +30,7 @@ type LVMLogicalVolumeSnapshotList struct {
}

// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type LVMLogicalVolumeSnapshot struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
17 changes: 17 additions & 0 deletions api/v1alpha1/zz_generated_lvm_logical_volume_snapshot.deepcopy.go

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

2 changes: 2 additions & 0 deletions hack/generate_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# run from repository root
cd api

go get k8s.io/code-generator/cmd/deepcopy-gen

go run k8s.io/code-generator/cmd/deepcopy-gen -v 2 \
--output-file zz_generated_lvm_logical_volume_snapshot.deepcopy.go \
--go-header-file ../hack/boilerplate.txt \
Expand Down

0 comments on commit 023dc8a

Please sign in to comment.