diff --git a/Makefile b/Makefile index eb42f30ef..f65dd57a9 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,7 @@ 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/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/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 ./tools/cmd/crd-doc-gen/main.go + go run ./tools/cmd/doc-gen/main.go # Build the docker image docker-build: all hack/docker_build.sh diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index fd4c03d2b..bbeb17833 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -65,7 +65,6 @@ API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchJobTrigger,CreateActionJobsToTrigger API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchJobTrigger,DeleteActionJobsToTrigger API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,BitbucketServerSource -API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,Description API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,GitHubSource API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,GitSource API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,MultiBranchJobTrigger @@ -74,7 +73,6 @@ API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,SourceType API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,SvnSource API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,MultiBranchPipeline,TimerTrigger -API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,NoScmPipeline,Description API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,NoScmPipeline,DisableConcurrent API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,NoScmPipeline,RemoteTrigger API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3,NoScmPipeline,TimerTrigger diff --git a/api/ks-openapi-spec/swagger.json b/api/ks-openapi-spec/swagger.json index 9603d0881..d1088f269 100644 --- a/api/ks-openapi-spec/swagger.json +++ b/api/ks-openapi-spec/swagger.json @@ -84,9 +84,6 @@ "paths": { "/kapis/devops.kubesphere.io/v1alpha2/crumbissuer": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -113,9 +110,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/checkCron": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json", "charset=utf-8" @@ -133,13 +127,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "the name of the CI/CD pipeline", - "name": "pipeline", - "in": "path", - "required": true - }, { "name": "body", "in": "body", @@ -167,9 +154,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/credentials/{credential}/usage": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -212,9 +196,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -257,9 +238,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -331,9 +309,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -383,9 +358,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -443,9 +415,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -502,9 +471,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/artifacts": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -581,9 +547,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/log": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -639,9 +602,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -712,9 +672,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -784,9 +741,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -856,9 +810,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodes/{node}/steps/{step}/log": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -928,9 +879,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/nodesdetail": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -993,9 +941,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/replay": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1052,9 +997,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/branches/{branch}/runs/{run}/stop": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1153,7 +1095,8 @@ "format": "pipeline=%s", "description": "the name of the CI/CD pipeline", "name": "pipeline", - "in": "query" + "in": "path", + "required": true }, { "name": "body", @@ -1182,9 +1125,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/consolelog": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -1218,9 +1158,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1282,9 +1219,6 @@ } }, "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1335,9 +1269,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1387,9 +1318,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/artifacts": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1459,9 +1387,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/log": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -1510,9 +1435,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1568,9 +1490,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1633,9 +1552,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -1698,9 +1614,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -1763,9 +1676,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/nodesdetail": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1789,13 +1699,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "the name of branch, same as repository branch.", - "name": "branch", - "in": "path", - "required": true - }, { "type": "string", "description": "pipeline run ID, the unique ID for a pipeline once build.", @@ -1828,9 +1731,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/replay": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1880,9 +1780,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/runs/{run}/stop": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -1948,9 +1845,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/devops/{devops}/pipelines/{pipeline}/scan": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "text/html; charset=utf-8" ], @@ -1989,11 +1883,34 @@ } } }, - "/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations": { + "/kapis/devops.kubesphere.io/v1alpha2/jenkins/{path}": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "operationId": "func1", + "parameters": [ + { + "pattern": "[*]", + "type": "string", + "description": "Path stands for any suffix path.", + "name": "path", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok" + }, + "default": { + "description": "ok" + } + } + } + }, + "/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations": { + "get": { "produces": [ "application/json" ], @@ -2043,9 +1960,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/organizations/{organization}/repositories": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2098,19 +2012,13 @@ "200": { "description": "ok", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/devops.OrgRepo" - } + "$ref": "#/definitions/devops.OrgRepo" } }, "default": { "description": "ok", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/devops.OrgRepo" - } + "$ref": "#/definitions/devops.OrgRepo" } } } @@ -2118,9 +2026,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/servers": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2160,9 +2065,6 @@ } }, "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2206,9 +2108,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/scms/{scm}/verify": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2244,9 +2143,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/search": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2384,9 +2280,6 @@ }, "/kapis/devops.kubesphere.io/v1alpha2/webhook/git": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain; charset=utf-8" ], @@ -2461,40 +2354,912 @@ } } }, - "/kapis/iam.kubesphere.io/v1alpha2/clusterroles": { + "/kapis/devops.kubesphere.io/v1alpha3/devops/{devops}/credentials": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "DevOps Project" + ], + "summary": "list the credentials of the specified devops for the current user", + "operationId": "ListCredential", + "parameters": [ + { + "type": "string", + "description": "devops name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name used to do filtering", + "name": "name", + "in": "query" + }, + { + "type": "string", + "format": "page=%d", + "default": "page=1", + "description": "page", + "name": "page", + "in": "query" + }, + { + "type": "string", + "description": "limit", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "default": "ascending=false", + "description": "sort parameters, e.g. ascending=false", + "name": "ascending", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "sortBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "create the credential of the specified devops for the current user", + "operationId": "CreateCredential", + "parameters": [ + { + "type": "string", + "description": "devops name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + } + } + } + }, + "/kapis/devops.kubesphere.io/v1alpha3/devops/{devops}/credentials/{credential}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "get the credential of the specified devops for the current user", + "operationId": "GetCredential", + "parameters": [ + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "pipeline name", + "name": "credential", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "put the credential of the specified devops for the current user", + "operationId": "UpdateCredential", + "parameters": [ + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "credential name", + "name": "credential", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Pipeline" + ], + "summary": "delete the credential of the specified devops for the current user", + "operationId": "DeleteCredential", + "parameters": [ + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "credential name", + "name": "credential", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + } + } + } + } + }, + "/kapis/devops.kubesphere.io/v1alpha3/devops/{devops}/pipelines": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "list the pipelines of the specified devops for the current user", + "operationId": "ListPipeline", + "parameters": [ + { + "type": "string", + "description": "devops name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "create the pipeline of the specified devops for the current user", + "operationId": "CreatePipeline", + "parameters": [ + { + "type": "string", + "description": "devops name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + } + } + } + }, + "/kapis/devops.kubesphere.io/v1alpha3/devops/{devops}/pipelines/{pipeline}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "get the pipeline of the specified devops for the current user", + "operationId": "getPipelineByName", + "parameters": [ + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "pipeline name", + "name": "pipeline", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "put the pipeline of the specified devops for the current user", + "operationId": "UpdatePipeline", + "parameters": [ + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "pipeline name", + "name": "pipeline", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Pipeline" + ], + "summary": "delete the pipeline of the specified devops for the current user", + "operationId": "DeletePipeline", + "parameters": [ + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "pipeline name", + "name": "pipeline", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.Pipeline" + } + } + } + } + } + }, + "/kapis/devops.kubesphere.io/v1alpha3/workspaces/{workspace}/devops": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "List the devopsproject of the specified workspace for the current user", + "operationId": "ListDevOpsProject", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "Create the devopsproject of the specified workspace for the current user", + "operationId": "CreateDevOpsProject", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + } + } + } + }, + "/kapis/devops.kubesphere.io/v1alpha3/workspaces/{workspace}/devops/{devops}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "Get the devopsproject of the specified workspace for the current user", + "operationId": "GetDevOpsProject", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "Put the devopsproject of the specified workspace for the current user", + "operationId": "UpdateDevOpsProject", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "DevOps Project" + ], + "summary": "Get the devopsproject of the specified workspace for the current user", + "operationId": "DeleteDevOpsProject", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha3.DevOpsProject" + } + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/clustermembers": { + "get": { "produces": [ "application/json" ], "tags": [ "Access Management" ], - "summary": "List cluster roles.", - "operationId": "ListClusterRoles", + "summary": "List all members in cluster.", + "operationId": "ListClusterMembers", "responses": { "200": { "description": "ok", "schema": { - "$ref": "#/definitions/models.PageableResponse" + "$ref": "#/definitions/api.ListResult" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/models.PageableResponse" + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Add user to current cluster.", + "operationId": "CreateClusterMembers", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } } } } } }, - "/kapis/iam.kubesphere.io/v1alpha2/globalroles": { + "/kapis/iam.kubesphere.io/v1alpha2/clustermembers/{clustermember}": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve member details in cluster.", + "operationId": "DescribeClusterMember", + "parameters": [ + { + "type": "string", + "description": "cluster member's username", + "name": "clustermember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update cluster member role bind.", + "operationId": "UpdateClusterMember", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + { + "type": "string", + "description": "cluster member's username", + "name": "clustermember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete member in cluster scope.", + "operationId": "RemoveClusterMember", + "parameters": [ + { + "type": "string", + "description": "cluster member's username", + "name": "clustermember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/clustermembers/{clustermember}/clusterroles": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve user's role templates in cluster.", + "operationId": "RetrieveMemberRoleTemplates", + "parameters": [ + { + "type": "string", + "description": "cluster member's username", + "name": "clustermember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/clusterroles": { + "get": { "produces": [ "application/json" ], @@ -2502,18 +3267,1180 @@ "Access Management" ], "summary": "List all cluster roles.", - "operationId": "ListGlobalRoles", + "operationId": "ListClusterRoles", "responses": { "200": { "description": "ok", "schema": { - "$ref": "#/definitions/models.PageableResponse" + "$ref": "#/definitions/api.ListResult" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/models.PageableResponse" + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Create cluster role. Automatically aggregate policy rules according to annotation.", + "operationId": "CreateClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/clusterroles/{clusterrole}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve cluster role details.", + "operationId": "DescribeClusterRole", + "parameters": [ + { + "type": "string", + "description": "cluster role name", + "name": "clusterrole", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update cluster role. Automatically aggregate policy rules according to annotation.", + "operationId": "UpdateClusterRole", + "parameters": [ + { + "type": "string", + "description": "cluster role name", + "name": "clusterrole", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete cluster role.", + "operationId": "DeleteClusterRole", + "parameters": [ + { + "type": "string", + "description": "cluster role name", + "name": "clusterrole", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Patch cluster role. Automatically aggregate policy rules according to annotation.", + "operationId": "PatchClusterRole", + "parameters": [ + { + "type": "string", + "description": "cluster role name", + "name": "clusterrole", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.ClusterRole" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "List all members in the specified devops project.", + "operationId": "ListNamespaceMembers", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Batch add devops project members.", + "operationId": "CreateNamespaceMembers", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/members/{member}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve devops project member details.", + "operationId": "DescribeNamespaceMember", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "devops project member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update member in devops project.", + "operationId": "UpdateNamespaceMember", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "devops project member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Remove member in namespace.", + "operationId": "RemoveNamespaceMember", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "devops project member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/members/{member}/roles": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve member's role templates in devops project.", + "operationId": "RetrieveMemberRoleTemplates", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "devops project member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/roles": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "List all roles in the specified devops project.", + "operationId": "ListRoles", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Create role in the specified devops project. Automatically aggregate policy rules according to annotation.", + "operationId": "CreateNamespaceRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/devops/{devops}/roles/{role}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve devops project role details.", + "operationId": "DescribeNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update devops project role. Automatically aggregate policy rules according to annotation.", + "operationId": "UpdateNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete role in the specified devops project.", + "operationId": "DeleteNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Patch devops project role. Automatically aggregate policy rules according to annotation.", + "operationId": "PatchNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "devops project name", + "name": "devops", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/globalroles": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "List all global roles.", + "operationId": "ListGlobalRoles", + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Create global role. Automatically aggregate policy rules according to annotation.", + "operationId": "CreateGlobalRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/globalroles/{globalrole}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve global role details.", + "operationId": "DescribeGlobalRole", + "parameters": [ + { + "type": "string", + "description": "global role name", + "name": "globalrole", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update global role. Automatically aggregate policy rules according to annotation.", + "operationId": "UpdateGlobalRole", + "parameters": [ + { + "type": "string", + "description": "global role name", + "name": "globalrole", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete global role.", + "operationId": "DeleteGlobalRole", + "parameters": [ + { + "type": "string", + "description": "global role name", + "name": "globalrole", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Patch global role. Automatically aggregate policy rules according to annotation.", + "operationId": "PatchGlobalRole", + "parameters": [ + { + "type": "string", + "description": "global role name", + "name": "globalrole", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.GlobalRole" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "List all members in the specified namespace.", + "operationId": "ListNamespaceMembers", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Batch add namespace members.", + "operationId": "CreateNamespaceMembers", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/members/{member}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve namespace member details.", + "operationId": "DescribeNamespaceMember", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "namespace member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update member in namespace.", + "operationId": "UpdateNamespaceMember", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "namespace member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete member in namespace scope.", + "operationId": "RemoveNamespaceMember", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "namespace member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/members/{member}/roles": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve member's role templates in namespace.", + "operationId": "RetrieveMemberRoleTemplates", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "namespace member's username", + "name": "member", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" } } } @@ -2521,9 +4448,6 @@ }, "/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2545,35 +4469,38 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/models.PageableResponse" + "$ref": "#/definitions/api.ListResult" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/models.PageableResponse" + "$ref": "#/definitions/api.ListResult" } } } - } - }, - "/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/users": { - "get": { - "consumes": [ - "application/json" - ], + }, + "post": { "produces": [ "application/json" ], "tags": [ "Access Management" ], - "summary": "List all users in the specified namespace.", - "operationId": "ListNamespaceUsers", + "summary": "Create role in the specified namespace. Automatically aggregate policy rules according to annotation.", + "operationId": "CreateNamespaceRole", "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, { "type": "string", - "description": "kubernetes namespace", + "description": "namespace", "name": "namespace", "in": "path", "required": true @@ -2581,23 +4508,207 @@ ], "responses": { "200": { - "description": "OK" + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } } } } }, - "/kapis/iam.kubesphere.io/v1alpha2/users": { + "/kapis/iam.kubesphere.io/v1alpha2/namespaces/{namespace}/roles/{role}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ "Access Management" ], - "summary": "List all users.", + "summary": "Retrieve role details.", + "operationId": "DescribeNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update namespace role. Automatically aggregate policy rules according to annotation.", + "operationId": "UpdateNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete role in the specified namespace.", + "operationId": "DeleteNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Patch namespace role.", + "operationId": "PatchNamespaceRole", + "parameters": [ + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "role name", + "name": "role", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Role" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/users": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "List all users in global scope.", "operationId": "ListUsers", "responses": { "200": { @@ -2613,13 +4724,44 @@ } } } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Create user in global scope.", + "operationId": "CreateUser", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + } } }, "/kapis/iam.kubesphere.io/v1alpha2/users/{user}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2641,23 +4783,207 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.UserDetail" + "$ref": "#/definitions/v1alpha2.User" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.UserDetail" + "$ref": "#/definitions/v1alpha2.User" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update user info.", + "operationId": "UpdateUser", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + { + "type": "string", + "description": "username", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete user.", + "operationId": "DeleteUser", + "parameters": [ + { + "type": "string", + "description": "username", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" } } } } }, - "/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/users": { + "/kapis/iam.kubesphere.io/v1alpha2/users/{user}/globalroles": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve user's global role templates.", + "operationId": "RetrieveMemberRoleTemplates", + "parameters": [ + { + "type": "string", + "description": "username", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/users/{user}/loginrecords": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "List user's login records.", + "operationId": "ListUserLoginRecords", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/users/{user}/password": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Modify user's password.", + "operationId": "ModifyPassword", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/iam.PasswordReset" + } + }, + { + "type": "string", + "description": "username", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/workspacemembers": { + "get": { "produces": [ "application/json" ], @@ -2665,7 +4991,7 @@ "Access Management" ], "summary": "List all members in the specified workspace.", - "operationId": "ListWorkspaceUsers", + "operationId": "ListWorkspaceMembers", "parameters": [ { "type": "string", @@ -2677,16 +5003,244 @@ ], "responses": { "200": { - "description": "OK" + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Batch add workspace members.", + "operationId": "CreateWorkspaceMembers", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + }, + "default": { + "description": "ok", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/workspacemembers/{workspacemember}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve workspace member details.", + "operationId": "DescribeWorkspaceMember", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace member's username", + "name": "workspacemember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.User" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update member in workspace.", + "operationId": "UpdateWorkspaceMember", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace member's username", + "name": "workspacemember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Member" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete member in workspace scope.", + "operationId": "RemoveWorkspaceMember", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace member's username", + "name": "workspacemember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/workspacemembers/{workspacemember}/workspaceroles": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Retrieve member's role templates in workspace.", + "operationId": "RetrieveMemberRoleTemplates", + "parameters": [ + { + "type": "string", + "description": "workspace", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace member's username", + "name": "workspacemember", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } } } } }, "/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/workspaceroles": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -2706,257 +5260,234 @@ ], "responses": { "200": { - "description": "OK" + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } } } - } - }, - "/kapis/logging.kubesphere.io/v1alpha2/cluster": { - "get": { - "consumes": [ - "application/json" - ], + }, + "post": { "produces": [ "application/json" ], "tags": [ - "Log Query" + "Access Management" ], - "summary": "Query logs against the cluster.", - "operationId": "handleClusterQuery", + "summary": "Create workspace role. Automatically aggregate policy rules according to annotation.", + "operationId": "CreateWorkspaceRole", "parameters": [ { - "type": "string", - "default": "query", - "description": "Operation type. This can be one of four types: query (for querying logs), statistics (for retrieving statistical data), histogram (for displaying log count by time interval) and export (for exporting logs). Defaults to query.", - "name": "operation", - "in": "query" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceRole" + } }, { "type": "string", - "description": "A comma-separated list of workspaces. This field restricts the query to specified workspaces. For example, the following filter matches the workspace my-ws and demo-ws: `my-ws,demo-ws`", - "name": "workspaces", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. Differing from **workspaces**, this field performs fuzzy matching on workspaces. For example, the following value limits the query to workspaces whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", - "name": "workspace_query", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of namespaces. This field restricts the query to specified namespaces. For example, the following filter matches the namespace my-ns and demo-ns: `my-ns,demo-ns`", - "name": "namespaces", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. Differing from **namespaces**, this field performs fuzzy matching on namespaces. For example, the following value limits the query to namespaces whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", - "name": "namespace_query", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of workloads. This field restricts the query to specified workloads. For example, the following filter matches the workload my-wl and demo-wl: `my-wl,demo-wl`", - "name": "workloads", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. Differing from **workloads**, this field performs fuzzy matching on workloads. For example, the following value limits the query to workloads whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", - "name": "workload_query", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: `my-po,demo-po`", - "name": "pods", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. Differing from **pods**, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", - "name": "pod_query", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: `my-cont,demo-cont`", - "name": "containers", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. Differing from **containers**, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", - "name": "container_query", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to `err,INFO`, the query returns any log containing err(ERR,Err,...) *OR* INFO(info,InFo,...).", - "name": "log_query", - "in": "query" - }, - { - "type": "string", - "default": "15m", - "description": "Time interval. It requires **operation** is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).", - "name": "interval", - "in": "query" - }, - { - "type": "string", - "description": "Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.", - "name": "start_time", - "in": "query" - }, - { - "type": "string", - "description": "End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.", - "name": "end_time", - "in": "query" - }, - { - "type": "string", - "default": "desc", - "description": "Sort order. One of acs, desc. This field sorts logs by timestamp.", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "default": 0, - "description": "The offset from the result set. This field returns query results from the specified offset. It requires **operation** is set to query. Defaults to 0 (i.e. from the beginning of the result set).", - "name": "from", - "in": "query" - }, - { - "type": "integer", - "default": 10, - "description": "Size of result to return. It requires **operation** is set to query. Defaults to 10 (i.e. 10 log records).", - "name": "size", - "in": "query" + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true } ], "responses": { "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.APIResponse" + "$ref": "#/definitions/v1alpha2.WorkspaceRole" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.APIResponse" + "$ref": "#/definitions/v1alpha2.WorkspaceRole" } } } } }, - "/kapis/logging.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}/containers/{container}": { + "/kapis/iam.kubesphere.io/v1alpha2/workspaces/{workspace}/workspaceroles/{workspacerole}": { "get": { - "consumes": [ - "application/json", - "application/xml" - ], "produces": [ - "application/json", - "text/plain" + "application/json" ], "tags": [ - "Log Query" + "Access Management" ], - "summary": "Query logs against the specific container.", - "operationId": "handleContainerQuery", + "summary": "Retrieve workspace role details.", + "operationId": "DescribeWorkspaceRole", "parameters": [ { "type": "string", - "description": "The name of the namespace.", - "name": "namespace", + "description": "workspace name", + "name": "workspace", "in": "path", "required": true }, { "type": "string", - "description": "Pod name.", - "name": "pod", + "description": "workspace role name", + "name": "workspacerole", "in": "path", "required": true - }, - { - "type": "string", - "description": "Container name.", - "name": "container", - "in": "path", - "required": true - }, - { - "type": "string", - "default": "query", - "description": "Operation type. This can be one of four types: query (for querying logs), statistics (for retrieving statistical data), histogram (for displaying log count by time interval) and export (for exporting logs). Defaults to query.", - "name": "operation", - "in": "query" - }, - { - "type": "string", - "description": "A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to `err,INFO`, the query returns any log containing err(ERR,Err,...) *OR* INFO(info,InFo,...).", - "name": "log_query", - "in": "query" - }, - { - "type": "string", - "default": "15m", - "description": "Time interval. It requires **operation** is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).", - "name": "interval", - "in": "query" - }, - { - "type": "string", - "description": "Start time of query. Default to 0. The format is a string representing milliseconds since the epoch, eg. 1559664000000.", - "name": "start_time", - "in": "query" - }, - { - "type": "string", - "description": "End time of query. Default to now. The format is a string representing milliseconds since the epoch, eg. 1559664000000.", - "name": "end_time", - "in": "query" - }, - { - "type": "string", - "default": "desc", - "description": "Sort order. One of acs, desc. This field sorts logs by timestamp.", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "default": 0, - "description": "The offset from the result set. This field returns query results from the specified offset. It requires **operation** is set to query. Defaults to 0 (i.e. from the beginning of the result set).", - "name": "from", - "in": "query" - }, - { - "type": "integer", - "default": 10, - "description": "Size of result to return. It requires **operation** is set to query. Defaults to 10 (i.e. 10 log records).", - "name": "size", - "in": "query" } ], "responses": { "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.APIResponse" + "$ref": "#/definitions/v1alpha2.WorkspaceRole" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.APIResponse" + "$ref": "#/definitions/v1alpha2.WorkspaceRole" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Update workspace role. Automatically aggregate policy rules according to annotation.", + "operationId": "UpdateWorkspaceRole", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace role name", + "name": "workspacerole", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceRole" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceRole" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Delete workspace role.", + "operationId": "DeleteWorkspaceRole", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace role name", + "name": "workspacerole", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "Access Management" + ], + "summary": "Patch workspace role. Automatically aggregate policy rules according to annotation.", + "operationId": "PatchWorkspaceRole", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspace role name", + "name": "workspacerole", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceRole" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" } } } @@ -2964,9 +5495,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/cluster": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3026,9 +5554,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/components/{component}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3040,7 +5565,7 @@ "parameters": [ { "type": "string", - "description": "system component to monitor. One of etcd, apiserver, scheduler, controller_manager, coredns, prometheus.", + "description": "system component to monitor. One of etcd, apiserver, scheduler.", "name": "component", "in": "path", "required": true @@ -3093,11 +5618,34 @@ } } }, - "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces": { + "/kapis/monitoring.kubesphere.io/v1alpha3/kubesphere": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "KubeSphere Metrics" + ], + "summary": "Get platform-level metric data.", + "operationId": "handleKubeSphereMetricsQuery", + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/monitoring.Metrics" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/monitoring.Metrics" + } + } + } + } + }, + "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces": { + "get": { "produces": [ "application/json" ], @@ -3189,9 +5737,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3258,9 +5803,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/persistentvolumeclaims": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3281,7 +5823,7 @@ "type": "string", "description": "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).", "name": "metrics_filter", - "in": "path" + "in": "query" }, { "type": "string", @@ -3359,9 +5901,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/persistentvolumeclaims/{pvc}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3389,7 +5928,7 @@ "type": "string", "description": "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).", "name": "metrics_filter", - "in": "path" + "in": "query" }, { "type": "string", @@ -3435,9 +5974,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/pods": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3536,9 +6072,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/pods/{pod}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3612,9 +6145,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/pods/{pod}/containers": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3720,9 +6250,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/pods/{pod}/containers/{container}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3801,11 +6328,64 @@ } } }, - "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/targets/metadata": { + "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/targets/labelsets": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "Custom Metrics" + ], + "summary": "List all available labels and values of a metric within a specific time span.", + "operationId": "handleMetricLabelSetQuery", + "parameters": [ + { + "type": "string", + "description": "The name of the namespace.", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the metric", + "name": "metric", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Start time of query. It is a string with Unix time format, eg. 1559347200. ", + "name": "start", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "End time of query. It is a string with Unix time format, eg. 1561939200. ", + "name": "end", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/monitoring.MetricLabelSet" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/monitoring.MetricLabelSet" + } + } + } + } + }, + "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/targets/metadata": { + "get": { "produces": [ "application/json" ], @@ -3841,9 +6421,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/targets/query": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -3870,8 +6447,7 @@ "type": "string", "description": "Start time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200. ", "name": "start", - "in": "query", - "required": true + "in": "query" }, { "type": "string", @@ -3911,9 +6487,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/workloads": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4012,9 +6585,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/workloads/{kind}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4120,9 +6690,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/workloads/{kind}/{workload}/pods": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4235,9 +6802,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/nodes": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4329,9 +6893,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/nodes/{node}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4398,9 +6959,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/nodes/{node}/pods": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4499,9 +7057,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/nodes/{node}/pods/{pod}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4575,9 +7130,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/storageclasses/{storageclass}/persistentvolumeclaims": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4598,7 +7150,7 @@ "type": "string", "description": "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).", "name": "metrics_filter", - "in": "path" + "in": "query" }, { "type": "string", @@ -4676,9 +7228,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/workspaces": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4770,9 +7319,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/workspaces/{workspace}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4819,6 +7365,12 @@ "description": "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.", "name": "time", "in": "query" + }, + { + "type": "string", + "description": "Additional operations. Currently available types is statistics. It retrieves the total number of namespaces, devops projects, members and roles in this workspace at the moment.", + "name": "type", + "in": "query" } ], "responses": { @@ -4839,9 +7391,6 @@ }, "/kapis/monitoring.kubesphere.io/v1alpha3/workspaces/{workspace}/namespaces": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4940,9 +7489,6 @@ }, "/kapis/network.kubesphere.io/v1alpha2/namespaces/{namespace}/topology": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -4978,9 +7524,6 @@ }, "/kapis/network.kubesphere.io/v1alpha2/namespaces/{namespace}/topology/{node_id}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -5021,1612 +7564,8 @@ } } }, - "/kapis/openpitrix.io/v1/applications": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Namespace Resources" - ], - "summary": "List all applications", - "operationId": "ListApplications", - "parameters": [ - { - "type": "string", - "format": "key=value,key~value", - "description": "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "description": "the name of the project", - "name": "namespace", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "List app templates", - "operationId": "ListApps", - "parameters": [ - { - "type": "string", - "format": "key=%s,key~%s", - "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. reverse=true", - "name": "reverse", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. orderBy=createTime", - "name": "orderBy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Create a new app template", - "operationId": "CreateApp", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.CreateAppRequest" - } - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateAppResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateAppResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Describe the specified app template", - "operationId": "DescribeApp", - "parameters": [ - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersion" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersion" - } - } - } - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Delete the specified app template", - "operationId": "DeleteApp", - "parameters": [ - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - }, - "patch": { - "consumes": [ - "application/json", - "application/merge-patch+json", - "application/json-patch+json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Patch the specified app template", - "operationId": "ModifyApp", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest" - } - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/action": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Perform recover or suspend operation on app", - "operationId": "DoAppAction", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/audits": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "List audits information of the specific app template", - "operationId": "ListAppVersionAudits", - "parameters": [ - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersionAudit" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersionAudit" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/versions": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Get active versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all active app versions", - "operationId": "ListAppVersions", - "parameters": [ - { - "type": "string", - "format": "key=%s,key~%s", - "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "sort parameters, e.g. reverse=true", - "name": "reverse", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. orderBy=createTime", - "name": "orderBy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Create a new app template version", - "operationId": "CreateAppVersion", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.CreateAppVersionRequest" - } - }, - { - "type": "string", - "description": "Validate format of package(pack by op tool)", - "name": "validate", - "in": "query" - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateAppVersionResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateAppVersionResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Describe the specified app template version", - "operationId": "DescribeAppVersion", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersion" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersion" - } - } - } - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Delete the specified app template version", - "operationId": "DeleteAppVersion", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - }, - "patch": { - "consumes": [ - "application/json", - "application/merge-patch+json", - "application/json-patch+json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Patch the specified app template version", - "operationId": "ModifyAppVersion", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest" - } - }, - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/action": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Perform submit or other operations on app", - "operationId": "DoAppVersionAction", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/audits": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "List audits information of version-specific app template", - "operationId": "ListAppVersionAudits", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersionAudit" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersionAudit" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/files": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Get app template package files", - "operationId": "GetAppVersionFiles", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.GetAppVersionPackageFilesResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.GetAppVersionPackageFilesResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/package": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Get packages of version-specific app", - "operationId": "GetAppVersionPackage", - "parameters": [ - { - "type": "string", - "description": "app template version id", - "name": "version", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.GetAppVersionPackageResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.GetAppVersionPackageResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/attachments/{attachment}": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Get attachment by attachment id", - "operationId": "DescribeAttachment", - "parameters": [ - { - "type": "string", - "description": "attachment id", - "name": "attachment", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Attachment" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Attachment" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/categories": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "List categories", - "operationId": "ListCategories", - "parameters": [ - { - "type": "string", - "format": "key=%s,key~%s", - "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. reverse=true", - "name": "reverse", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. orderBy=createTime", - "name": "orderBy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Create app template category", - "operationId": "CreateCategory", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.CreateCategoryRequest" - } - }, - { - "type": "string", - "description": "app template id", - "name": "app", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateCategoryResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateCategoryResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/categories/{category}": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Describe the specified category", - "operationId": "DescribeCategory", - "parameters": [ - { - "type": "string", - "description": "category id", - "name": "category", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Category" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Category" - } - } - } - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Delete the specified category", - "operationId": "DeleteCategory", - "parameters": [ - { - "type": "string", - "description": "category id", - "name": "category", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - }, - "patch": { - "consumes": [ - "application/json", - "application/merge-patch+json", - "application/json-patch+json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Patch the specified category", - "operationId": "ModifyCategory", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.ModifyCategoryRequest" - } - }, - { - "type": "string", - "description": "category id", - "name": "category", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/namespaces/{namespace}/applications": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Namespace Resources" - ], - "summary": "List all applications within the specified namespace", - "operationId": "ListApplications", - "parameters": [ - { - "type": "string", - "format": "key=value,key~value", - "description": "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "description": "the name of the project", - "name": "namespace", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Namespace Resources" - ], - "summary": "Deploy a new application", - "operationId": "CreateApplication", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.CreateClusterRequest" - } - }, - { - "type": "string", - "description": "the name of the project", - "name": "namespace", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/namespaces/{namespace}/applications/{application}": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Namespace Resources" - ], - "summary": "Describe the specified application of the namespace", - "operationId": "DescribeApplication", - "parameters": [ - { - "type": "string", - "description": "the name of the project", - "name": "namespace", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "application ID", - "name": "application", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Application" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Application" - } - } - } - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Namespace Resources" - ], - "summary": "Delete the specified application", - "operationId": "DeleteApplication", - "parameters": [ - { - "type": "string", - "description": "the name of the project", - "name": "namespace", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "the id of the application cluster", - "name": "application", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - }, - "patch": { - "consumes": [ - "application/json", - "application/merge-patch+json", - "application/json-patch+json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Namespace Resources" - ], - "summary": "Modify application", - "operationId": "ModifyApplication", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.ModifyClusterAttributesRequest" - } - }, - { - "type": "string", - "description": "the name of the project", - "name": "namespace", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "the id of the application cluster", - "name": "application", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/repos": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "List repositories", - "operationId": "ListRepos", - "parameters": [ - { - "type": "string", - "format": "key=%s,key~%s", - "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. reverse=true", - "name": "reverse", - "in": "query" - }, - { - "type": "string", - "description": "sort parameters, e.g. orderBy=createTime", - "name": "orderBy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - }, - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Create repository, repository used to store package of app", - "operationId": "CreateRepo", - "parameters": [ - { - "type": "string", - "description": "Validate repository", - "name": "validate", - "in": "query" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.CreateRepoRequest" - } - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateRepoResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.CreateRepoResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/repos/{repo}": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Describe the specified repository", - "operationId": "DescribeRepo", - "parameters": [ - { - "type": "string", - "description": "repo id", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Repo" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.Repo" - } - } - } - }, - "delete": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Delete the specified repository", - "operationId": "DeleteRepo", - "parameters": [ - { - "type": "string", - "description": "repo id", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - }, - "patch": { - "consumes": [ - "application/json", - "application/merge-patch+json", - "application/json-patch+json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Openpitrix Resources" - ], - "summary": "Patch the specified repository", - "operationId": "ModifyRepo", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.ModifyRepoRequest" - } - }, - { - "type": "string", - "description": "repo id", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/repos/{repo}/action": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Start index repository event", - "operationId": "DoRepoAction", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/openpitrix.RepoActionRequest" - } - }, - { - "type": "string", - "description": "repo id", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/errors.Error" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/repos/{repo}/events": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Get repository events", - "operationId": "ListRepoEvents", - "parameters": [ - { - "type": "string", - "description": "repo id", - "name": "repo", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/models.PageableResponse" - } - } - } - } - }, - "/kapis/openpitrix.io/v1/reviews": { - "get": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "summary": "Get reviews of version-specific app", - "operationId": "ListReviews", - "parameters": [ - { - "type": "string", - "format": "key=%s,key~%s", - "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", - "name": "conditions", - "in": "query" - }, - { - "type": "string", - "format": "limit=%d,page=%d", - "default": "limit=10,page=1", - "description": "paging query, e.g. limit=100,page=1", - "name": "paging", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersionReview" - } - }, - "default": { - "description": "ok", - "schema": { - "$ref": "#/definitions/openpitrix.AppVersionReview" - } - } - } - } - }, "/kapis/operations.kubesphere.io/v1alpha2/namespaces/{namespace}/jobs/{job}": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6680,9 +7619,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/abnormalworkloads": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6709,9 +7645,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/componenthealth": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6738,9 +7671,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/components": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6773,9 +7703,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/components/{component}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6811,9 +7738,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/git/verify": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6850,9 +7774,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/abnormalworkloads": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6888,9 +7809,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/daemonsets/{daemonset}/revisions/{revision}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6940,9 +7858,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/deployments/{deployment}/revisions/{revision}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -6992,9 +7907,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/quotas": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7030,9 +7942,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/router": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7066,9 +7975,6 @@ } }, "put": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7102,9 +8008,6 @@ } }, "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7138,9 +8041,6 @@ } }, "delete": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7176,9 +8076,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/statefulsets/{statefulset}/revisions/{revision}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7228,9 +8125,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/namespaces/{namespace}/{resources}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7301,9 +8195,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/quotas": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7330,9 +8221,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/registry/blob": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7383,9 +8271,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/registry/verify": { "post": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7422,9 +8307,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/users/{user}/kubeconfig": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "text/plain", "application/json" @@ -7461,9 +8343,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/users/{user}/kubectl": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7499,9 +8378,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha2/{resources}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7565,9 +8441,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha3/componenthealth": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7594,9 +8467,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha3/components": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7629,9 +8499,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha3/components/{component}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7667,9 +8534,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha3/namespaces/{namespace}/{resources}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7745,9 +8609,6 @@ }, "/kapis/resources.kubesphere.io/v1alpha3/namespaces/{namespace}/{resources}/{name}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -7797,14 +8658,11 @@ }, "/kapis/resources.kubesphere.io/v1alpha3/{resources}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], "tags": [ - "Namespaced Resource" + "Clustered Resource" ], "summary": "Cluster level resources", "operationId": "handleListResources", @@ -7866,11 +8724,44 @@ } } }, - "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/graph": { + "/kapis/resources.kubesphere.io/v1alpha3/{resources}/{name}": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "Clustered Resource" + ], + "summary": "Cluster level resource", + "operationId": "handleGetResources", + "parameters": [ + { + "type": "string", + "description": "cluster level resource type, e.g. pods,jobs,configmaps,services.", + "name": "resources", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the clustered resources", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok" + }, + "default": { + "description": "ok" + } + } + } + }, + "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/graph": { + "get": { "produces": [ "application/json" ], @@ -7919,7 +8810,7 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.GraphResponse" + "$ref": "#/definitions/v1alpha2.graphResponse" } }, "400": { @@ -7937,7 +8828,7 @@ "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.GraphResponse" + "$ref": "#/definitions/v1alpha2.graphResponse" } } } @@ -7945,9 +8836,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/apps/{app}/health": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8004,9 +8892,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/apps/{app}/metrics": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8104,13 +8989,13 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } } } @@ -8118,9 +9003,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/graph": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8176,7 +9058,7 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.GraphResponse" + "$ref": "#/definitions/v1alpha2.graphResponse" } }, "400": { @@ -8194,7 +9076,7 @@ "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.GraphResponse" + "$ref": "#/definitions/v1alpha2.graphResponse" } } } @@ -8202,9 +9084,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/health": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8221,14 +9100,6 @@ "in": "path", "required": true }, - { - "type": "string", - "default": "app", - "description": "the type of health, app/service/workload, default app", - "name": "type", - "in": "path", - "required": true - }, { "type": "string", "default": "10m", @@ -8274,9 +9145,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/metrics": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8293,13 +9161,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "name of the service", - "name": "service", - "in": "path", - "required": true - }, { "type": "string", "default": "[]", @@ -8374,13 +9235,13 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } } } @@ -8388,9 +9249,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/health": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8447,9 +9305,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/services/{service}/metrics": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8547,13 +9402,13 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } } } @@ -8634,9 +9489,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}/health": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8693,9 +9545,6 @@ }, "/kapis/servicemesh.kubesphere.io/v1alpha2/namespaces/{namespace}/workloads/{workload}/metrics": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8719,13 +9568,6 @@ "in": "path", "required": true }, - { - "type": "string", - "description": "name of the service", - "name": "service", - "in": "path", - "required": true - }, { "type": "string", "default": "[]", @@ -8800,13 +9642,215 @@ "200": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" } }, "default": { "description": "ok", "schema": { - "$ref": "#/definitions/v1alpha2.MetricsResponse" + "$ref": "#/definitions/v1alpha2.metricsResponse" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/auditing/events": { + "get": { + "consumes": [ + "application/json", + "application/xml" + ], + "produces": [ + "application/json", + "text/plain" + ], + "tags": [ + "Auditing Query" + ], + "summary": "Query auditing events against the cluster", + "operationId": "Auditing", + "parameters": [ + { + "type": "string", + "default": "query", + "description": "Operation type. This can be one of three types: `query` (for querying events), `statistics` (for retrieving statistical data), `histogram` (for displaying events count by time interval). Defaults to query.", + "name": "operation", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of workspaces. This field restricts the query to specified workspaces. For example, the following filter matches the workspace my-ws and demo-ws: `my-ws,demo-ws`.", + "name": "workspace_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **workspace_filter**, this field performs fuzzy matching on workspaces. For example, the following value limits the query to workspaces whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "workspace_search", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of namespaces. This field restricts the query to specified `ObjectRef.Namespace`.", + "name": "objectref_namespace_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **objectref_namespace_filter**, this field performs fuzzy matching on `ObjectRef.Namespace`.", + "name": "objectref_namespace_search", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of names. This field restricts the query to specified `ObjectRef.Name`.", + "name": "objectref_name_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **objectref_name_filter**, this field performs fuzzy matching on `ObjectRef.Name`.", + "name": "objectref_name_search", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of levels. This know values are Metadata, Request, RequestResponse.", + "name": "level_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of verbs. This field restricts the query to specified verb. This field restricts the query to specified `Verb`.", + "name": "verb_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of user. This field restricts the query to specified user. For example, the following filter matches the user user1 and user2: `user1,user2`.", + "name": "user_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **user_filter**, this field performs fuzzy matching on 'User.username'. For example, the following value limits the query to user whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "user_search", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. This field performs fuzzy matching on 'User.Groups'. For example, the following value limits the query to group which contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "group_search", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. This field performs fuzzy matching on 'SourceIPs'. For example, the following value limits the query to SourceIPs which contains 127.0 *OR* 192.168.: `127.0,192.168.`.", + "name": "source_ip_search", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of resource. This field restricts the query to specified ip. This field restricts the query to specified `ObjectRef.Resource`.", + "name": "objectref_resource_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of subresource. This field restricts the query to specified subresource. This field restricts the query to specified `ObjectRef.Subresource`.", + "name": "objectref_subresource_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of response status code. This field restricts the query to specified response status code. This field restricts the query to specified `ResponseStatus.code`.", + "name": "response_code_filter", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of response status. This field restricts the query to specified response status. This field restricts the query to specified `ResponseStatus.status`.", + "name": "response_status_filter", + "in": "query" + }, + { + "type": "string", + "description": "Start time of query (limits `RequestReceivedTimestamp`). The format is a string representing seconds since the epoch, eg. 1136214245.", + "name": "start_time", + "in": "query" + }, + { + "type": "string", + "description": "End time of query (limits `RequestReceivedTimestamp`). The format is a string representing seconds since the epoch, eg. 1136214245.", + "name": "end_time", + "in": "query" + }, + { + "type": "string", + "default": "15m", + "description": "Time interval. It requires **operation** is set to `histogram`. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).", + "name": "interval", + "in": "query" + }, + { + "type": "string", + "default": "desc", + "description": "Sort order. One of asc, desc. This field sorts events by `RequestReceivedTimestamp`.", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "default": 0, + "description": "The offset from the result set. This field returns query results from the specified offset. It requires **operation** is set to `query`. Defaults to 0 (i.e. from the beginning of the result set).", + "name": "from", + "in": "query" + }, + { + "type": "integer", + "default": 10, + "description": "Size of result set to return. It requires **operation** is set to `query`. Defaults to 10 (i.e. 10 event records).", + "name": "size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha1.APIResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha1.APIResponse" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/clusters": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List clusters available to users", + "operationId": "ListClusters", + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" } } } @@ -8814,9 +9858,6 @@ }, "/kapis/tenant.kubesphere.io/v1alpha2/events": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -8829,7 +9870,7 @@ { "type": "string", "default": "query", - "description": "Operation type. This can be one of four types: `query` (for querying events), `statistics` (for retrieving statistical data), `histogram` (for displaying events count by time interval). Defaults to query.", + "description": "Operation type. This can be one of three types: `query` (for querying events), `statistics` (for retrieving statistical data), `histogram` (for displaying events count by time interval). Defaults to query.", "name": "operation", "in": "query" }, @@ -8956,11 +9997,189 @@ } } }, - "/kapis/tenant.kubesphere.io/v1alpha2/workspaces": { + "/kapis/tenant.kubesphere.io/v1alpha2/federatednamespaces": { "get": { - "consumes": [ + "produces": [ "application/json" ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the federated namespaces for the current user", + "operationId": "ListFederatedNamespaces", + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/logs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Log Query" + ], + "summary": "Query logs against the cluster.", + "operationId": "QueryLogs", + "parameters": [ + { + "type": "string", + "default": "query", + "description": "Operation type. This can be one of four types: query (for querying logs), statistics (for retrieving statistical data), histogram (for displaying log count by time interval) and export (for exporting logs). Defaults to query.", + "name": "operation", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of namespaces. This field restricts the query to specified namespaces. For example, the following filter matches the namespace my-ns and demo-ns: `my-ns,demo-ns`", + "name": "namespaces", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **namespaces**, this field performs fuzzy matching on namespaces. For example, the following value limits the query to namespaces whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "namespace_query", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of workloads. This field restricts the query to specified workloads. For example, the following filter matches the workload my-wl and demo-wl: `my-wl,demo-wl`", + "name": "workloads", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **workloads**, this field performs fuzzy matching on workloads. For example, the following value limits the query to workloads whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "workload_query", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of pods. This field restricts the query to specified pods. For example, the following filter matches the pod my-po and demo-po: `my-po,demo-po`", + "name": "pods", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **pods**, this field performs fuzzy matching on pods. For example, the following value limits the query to pods whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "pod_query", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of containers. This field restricts the query to specified containers. For example, the following filter matches the container my-cont and demo-cont: `my-cont,demo-cont`", + "name": "containers", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. Differing from **containers**, this field performs fuzzy matching on containers. For example, the following value limits the query to containers whose name contains the word my(My,MY,...) *OR* demo(Demo,DemO,...): `my,demo`.", + "name": "container_query", + "in": "query" + }, + { + "type": "string", + "description": "A comma-separated list of keywords. The query returns logs which contain at least one keyword. Case-insensitive matching. For example, if the field is set to `err,INFO`, the query returns any log containing err(ERR,Err,...) *OR* INFO(info,InFo,...).", + "name": "log_query", + "in": "query" + }, + { + "type": "string", + "default": "15m", + "description": "Time interval. It requires **operation** is set to histogram. The format is [0-9]+[smhdwMqy]. Defaults to 15m (i.e. 15 min).", + "name": "interval", + "in": "query" + }, + { + "type": "string", + "description": "Start time of query. Default to 0. The format is a string representing seconds since the epoch, eg. 1559664000.", + "name": "start_time", + "in": "query" + }, + { + "type": "string", + "description": "End time of query. Default to now. The format is a string representing seconds since the epoch, eg. 1559664000.", + "name": "end_time", + "in": "query" + }, + { + "type": "string", + "default": "desc", + "description": "Sort order. One of asc, desc. This field sorts logs by timestamp.", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "default": 0, + "description": "The offset from the result set. This field returns query results from the specified offset. It requires **operation** is set to query. Defaults to 0 (i.e. from the beginning of the result set).", + "name": "from", + "in": "query" + }, + { + "type": "integer", + "default": 10, + "description": "Size of result to return. It requires **operation** is set to query. Defaults to 10 (i.e. 10 log records).", + "name": "size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.APIResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.APIResponse" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/namespaces": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the namespaces for the current user", + "operationId": "ListNamespaces", + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces": { + "get": { "produces": [ "application/json" ], @@ -8983,13 +10202,304 @@ } } } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Create workspace.", + "operationId": "CreateWorkspace", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Describe workspace.", + "operationId": "DescribeWorkspace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Update workspace.", + "operationId": "UpdateWorkspace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Delete workspace.", + "operationId": "DeleteWorkspace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Update workspace.", + "operationId": "PatchWorkspace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.WorkspaceTemplate" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/clusters": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List clusters authorized to the specified workspace.", + "operationId": "ListWorkspaceClusters", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/devops": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the devops projects of the specified workspace for the current user", + "operationId": "ListDevOpsProjects", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/federatednamespaces": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the federated namespaces of the specified workspace for the current user", + "operationId": "ListFederatedNamespaces", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/api.ListResult" + } + } + } } }, "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -9011,19 +10521,335 @@ "200": { "description": "ok", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.Namespace" - } + "$ref": "#/definitions/api.ListResult" } }, "default": { "description": "ok", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.Namespace" - } + "$ref": "#/definitions/api.ListResult" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the namespaces of the specified workspace for the current user", + "operationId": "CreateNamespace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/namespaces/{namespace}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Retrieve namespace details.", + "operationId": "DescribeNamespace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "namespace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "operationId": "UpdateNamespace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "namespace", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "Delete namespace.", + "operationId": "DeleteNamespace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "namespace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "operationId": "PatchNamespace", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "project name", + "name": "namespace", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/workspacemembers/{workspacemember}/devops": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the devops projects of specified workspace for the workspace member", + "operationId": "ListDevOpsProjects", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspacemember username", + "name": "workspacemember", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + } + } + }, + "/kapis/tenant.kubesphere.io/v1alpha2/workspaces/{workspace}/workspacemembers/{workspacemember}/namespaces": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Tenant Resources" + ], + "summary": "List the namespaces of the specified workspace for the workspace member", + "operationId": "ListNamespaces", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workspacemember username", + "name": "workspacemember", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1.Namespace" } } } @@ -9031,9 +10857,6 @@ }, "/kapis/terminal.kubesphere.io/v1alpha2/namespaces/{namespace}/pods/{pod}": { "get": { - "consumes": [ - "application/json" - ], "produces": [ "application/json" ], @@ -9042,6 +10865,22 @@ ], "summary": "create terminal session", "operationId": "handleTerminalSession", + "parameters": [ + { + "type": "string", + "description": "namespace of which the pod located in", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the pod", + "name": "pod", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK" @@ -10563,98 +12402,7 @@ "devops.Pipeline.disabled": {}, "devops.Pipeline.parameters": {}, "devops.Pipeline.pipelineFolderNames": {}, - "devops.PipelineBranch": { - "properties": { - "_class": { - "description": "It’s a fully qualified name and is an identifier of the producer of this resource's capability.", - "type": "string" - }, - "_links": { - "description": "references the reachable path to this resource", - "$ref": "#/definitions/._links" - }, - "actions": { - "description": "the list of all actions.", - "type": "array", - "items": { - "$ref": "#/definitions/devops.PipelineBranch.actions" - } - }, - "branch": { - "$ref": "#/definitions/.branch" - }, - "disabled": { - "description": "disable or not, if disabled, can not do any action", - "type": "boolean" - }, - "displayName": { - "description": "display name", - "type": "string" - }, - "estimatedDurationInMillis": { - "description": "estimated duration time, unit is millis", - "type": "integer", - "format": "int32" - }, - "fullDisplayName": { - "description": "full display name", - "type": "string" - }, - "fullName": { - "description": "full name", - "type": "string" - }, - "latestRun": { - "$ref": "#/definitions/.latestRun" - }, - "name": { - "description": "name", - "type": "string" - }, - "organization": { - "description": "the name of organization", - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/devops.PipelineBranch.parameters" - } - }, - "permissions": { - "$ref": "#/definitions/.permissions" - }, - "weatherScore": { - "description": "the score to description the result of pipeline", - "type": "integer", - "format": "int32" - } - } - }, - "devops.PipelineBranch.actions": {}, - "devops.PipelineBranch.parameters": { - "properties": { - "_class": { - "description": "It’s a fully qualified name and is an identifier of the producer of this resource's capability.", - "type": "string" - }, - "defaultParameterValue": { - "$ref": "#/definitions/.defaultParameterValue" - }, - "description": { - "description": "description", - "type": "string" - }, - "name": { - "description": "name", - "type": "string" - }, - "type": { - "description": "type", - "type": "string" - } - } - }, + "devops.PipelineBranch": {}, "devops.PipelineList": { "required": [ "items", @@ -10822,150 +12570,23 @@ "devops.PipelineRun.name": {}, "devops.PipelineRun.pullRequest": {}, "devops.PipelineRunList": { + "required": [ + "items", + "totalItems" + ], "properties": { - "_class": { - "description": "It’s a fully qualified name and is an identifier of the producer of this resource's capability.", - "type": "string" - }, - "_links": { - "description": "references the reachable path to this resource", - "$ref": "#/definitions/._links" - }, - "actions": { - "description": "the list of all actions", + "items": { "type": "array", "items": { - "$ref": "#/definitions/devops.PipelineRunList.actions" + "$ref": "#/definitions/devops.PipelineRun" } }, - "artifactsZipFile": { - "description": "the artifacts zip file", - "$ref": "#/definitions/devops.PipelineRunList.artifactsZipFile" - }, - "branch": { - "$ref": "#/definitions/.branch" - }, - "causeOfBlockage": { - "description": "the cause of blockage", - "$ref": "#/definitions/devops.PipelineRunList.causeOfBlockage" - }, - "causes": { - "type": "array", - "items": { - "$ref": "#/definitions/devops.PipelineRunList.causes" - } - }, - "changeSet": { - "description": "changeset information", - "type": "array", - "items": { - "$ref": "#/definitions/devops.PipelineRunList.changeSet" - } - }, - "commitId": { - "description": "commit id", - "type": "string" - }, - "commitUrl": { - "description": "commit url ", - "$ref": "#/definitions/devops.PipelineRunList.commitUrl" - }, - "description": { - "description": "description of resource", - "$ref": "#/definitions/devops.PipelineRunList.description" - }, - "durationInMillis": { - "description": "duration time in millis", + "totalItems": { "type": "integer", "format": "int32" - }, - "enQueueTime": { - "description": "the time of enter the queue", - "type": "string" - }, - "endTime": { - "description": "the time of end", - "type": "string" - }, - "estimatedDurationInMillis": { - "description": "estimated duration time, unit is millis", - "type": "integer", - "format": "int32" - }, - "id": { - "description": "id", - "type": "string" - }, - "name": { - "description": "name", - "$ref": "#/definitions/devops.PipelineRunList.name" - }, - "organization": { - "description": "the name of organization", - "type": "string" - }, - "pipeline": { - "description": "pipeline name", - "type": "string" - }, - "pullRequest": { - "description": "pull request", - "$ref": "#/definitions/devops.PipelineRunList.pullRequest" - }, - "replayable": { - "description": "replayable or not", - "type": "boolean" - }, - "result": { - "description": "the result of pipeline run. e.g. SUCCESS", - "type": "string" - }, - "runSummary": { - "description": "pipeline run summary", - "type": "string" - }, - "startTime": { - "description": "the time of start", - "type": "string" - }, - "state": { - "description": "run state. e.g. RUNNING", - "type": "string" - }, - "type": { - "description": "source type, such as \"WorkflowRun\"", - "type": "string" } } }, - "devops.PipelineRunList.actions": {}, - "devops.PipelineRunList.artifactsZipFile": {}, - "devops.PipelineRunList.causeOfBlockage": {}, - "devops.PipelineRunList.causes": { - "properties": { - "_class": { - "description": "It’s a fully qualified name and is an identifier of the producer of this resource's capability.", - "type": "string" - }, - "shortDescription": { - "description": "short description", - "type": "string" - }, - "userId": { - "description": "user id", - "type": "string" - }, - "userName": { - "description": "user name", - "type": "string" - } - } - }, - "devops.PipelineRunList.changeSet": {}, - "devops.PipelineRunList.commitUrl": {}, - "devops.PipelineRunList.description": {}, - "devops.PipelineRunList.name": {}, - "devops.PipelineRunList.pullRequest": {}, "devops.PipelineRunNodes": { "properties": { "_class": { @@ -11679,6 +13300,20 @@ } } }, + "iam.PasswordReset": { + "required": [ + "currentPassword", + "password" + ], + "properties": { + "currentPassword": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, "inf.Dec": { "required": [ "unscaled", @@ -11991,6 +13626,21 @@ } } }, + "monitoring.MetricLabelSet": { + "required": [ + "data" + ], + "properties": { + "data": { + "description": "actual array of results", + "type": "array", + "items": { + "$ref": "#/definitions/monitoring.MetricLabelSet.data" + } + } + } + }, + "monitoring.MetricLabelSet.data": {}, "monitoring.MetricValue": { "properties": { "metric": { @@ -12002,10 +13652,7 @@ }, "value": { "description": "time series, values of vector type", - "type": "array", - "items": { - "type": "number" - } + "type": "string" }, "values": { "description": "time series, values of matrix type", @@ -12046,868 +13693,6 @@ } }, "monitoring.Point": {}, - "openpitrix.App": { - "required": [ - "category_set" - ], - "properties": { - "abstraction": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "app_id": { - "type": "string" - }, - "app_version_types": { - "type": "string" - }, - "category_set": { - "type": "array", - "items": { - "$ref": "#/definitions/openpitrix.ResourceCategory" - } - }, - "chart_name": { - "type": "string" - }, - "cluster_total": { - "type": "integer", - "format": "int32" - }, - "company_join_time": { - "type": "string" - }, - "company_name": { - "type": "string" - }, - "company_profile": { - "type": "string" - }, - "company_website": { - "type": "string" - }, - "create_time": { - "type": "string" - }, - "description": { - "type": "string" - }, - "home": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "isv": { - "type": "string" - }, - "keywords": { - "type": "string" - }, - "latest_app_version": { - "$ref": "#/definitions/openpitrix.AppVersion" - }, - "maintainers": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "readme": { - "type": "string" - }, - "repo_id": { - "type": "string" - }, - "screenshots": { - "type": "string" - }, - "sources": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - }, - "tos": { - "type": "string" - }, - "update_time": { - "type": "string" - } - } - }, - "openpitrix.AppVersion": { - "properties": { - "active": { - "type": "boolean" - }, - "app_id": { - "type": "string" - }, - "cluster_total": { - "type": "integer", - "format": "int32" - }, - "create_time": { - "type": "string" - }, - "description": { - "type": "string" - }, - "home": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "keywords": { - "type": "string" - }, - "maintainers": { - "type": "string" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "package_name": { - "type": "string" - }, - "readme": { - "type": "string" - }, - "review_id": { - "type": "string" - }, - "screenshots": { - "type": "string" - }, - "sequence": { - "type": "integer", - "format": "int64" - }, - "sources": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - }, - "type": { - "type": "string" - }, - "update_time": { - "type": "string" - }, - "version_id": { - "type": "string" - } - } - }, - "openpitrix.AppVersionAudit": { - "properties": { - "app_id": { - "type": "string" - }, - "app_name": { - "type": "string" - }, - "message": { - "type": "string" - }, - "operator": { - "type": "string" - }, - "operator_type": { - "type": "string" - }, - "review_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - }, - "version_id": { - "type": "string" - }, - "version_name": { - "type": "string" - }, - "version_type": { - "type": "string" - } - } - }, - "openpitrix.AppVersionReview": { - "properties": { - "app_id": { - "type": "string" - }, - "app_name": { - "type": "string" - }, - "phase": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/openpitrix.AppVersionReviewPhase" - } - }, - "review_id": { - "type": "string" - }, - "reviewer": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - }, - "version_id": { - "type": "string" - }, - "version_name": { - "type": "string" - }, - "version_type": { - "type": "string" - } - } - }, - "openpitrix.AppVersionReviewPhase": { - "properties": { - "message": { - "type": "string" - }, - "operator": { - "type": "string" - }, - "operator_type": { - "type": "string" - }, - "review_time": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - } - } - }, - "openpitrix.Application": { - "required": [ - "name" - ], - "properties": { - "app": { - "description": "application template info", - "$ref": "#/definitions/openpitrix.App" - }, - "cluster": { - "description": "application cluster info", - "$ref": "#/definitions/openpitrix.Cluster" - }, - "ingresses": { - "description": "application ingresses", - "type": "array", - "items": { - "$ref": "#/definitions/v1beta1.Ingress" - } - }, - "name": { - "description": "application name", - "type": "string" - }, - "services": { - "description": "application services", - "type": "array", - "items": { - "$ref": "#/definitions/v1.Service" - } - }, - "version": { - "description": "application template version info", - "$ref": "#/definitions/openpitrix.AppVersion" - }, - "workloads": { - "description": "application workloads", - "$ref": "#/definitions/openpitrix.workLoads" - } - } - }, - "openpitrix.Attachment": { - "properties": { - "attachment_content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/strfmt.Base64" - } - }, - "attachment_id": { - "type": "string" - }, - "create_time": { - "type": "string" - } - } - }, - "openpitrix.Category": { - "properties": { - "app_total": { - "type": "integer", - "format": "int32" - }, - "category_id": { - "type": "string" - }, - "create_time": { - "type": "string" - }, - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "update_time": { - "type": "string" - } - } - }, - "openpitrix.Cluster": { - "properties": { - "additional_info": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "cluster_id": { - "type": "string" - }, - "cluster_type": { - "type": "integer", - "format": "int64" - }, - "create_time": { - "type": "string" - }, - "debug": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "endpoints": { - "type": "string" - }, - "env": { - "type": "string" - }, - "frontgate_id": { - "type": "string" - }, - "global_uuid": { - "type": "string" - }, - "metadata_root_access": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "runtime_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - }, - "subnet_id": { - "type": "string" - }, - "transition_status": { - "type": "string" - }, - "upgrade_status": { - "type": "string" - }, - "upgrade_time": { - "type": "string" - }, - "version_id": { - "type": "string" - }, - "vpc_id": { - "type": "string" - }, - "zone": { - "type": "string" - } - } - }, - "openpitrix.CreateAppRequest": { - "properties": { - "icon": { - "type": "string" - }, - "isv": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version_name": { - "type": "string" - }, - "version_package": { - "type": "string" - }, - "version_type": { - "type": "string" - } - } - }, - "openpitrix.CreateAppResponse": { - "properties": { - "app_id": { - "type": "string" - }, - "version_id": { - "type": "string" - } - } - }, - "openpitrix.CreateAppVersionRequest": { - "properties": { - "app_id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "package": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "openpitrix.CreateAppVersionResponse": { - "properties": { - "version_id": { - "type": "string" - } - } - }, - "openpitrix.CreateCategoryRequest": { - "properties": { - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "openpitrix.CreateCategoryResponse": { - "properties": { - "category_id": { - "type": "string" - } - } - }, - "openpitrix.CreateClusterRequest": { - "required": [ - "advanced_param" - ], - "properties": { - "advanced_param": { - "type": "array", - "items": { - "type": "string" - } - }, - "app_id": { - "type": "string" - }, - "conf": { - "type": "string" - }, - "runtime_id": { - "type": "string" - }, - "version_id": { - "type": "string" - } - } - }, - "openpitrix.CreateRepoRequest": { - "required": [ - "providers" - ], - "properties": { - "app_default_status": { - "type": "string" - }, - "category_id": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "workspace": { - "type": "string" - } - } - }, - "openpitrix.CreateRepoResponse": { - "properties": { - "repo_id": { - "type": "string" - } - } - }, - "openpitrix.GetAppVersionPackageFilesResponse": { - "properties": { - "files": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/strfmt.Base64" - } - }, - "version_id": { - "type": "string" - } - } - }, - "openpitrix.GetAppVersionPackageResponse": { - "properties": { - "app_id": { - "type": "string" - }, - "package": { - "type": "string" - }, - "version_id": { - "type": "string" - } - } - }, - "openpitrix.ModifyAppVersionRequest": { - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "package": { - "type": "string" - }, - "package_files": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest.package_files" - } - }, - "version_id": { - "type": "string" - } - } - }, - "openpitrix.ModifyCategoryRequest": { - "properties": { - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "openpitrix.ModifyClusterAttributesRequest": { - "properties": { - "cluster_id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "openpitrix.ModifyRepoRequest": { - "required": [ - "providers" - ], - "properties": { - "app_default_status": { - "type": "string" - }, - "category_id": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "workspace": { - "type": "string" - } - } - }, - "openpitrix.Repo": { - "required": [ - "category_set", - "labels", - "providers", - "selectors" - ], - "properties": { - "app_default_status": { - "type": "string" - }, - "category_set": { - "type": "array", - "items": { - "$ref": "#/definitions/openpitrix.ResourceCategory" - } - }, - "controller": { - "type": "integer", - "format": "int32" - }, - "create_time": { - "type": "string" - }, - "credential": { - "type": "string" - }, - "description": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "$ref": "#/definitions/openpitrix.RepoLabel" - } - }, - "name": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "providers": { - "type": "array", - "items": { - "type": "string" - } - }, - "repo_id": { - "type": "string" - }, - "selectors": { - "type": "array", - "items": { - "$ref": "#/definitions/openpitrix.RepoSelector" - } - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "visibility": { - "type": "string" - } - } - }, - "openpitrix.RepoActionRequest": { - "required": [ - "action" - ], - "properties": { - "action": { - "type": "string" - } - } - }, - "openpitrix.RepoLabel": { - "properties": { - "create_time": { - "type": "string" - }, - "label_key": { - "type": "string" - }, - "label_value": { - "type": "string" - } - } - }, - "openpitrix.RepoSelector": { - "properties": { - "create_time": { - "type": "string" - }, - "selector_key": { - "type": "string" - }, - "selector_value": { - "type": "string" - } - } - }, - "openpitrix.ResourceCategory": { - "properties": { - "category_id": { - "type": "string" - }, - "create_time": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string" - }, - "status_time": { - "type": "string" - } - } - }, - "openpitrix.workLoads": { - "properties": { - "daemonsets": { - "description": "daemonset list", - "type": "array", - "items": { - "$ref": "#/definitions/v1.DaemonSet" - } - }, - "deployments": { - "description": "deployment list", - "type": "array", - "items": { - "$ref": "#/definitions/v1.Deployment" - } - }, - "statefulsets": { - "description": "statefulset list", - "type": "array", - "items": { - "$ref": "#/definitions/v1.StatefulSet" - } - } - } - }, "prometheus.Metric": { "required": [ "matrix", @@ -13376,6 +14161,18 @@ } } }, + "v1.AggregationRule": { + "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "properties": { + "clusterRoleSelectors": { + "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LabelSelector" + } + } + } + }, "v1.AzureDataDiskCachingMode": {}, "v1.AzureDataDiskKind": {}, "v1.AzureDiskVolumeSource": { @@ -13552,6 +14349,37 @@ } } }, + "v1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "required": [ + "rules" + ], + "properties": { + "aggregationRule": { + "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + "$ref": "#/definitions/v1.AggregationRule" + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PolicyRule" + } + } + } + }, "v1.ConfigMapEnvSource": { "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", "properties": { @@ -13938,169 +14766,6 @@ } } }, - "v1.Deployment": { - "description": "Deployment enables declarative updates for Pods and ReplicaSets.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata.", - "$ref": "#/definitions/v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the Deployment.", - "$ref": "#/definitions/v1.DeploymentSpec" - }, - "status": { - "description": "Most recently observed status of the Deployment.", - "$ref": "#/definitions/v1.DeploymentStatus" - } - } - }, - "v1.DeploymentCondition": { - "description": "DeploymentCondition describes the state of a deployment at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "type": "string" - }, - "lastUpdateTime": { - "description": "The last time this condition was updated.", - "type": "string" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of deployment condition.", - "type": "string" - } - } - }, - "v1.DeploymentSpec": { - "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", - "required": [ - "selector", - "template" - ], - "properties": { - "minReadySeconds": { - "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - "type": "integer", - "format": "int32" - }, - "paused": { - "description": "Indicates that the deployment is paused.", - "type": "boolean" - }, - "progressDeadlineSeconds": { - "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", - "$ref": "#/definitions/v1.LabelSelector" - }, - "strategy": { - "description": "The deployment strategy to use to replace existing pods with new ones.", - "$ref": "#/definitions/v1.DeploymentStrategy" - }, - "template": { - "description": "Template describes the pods that will be created.", - "$ref": "#/definitions/v1.PodTemplateSpec" - } - } - }, - "v1.DeploymentStatus": { - "description": "DeploymentStatus is the most recently observed status of the Deployment.", - "properties": { - "availableReplicas": { - "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "collisionCount": { - "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a deployment's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/v1.DeploymentCondition" - } - }, - "observedGeneration": { - "description": "The generation observed by the deployment controller.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "Total number of ready pods targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - "type": "integer", - "format": "int32" - }, - "unavailableReplicas": { - "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "type": "integer", - "format": "int32" - }, - "updatedReplicas": { - "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - "type": "integer", - "format": "int32" - } - } - }, - "v1.DeploymentStrategy": { - "description": "DeploymentStrategy describes how to replace existing pods with new ones.", - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - "$ref": "#/definitions/v1.RollingUpdateDeployment" - }, - "type": { - "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - "type": "string" - } - } - }, "v1.DownwardAPIProjection": { "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", "properties": { @@ -14213,7 +14878,7 @@ "$ref": "#/definitions/v1.ConfigMapKeySelector" }, "fieldRef": { - "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", + "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", "$ref": "#/definitions/v1.ObjectFieldSelector" }, "resourceFieldRef": { @@ -15130,7 +15795,7 @@ "type": "string" }, "finalizers": { - "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", "type": "array", "items": { "type": "string" @@ -15714,7 +16379,7 @@ "type": "string" }, "shareProcessNamespace": { - "description": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. This field is beta-level and may be disabled with the PodShareProcessNamespace feature.", + "description": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", "type": "boolean" }, "subdomain": { @@ -16162,6 +16827,33 @@ } } }, + "v1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PolicyRule" + } + } + } + }, "v1.RollingUpdateDaemonSet": { "description": "Spec to control the desired behavior of daemon set rolling update.", "properties": { @@ -16171,19 +16863,6 @@ } } }, - "v1.RollingUpdateDeployment": { - "description": "Spec to control the desired behavior of rolling update.", - "properties": { - "maxSurge": { - "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", - "type": "string" - }, - "maxUnavailable": { - "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "type": "string" - } - } - }, "v1.RollingUpdateStatefulSetStrategy": { "description": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", "properties": { @@ -16265,6 +16944,41 @@ } } }, + "v1.Secret": { + "description": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "data": { + "description": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1.Secret.data" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "stringData": { + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Used to facilitate programmatic handling of secret data.", + "type": "string" + } + } + }, "v1.SecretEnvSource": { "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", "properties": { @@ -16547,6 +17261,13 @@ "description": "sessionAffinityConfig contains the configurations of session affinity.", "$ref": "#/definitions/v1.SessionAffinityConfig" }, + "topologyKeys": { + "description": "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied.", + "type": "array", + "items": { + "type": "string" + } + }, "type": { "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", "type": "string" @@ -17039,7 +17760,7 @@ "type": "string" }, "subPathExpr": { - "description": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is beta in 1.15.", + "description": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", "type": "string" } } @@ -17119,7 +17840,7 @@ "type": "string" }, "runAsUserName": { - "description": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.", + "description": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag.", "type": "string" } } @@ -17140,6 +17861,16 @@ } } }, + "v1alpha1.WorkspaceSpec": { + "properties": { + "manager": { + "type": "string" + }, + "networkIsolation": { + "type": "boolean" + } + } + }, "v1alpha2.APIResponse": { "properties": { "histogram": { @@ -17156,16 +17887,6 @@ } } }, - "v1alpha2.AggregationRule": { - "properties": { - "roleSelectors": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.LabelSelector" - } - } - } - }, "v1alpha2.BadRequestError": { "required": [ "status", @@ -17347,15 +18068,11 @@ } } }, - "v1alpha2.FinalizerName": {}, "v1alpha2.GlobalRole": { "required": [ "rules" ], "properties": { - "aggregationRule": { - "$ref": "#/definitions/v1alpha2.AggregationRule" - }, "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" @@ -17375,30 +18092,6 @@ } } }, - "v1alpha2.GraphResponse": { - "required": [ - "duration", - "graphType", - "elements", - "timestamp" - ], - "properties": { - "duration": { - "type": "integer", - "format": "int64" - }, - "elements": { - "$ref": "#/definitions/cytoscape.Elements" - }, - "graphType": { - "type": "string" - }, - "timestamp": { - "type": "integer", - "format": "int64" - } - } - }, "v1alpha2.HealthStatus": { "required": [ "kubesphereStatus", @@ -17418,6 +18111,20 @@ } } }, + "v1alpha2.Member": { + "required": [ + "username", + "roleRef" + ], + "properties": { + "roleRef": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "v1alpha2.MetadataRow": { "required": [ "id", @@ -17513,32 +18220,12 @@ } } }, - "v1alpha2.MetricsResponse": { - "required": [ - "histograms", - "metrics" - ], - "properties": { - "histograms": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/prometheus.Metrics.histograms" - } - }, - "metrics": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/prometheus.Metric" - } - } - } - }, "v1alpha2.Node": { "required": [ - "labelMinor", - "rank", "id", "label", + "rank", + "labelMinor", "controls" ], "properties": { @@ -17879,47 +18566,9 @@ } } }, - "v1alpha2.UserCondition": { - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "v1alpha2.UserDetail": { - "required": [ - "User", - "globalRole" - ], - "properties": { - "User": { - "$ref": "#/definitions/v1alpha2.User" - }, - "globalRole": { - "$ref": "#/definitions/v1alpha2.GlobalRole" - } - } - }, "v1alpha2.UserSpec": { "required": [ - "email", - "password" + "email" ], "properties": { "description": { @@ -17931,12 +18580,6 @@ "email": { "type": "string" }, - "finalizers": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha2.FinalizerName" - } - }, "groups": { "type": "array", "items": { @@ -17953,17 +18596,62 @@ }, "v1alpha2.UserStatus": { "properties": { - "conditions": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha2.UserCondition" - } + "lastLoginTime": { + "type": "string" + }, + "lastTransitionTime": { + "type": "string" + }, + "reason": { + "type": "string" }, "state": { "type": "string" } } }, + "v1alpha2.WorkspaceRole": { + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.PolicyRule" + } + } + } + }, + "v1alpha2.WorkspaceTemplate": { + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1beta1.FederatedWorkspaceSpec" + } + } + }, "v1alpha2.appHealthResponse": { "required": [ "workloadStatuses", @@ -17981,6 +18669,50 @@ } } }, + "v1alpha2.graphResponse": { + "required": [ + "duration", + "graphType", + "elements", + "timestamp" + ], + "properties": { + "duration": { + "type": "integer", + "format": "int64" + }, + "elements": { + "$ref": "#/definitions/cytoscape.Elements" + }, + "graphType": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + } + } + }, + "v1alpha2.metricsResponse": { + "required": [ + "metrics", + "histograms" + ], + "properties": { + "histograms": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/prometheus.Metrics.histograms" + } + }, + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/prometheus.Metric" + } + } + } + }, "v1alpha2.namespaceAppHealthResponse": { "required": [ "NamespaceAppHealth" @@ -18018,39 +18750,53 @@ } } }, - "v1beta1.HTTPIngressPath": { - "description": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", - "required": [ - "backend" - ], + "v1alpha3.BitbucketServerSource": { "properties": { - "backend": { - "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", - "$ref": "#/definitions/v1beta1.IngressBackend" + "api_uri": { + "description": "The api url can specify the location of the github apiserver.For private cloud configuration", + "type": "string" }, - "path": { - "description": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", + "credential_id": { + "description": "credential id to access github source", + "type": "string" + }, + "discover_branches": { + "description": "Discover branch configuration", + "type": "integer", + "format": "int32" + }, + "discover_pr_from_forks": { + "description": "Discover fork PR configuration", + "$ref": "#/definitions/v1alpha3.DiscoverPRFromForks" + }, + "discover_pr_from_origin": { + "description": "Discover origin PR configuration", + "type": "integer", + "format": "int32" + }, + "git_clone_option": { + "description": "advavced git clone options", + "$ref": "#/definitions/v1alpha3.GitCloneOption" + }, + "owner": { + "description": "owner of github repo", + "type": "string" + }, + "regex_filter": { + "description": "Regex used to match the name of the branch that needs to be run", + "type": "string" + }, + "repo": { + "description": "repo name of github repo", + "type": "string" + }, + "scm_id": { + "description": "uid of scm", "type": "string" } } }, - "v1beta1.HTTPIngressRuleValue": { - "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://\u003chost\u003e/\u003cpath\u003e?\u003csearchpart\u003e -\u003e backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", - "required": [ - "paths" - ], - "properties": { - "paths": { - "description": "A collection of paths that map requests to backends.", - "type": "array", - "items": { - "$ref": "#/definitions/v1beta1.HTTPIngressPath" - } - } - } - }, - "v1beta1.Ingress": { - "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.", + "v1alpha3.DevOpsProject": { "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -18061,93 +18807,461 @@ "type": "string" }, "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "$ref": "#/definitions/v1.ObjectMeta" }, "spec": { - "description": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - "$ref": "#/definitions/v1beta1.IngressSpec" + "$ref": "#/definitions/v1alpha3.DevOpsProjectSpec" }, "status": { - "description": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - "$ref": "#/definitions/v1beta1.IngressStatus" + "$ref": "#/definitions/v1alpha3.DevOpsProjectStatus" } } }, - "v1beta1.IngressBackend": { - "description": "IngressBackend describes all endpoints for a given service and port.", + "v1alpha3.DevOpsProjectSpec": {}, + "v1alpha3.DevOpsProjectStatus": { + "properties": { + "adminNamespace": { + "type": "string" + } + } + }, + "v1alpha3.DiscarderProperty": { + "properties": { + "days_to_keep": { + "description": "days to keep pipeline", + "type": "string" + }, + "num_to_keep": { + "description": "nums to keep pipeline", + "type": "string" + } + } + }, + "v1alpha3.DiscoverPRFromForks": { + "properties": { + "strategy": { + "description": "github discover strategy", + "type": "integer", + "format": "int32" + }, + "trust": { + "description": "trust user type", + "type": "integer", + "format": "int32" + } + } + }, + "v1alpha3.GitCloneOption": { + "properties": { + "depth": { + "description": "git clone depth", + "type": "integer", + "format": "int32" + }, + "shallow": { + "description": "Whether to use git shallow clone", + "type": "boolean" + }, + "timeout": { + "description": "git clone timeout mins", + "type": "integer", + "format": "int32" + } + } + }, + "v1alpha3.GitSource": { + "properties": { + "credential_id": { + "description": "credential id to access git source", + "type": "string" + }, + "discover_branches": { + "description": "Whether to discover a branch", + "type": "boolean" + }, + "git_clone_option": { + "description": "advavced git clone options", + "$ref": "#/definitions/v1alpha3.GitCloneOption" + }, + "regex_filter": { + "description": "Regex used to match the name of the branch that needs to be run", + "type": "string" + }, + "scm_id": { + "description": "uid of scm", + "type": "string" + }, + "url": { + "description": "url of git source", + "type": "string" + } + } + }, + "v1alpha3.GithubSource": { + "properties": { + "api_uri": { + "description": "The api url can specify the location of the github apiserver.For private cloud configuration", + "type": "string" + }, + "credential_id": { + "description": "credential id to access github source", + "type": "string" + }, + "discover_branches": { + "description": "Discover branch configuration", + "type": "integer", + "format": "int32" + }, + "discover_pr_from_forks": { + "description": "Discover fork PR configuration", + "$ref": "#/definitions/v1alpha3.DiscoverPRFromForks" + }, + "discover_pr_from_origin": { + "description": "Discover origin PR configuration", + "type": "integer", + "format": "int32" + }, + "git_clone_option": { + "description": "advavced git clone options", + "$ref": "#/definitions/v1alpha3.GitCloneOption" + }, + "owner": { + "description": "owner of github repo", + "type": "string" + }, + "regex_filter": { + "description": "Regex used to match the name of the branch that needs to be run", + "type": "string" + }, + "repo": { + "description": "repo name of github repo", + "type": "string" + }, + "scm_id": { + "description": "uid of scm", + "type": "string" + } + } + }, + "v1alpha3.MultiBranchJobTrigger": { + "properties": { + "create_action_job_to_trigger": { + "description": "pipeline name to trigger", + "type": "string" + }, + "delete_action_job_to_trigger": { + "description": "pipeline name to trigger", + "type": "string" + } + } + }, + "v1alpha3.MultiBranchPipeline": { "required": [ - "serviceName", - "servicePort" + "name", + "source_type", + "script_path" ], "properties": { - "serviceName": { - "description": "Specifies the name of the referenced service.", + "bitbucket_server_source": { + "description": "bitbucket server scm defile", + "$ref": "#/definitions/v1alpha3.BitbucketServerSource" + }, + "description": { + "description": "description of pipeline", "type": "string" }, - "servicePort": { - "description": "Specifies the port of the referenced service.", + "discarder": { + "description": "Discarder of pipeline, managing when to drop a pipeline", + "$ref": "#/definitions/v1alpha3.DiscarderProperty" + }, + "git_source": { + "description": "git scm define", + "$ref": "#/definitions/v1alpha3.GitSource" + }, + "github_source": { + "description": "github scm define", + "$ref": "#/definitions/v1alpha3.GithubSource" + }, + "multibranch_job_trigger": { + "description": "Pipeline tasks that need to be triggered when branch creation/deletion", + "$ref": "#/definitions/v1alpha3.MultiBranchJobTrigger" + }, + "name": { + "description": "name of pipeline", "type": "string" + }, + "script_path": { + "description": "script path in scm", + "type": "string" + }, + "single_svn_source": { + "description": "single branch svn scm define", + "$ref": "#/definitions/v1alpha3.SingleSvnSource" + }, + "source_type": { + "description": "type of scm, such as github/git/svn", + "type": "string" + }, + "svn_source": { + "description": "multi branch svn scm define", + "$ref": "#/definitions/v1alpha3.SvnSource" + }, + "timer_trigger": { + "description": "Timer to trigger pipeline run", + "$ref": "#/definitions/v1alpha3.TimerTrigger" } } }, - "v1beta1.IngressRule": { - "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "v1alpha3.NoScmPipeline": { + "required": [ + "name" + ], "properties": { - "host": { - "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", + "description": { + "description": "description of pipeline", "type": "string" }, - "http": { - "$ref": "#/definitions/v1beta1.HTTPIngressRuleValue" - } - } - }, - "v1beta1.IngressSpec": { - "description": "IngressSpec describes the Ingress the user wishes to exist.", - "properties": { - "backend": { - "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - "$ref": "#/definitions/v1beta1.IngressBackend" + "disable_concurrent": { + "description": "Whether to prohibit the pipeline from running in parallel", + "type": "boolean" }, - "rules": { - "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "discarder": { + "description": "Discarder of pipeline, managing when to drop a pipeline", + "$ref": "#/definitions/v1alpha3.DiscarderProperty" + }, + "jenkinsfile": { + "description": "Jenkinsfile's content'", + "type": "string" + }, + "name": { + "description": "name of pipeline", + "type": "string" + }, + "parameters": { + "description": "Parameters define of pipeline,user could pass param when run pipeline", "type": "array", "items": { - "$ref": "#/definitions/v1beta1.IngressRule" + "$ref": "#/definitions/v1alpha3.Parameter" } }, - "tls": { - "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "remote_trigger": { + "description": "Remote api define to trigger pipeline run", + "$ref": "#/definitions/v1alpha3.RemoteTrigger" + }, + "timer_trigger": { + "description": "Timer to trigger pipeline run", + "$ref": "#/definitions/v1alpha3.TimerTrigger" + } + } + }, + "v1alpha3.Parameter": { + "required": [ + "name", + "type" + ], + "properties": { + "default_value": { + "description": "default value of param", + "type": "string" + }, + "description": { + "description": "description of pipeline", + "type": "string" + }, + "name": { + "description": "name of param", + "type": "string" + }, + "type": { + "description": "type of param", + "type": "string" + } + } + }, + "v1alpha3.Pipeline": { + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha3.PipelineSpec" + }, + "status": { + "$ref": "#/definitions/v1alpha3.PipelineStatus" + } + } + }, + "v1alpha3.PipelineSpec": { + "required": [ + "type" + ], + "properties": { + "multi_branch_pipeline": { + "description": "in scm pipeline structs", + "$ref": "#/definitions/v1alpha3.MultiBranchPipeline" + }, + "pipeline": { + "description": "no scm pipeline structs", + "$ref": "#/definitions/v1alpha3.NoScmPipeline" + }, + "type": { + "description": "type of devops pipeline, in scm or no scm", + "type": "string" + } + } + }, + "v1alpha3.PipelineStatus": {}, + "v1alpha3.RemoteTrigger": { + "properties": { + "token": { + "description": "remote trigger token", + "type": "string" + } + } + }, + "v1alpha3.SingleSvnSource": { + "properties": { + "credential_id": { + "description": "credential id to access svn source", + "type": "string" + }, + "remote": { + "description": "remote address url", + "type": "string" + }, + "scm_id": { + "description": "uid of scm", + "type": "string" + } + } + }, + "v1alpha3.SvnSource": { + "properties": { + "credential_id": { + "description": "credential id to access svn source", + "type": "string" + }, + "excludes": { + "description": "branches do not run pipeline", + "type": "string" + }, + "includes": { + "description": "branches to run pipeline", + "type": "string" + }, + "remote": { + "description": "remote address url", + "type": "string" + }, + "scm_id": { + "description": "uid of scm", + "type": "string" + } + } + }, + "v1alpha3.TimerTrigger": { + "properties": { + "cron": { + "description": "jenkins cron script", + "type": "string" + }, + "interval": { + "description": "interval ms", + "type": "string" + } + } + }, + "v1beta1.ClusterOverride": { + "required": [ + "path" + ], + "properties": { + "op": { + "type": "string" + }, + "path": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1beta1.FederatedWorkspaceSpec": { + "required": [ + "template", + "placement" + ], + "properties": { + "overrides": { "type": "array", "items": { - "$ref": "#/definitions/v1beta1.IngressTLS" + "$ref": "#/definitions/v1beta1.GenericOverrideItem" + } + }, + "placement": { + "$ref": "#/definitions/v1beta1.GenericPlacementFields" + }, + "template": { + "$ref": "#/definitions/v1beta1.WorkspaceTemplate" + } + } + }, + "v1beta1.GenericClusterReference": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "v1beta1.GenericOverrideItem": { + "required": [ + "clusterName" + ], + "properties": { + "clusterName": { + "type": "string" + }, + "clusterOverrides": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ClusterOverride" } } } }, - "v1beta1.IngressStatus": { - "description": "IngressStatus describe the current state of the Ingress.", + "v1beta1.GenericPlacementFields": { "properties": { - "loadBalancer": { - "description": "LoadBalancer contains the current status of the load-balancer.", - "$ref": "#/definitions/v1.LoadBalancerStatus" + "clusterSelector": { + "$ref": "#/definitions/v1.LabelSelector" + }, + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.GenericClusterReference" + } } } }, - "v1beta1.IngressTLS": { - "description": "IngressTLS describes the transport layer security associated with an Ingress.", + "v1beta1.WorkspaceTemplate": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", "properties": { - "hosts": { - "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", - "type": "array", - "items": { - "type": "string" - } + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" }, - "secretName": { - "description": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", - "type": "string" + "spec": { + "$ref": "#/definitions/v1alpha1.WorkspaceSpec" } } } diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 74d0fde9b..ff5ff3ee3 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -128,7 +128,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -286,7 +286,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -872,7 +872,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -973,7 +973,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -1127,7 +1127,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -1285,7 +1285,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -1856,7 +1856,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -2014,7 +2014,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -2585,7 +2585,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -2743,7 +2743,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -3314,7 +3314,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -3472,7 +3472,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4058,7 +4058,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4159,7 +4159,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4268,7 +4268,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4369,7 +4369,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4478,7 +4478,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4579,7 +4579,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4688,7 +4688,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4789,7 +4789,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -4913,7 +4913,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -5071,7 +5071,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -5642,7 +5642,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -5800,7 +5800,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -6386,7 +6386,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -6487,7 +6487,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -6596,7 +6596,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -6697,7 +6697,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -6851,7 +6851,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -7009,7 +7009,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -7595,7 +7595,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -7696,7 +7696,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -7865,7 +7865,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -7966,7 +7966,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -8060,7 +8060,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -8218,7 +8218,7 @@ { "uniqueItems": true, "type": "boolean", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", "name": "allowWatchBookmarks", "in": "query" }, @@ -9059,6 +9059,11 @@ "group": "tenant.kubesphere.io", "kind": "DeleteOptions", "version": "v1alpha1" + }, + { + "group": "tenant.kubesphere.io", + "kind": "DeleteOptions", + "version": "v1alpha2" } ] }, @@ -9166,7 +9171,7 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }, "finalizers": { - "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", "type": "array", "items": { "type": "string" @@ -9453,6 +9458,11 @@ "group": "tenant.kubesphere.io", "kind": "WatchEvent", "version": "v1alpha1" + }, + { + "group": "tenant.kubesphere.io", + "kind": "WatchEvent", + "version": "v1alpha2" } ] }, @@ -9591,6 +9601,13 @@ "$ref": "#/definitions/io.kubesphere.kubesphere.pkg.apis.cluster.v1alpha1.ClusterCondition" } }, + "configz": { + "description": "Configz is status of components enabled in the member cluster. This is synchronized with member cluster every amount of time, like 5 minutes.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, "kubernetesVersion": { "description": "GitVersion of the kubernetes cluster, this field is populated by cluster controller", "type": "string" @@ -10897,7 +10914,7 @@ "bitbucket_server_source": { "$ref": "#/definitions/io.kubesphere.kubesphere.pkg.apis.devops.v1alpha3.BitbucketServerSource" }, - "descriptio": { + "description": { "type": "string" }, "discarder": { @@ -10938,7 +10955,7 @@ "name" ], "properties": { - "descriptio": { + "description": { "type": "string" }, "disable_concurrent": { diff --git a/pkg/apis/cluster/v1alpha1/openapi_generated.go b/pkg/apis/cluster/v1alpha1/openapi_generated.go index 520e7e862..8886c25a1 100644 --- a/pkg/apis/cluster/v1alpha1/openapi_generated.go +++ b/pkg/apis/cluster/v1alpha1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The KubeSphere authors. +Copyright 2020 The KubeSphere Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2479,7 +2479,7 @@ func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common. Properties: map[string]spec.Schema{ "fieldRef": { SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", + Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), }, }, @@ -7003,6 +7003,13 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common Format: "int64", }, }, + "insecureSkipTLSVerifyBackend": { + SchemaProps: spec.SchemaProps{ + Description: "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -7387,7 +7394,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "shareProcessNamespace": { SchemaProps: spec.SchemaProps{ - Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. This field is beta-level and may be disabled with the PodShareProcessNamespace feature.", + Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", Type: []string{"boolean"}, Format: "", }, @@ -10067,6 +10074,20 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Format: "", }, }, + "topologyKeys": { + SchemaProps: spec.SchemaProps{ + Description: "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, }, }, @@ -10767,7 +10788,7 @@ func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.O }, "subPathExpr": { SchemaProps: spec.SchemaProps{ - Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is beta in 1.15.", + Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", Type: []string{"string"}, Format: "", }, @@ -11116,7 +11137,7 @@ func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.Reference }, "runAsUserName": { SchemaProps: spec.SchemaProps{ - Description: "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.", + Description: "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag.", Type: []string{"string"}, Format: "", }, @@ -12091,7 +12112,7 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", Type: []string{"boolean"}, Format: "", }, @@ -12328,7 +12349,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -13525,6 +13546,21 @@ func schema_pkg_apis_cluster_v1alpha1_ClusterStatus(ref common.ReferenceCallback Format: "", }, }, + "configz": { + SchemaProps: spec.SchemaProps{ + Description: "Configz is status of components enabled in the member cluster. This is synchronized with member cluster every amount of time, like 5 minutes.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, }, }, }, diff --git a/pkg/apis/devops/v1alpha1/openapi_generated.go b/pkg/apis/devops/v1alpha1/openapi_generated.go index d46bbc4f5..490ee5b68 100644 --- a/pkg/apis/devops/v1alpha1/openapi_generated.go +++ b/pkg/apis/devops/v1alpha1/openapi_generated.go @@ -2505,7 +2505,7 @@ func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common. Properties: map[string]spec.Schema{ "fieldRef": { SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", + Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), }, }, @@ -7029,6 +7029,13 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common Format: "int64", }, }, + "insecureSkipTLSVerifyBackend": { + SchemaProps: spec.SchemaProps{ + Description: "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -7413,7 +7420,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "shareProcessNamespace": { SchemaProps: spec.SchemaProps{ - Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. This field is beta-level and may be disabled with the PodShareProcessNamespace feature.", + Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", Type: []string{"boolean"}, Format: "", }, @@ -10093,6 +10100,20 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Format: "", }, }, + "topologyKeys": { + SchemaProps: spec.SchemaProps{ + Description: "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, }, }, @@ -10793,7 +10814,7 @@ func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.O }, "subPathExpr": { SchemaProps: spec.SchemaProps{ - Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is beta in 1.15.", + Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", Type: []string{"string"}, Format: "", }, @@ -11142,7 +11163,7 @@ func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.Reference }, "runAsUserName": { SchemaProps: spec.SchemaProps{ - Description: "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.", + Description: "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag.", Type: []string{"string"}, Format: "", }, @@ -12117,7 +12138,7 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", Type: []string{"boolean"}, Format: "", }, @@ -12354,7 +12375,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/pkg/apis/devops/v1alpha3/openapi_generated.go b/pkg/apis/devops/v1alpha3/openapi_generated.go index 9fd63b9fb..76b4cdcdc 100644 --- a/pkg/apis/devops/v1alpha3/openapi_generated.go +++ b/pkg/apis/devops/v1alpha3/openapi_generated.go @@ -1069,7 +1069,7 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", Type: []string{"boolean"}, Format: "", }, @@ -1306,7 +1306,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -2692,7 +2692,7 @@ func schema_pkg_apis_devops_v1alpha3_MultiBranchPipeline(ref common.ReferenceCal Format: "", }, }, - "descriptio": { + "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", @@ -2771,7 +2771,7 @@ func schema_pkg_apis_devops_v1alpha3_NoScmPipeline(ref common.ReferenceCallback) Format: "", }, }, - "descriptio": { + "description": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", diff --git a/pkg/apis/network/v1alpha1/openapi_generated.go b/pkg/apis/network/v1alpha1/openapi_generated.go index 0bbf69ce0..52447e1a6 100644 --- a/pkg/apis/network/v1alpha1/openapi_generated.go +++ b/pkg/apis/network/v1alpha1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The KubeSphere authors. +Copyright 2020 The KubeSphere Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1392,7 +1392,7 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", Type: []string{"boolean"}, Format: "", }, @@ -1629,7 +1629,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/pkg/apis/servicemesh/v1alpha2/openapi_generated.go b/pkg/apis/servicemesh/v1alpha2/openapi_generated.go index 55788b1a8..40301d732 100644 --- a/pkg/apis/servicemesh/v1alpha2/openapi_generated.go +++ b/pkg/apis/servicemesh/v1alpha2/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The KubeSphere authors. +Copyright 2020 The KubeSphere Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1056,7 +1056,7 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", Type: []string{"boolean"}, Format: "", }, @@ -1293,7 +1293,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/pkg/apis/tenant/v1alpha1/openapi_generated.go b/pkg/apis/tenant/v1alpha1/openapi_generated.go index e74e30efe..af2fd7540 100644 --- a/pkg/apis/tenant/v1alpha1/openapi_generated.go +++ b/pkg/apis/tenant/v1alpha1/openapi_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The KubeSphere Authors. +Copyright 2020 The KubeSphere Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1048,7 +1048,7 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "allowWatchBookmarks": { SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.\n\nThis field is beta.", + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", Type: []string{"boolean"}, Format: "", }, @@ -1285,7 +1285,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/pkg/informers/null_informers.go b/pkg/informers/null_informers.go index 30572c02c..ad710f9d8 100644 --- a/pkg/informers/null_informers.go +++ b/pkg/informers/null_informers.go @@ -21,23 +21,37 @@ import ( istioinformers "istio.io/client-go/pkg/informers/externalversions" apiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes/fake" + ksfake "kubesphere.io/kubesphere/pkg/client/clientset/versioned/fake" ksinformers "kubesphere.io/kubesphere/pkg/client/informers/externalversions" appinformers "sigs.k8s.io/application/pkg/client/informers/externalversions" + "time" ) type nullInformerFactory struct { + fakeK8sInformerFactory informers.SharedInformerFactory + fakeKsInformerFactory ksinformers.SharedInformerFactory } func NewNullInformerFactory() InformerFactory { - return &nullInformerFactory{} + fakeClient := fake.NewSimpleClientset() + fakeInformerFactory := informers.NewSharedInformerFactory(fakeClient, time.Minute*10) + + fakeKsClient := ksfake.NewSimpleClientset() + fakeKsInformerFactory := ksinformers.NewSharedInformerFactory(fakeKsClient, time.Minute*10) + + return &nullInformerFactory{ + fakeK8sInformerFactory: fakeInformerFactory, + fakeKsInformerFactory: fakeKsInformerFactory, + } } func (n nullInformerFactory) KubernetesSharedInformerFactory() informers.SharedInformerFactory { - return nil + return n.fakeK8sInformerFactory } func (n nullInformerFactory) KubeSphereSharedInformerFactory() ksinformers.SharedInformerFactory { - return nil + return n.fakeKsInformerFactory } func (n nullInformerFactory) IstioSharedInformerFactory() istioinformers.SharedInformerFactory { diff --git a/pkg/kapis/devops/v1alpha2/register.go b/pkg/kapis/devops/v1alpha2/register.go index fd3fabf41..1e30b0539 100644 --- a/pkg/kapis/devops/v1alpha2/register.go +++ b/pkg/kapis/devops/v1alpha2/register.go @@ -280,7 +280,6 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops Doc("Get steps details inside a activity node. For a node, the steps which defined inside the node."). Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of the CI/CD pipeline")). - Param(webservice.PathParameter("branch", "the name of branch, same as repository branch.")). Param(webservice.PathParameter("run", "pipeline run ID, the unique ID for a pipeline once build.")). Returns(http.StatusOK, RespOK, []devops.NodesDetail{}). Writes(devops.NodesDetail{})) @@ -484,9 +483,7 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops Produces("text/html; charset=utf-8"). Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). Param(webservice.PathParameter("pipeline", "the name of the CI/CD pipeline")). - Param(webservice.QueryParameter("delay", "the delay time to scan"). - Required(false). - DataFormat("delay=%d"))) + Param(webservice.QueryParameter("delay", "the delay time to scan").Required(false).DataFormat("delay=%d"))) // match /job/project-8QnvykoJw4wZ/job/test-1/indexing/consoleText webservice.Route(webservice.GET("/devops/{devops}/pipelines/{pipeline}/consolelog"). @@ -520,9 +517,7 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsScmTag}). Doc("List all organizations of the specified source configuration management (SCM) such as Github."). Param(webservice.PathParameter("scm", "the ID of the source configuration management (SCM).")). - Param(webservice.QueryParameter("credentialId", "credential ID for source configuration management (SCM)."). - Required(true). - DataFormat("credentialId=%s")). + Param(webservice.QueryParameter("credentialId", "credential ID for source configuration management (SCM).").Required(true).DataFormat("credentialId=%s")). Returns(http.StatusOK, RespOK, []devops.SCMOrg{}). Writes([]devops.SCMOrg{})) @@ -533,15 +528,9 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops Doc("List all repositories in the specified organization."). Param(webservice.PathParameter("scm", "The ID of the source configuration management (SCM).")). Param(webservice.PathParameter("organization", "organization ID, such as github username.")). - Param(webservice.QueryParameter("credentialId", "credential ID for SCM."). - Required(true). - DataFormat("credentialId=%s")). - Param(webservice.QueryParameter("pageNumber", "page number."). - Required(true). - DataFormat("pageNumber=%d")). - Param(webservice.QueryParameter("pageSize", "the item count of one page."). - Required(true). - DataFormat("pageSize=%d")). + Param(webservice.QueryParameter("credentialId", "credential ID for SCM.").Required(true).DataFormat("credentialId=%s")). + Param(webservice.QueryParameter("pageNumber", "page number.").Required(true).DataFormat("pageNumber=%d")). + Param(webservice.QueryParameter("pageSize", "the item count of one page.").Required(true).DataFormat("pageSize=%d")). Returns(http.StatusOK, RespOK, devops.OrgRepo{}). Writes(devops.OrgRepo{})) @@ -570,9 +559,7 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsWebhookTag}). Doc("Get commit notification by HTTP GET method. Git webhook will request here."). Produces("text/plain; charset=utf-8"). - Param(webservice.QueryParameter("url", "Git url"). - Required(true). - DataFormat("url=%s"))) + Param(webservice.QueryParameter("url", "Git url").Required(true).DataFormat("url=%s"))) // Gitlab or some other scm managers can only use HTTP method. match /git/notifyCommit/?url= webservice.Route(webservice.POST("/webhook/git"). @@ -581,9 +568,7 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops Doc("Get commit notification by HTTP POST method. Git webhook will request here."). Consumes("application/json"). Produces("text/plain; charset=utf-8"). - Param(webservice.QueryParameter("url", "Git url"). - Required(true). - DataFormat("url=%s"))) + Param(webservice.QueryParameter("url", "Git url").Required(true).DataFormat("url=%s"))) webservice.Route(webservice.POST("/webhook/github"). To(projectPipelineHandler.GithubWebhook). @@ -595,9 +580,7 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops To(projectPipelineHandler.CheckScriptCompile). Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsPipelineTag}). Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). - Param(webservice.QueryParameter("pipeline", "the name of the CI/CD pipeline"). - Required(false). - DataFormat("pipeline=%s")). + Param(webservice.PathParameter("pipeline", "the name of the CI/CD pipeline").DataFormat("pipeline=%s")). Consumes("application/x-www-form-urlencoded", "charset=utf-8"). Produces("application/json", "charset=utf-8"). Doc("Check pipeline script compile."). @@ -609,7 +592,6 @@ func AddPipelineToWebService(webservice *restful.WebService, devopsClient devops To(projectPipelineHandler.CheckCron). Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsPipelineTag}). Param(webservice.PathParameter("devops", "DevOps project's ID, e.g. project-RRRRAzLBlLEm")). - Param(webservice.PathParameter("pipeline", "the name of the CI/CD pipeline")). Produces("application/json", "charset=utf-8"). Doc("Check cron script compile."). Reads(devops.CronData{}). @@ -705,7 +687,8 @@ func AddJenkinsToContainer(webservice *restful.WebService, devopsClient devops.I return err } parse.Path = strings.Trim(parse.Path, "/") - webservice.Route(webservice.GET("/jenkins/{path:*}"). + webservice.Route(webservice.GET("/jenkins/{path:[*]}"). + Param(webservice.PathParameter("path", "Path stands for any suffix path.")). To(func(request *restful.Request, response *restful.Response) { u := request.Request.URL u.Host = parse.Host diff --git a/pkg/kapis/devops/v1alpha3/register.go b/pkg/kapis/devops/v1alpha3/register.go index f4fd03678..085eca8af 100644 --- a/pkg/kapis/devops/v1alpha3/register.go +++ b/pkg/kapis/devops/v1alpha3/register.go @@ -74,7 +74,6 @@ func AddToContainer(container *restful.Container, devopsClient devopsClient.Inte ws.Route(ws.GET("/devops/{devops}/credentials/{credential}"). To(handler.GetCredential). - Param(ws.PathParameter("workspace", "workspace name")). Param(ws.PathParameter("devops", "project name")). Param(ws.PathParameter("credential", "pipeline name")). Doc("get the credential of the specified devops for the current user"). @@ -83,7 +82,6 @@ func AddToContainer(container *restful.Container, devopsClient devopsClient.Inte ws.Route(ws.PUT("/devops/{devops}/credentials/{credential}"). To(handler.UpdateCredential). - Param(ws.PathParameter("workspace", "workspace name")). Param(ws.PathParameter("devops", "project name")). Param(ws.PathParameter("credential", "credential name")). Doc("put the credential of the specified devops for the current user"). @@ -119,6 +117,7 @@ func AddToContainer(container *restful.Container, devopsClient devopsClient.Inte ws.Route(ws.GET("/devops/{devops}/pipelines/{pipeline}"). To(handler.GetPipeline). + Operation("getPipelineByName"). Param(ws.PathParameter("devops", "project name")). Param(ws.PathParameter("pipeline", "pipeline name")). Doc("get the pipeline of the specified devops for the current user"). diff --git a/pkg/kapis/iam/v1alpha2/register.go b/pkg/kapis/iam/v1alpha2/register.go index c4a59462b..c82e461b3 100644 --- a/pkg/kapis/iam/v1alpha2/register.go +++ b/pkg/kapis/iam/v1alpha2/register.go @@ -76,13 +76,16 @@ func AddToContainer(container *restful.Container, im im.IdentityManagementInterf Param(ws.PathParameter("user", "username")). Returns(http.StatusOK, api.StatusOK, iamv1alpha2.User{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) + ws.Route(ws.GET("/users"). To(handler.ListUsers). Doc("List all users in global scope."). Returns(http.StatusOK, api.StatusOK, api.ListResult{Items: []interface{}{iamv1alpha2.User{}}}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) + ws.Route(ws.GET("/users/{user}/loginrecords"). To(handler.ListUserLoginRecords). + Param(ws.PathParameter("user", "username of the user")). Doc("List user's login records."). Returns(http.StatusOK, api.StatusOK, api.ListResult{Items: []interface{}{iamv1alpha2.LoginRecord{}}}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) @@ -261,6 +264,7 @@ func AddToContainer(container *restful.Container, im im.IdentityManagementInterf Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) ws.Route(ws.GET("/globalroles/{globalrole}"). To(handler.DescribeGlobalRole). + Param(ws.PathParameter("globalrole", "global role name")). Doc("Retrieve global role details."). Returns(http.StatusOK, api.StatusOK, iamv1alpha2.GlobalRole{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) @@ -299,6 +303,7 @@ func AddToContainer(container *restful.Container, im im.IdentityManagementInterf Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) ws.Route(ws.GET("/clusterroles/{clusterrole}"). To(handler.DescribeClusterRole). + Param(ws.PathParameter("clusterrole", "cluster role name")). Doc("Retrieve cluster role details."). Returns(http.StatusOK, api.StatusOK, rbacv1.ClusterRole{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.AccessManagementTag})) diff --git a/pkg/kapis/monitoring/v1alpha3/register.go b/pkg/kapis/monitoring/v1alpha3/register.go index 332517f0f..3a799bef2 100644 --- a/pkg/kapis/monitoring/v1alpha3/register.go +++ b/pkg/kapis/monitoring/v1alpha3/register.go @@ -32,11 +32,11 @@ import ( ) const ( - GroupName = "monitoring.kubesphere.io" - RespOK = "ok" + groupName = "monitoring.kubesphere.io" + respOK = "ok" ) -var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"} +var GroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha3"} func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monitoringClient monitoring.Interface, factory informers.InformerFactory, opClient openpitrix.Client) error { ws := runtime.NewWebService(GroupVersion) @@ -48,7 +48,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Doc("Get platform-level metric data."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.KubeSphereMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/cluster"). @@ -61,7 +61,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ClusterMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/nodes"). @@ -79,7 +79,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NodeMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/nodes/{node}"). @@ -93,7 +93,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NodeMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/workspaces"). @@ -111,7 +111,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.WorkspaceMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/workspaces/{workspace}"). @@ -126,7 +126,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("type", "Additional operations. Currently available types is statistics. It retrieves the total number of namespaces, devops projects, members and roles in this workspace at the moment.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.WorkspaceMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/workspaces/{workspace}/namespaces"). @@ -145,7 +145,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces"). @@ -163,7 +163,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}"). @@ -177,7 +177,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/workloads"). @@ -196,7 +196,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.WorkloadMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/workloads/{kind}"). @@ -216,7 +216,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.WorkloadMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/pods"). @@ -235,7 +235,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PodMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/pods/{pod}"). @@ -250,7 +250,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PodMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/workloads/{kind}/{workload}/pods"). @@ -271,7 +271,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PodMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/nodes/{node}/pods"). @@ -290,7 +290,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PodMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/nodes/{node}/pods/{pod}"). @@ -305,7 +305,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PodMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/pods/{pod}/containers"). @@ -325,7 +325,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ContainerMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/pods/{pod}/containers/{container}"). @@ -341,14 +341,14 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ContainerMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/storageclasses/{storageclass}/persistentvolumeclaims"). To(h.handlePVCMetricsQuery). Doc("Get PVC-level metric data of the specific storageclass's PVCs."). Param(ws.PathParameter("storageclass", "The name of the storageclass.").DataType("string").Required(true)). - Param(ws.PathParameter("metrics_filter", "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).").DataType("string").Required(false)). + Param(ws.QueryParameter("metrics_filter", "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).").DataType("string").Required(false)). Param(ws.QueryParameter("resources_filter", "The PVC filter consists of a regexp pattern. It specifies which PVC data to return. For example, the following filter matches any pod whose name begins with redis: `redis.*`.").DataType("string").Required(false)). Param(ws.QueryParameter("start", "Start time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200. ").DataType("string").Required(false)). Param(ws.QueryParameter("end", "End time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200. ").DataType("string").Required(false)). @@ -360,14 +360,14 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PVCMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/persistentvolumeclaims"). To(h.handlePVCMetricsQuery). Doc("Get PVC-level metric data of the specific namespace's PVCs."). Param(ws.PathParameter("namespace", "The name of the namespace.").DataType("string").Required(true)). - Param(ws.PathParameter("metrics_filter", "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).").DataType("string").Required(false)). + Param(ws.QueryParameter("metrics_filter", "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).").DataType("string").Required(false)). Param(ws.QueryParameter("resources_filter", "The PVC filter consists of a regexp pattern. It specifies which PVC data to return. For example, the following filter matches any pod whose name begins with redis: `redis.*`.").DataType("string").Required(false)). Param(ws.QueryParameter("start", "Start time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200. ").DataType("string").Required(false)). Param(ws.QueryParameter("end", "End time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200. ").DataType("string").Required(false)). @@ -379,7 +379,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("limit", "Page size, the maximum number of results in a single page. Defaults to 5.").DataType("integer").Required(false).DefaultValue("5")). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PVCMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/persistentvolumeclaims/{pvc}"). @@ -387,14 +387,14 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Doc("Get PVC-level metric data of a specific PVC. Navigate to the PVC by the PVC's namespace."). Param(ws.PathParameter("namespace", "The name of the namespace.").DataType("string").Required(true)). Param(ws.PathParameter("pvc", "PVC name.").DataType("string").Required(true)). - Param(ws.PathParameter("metrics_filter", "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).").DataType("string").Required(false)). + Param(ws.QueryParameter("metrics_filter", "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).").DataType("string").Required(false)). Param(ws.QueryParameter("start", "Start time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200. ").DataType("string").Required(false)). Param(ws.QueryParameter("end", "End time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200. ").DataType("string").Required(false)). Param(ws.QueryParameter("step", "Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both **start** and **end** are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).").DataType("string").DefaultValue("10m").Required(false)). Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.PVCMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/components/{component}"). @@ -408,7 +408,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.ComponentMetricsTag}). Writes(model.Metrics{}). - Returns(http.StatusOK, RespOK, model.Metrics{})). + Returns(http.StatusOK, respOK, model.Metrics{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/targets/metadata"). @@ -417,7 +417,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.PathParameter("namespace", "The name of the namespace.").DataType("string").Required(true)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.CustomMetricsTag}). Writes(model.Metadata{}). - Returns(http.StatusOK, RespOK, model.Metadata{})). + Returns(http.StatusOK, respOK, model.Metadata{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/targets/labelsets"). @@ -429,7 +429,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("end", "End time of query. It is a string with Unix time format, eg. 1561939200. ").DataType("string").Required(true)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.CustomMetricsTag}). Writes(model.MetricLabelSet{}). - Returns(http.StatusOK, RespOK, model.MetricLabelSet{})). + Returns(http.StatusOK, respOK, model.MetricLabelSet{})). Produces(restful.MIME_JSON) ws.Route(ws.GET("/namespaces/{namespace}/targets/query"). @@ -443,7 +443,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito Param(ws.QueryParameter("time", "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.").DataType("string").Required(false)). Metadata(restfulspec.KeyOpenAPITags, []string{constants.CustomMetricsTag}). Writes(monitoring.Metric{}). - Returns(http.StatusOK, RespOK, monitoring.Metric{})). + Returns(http.StatusOK, respOK, monitoring.Metric{})). Produces(restful.MIME_JSON) c.Add(ws) diff --git a/pkg/kapis/servicemesh/metrics/v1alpha2/register.go b/pkg/kapis/servicemesh/metrics/v1alpha2/register.go index 51bb42171..707488d68 100644 --- a/pkg/kapis/servicemesh/metrics/v1alpha2/register.go +++ b/pkg/kapis/servicemesh/metrics/v1alpha2/register.go @@ -24,9 +24,9 @@ import ( "net/http" ) -const GroupName = "servicemesh.kubesphere.io" +const groupName = "servicemesh.kubesphere.io" -var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} +var GroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha2"} func AddToContainer(c *restful.Container) error { @@ -52,8 +52,8 @@ func AddToContainer(c *restful.Container) error { Param(webservice.QueryParameter("byLabels[]", "list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name").DefaultValue("[]")). Param(webservice.QueryParameter("requestProtocol", "request protocol for the telemetry, e.g. http/tcp/grpc").DefaultValue("all protocols")). Param(webservice.QueryParameter("reporter", "istio telemetry reporter, 'source' or 'destination'").DefaultValue("source")). - Returns(http.StatusOK, "ok", MetricsResponse{}). - Writes(MetricsResponse{})).Produces(restful.MIME_JSON) + Returns(http.StatusOK, "ok", metricsResponse{}). + Writes(metricsResponse{})).Produces(restful.MIME_JSON) // Get app metrics // Get /namespaces/{namespace}/apps/{app}/metrics @@ -73,8 +73,8 @@ func AddToContainer(c *restful.Container) error { Param(webservice.QueryParameter("byLabels[]", "list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name").DefaultValue("[]")). Param(webservice.QueryParameter("requestProtocol", "request protocol for the telemetry, e.g. http/tcp/grpc").DefaultValue("all protocols")). Param(webservice.QueryParameter("reporter", "istio telemetry reporter, 'source' or 'destination'").DefaultValue("source")). - Returns(http.StatusOK, "ok", MetricsResponse{}). - Writes(MetricsResponse{})). + Returns(http.StatusOK, "ok", metricsResponse{}). + Writes(metricsResponse{})). Produces(restful.MIME_JSON) // Get workload metrics @@ -85,7 +85,6 @@ func AddToContainer(c *restful.Container) error { Doc("Get workload metrics from a specific namespace"). Param(webservice.PathParameter("namespace", "name of the namespace").Required(true)). Param(webservice.PathParameter("workload", "name of the workload").Required(true)). - Param(webservice.PathParameter("service", "name of the service")). Param(webservice.QueryParameter("filters[]", "type of metrics type, fetch all metrics when empty, e.g. request_count, request_duration, request_error_count").DefaultValue("[]")). Param(webservice.QueryParameter("queryTime", "from which UNIX time to extract metrics")). Param(webservice.QueryParameter("duration", "duration of the query period, in seconds").DefaultValue("1800")). @@ -96,8 +95,8 @@ func AddToContainer(c *restful.Container) error { Param(webservice.QueryParameter("byLabels[]", "list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name").DefaultValue("[]")). Param(webservice.QueryParameter("requestProtocol", "request protocol for the telemetry, e.g. http/tcp/grpc").DefaultValue("all protocols")). Param(webservice.QueryParameter("reporter", "istio telemetry reporter, 'source' or 'destination'").DefaultValue("source")). - Returns(http.StatusOK, "ok", MetricsResponse{}). - Writes(MetricsResponse{})). + Returns(http.StatusOK, "ok", metricsResponse{}). + Writes(metricsResponse{})). Produces(restful.MIME_JSON) // Get namespace metrics @@ -107,7 +106,6 @@ func AddToContainer(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("Get metrics from a specific namespace"). Param(webservice.PathParameter("namespace", "name of the namespace").Required(true)). - Param(webservice.PathParameter("service", "name of the service")). Param(webservice.QueryParameter("filters[]", "type of metrics type, fetch all metrics when empty, e.g. request_count, request_duration, request_error_count").DefaultValue("[]")). Param(webservice.QueryParameter("queryTime", "from which UNIX time to extract metrics")). Param(webservice.QueryParameter("duration", "duration of the query period, in seconds").DefaultValue("1800")). @@ -118,8 +116,8 @@ func AddToContainer(c *restful.Container) error { Param(webservice.QueryParameter("byLabels[]", "list of labels to use for grouping metrics(via Prometheus 'by' clause), e.g. source_workload, destination_service_name").DefaultValue("[]")). Param(webservice.QueryParameter("requestProtocol", "request protocol for the telemetry, e.g. http/tcp/grpc").DefaultValue("all protocols")). Param(webservice.QueryParameter("reporter", "istio telemetry reporter, 'source' or 'destination'").DefaultValue("source")). - Returns(http.StatusOK, "ok", MetricsResponse{}). - Writes(MetricsResponse{})).Produces(restful.MIME_JSON) + Returns(http.StatusOK, "ok", metricsResponse{}). + Writes(metricsResponse{})).Produces(restful.MIME_JSON) // Get namespace graph // Get /namespaces/{namespace}/graph @@ -135,8 +133,8 @@ func AddToContainer(c *restful.Container) error { Param(webservice.QueryParameter("injectServiceNodes", "flag for injecting the requested service node between source and destination nodes.").DefaultValue("false")). Returns(http.StatusBadRequest, "bad request", BadRequestError{}). Returns(http.StatusNotFound, "not found", NotFoundError{}). - Returns(http.StatusOK, "ok", GraphResponse{}). - Writes(GraphResponse{})).Produces(restful.MIME_JSON) + Returns(http.StatusOK, "ok", graphResponse{}). + Writes(graphResponse{})).Produces(restful.MIME_JSON) // Get namespaces graph, for multiple namespaces // Get /namespaces/graph @@ -151,8 +149,8 @@ func AddToContainer(c *restful.Container) error { Param(webservice.QueryParameter("injectServiceNodes", "flag for injecting the requested service node between source and destination nodes.").DefaultValue("false")). Returns(http.StatusBadRequest, "bad request", BadRequestError{}). Returns(http.StatusNotFound, "not found", NotFoundError{}). - Returns(http.StatusOK, "ok", GraphResponse{}). - Writes(GraphResponse{})).Produces(restful.MIME_JSON) + Returns(http.StatusOK, "ok", graphResponse{}). + Writes(graphResponse{})).Produces(restful.MIME_JSON) // Get namespace health webservice.Route(webservice.GET("/namespaces/{namespace}/health"). @@ -160,7 +158,6 @@ func AddToContainer(c *restful.Container) error { Metadata(restfulspec.KeyOpenAPITags, tags). Doc("Get app/service/workload health of a namespace"). Param(webservice.PathParameter("namespace", "name of a namespace").Required(true)). - Param(webservice.PathParameter("type", "the type of health, app/service/workload, default app").DefaultValue("app")). Param(webservice.QueryParameter("rateInterval", "the rate interval used for fetching error rate").DefaultValue("10m").Required(true)). Param(webservice.QueryParameter("queryTime", "the time to use for query")). Returns(http.StatusBadRequest, "bad request", BadRequestError{}). diff --git a/pkg/kapis/servicemesh/metrics/v1alpha2/swagger-doc.go b/pkg/kapis/servicemesh/metrics/v1alpha2/swagger-doc.go index 57d057566..9cc6434e3 100644 --- a/pkg/kapis/servicemesh/metrics/v1alpha2/swagger-doc.go +++ b/pkg/kapis/servicemesh/metrics/v1alpha2/swagger-doc.go @@ -45,7 +45,7 @@ type NotFoundError struct { Reason error `json:"reason"` } -type GraphResponse struct { +type graphResponse struct { cytoscape.Config } @@ -65,6 +65,6 @@ type appHealthResponse struct { models.AppHealth } -type MetricsResponse struct { +type metricsResponse struct { prometheus.Metrics } diff --git a/pkg/kapis/tenant/v1alpha2/register.go b/pkg/kapis/tenant/v1alpha2/register.go index 1d535f845..acb77cec6 100644 --- a/pkg/kapis/tenant/v1alpha2/register.go +++ b/pkg/kapis/tenant/v1alpha2/register.go @@ -60,76 +60,91 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, k8s Doc("List clusters available to users"). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.POST("/workspaces"). To(handler.CreateWorkspace). Reads(tenantv1alpha2.WorkspaceTemplate{}). Returns(http.StatusOK, api.StatusOK, tenantv1alpha2.WorkspaceTemplate{}). Doc("Create workspace."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.DELETE("/workspaces/{workspace}"). To(handler.DeleteWorkspace). + Param(ws.PathParameter("workspace", "workspace name")). Returns(http.StatusOK, api.StatusOK, errors.None). Doc("Delete workspace."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.PUT("/workspaces/{workspace}"). To(handler.UpdateWorkspace). + Param(ws.PathParameter("workspace", "workspace name")). Reads(tenantv1alpha2.WorkspaceTemplate{}). Returns(http.StatusOK, api.StatusOK, tenantv1alpha2.WorkspaceTemplate{}). Doc("Update workspace."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.PATCH("/workspaces/{workspace}"). To(handler.PatchWorkspace). + Param(ws.PathParameter("workspace", "workspace name")). Consumes(mimePatch...). Reads(tenantv1alpha2.WorkspaceTemplate{}). Returns(http.StatusOK, api.StatusOK, tenantv1alpha2.WorkspaceTemplate{}). Doc("Update workspace."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces"). To(handler.ListWorkspaces). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). Doc("List all workspaces that belongs to the current user"). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}"). To(handler.DescribeWorkspace). + Param(ws.PathParameter("workspace", "workspace name")). Returns(http.StatusOK, api.StatusOK, tenantv1alpha2.WorkspaceTemplate{}). Doc("Describe workspace."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/clusters"). To(handler.ListWorkspaceClusters). + Param(ws.PathParameter("workspace", "workspace name")). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Doc("List clusters authorized to the specified workspace."). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) ws.Route(ws.GET("/namespaces"). To(handler.ListNamespaces). - Param(ws.PathParameter("workspace", "workspace name")). Doc("List the namespaces for the current user"). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/federatednamespaces"). To(handler.ListFederatedNamespaces). - Param(ws.PathParameter("workspace", "workspace name")). Doc("List the federated namespaces for the current user"). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/federatednamespaces"). To(handler.ListFederatedNamespaces). Param(ws.PathParameter("workspace", "workspace name")). Doc("List the federated namespaces of the specified workspace for the current user"). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/namespaces"). To(handler.ListNamespaces). Param(ws.PathParameter("workspace", "workspace name")). Doc("List the namespaces of the specified workspace for the current user"). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/devops"). To(handler.ListDevOpsProjects). Param(ws.PathParameter("workspace", "workspace name")). Doc("List the devops projects of the specified workspace for the current user"). Returns(http.StatusOK, api.StatusOK, api.ListResult{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/workspacemembers/{workspacemember}/devops"). To(handler.ListDevOpsProjects). Param(ws.PathParameter("workspace", "workspace name")). @@ -138,18 +153,23 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, k8s Reads(corev1.Namespace{}). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/namespaces/{namespace}"). To(handler.DescribeNamespace). Param(ws.PathParameter("workspace", "workspace name")). + Param(ws.PathParameter("namespace", "project name")). Doc("Retrieve namespace details."). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.DELETE("/workspaces/{workspace}/namespaces/{namespace}"). To(handler.DeleteNamespace). Param(ws.PathParameter("workspace", "workspace name")). + Param(ws.PathParameter("namespace", "project name")). Doc("Delete namespace."). Returns(http.StatusOK, api.StatusOK, errors.None). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.POST("/workspaces/{workspace}/namespaces"). To(handler.CreateNamespace). Param(ws.PathParameter("workspace", "workspace name")). @@ -157,6 +177,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, k8s Reads(corev1.Namespace{}). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.GET("/workspaces/{workspace}/workspacemembers/{workspacemember}/namespaces"). To(handler.ListNamespaces). Param(ws.PathParameter("workspace", "workspace name")). @@ -165,16 +186,20 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, k8s Reads(corev1.Namespace{}). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.PUT("/workspaces/{workspace}/namespaces/{namespace}"). To(handler.UpdateNamespace). Param(ws.PathParameter("workspace", "workspace name")). + Param(ws.PathParameter("namespace", "project name")). Reads(corev1.Namespace{}). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) + ws.Route(ws.PATCH("/workspaces/{workspace}/namespaces/{namespace}"). To(handler.PatchNamespace). Consumes(mimePatch...). Param(ws.PathParameter("workspace", "workspace name")). + Param(ws.PathParameter("namespace", "project name")). Reads(corev1.Namespace{}). Returns(http.StatusOK, api.StatusOK, corev1.Namespace{}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag})) diff --git a/pkg/kapis/terminal/v1alpha2/register.go b/pkg/kapis/terminal/v1alpha2/register.go index 2a8b815e8..d948a64cb 100644 --- a/pkg/kapis/terminal/v1alpha2/register.go +++ b/pkg/kapis/terminal/v1alpha2/register.go @@ -41,6 +41,8 @@ func AddToContainer(c *restful.Container, client kubernetes.Interface, config *r webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pod}"). To(handler.handleTerminalSession). + Param(webservice.PathParameter("namespace", "namespace of which the pod located in")). + Param(webservice.PathParameter("pod", "name of the pod")). Doc("create terminal session"). Metadata(restfulspec.KeyOpenAPITags, []string{constants.TerminalTag}). Writes(models.PodInfo{})) diff --git a/tools/cmd/doc-gen/main.go b/tools/cmd/doc-gen/main.go index dc3fabcb0..19b785b75 100644 --- a/tools/cmd/doc-gen/main.go +++ b/tools/cmd/doc-gen/main.go @@ -36,6 +36,7 @@ import ( "kubesphere.io/kubesphere/pkg/constants" "kubesphere.io/kubesphere/pkg/informers" devopsv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/devops/v1alpha2" + devopsv1alpha3 "kubesphere.io/kubesphere/pkg/kapis/devops/v1alpha3" iamv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/iam/v1alpha2" monitoringv1alpha3 "kubesphere.io/kubesphere/pkg/kapis/monitoring/v1alpha3" networkv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/network/v1alpha2" @@ -110,12 +111,13 @@ func generateSwaggerJson() []byte { informerFactory := informers.NewNullInformerFactory() - urlruntime.Must(devopsv1alpha2.AddToContainer(container, informerFactory.KubeSphereSharedInformerFactory(), &fake.Devops{}, nil, clientsets.KubeSphere(), fakes3.NewFakeS3())) - urlruntime.Must(iamv1alpha2.AddToContainer(container, im.NewOperator(clientsets.KubeSphere(), informerFactory), am.NewReadOnlyOperator(informerFactory), authoptions.NewAuthenticateOptions())) + urlruntime.Must(devopsv1alpha2.AddToContainer(container, informerFactory.KubeSphereSharedInformerFactory(), &fake.Devops{}, nil, clientsets.KubeSphere(), fakes3.NewFakeS3(), "")) + urlruntime.Must(devopsv1alpha3.AddToContainer(container, &fake.Devops{}, clientsets.Kubernetes(), clientsets.KubeSphere(), informerFactory.KubeSphereSharedInformerFactory(), informerFactory.KubernetesSharedInformerFactory())) + urlruntime.Must(iamv1alpha2.AddToContainer(container, im.NewOperator(clientsets.KubeSphere(), informerFactory, nil), am.NewReadOnlyOperator(informerFactory), authoptions.NewAuthenticateOptions())) urlruntime.Must(monitoringv1alpha3.AddToContainer(container, clientsets.Kubernetes(), nil, informerFactory, nil)) urlruntime.Must(openpitrixv1.AddToContainer(container, informerFactory, nil)) urlruntime.Must(operationsv1alpha2.AddToContainer(container, clientsets.Kubernetes())) - urlruntime.Must(resourcesv1alpha2.AddToContainer(container, clientsets.Kubernetes(), informerFactory)) + urlruntime.Must(resourcesv1alpha2.AddToContainer(container, clientsets.Kubernetes(), informerFactory, "")) urlruntime.Must(resourcesv1alpha3.AddToContainer(container, informerFactory)) urlruntime.Must(tenantv1alpha2.AddToContainer(container, informerFactory, nil, nil, nil, nil, nil)) urlruntime.Must(terminalv1alpha2.AddToContainer(container, clientsets.Kubernetes(), nil)) @@ -194,7 +196,7 @@ func enrichSwaggerObject(swo *spec.Swagger) { Name: "Apache", URL: "http://www.apache.org/licenses/", }, - Version: version.Version, + Version: version.Get().GitVersion, }, }