Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move policy apis to api repo #67

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ clean:

# Run go fmt against code
fmt:
go fmt ./pkg/... ./analysis/... ./autoscaling/... ./prediction/... ./ensurance/... ./topology/...
go fmt ./pkg/... ./analysis/... ./autoscaling/... ./prediction/... ./ensurance/... ./topology/... ./policy/...

# Run go vet against code
vet:
go vet ./pkg/... ./analysis/... ./autoscaling/... ./prediction/... ./ensurance/... ./topology/...
go vet ./pkg/... ./analysis/... ./autoscaling/... ./prediction/... ./ensurance/... ./topology/... ./policy/...

test:
go test --race --v ./pkg/...
Expand Down
4 changes: 2 additions & 2 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(
bash "${CODEGEN_PKG}"/generate-groups.sh "client,lister,informer" \
github.com/gocrane/api/pkg/generated \
github.com/gocrane/api \
"autoscaling:v1alpha1 ensurance:v1alpha1 prediction:v1alpha1 analysis:v1alpha1 topology:v1alpha1" \
"autoscaling:v1alpha1 ensurance:v1alpha1 prediction:v1alpha1 analysis:v1alpha1 topology:v1alpha1 policy:v1alpha1" \
--output-base "$SCRIPT_ROOT" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt" \
--plural-exceptions "Analytics:Analytics"

bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy" \
github.com/gocrane/api/pkg/generated \
github.com/gocrane/api \
"autoscaling:v1alpha1 ensurance:v1alpha1 prediction:v1alpha1 analysis:v1alpha1 topology:v1alpha1" \
"autoscaling:v1alpha1 ensurance:v1alpha1 prediction:v1alpha1 analysis:v1alpha1 topology:v1alpha1 policy:v1alpha1" \
--output-base "$SCRIPT_ROOT" \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt"

Expand Down
3 changes: 2 additions & 1 deletion hack/update-crdgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ controller-gen crd paths=./autoscaling/... output:crd:dir=./artifacts/deploy
controller-gen crd paths=./ensurance/... output:crd:dir=./artifacts/deploy
controller-gen crd paths=./analysis/... output:crd:dir=./artifacts/deploy
controller-gen crd paths=./topology/... output:crd:dir=./artifacts/deploy
controller-gen crd paths=./policy/... output:crd:dir=./artifacts/deploy

controller-gen webhook paths=./prediction/... output:webhook:dir=./artifacts/deploy
controller-gen webhook paths=./autoscaling/... output:webhook:dir=./artifacts/deploy
controller-gen webhook paths=./ensurance/... output:webhook:dir=./artifacts/deploy
controller-gen webhook paths=./analysis/... output:webhook:dir=./artifacts/deploy
controller-gen webhook paths=./topology/... output:webhook:dir=./artifacts/deploy

controller-gen crd paths=./policy/... output:crd:dir=./artifacts/deploy
14 changes: 14 additions & 0 deletions pkg/generated/clientset/versioned/clientset.go

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

7 changes: 7 additions & 0 deletions pkg/generated/clientset/versioned/fake/clientset_generated.go

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

2 changes: 2 additions & 0 deletions pkg/generated/clientset/versioned/fake/register.go

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

2 changes: 2 additions & 0 deletions pkg/generated/clientset/versioned/scheme/register.go

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

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

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

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

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

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

78 changes: 78 additions & 0 deletions pkg/generated/openapi/zz_generated.openapi.go

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

6 changes: 6 additions & 0 deletions policy/register.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package policy

// GroupName is the group name used in this package
const (
GroupName = "policy.crane.io"
)
4 changes: 4 additions & 0 deletions policy/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Package v1alpha1 is the v1alpha1 version of the policy API.
// +k8s:deepcopy-gen=package,register
// +groupName=policy.crane.io
package v1alpha1
Loading