Skip to content

Commit

Permalink
fix k8s 1.18 error #116
Browse files Browse the repository at this point in the history
  • Loading branch information
freeznet committed Apr 14, 2021
1 parent 855f6e1 commit c68ec9b
Show file tree
Hide file tree
Showing 12 changed files with 26,673 additions and 26,049 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4 ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/function_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type FunctionStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
//+kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector

// Function is the Schema for the functions API
type Function struct {
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/function_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (r *Function) SetupWebhookWithManager(mgr ctrl.Manager) error {

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!

// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-function,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=functions,versions=v1alpha1,name=vfunction.kb.io
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-function,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=functions,versions=v1alpha1,name=vfunction.kb.io,webhookVersions=v1beta1

var _ webhook.Defaulter = &Function{}

Expand Down Expand Up @@ -103,7 +103,7 @@ func (r *Function) Default() {
}

// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-function,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=functions,versions=v1alpha1,name=vfunction.kb.io
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-function,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=functions,versions=v1alpha1,name=vfunction.kb.io,webhookVersions=v1beta1

var _ webhook.Validator = &Function{}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/sink_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type SinkStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
//+kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector

// Topic is the Schema for the sinks API
type Sink struct {
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/sink_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (r *Sink) SetupWebhookWithManager(mgr ctrl.Manager) error {

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!

// +kubebuilder:webhook:path=/mutate-cloud-streamnative-io-streamnative-io-v1alpha1-sink,mutating=true,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sinks,verbs=create;update,versions=v1alpha1,name=msink.kb.io
// +kubebuilder:webhook:path=/mutate-cloud-streamnative-io-streamnative-io-v1alpha1-sink,mutating=true,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sinks,verbs=create;update,versions=v1alpha1,name=msink.kb.io,webhookVersions=v1beta1

var _ webhook.Defaulter = &Sink{}

Expand Down Expand Up @@ -93,7 +93,7 @@ func (r *Sink) Default() {
}

// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-sink,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sinks,versions=v1alpha1,name=vsink.kb.io
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-sink,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sinks,versions=v1alpha1,name=vsink.kb.io,webhookVersions=v1beta1

var _ webhook.Validator = &Sink{}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type SourceStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
//+kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector

// Source is the Schema for the sources API
type Source struct {
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/source_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (r *Source) SetupWebhookWithManager(mgr ctrl.Manager) error {

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!

// +kubebuilder:webhook:path=/mutate-cloud-streamnative-io-streamnative-io-v1alpha1-source,mutating=true,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sources,verbs=create;update,versions=v1alpha1,name=msource.kb.io
// +kubebuilder:webhook:path=/mutate-cloud-streamnative-io-streamnative-io-v1alpha1-source,mutating=true,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sources,verbs=create;update,versions=v1alpha1,name=msource.kb.io,webhookVersions=v1beta1

var _ webhook.Defaulter = &Source{}

Expand Down Expand Up @@ -103,7 +103,7 @@ func (r *Source) Default() {
}

// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-source,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sources,versions=v1alpha1,name=vsource.kb.io
// +kubebuilder:webhook:verbs=create;update,path=/validate-cloud-streamnative-io-streamnative-io-v1alpha1-source,mutating=false,failurePolicy=fail,groups=cloud.streamnative.io.streamnative.io,resources=sources,versions=v1alpha1,name=vsource.kb.io,webhookVersions=v1beta1
var _ webhook.Validator = &Source{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
Expand Down
Loading

0 comments on commit c68ec9b

Please sign in to comment.