Merge branch 'dev' into devops-refactor
# Conflicts: # Makefile # api/api-rules/violation_exceptions.list # api/openapi-spec/swagger.json # cmd/controller-manager/app/controllers.go # hack/generate_client.sh # pkg/apis/cluster/v1alpha1/openapi_generated.go # pkg/client/informers/externalversions/generic.go # pkg/kapis/tenant/v1alpha2/register.go # pkg/models/tenant/devops.go # pkg/models/tenant/workspaces.go # pkg/simple/client/devops/fake/fakedevops.go # tools/cmd/crd-doc-gen/main.go
This commit is contained in:
1
Makefile
1
Makefile
@@ -83,7 +83,6 @@ openapi:
|
|||||||
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/servicemesh/v1alpha2 -p kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/servicemesh/v1alpha2 -p kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
||||||
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/api/networking/v1,./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./vendor/k8s.io/apimachinery/pkg/util/intstr,./pkg/apis/network/v1alpha1 -p kubesphere.io/kubesphere/pkg/apis/network/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/api/networking/v1,./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./vendor/k8s.io/apimachinery/pkg/util/intstr,./pkg/apis/network/v1alpha1 -p kubesphere.io/kubesphere/pkg/apis/network/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
||||||
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/devops/v1alpha1,./vendor/k8s.io/apimachinery/pkg/runtime,./vendor/k8s.io/api/core/v1 -p kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/devops/v1alpha1,./vendor/k8s.io/apimachinery/pkg/runtime,./vendor/k8s.io/api/core/v1 -p kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
||||||
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/devops/v1alpha3,./vendor/k8s.io/apimachinery/pkg/runtime -p kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
|
||||||
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/cluster/v1alpha1,./vendor/k8s.io/apimachinery/pkg/runtime,./vendor/k8s.io/api/core/v1 -p kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
go run ./vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./pkg/apis/cluster/v1alpha1,./vendor/k8s.io/apimachinery/pkg/runtime,./vendor/k8s.io/api/core/v1 -p kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1 -h ./hack/boilerplate.go.txt --report-filename ./api/api-rules/violation_exceptions.list
|
||||||
go run ./tools/cmd/crd-doc-gen/main.go
|
go run ./tools/cmd/crd-doc-gen/main.go
|
||||||
# Build the docker image
|
# Build the docker image
|
||||||
|
|||||||
@@ -141,11 +141,27 @@ API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,Table
|
|||||||
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,UpdateOptions,DryRun
|
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,UpdateOptions,DryRun
|
||||||
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,RawExtension,Raw
|
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,RawExtension,Raw
|
||||||
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
|
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
|
||||||
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,AgentList,Items
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerConfig,Env
|
||||||
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,AgentStatus,Conditions
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerInfo,BuildVolumes
|
||||||
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,AgentStatus,KubeConfig
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerInfo,RuntimeArtifacts
|
||||||
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,ClusterList,Items
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,Parameter,OptValues
|
||||||
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,ClusterStatus,Conditions
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iAutoScale,Containers
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBinaryList,Items
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuildResult,ImageRepoTags
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderList,Items
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateList,Items
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateSpec,ContainerInfo
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateSpec,Parameters
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,AddHost
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,BuildVolumes
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,DropCapabilities
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,Environment
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,Injections
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,NodeAffinityValues
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,RuntimeArtifacts
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,SecurityOpt
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iRunList,Items
|
||||||
|
API rule violation: list_type_missing,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,UserDefineTemplate,Parameters
|
||||||
API rule violation: names_match,k8s.io/api/core/v1,AzureDiskVolumeSource,DataDiskURI
|
API rule violation: names_match,k8s.io/api/core/v1,AzureDiskVolumeSource,DataDiskURI
|
||||||
API rule violation: names_match,k8s.io/api/core/v1,ContainerStatus,LastTerminationState
|
API rule violation: names_match,k8s.io/api/core/v1,ContainerStatus,LastTerminationState
|
||||||
API rule violation: names_match,k8s.io/api/core/v1,DaemonEndpoint,Port
|
API rule violation: names_match,k8s.io/api/core/v1,DaemonEndpoint,Port
|
||||||
@@ -182,5 +198,13 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
|
|||||||
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
|
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
|
||||||
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
|
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
|
||||||
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
|
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
|
||||||
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,AgentSpec,KubeSphereAPIServerPort
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerConfig,Env
|
||||||
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1,AgentStatus,KubeConfig
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,ContainerConfig,Labels
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,DockerConfig,Endpoint
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBinarySpec,MD5
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iBuilderTemplateSpec,Parameters
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,CGroupLimits
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,CallbackURL
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,ImageScriptsURL
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,ScriptsURL
|
||||||
|
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1,S2iConfig,SourceURL
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -137,6 +137,7 @@ func AddControllers(
|
|||||||
"pipeline-controller": devopsPipelineController,
|
"pipeline-controller": devopsPipelineController,
|
||||||
"devopscredential-controller": devopsCredentialController,
|
"devopscredential-controller": devopsCredentialController,
|
||||||
"cluster-controller": clusterController,
|
"cluster-controller": clusterController,
|
||||||
|
"user-controller": userController,
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, ctrl := range controllers {
|
for name, ctrl := range controllers {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
GV="network:v1alpha1 servicemesh:v1alpha2 tenant:v1alpha1 devops:v1alpha1 devops:v1alpha3 iam:v1alpha2 tower:v1alpha1 cluster:v1alpha1"
|
GV="network:v1alpha1 servicemesh:v1alpha2 tenant:v1alpha1 devops:v1alpha1 iam:v1alpha2 devops:v1alpha3 cluster:v1alpha1"
|
||||||
|
|
||||||
rm -rf ./pkg/client
|
rm -rf ./pkg/client
|
||||||
./hack/generate_group.sh "client,lister,informer" kubesphere.io/kubesphere/pkg/client kubesphere.io/kubesphere/pkg/apis "$GV" --output-base=./ -h "$PWD/hack/boilerplate.go.txt"
|
./hack/generate_group.sh "client,lister,informer" kubesphere.io/kubesphere/pkg/client kubesphere.io/kubesphere/pkg/apis "$GV" --output-base=./ -h "$PWD/hack/boilerplate.go.txt"
|
||||||
|
|||||||
@@ -289,7 +289,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
|||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.AgentSpec": schema_pkg_apis_cluster_v1alpha1_AgentSpec(ref),
|
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.AgentSpec": schema_pkg_apis_cluster_v1alpha1_AgentSpec(ref),
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.AgentStatus": schema_pkg_apis_cluster_v1alpha1_AgentStatus(ref),
|
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.AgentStatus": schema_pkg_apis_cluster_v1alpha1_AgentStatus(ref),
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.Cluster": schema_pkg_apis_cluster_v1alpha1_Cluster(ref),
|
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.Cluster": schema_pkg_apis_cluster_v1alpha1_Cluster(ref),
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterCondition": schema_pkg_apis_cluster_v1alpha1_ClusterCondition(ref),
|
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterList": schema_pkg_apis_cluster_v1alpha1_ClusterList(ref),
|
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterList": schema_pkg_apis_cluster_v1alpha1_ClusterList(ref),
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterSpec": schema_pkg_apis_cluster_v1alpha1_ClusterSpec(ref),
|
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterSpec": schema_pkg_apis_cluster_v1alpha1_ClusterSpec(ref),
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterStatus": schema_pkg_apis_cluster_v1alpha1_ClusterStatus(ref),
|
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterStatus": schema_pkg_apis_cluster_v1alpha1_ClusterStatus(ref),
|
||||||
@@ -13470,7 +13469,7 @@ func schema_pkg_apis_cluster_v1alpha1_AgentSpec(ref common.ReferenceCallback) co
|
|||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"paused": {
|
"Paused": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Indicates that the agent is paused.",
|
Description: "Indicates that the agent is paused.",
|
||||||
Type: []string{"boolean"},
|
Type: []string{"boolean"},
|
||||||
@@ -13510,7 +13509,7 @@ func schema_pkg_apis_cluster_v1alpha1_AgentStatus(ref common.ReferenceCallback)
|
|||||||
Format: "int64",
|
Format: "int64",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"kubeconfig": {
|
"KubeConfig": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Issued new kubeconfig by proxy server",
|
Description: "Issued new kubeconfig by proxy server",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
@@ -13518,6 +13517,7 @@ func schema_pkg_apis_cluster_v1alpha1_AgentStatus(ref common.ReferenceCallback)
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Required: []string{"KubeConfig"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Dependencies: []string{
|
Dependencies: []string{
|
||||||
@@ -13569,61 +13569,6 @@ func schema_pkg_apis_cluster_v1alpha1_Cluster(ref common.ReferenceCallback) comm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func schema_pkg_apis_cluster_v1alpha1_ClusterCondition(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
|
||||||
return common.OpenAPIDefinition{
|
|
||||||
Schema: spec.Schema{
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Type: []string{"object"},
|
|
||||||
Properties: map[string]spec.Schema{
|
|
||||||
"type": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "Type of the condition",
|
|
||||||
Type: []string{"string"},
|
|
||||||
Format: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "Status of the condition, one of True, False, Unknown.",
|
|
||||||
Type: []string{"string"},
|
|
||||||
Format: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"lastUpdateTime": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "The last time this condition was updated.",
|
|
||||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"lastTransitionTime": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "Last time the condition transitioned from one status to another.",
|
|
||||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"reason": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "The reason for the condition's last transition.",
|
|
||||||
Type: []string{"string"},
|
|
||||||
Format: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "A human readable message indicating details about the transition.",
|
|
||||||
Type: []string{"string"},
|
|
||||||
Format: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Required: []string{"type", "status"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Dependencies: []string{
|
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func schema_pkg_apis_cluster_v1alpha1_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
func schema_pkg_apis_cluster_v1alpha1_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||||
return common.OpenAPIDefinition{
|
return common.OpenAPIDefinition{
|
||||||
Schema: spec.Schema{
|
Schema: spec.Schema{
|
||||||
@@ -13678,21 +13623,14 @@ func schema_pkg_apis_cluster_v1alpha1_ClusterSpec(ref common.ReferenceCallback)
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"federated": {
|
"federated": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Join cluster as a kubefed cluster",
|
Description: "Join cluster as kubefed cluster",
|
||||||
Type: []string{"boolean"},
|
Type: []string{"boolean"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"active": {
|
"state": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Desired state of the cluster",
|
Description: "Desired state of the cluster",
|
||||||
Type: []string{"boolean"},
|
|
||||||
Format: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "Provider of the cluster, this field is just for description",
|
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@@ -13709,37 +13647,51 @@ func schema_pkg_apis_cluster_v1alpha1_ClusterStatus(ref common.ReferenceCallback
|
|||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Type: []string{"object"},
|
Type: []string{"object"},
|
||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"conditions": {
|
"type": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Represents the latest available observations of a cluster's current state.",
|
Description: "Type of the condition",
|
||||||
Type: []string{"array"},
|
|
||||||
Items: &spec.SchemaOrArray{
|
|
||||||
Schema: &spec.Schema{
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Ref: ref("kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterCondition"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"kubernetesVersion": {
|
|
||||||
SchemaProps: spec.SchemaProps{
|
|
||||||
Description: "GitVersion of the kubernetes cluster, this field is set by cluster controller",
|
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"nodeCount": {
|
"status": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Count of the kubernetes cluster nodes",
|
Description: "Status of the condition, one of True, False, Unknown.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"string"},
|
||||||
Format: "int32",
|
Format: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"lastUpdateTime": {
|
||||||
|
SchemaProps: spec.SchemaProps{
|
||||||
|
Description: "The last time this condition was updated.",
|
||||||
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"lastTransitionTime": {
|
||||||
|
SchemaProps: spec.SchemaProps{
|
||||||
|
Description: "Last time the condition transitioned from one status to another.",
|
||||||
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"reason": {
|
||||||
|
SchemaProps: spec.SchemaProps{
|
||||||
|
Description: "The reason for the condition's last transition.",
|
||||||
|
Type: []string{"string"},
|
||||||
|
Format: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
SchemaProps: spec.SchemaProps{
|
||||||
|
Description: "A human readable message indicating details about the transition.",
|
||||||
|
Type: []string{"string"},
|
||||||
|
Format: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Required: []string{"type", "status"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Dependencies: []string{
|
Dependencies: []string{
|
||||||
"kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1.ClusterCondition"},
|
"k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ func AddToContainer(c *restful.Container, k8sClient k8s.Client, factory informer
|
|||||||
Doc("List the namespaces of the specified workspace for the current user").
|
Doc("List the namespaces of the specified workspace for the current user").
|
||||||
Returns(http.StatusOK, api.StatusOK, []v1.Namespace{}).
|
Returns(http.StatusOK, api.StatusOK, []v1.Namespace{}).
|
||||||
Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag}))
|
Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag}))
|
||||||
|
|
||||||
c.Add(ws)
|
c.Add(ws)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,14 @@ func main() {
|
|||||||
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesPluralAgent),
|
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesPluralAgent),
|
||||||
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesSingularAgent), meta.RESTScopeRoot)
|
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesSingularAgent), meta.RESTScopeRoot)
|
||||||
|
|
||||||
|
mapper.AddSpecific(clusterv1alpha1.SchemeGroupVersion.WithKind(clusterv1alpha1.ResourceKindCluster),
|
||||||
|
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesPluralCluster),
|
||||||
|
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesSingularCluster), meta.RESTScopeRoot)
|
||||||
|
|
||||||
|
mapper.AddSpecific(clusterv1alpha1.SchemeGroupVersion.WithKind(clusterv1alpha1.ResourceKindAgent),
|
||||||
|
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesPluralAgent),
|
||||||
|
clusterv1alpha1.SchemeGroupVersion.WithResource(clusterv1alpha1.ResourcesSingularAgent), meta.RESTScopeRoot)
|
||||||
|
|
||||||
spec, err := lib.RenderOpenAPISpec(lib.Config{
|
spec, err := lib.RenderOpenAPISpec(lib.Config{
|
||||||
Scheme: Scheme,
|
Scheme: Scheme,
|
||||||
Codecs: Codecs,
|
Codecs: Codecs,
|
||||||
|
|||||||
Reference in New Issue
Block a user