fix comment & add servicemesh gen

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-07-30 21:19:35 +08:00
parent 1c10391faf
commit de7fc0819f
8 changed files with 12501 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ import (
// Generate openapi for apis
//go:generate go run ../../vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ../../vendor/k8s.io/api/core/v1,../../vendor/k8s.io/apimachinery/pkg/apis/meta/v1,../../vendor/k8s.io/apimachinery/pkg/api/resource,../../vendor/k8s.io/apimachinery/pkg/runtime,../../vendor/k8s.io/apimachinery/pkg/util/intstr,k8s.io/apimachinery/pkg/version,./tenant/v1alpha1 -p kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1 -h ../../hack/boilerplate.go.txt --report-filename ../../api/api-rules/violation_exceptions.list
//go:generate go run ../../vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ../../vendor/k8s.io/api/core/v1,../../vendor/k8s.io/apimachinery/pkg/apis/meta/v1,../../vendor/k8s.io/apimachinery/pkg/api/resource,../../vendor/k8s.io/apimachinery/pkg/runtime,../../vendor/k8s.io/apimachinery/pkg/util/intstr,../../vendor/github.com/knative/pkg/apis/istio/v1alpha3,k8s.io/apimachinery/pkg/version,./servicemesh/v1alpha2 -p kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2 -h ../../hack/boilerplate.go.txt --report-filename ../../api/api-rules/violation_exceptions.list
// AddToSchemes may be used to add all resources defined in the project to a Scheme
var AddToSchemes runtime.SchemeBuilder

View File

@@ -0,0 +1,12 @@
package crdinstall
import (
k8sruntime "k8s.io/apimachinery/pkg/runtime"
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
)
func Install(scheme *k8sruntime.Scheme) {
urlruntime.Must(servicemeshv1alpha2.AddToScheme(scheme))
urlruntime.Must(scheme.SetVersionPriority(servicemeshv1alpha2.SchemeGroupVersion))
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
ResourceKindServicePolicy = "ServicePolicy"
ResourceSingularServicePolicy = "servicepolicy"
ResourcePluralServicePolicy = "servicepolicies"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

View File

@@ -25,6 +25,12 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
const (
ResourceKindStrategy = "Strategy"
ResourceSingularStrategy = "strategy"
ResourcePluralStrategy = "strategies"
)
type StrategyType string
const (