From 63701ae7b727b35d64c1eac82ddc1e6c5c4bf5a6 Mon Sep 17 00:00:00 2001 From: estella Date: Mon, 27 May 2024 19:50:31 +0800 Subject: [PATCH 1/8] init sks --- .../docs/getting-started/how-to.md | 2 +- cloudtower-api-doc/docs/intro.md | 2 +- cloudtower-api-doc/docusaurus.config.js | 6 +- .../en/docusaurus-theme-classic/navbar.json | 7 +- .../scripts/create-new-api-doc.js | 67 +- cloudtower-api-doc/src/pages/api.md | 2 +- cloudtower-api-doc/src/pages/sks-api.md | 8 + .../DocsVersionDropdownNavbarItem.tsx | 12 +- .../static/sks-specs/1.4.0-swagger.json | 732 ++++++++++++++++++ cloudtower-api-doc/swagger/SKS-App.tsx | 139 ++++ cloudtower-api-doc/swagger/i18n.ts | 9 +- .../swagger/locales/en/sks-1.4.0.json | 115 +++ .../swagger/locales/zh/sks-1.4.0.json | 115 +++ cloudtower-api-doc/swagger/utils/swagger.ts | 5 + cloudtower-api-doc/swagger/utils/wrap.ts | 15 +- package.json | 1 - 16 files changed, 1175 insertions(+), 62 deletions(-) create mode 100644 cloudtower-api-doc/src/pages/sks-api.md create mode 100644 cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json create mode 100644 cloudtower-api-doc/swagger/SKS-App.tsx create mode 100644 cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json create mode 100644 cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json diff --git a/cloudtower-api-doc/docs/getting-started/how-to.md b/cloudtower-api-doc/docs/getting-started/how-to.md index c12c3c4e..cfbbbc4c 100644 --- a/cloudtower-api-doc/docs/getting-started/how-to.md +++ b/cloudtower-api-doc/docs/getting-started/how-to.md @@ -1,5 +1,5 @@ --- -title: 如何阅读 API 参考 +title: 如何阅读 CloudTower API 参考 sidebar_position: 13 --- diff --git a/cloudtower-api-doc/docs/intro.md b/cloudtower-api-doc/docs/intro.md index 9182c52d..5d00265d 100644 --- a/cloudtower-api-doc/docs/intro.md +++ b/cloudtower-api-doc/docs/intro.md @@ -18,6 +18,6 @@ CloudTower API 可以用于调用 CloudTower 内所管理的各类资源。我 ## 更多 -我们提供了较多常见且丰富的 SDK 调用示例,您可以到 `案例演示` 该章节下进一步熟悉。同时,具体的 API 接口、字段说明等可以查看 [API 参考](https://code.smartx.com/api/) 页面。 +我们提供了较多常见且丰富的 SDK 调用示例,您可以到 `案例演示` 该章节下进一步熟悉。同时,具体的 API 接口、字段说明等可以查看 [CloudTower API 参考](https://code.smartx.com/api/) 页面。 感谢您选择 CloudTower API。如果您有任何疑问或需要帮助,请随时联系我们。 \ No newline at end of file diff --git a/cloudtower-api-doc/docusaurus.config.js b/cloudtower-api-doc/docusaurus.config.js index b93d7c03..8341480d 100644 --- a/cloudtower-api-doc/docusaurus.config.js +++ b/cloudtower-api-doc/docusaurus.config.js @@ -97,7 +97,11 @@ const config = { }, { to: "/api", - label: "API 参考", + label: "CloudTower API 参考", + }, + { + to: "/sks-api", + label: "SKS API 参考", }, { type: "docsVersionDropdown", diff --git a/cloudtower-api-doc/i18n/en/docusaurus-theme-classic/navbar.json b/cloudtower-api-doc/i18n/en/docusaurus-theme-classic/navbar.json index c91e7399..375f9d54 100644 --- a/cloudtower-api-doc/i18n/en/docusaurus-theme-classic/navbar.json +++ b/cloudtower-api-doc/i18n/en/docusaurus-theme-classic/navbar.json @@ -1,6 +1,9 @@ { - "item.label.API 参考": { - "message": "API Reference" + "item.label.CloudTower API 参考": { + "message": "CloudTower API Reference" + }, + "item.label.SKS API 参考": { + "message": "SKS API Reference" }, "item.label.下载": { "message": "Download" diff --git a/cloudtower-api-doc/scripts/create-new-api-doc.js b/cloudtower-api-doc/scripts/create-new-api-doc.js index 257c9973..66e27828 100644 --- a/cloudtower-api-doc/scripts/create-new-api-doc.js +++ b/cloudtower-api-doc/scripts/create-new-api-doc.js @@ -8,7 +8,7 @@ const { getLocalesFile, } = require("./describe"); -const versions = [ +const towerVersions = [ '4.0.0', '3.4.0', "3.3.0", @@ -29,63 +29,48 @@ const versions = [ '1.8.0' ]; +const sksVersions = [ + '1.4.0' +] + +const versionMap = { + sks: sksVersions, + tower: towerVersions +} yargsInteractive() .usage("$0 [args]") .help("help") .alias("help", "h") .interactive({ interactive: { default: true }, + product: { + description: "Provide which product you want to create, sks or tower", + type: "input" + }, version: { description: "Provide swagger json file version", type: "input", }, }) .then((result) => { - const { version } = result; - createNewApiLocales(version); - // createNewApiDoc(version); + const { version, product } = result; + createNewApiLocales(version, product); }); -const getPrevVersion = (v) => { - if(versions.indexOf(v) < 0) { - return versions[0] - } - return versions[versions.indexOf(v) + 1]; -} -const getSwaggerPath = (v) => + +const getSwaggerPath = (v, prefix) => nodePath.resolve( process.cwd(), - nodePath.join('cloudtower-api-doc', 'static', 'specs', `${v}-swagger.json`) + nodePath.join('cloudtower-api-doc', 'static', `${prefix}specs`, `${v}-swagger.json`) ); -const getVersionedPath =(version, isEn) => { - let versionedPath = nodePath.join('versioned_docs', `version-${version}`); - if(isEn) { - versionedPath = nodePath.join('i18n', 'en', 'docusaurus-plugin-content-docs', `version-${version}`) - } - return nodePath.resolve(process.cwd(), nodePath.join('cloudtower-api-doc', versionedPath)) -} - -const createNewApiDoc = async (version) => { - const prevVersion = getPrevVersion(version); - const pMap = (await import("p-map")).default; - await pMap(['zh', 'en'], async (lng) => { - const versiondPath = getVersionedPath(version, lng === 'en'); - const prevVersionPath = getVersionedPath(prevVersion, lng === 'en'); - fsExtra.copySync(prevVersionPath, versiondPath); - fsExtra.readdirSync(versiondPath).forEach(file => { - if(file === 'download.md') { - const completePath = nodePath.join(versiondPath, file); - fsExtra.writeFileSync(completePath, fsExtra.readFileSync(completePath, 'utf-8').replaceAll(prevVersion, version), 'utf-8') - } - }) - }) -} -const createNewApiLocales = async (version) => { +const createNewApiLocales = async (version, product) => { + const prefix = product === 'tower' ? '' : `${product}-` const traverPreviousVersion = async (current_version, onGetDiffSpec) => { let early_break = false; + const versions = versionMap[product]; let versionIndex = versions.findIndex((v) => v === current_version) + 1; versionIndex = versions.findIndex((v) => v === current_version) + 1; while (!early_break && versionIndex < versions.length) { @@ -95,7 +80,7 @@ const createNewApiLocales = async (version) => { } }; - const specAbsolutePath = getSwaggerPath(version); + const specAbsolutePath = getSwaggerPath(version, prefix); const pMap = (await import("p-map")).default; if (!fsExtra.statSync(specAbsolutePath).isFile()) { throw new Error( @@ -108,7 +93,7 @@ const createNewApiLocales = async (version) => { const spec = require(specAbsolutePath); const { paths, components } = spec; const tags = new Set(); - const outputLocalesPath = getLocalesFile(lng, version); + const outputLocalesPath = getLocalesFile(lng, `${prefix}${version}`); const locales = fsExtra.existsSync(outputLocalesPath) ? require(outputLocalesPath) : { schemas: {}, tags: [], @@ -118,7 +103,7 @@ const createNewApiLocales = async (version) => { let diffSchema; let previousVersion; await traverPreviousVersion(version, async (previous) => { - const previousLocales = require(getLocalesFile(lng, previous)); + const previousLocales = require(getLocalesFile(lng, `${prefix}${previous}`)); diffSchema = previousLocales.schemas[schemaName] if(diffSchema) { previousVersion = previous; @@ -149,7 +134,7 @@ const createNewApiLocales = async (version) => { } let diffContent; await traverPreviousVersion(version, async (previous) => { - const previousLocales = require(getLocalesFile(lng, previous)); + const previousLocales = require(getLocalesFile(lng, `${prefix}${previous}`)); diffContent = previousLocales.paths[api]; return diffContent; }); @@ -162,7 +147,7 @@ const createNewApiLocales = async (version) => { }; }); await traverPreviousVersion(version, async (previous) => { - const previousSpec = require(getSwaggerPath(previous)); + const previousSpec = require(getSwaggerPath(previous, prefix)); await pMap(Object.keys(previousSpec.paths), async (api) => { const tagList = _.get(previousSpec, ['paths', api, 'post', 'tags']) tagList && diff --git a/cloudtower-api-doc/src/pages/api.md b/cloudtower-api-doc/src/pages/api.md index 4e975f7b..c2d77df1 100644 --- a/cloudtower-api-doc/src/pages/api.md +++ b/cloudtower-api-doc/src/pages/api.md @@ -1,5 +1,5 @@ --- -title: API 参考 +title: CloudTower API 参考 hide_table_of_contents: true --- diff --git a/cloudtower-api-doc/src/pages/sks-api.md b/cloudtower-api-doc/src/pages/sks-api.md new file mode 100644 index 00000000..f1954638 --- /dev/null +++ b/cloudtower-api-doc/src/pages/sks-api.md @@ -0,0 +1,8 @@ +--- +title: SKS API 参考 +hide_table_of_contents: true +--- + +import App from '../../swagger/SKS-App'; + + \ No newline at end of file diff --git a/cloudtower-api-doc/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx b/cloudtower-api-doc/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx index b54f2e84..d5fcaf08 100644 --- a/cloudtower-api-doc/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +++ b/cloudtower-api-doc/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx @@ -3,7 +3,7 @@ import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; import clsx from 'clsx'; import i18next from '../../../swagger/i18n'; -import { specMap } from '../../../swagger/utils/swagger'; +import { specMap, sksSpecMap } from '../../../swagger/utils/swagger'; import styles from './styles.module.scss' import { useLocation } from '@docusaurus/router'; @@ -17,12 +17,14 @@ export default function DocsVersionDropdownNavbarItem({ ...props }) { const versions = Object.keys(specMap); + const sksVersions = Object.keys(sksSpecMap); const [ active, setActive ] = useState(false) const { search, pathname, hash } = useLocation(); const searchParams = new URLSearchParams(search); const currentVersion = searchParams.get('version') || versions[0]; const versionLinks = useMemo(() => { - return versions.map((version) => { + const vs = pathname === '/api' ? versions : sksVersions + return vs.map((version) => { searchParams.set('version', version); return { label: version, @@ -30,7 +32,7 @@ export default function DocsVersionDropdownNavbarItem({ isActive: () => version === currentVersion, }; }) - }, [ versions, currentVersion]); + }, [ versions,, sksVersions, currentVersion]); const items = [ ...dropdownItemsBefore, @@ -42,8 +44,8 @@ export default function DocsVersionDropdownNavbarItem({ false : undefined} /> ); diff --git a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json new file mode 100644 index 00000000..8fd39f66 --- /dev/null +++ b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json @@ -0,0 +1,732 @@ +{ + "components": { + "schemas": { + "cluster.KubeConfig": { + "properties": { + "data": { "description": "Base64 encoded string", "type": "string" } + }, + "type": "object" + }, + "errors.ErrorResponse": { + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "code": { + "description": "Suggested HTTP return code for this status, 0 if not set.", + "type": "integer" + }, + "details": { "$ref": "#/components/schemas/v1.StatusDetails" }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { "$ref": "#/components/schemas/v1.ListMeta" }, + "reason": { "$ref": "#/components/schemas/v1.StatusReason" }, + "status": { + "description": "Status of the operation.\nOne of: \"Success\" or \"Failure\".\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "type": "string" + } + }, + "type": "object" + }, + "instance.connectivityResponse": { + "properties": { + "connectable": { "description": "检查结果", "type": "boolean" }, + "host": { "type": "string" }, + "message": { "description": "附加消息", "type": "string" }, + "port": { "type": "integer" }, + "protocol": { + "type": "string", + "x-enum-varnames": [ + "ProtocolTCP", + "ProtocolUDP", + "ProtocolIPIP", + "ProtocolICMP", + "ProtocolSSH", + "ProtocolHTTP" + ] + }, + "success": { "description": "是否执行成功", "type": "boolean" } + }, + "type": "object" + }, + "instance.labelSets": { + "additionalProperties": { + "items": { "type": "string" }, + "type": "array" + }, + "type": "object" + }, + "intstr.IntOrString": { + "description": "The maximum number of machines that can be scheduled above the\ndesired number of machines.\nValue can be an absolute number (ex: 5) or a percentage of\ndesired machines (ex: 10%).\nThis can not be 0 if MaxUnavailable is 0.\nAbsolute number is calculated from percentage by rounding up.\nDefaults to 1.\nExample: when this is set to 30%, the new MachineSet can be scaled\nup immediately when the rolling update starts, such that the total\nnumber of old and new machines do not exceed 130% of desired\nmachines. Once old machines have been killed, new MachineSet can\nbe scaled up further, ensuring that total number of machines running\nat any time during the update is at most 130% of desired machines.", + "properties": { + "intVal": { "type": "integer" }, + "strVal": { "type": "string" }, + "type": { "$ref": "#/components/schemas/intstr.Type" } + }, + "type": "object" + }, + "intstr.Type": { + "type": "integer", + "x-enum-comments": { + "Int": "The IntOrString holds an int.", + "String": "The IntOrString holds a string." + }, + "x-enum-varnames": ["Int", "String"] + }, + "k8s_io_api_core_v1.ConditionStatus": { + "description": "+kubebuilder:validation:Type=string" + } + } + }, + "info": { + "contact": { "name": "SmartX Inc.", "url": "https://www.smartx.com/" }, + "description": "This is the doc for SKS REST API.", + "termsOfService": "http://swagger.io/terms/", + "title": "SKS REST API", + "version": "1.0" + }, + "externalDocs": { "description": "", "url": "" }, + "paths": { + "/api/v1/servers/connectivity-probes/:namespace/:name": { + "post": { + "operationId": "instances/connectivity-probes", + "parameters": [ + { + "description": "serverInstance object on namespace name", + "in": "query", + "name": "namespace", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ServerInstance object name", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/instance.connectivityResponse" + }, + "type": "array" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Not Found" + }, + "406": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Not Acceptable" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Network connectivity probe on serverInstance.", + "tags": ["instances"] + } + }, + "/api/v1/servers/labels": { + "get": { + "operationId": "instances/jobs", + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/instance.labelSets" } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get all Ready ServiceInstance label sets.", + "tags": ["instances"] + } + }, + "/api/v1/servers/prepare-environment": { + "get": { + "operationId": "instances/commands", + "requestBody": { + "content": { "text/plain": { "schema": { "type": "string" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { "schema": { "type": "string" } }, + "text/plain": { "schema": { "type": "string" } } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Download prepare environment command.", + "tags": ["instances"] + } + }, + "/clusters": { + "get": { + "operationId": "ListClusters", + "parameters": [ + { + "description": "The namespace name. Default to all namespaces if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterList" + } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get all workload clusters.", + "tags": ["clusters"] + }, + "post": { + "operationId": "CreateCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + }, + "description": "KubeSmartCluster spec", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + }, + "description": "Created" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Create a workload cluster", + "tags": ["clusters"] + } + }, + "/clusters/:cluster": { + "delete": { + "operationId": "DeleteCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + }, + { + "description": "Whether to delete a cluster forcefully. Default to false if not specified.", + "in": "query", + "name": "force", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { "schema": { "type": "object" } } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Delete a workload cluster.", + "tags": ["clusters"] + }, + "get": { + "operationId": "GetCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get a workload cluster.", + "tags": ["clusters"] + }, + "put": { + "operationId": "UpdateCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + }, + "description": "KubeSmartCluster spec", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Update a workload cluster.", + "tags": ["clusters"] + } + }, + "/clusters/:cluster/addons": { + "get": { + "operationId": "listClusterAddons", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/v1alpha1.AddonList" } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get addons of a workload cluster.", + "tags": ["clusters"] + } + }, + "/clusters/:cluster/kubeconfig": { + "get": { + "operationId": "GetClusterKubeconfig", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/cluster.KubeConfig" } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get the kubeconfig of a workload cluster.", + "tags": ["clusters"] + } + }, + "/clusters/{cluster}/proxy/{k8s_url}": { + "delete": { + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "operationId": "ProxyRequestToWorkloadCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "responses": null, + "summary": "Proxy all requests to the workload kubernetes cluster.", + "tags": ["workload clusters"] + }, + "get": { + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "operationId": "ProxyRequestToWorkloadCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "responses": null, + "summary": "Proxy all requests to the workload kubernetes cluster.", + "tags": ["workload clusters"] + }, + "head": { + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "operationId": "ProxyRequestToWorkloadCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "responses": null, + "summary": "Proxy all requests to the workload kubernetes cluster.", + "tags": ["workload clusters"] + }, + "patch": { + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "operationId": "ProxyRequestToWorkloadCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "responses": null, + "summary": "Proxy all requests to the workload kubernetes cluster.", + "tags": ["workload clusters"] + }, + "post": { + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "operationId": "ProxyRequestToWorkloadCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "responses": null, + "summary": "Proxy all requests to the workload kubernetes cluster.", + "tags": ["workload clusters"] + }, + "put": { + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "operationId": "ProxyRequestToWorkloadCluster", + "parameters": [ + { + "description": "The namespace name. Default to default namespace if not specified.", + "in": "query", + "name": "namespace", + "schema": { "type": "string" } + } + ], + "responses": null, + "summary": "Proxy all requests to the workload kubernetes cluster.", + "tags": ["workload clusters"] + } + }, + "/compatibility/versions": { + "get": { + "operationId": "compatibleSKSVersion", + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "items": { "type": "string" }, "type": "array" } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get the current SKS compatible sksVersion list", + "tags": ["upgrade"] + } + }, + "/compatibility/vm-templates": { + "get": { + "operationId": "compatibleVmTemplate", + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "items": { "type": "string" }, "type": "array" } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Get Compatible vm template sks Version List", + "tags": ["upgrade"] + } + }, + "/healthz": { + "get": { + "operationId": "GetHealth", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/restful.Info" } + } + }, + "description": "{\"message\": \"healthy\"}" + } + }, + "summary": "Check service health.", + "tags": ["healthz"] + } + }, + "/licenses/validate": { + "post": { + "operationId": "validateLicense", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/license.licenseCode" } + } + }, + "description": "Issued by the license code", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/license.License" } + } + }, + "description": "OK" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } + }, + "description": "Internal Server Error" + } + }, + "summary": "Validate and parse license code.", + "tags": ["license"] + } + } + }, + "openapi": "3.1.0" +} diff --git a/cloudtower-api-doc/swagger/SKS-App.tsx b/cloudtower-api-doc/swagger/SKS-App.tsx new file mode 100644 index 00000000..ad146fc9 --- /dev/null +++ b/cloudtower-api-doc/swagger/SKS-App.tsx @@ -0,0 +1,139 @@ +import React, { useEffect, useState, useCallback, useRef } from "react"; +import _, { cloneDeep } from "lodash"; +import { ProStore, RedocProRawOptions } from "@redocly/reference-docs"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import { Badge } from "@redocly/reference-docs/lib/redoc-lib/src/common-elements"; +import i18next from "./i18n"; +import { + ISpec, + sksSpecMap as specMap, + overwriteSchemaTitle, + wrapSpecWithI18n, +} from "./utils"; +import Redocly from "./redoc/Redoc"; +import { LOCAL_STORAGE_SERVERS_KEY } from "./redoc/Console/ServerDropdown"; +import { DeepSearchStore } from "./redoc/services/SearchStore"; +import { useLocation } from "@docusaurus/router"; +const REDOC_CLASS = "redoc-container"; + +const ApiTag: React.FC<{ + operationId: string; + rawSpec: ISpec; +}> = ({ operationId, rawSpec }) => { + const findRawTags = useCallback( + (operation_id) => { + const rawPath = Object.values(rawSpec.paths).find( + (p) => (p.post || p.get).operationId === operation_id + ); + return (rawPath?.post || rawPath?.get)?.tags?.join("-"); + }, + [rawSpec] + ); + return {findRawTags(operationId)}; +}; +const Redoc: React.FC<{ + spec: ISpec; + rawSpec: ISpec; + onInit: RedocProRawOptions["hooks"]["onInit"]; +}> = (props) => { + return props.spec ? ( + ( + + ), + }, + routingBasePath: "sks-api/#", + pagination: "section", + ctrlFHijack: false, + expandDefaultServerVariables: true, + scrollYOffset: 60, + minCharacterLengthToInitSearch: 2, + nativeScrollbars: true, + hideDownloadButton: true, + disableSearch: true, + }} + /> + ) : ( + <> + ); +}; + +const App: React.FC = () => { + const { i18n } = useDocusaurusContext(); + const { search } = useLocation(); + const version = new URLSearchParams(search).get('version') || Object.keys(specMap)[0] + const [spec, setSpec] = useState(); + const [rawSpec, setRawSpec] = useState(); + const specRef = useRef(spec); + useEffect(() => { + const lastVersion = specMap[version] ? version : Object.keys(specMap)[0]; + specMap[lastVersion].then(data => { + const swaggerSpec: ISpec = _.cloneDeep(data.default); + setRawSpec(swaggerSpec); + i18next.changeLanguage(i18n.currentLocale); + setSpec(wrapSpecWithI18n(swaggerSpec, i18n.currentLocale, lastVersion, 'sks')); + }) + + }, [version, i18n.currentLocale]); + + useEffect(() => { + specRef.current = spec; + }, [spec]); + + + useEffect(() => { + localStorage.removeItem(LOCAL_STORAGE_SERVERS_KEY); + return () => { + const docContainer = document.querySelector( + "#__docusaurus > div.main-wrapper.docs-wrapper.docs-doc-page > div > main > div" + ); + if (docContainer && docContainer.classList.contains(REDOC_CLASS)) { + docContainer.classList.remove(REDOC_CLASS); + } + }; + }, []); + + const transCom = useCallback(() => { + overwriteSchemaTitle(specRef.current, { request: true, response: true }); + }, []); + + const onReDocLoaded = useCallback((prop: { store: ProStore }) => { + const docContainer = document.querySelector( + "#__docusaurus > div.main-wrapper.docs-wrapper.docs-doc-page > div > main > div" + ); + if (docContainer) { + docContainer.classList.add(REDOC_CLASS); + } + const { store } = prop; + store.search = new DeepSearchStore(store.options as any); + setTimeout(() => { + store.search.indexItems(store.menu.items); + }, 50); + store.observeAllAndRemark(); + store.onDidMount = () => { + if (location.hash) { + const ids = location.hash.split("#").filter(Boolean); + const item = store.menu.getItemById( + ids.join("/").replace("/tag", "tag") + ); + store.menu.activateAndScroll(item); + } + transCom(); + }; + }, []); + + return ( +
+ +
+ ); +}; + +export default App; diff --git a/cloudtower-api-doc/swagger/i18n.ts b/cloudtower-api-doc/swagger/i18n.ts index ed62ecb8..459ff1d1 100644 --- a/cloudtower-api-doc/swagger/i18n.ts +++ b/cloudtower-api-doc/swagger/i18n.ts @@ -65,8 +65,11 @@ import en4_0API from './locales/en/4.0.0.json'; import zh4_1API from './locales/zh/4.1.0.json'; import en4_1API from './locales/en/4.1.0.json'; +import skszh1_4 from './locales/zh/sks-1.4.0.json'; +import sksen1_4 from './locales/en/sks-1.4.0.json'; -export const fallbackNS = ['4_1_0','4_0_0','3_4_0','3_3_0', '3_2_0', '3_1_0', '3_0_0', '2_8_0', '2_7_0', '2_6_0', '2_5_0', '2_4_0', '2_3_0', '2_2_0', '2_1_0', '2_0_0', '1_10_0', '1_9_0', '1_8_0']; + +export const fallbackNS = ['4_1_0','4_0_0','3_4_0','3_3_0', '3_2_0', '3_1_0', '3_0_0', '2_8_0', '2_7_0', '2_6_0', '2_5_0', '2_4_0', '2_3_0', '2_2_0', '2_1_0', '2_0_0', '1_10_0', '1_9_0', '1_8_0', 'sks_1_4_0']; export type ApiDoc = { summary: string; description: string; @@ -96,6 +99,7 @@ i18next.init({ ['3_4_0']: en3_4API, ['4_0_0']: en4_0API, ['4_1_0']: en4_1API, + ['sks_1_4_0']: [sksen1_4], components: enComponents, }, [SupportLanguage.zh]: { @@ -118,6 +122,7 @@ i18next.init({ ['3_4_0']: zh3_4API, ['4_0_0']: zh4_0API, ['4_1_0']: zh4_1API, + ['sks_1_4_0']: [skszh1_4], components: zhComponents, }, }, @@ -131,7 +136,7 @@ i18next.init({ escapeValue: false, }, keySeparator: false, - ns: ['1_8_0', '1_9_0', '1_10_0','2_0_0', '2_1_0', '2_2_0', '2_3_0', '2_4_0', '2_5_0','2_6_0', '2_7_0','2_8_0', '3_0_0', '3_1_0','3_2_0', '3_3_0', '3_4_0', '4_0_0', '4_1_0','components'], + ns: ['sks_1_4_0','1_8_0', '1_9_0', '1_10_0','2_0_0', '2_1_0', '2_2_0', '2_3_0', '2_4_0', '2_5_0','2_6_0', '2_7_0','2_8_0', '3_0_0', '3_1_0','3_2_0', '3_3_0', '3_4_0', '4_0_0', '4_1_0','components'], nsSeparator: ".", load: "currentOnly", react: { diff --git a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json new file mode 100644 index 00000000..40763021 --- /dev/null +++ b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json @@ -0,0 +1,115 @@ +{ + "schemas": { + "cluster.KubeConfig": { + "data": "" + }, + "errors.ErrorResponse": { + "apiVersion": "", + "code": "", + "details": "", + "kind": "", + "message": "", + "metadata": "", + "reason": "", + "status": "" + }, + "instance.connectivityResponse": { + "connectable": "", + "host": "", + "message": "", + "port": "", + "protocol": "", + "success": "" + }, + "instance.labelSets": {}, + "intstr.IntOrString": { + "intVal": "", + "strVal": "", + "type": "" + }, + "intstr.Type": {}, + "k8s_io_api_core_v1.ConditionStatus": {} + }, + "tags": [ + { + "name": "instances", + "x-displayName": "", + "description": "" + }, + { + "name": "clusters", + "x-displayName": "", + "description": "" + }, + { + "name": "workload clusters", + "x-displayName": "", + "description": "" + }, + { + "name": "upgrade", + "x-displayName": "", + "description": "" + }, + { + "name": "healthz", + "x-displayName": "", + "description": "" + }, + { + "name": "license", + "x-displayName": "", + "description": "" + } + ], + "paths": { + "/api/v1/servers/connectivity-probes/:namespace/:name": { + "summary": "", + "description": "" + }, + "/api/v1/servers/labels": { + "summary": "", + "description": "" + }, + "/api/v1/servers/prepare-environment": { + "summary": "", + "description": "" + }, + "/clusters": { + "summary": "", + "description": "" + }, + "/clusters/:cluster": { + "summary": "", + "description": "" + }, + "/clusters/:cluster/addons": { + "summary": "", + "description": "" + }, + "/clusters/:cluster/kubeconfig": { + "summary": "", + "description": "" + }, + "/clusters/{cluster}/proxy/{k8s_url}": { + "summary": "", + "description": "" + }, + "/compatibility/versions": { + "summary": "", + "description": "" + }, + "/compatibility/vm-templates": { + "summary": "", + "description": "" + }, + "/healthz": { + "summary": "", + "description": "" + }, + "/licenses/validate": { + "summary": "", + "description": "" + } + } +} \ No newline at end of file diff --git a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json new file mode 100644 index 00000000..40763021 --- /dev/null +++ b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json @@ -0,0 +1,115 @@ +{ + "schemas": { + "cluster.KubeConfig": { + "data": "" + }, + "errors.ErrorResponse": { + "apiVersion": "", + "code": "", + "details": "", + "kind": "", + "message": "", + "metadata": "", + "reason": "", + "status": "" + }, + "instance.connectivityResponse": { + "connectable": "", + "host": "", + "message": "", + "port": "", + "protocol": "", + "success": "" + }, + "instance.labelSets": {}, + "intstr.IntOrString": { + "intVal": "", + "strVal": "", + "type": "" + }, + "intstr.Type": {}, + "k8s_io_api_core_v1.ConditionStatus": {} + }, + "tags": [ + { + "name": "instances", + "x-displayName": "", + "description": "" + }, + { + "name": "clusters", + "x-displayName": "", + "description": "" + }, + { + "name": "workload clusters", + "x-displayName": "", + "description": "" + }, + { + "name": "upgrade", + "x-displayName": "", + "description": "" + }, + { + "name": "healthz", + "x-displayName": "", + "description": "" + }, + { + "name": "license", + "x-displayName": "", + "description": "" + } + ], + "paths": { + "/api/v1/servers/connectivity-probes/:namespace/:name": { + "summary": "", + "description": "" + }, + "/api/v1/servers/labels": { + "summary": "", + "description": "" + }, + "/api/v1/servers/prepare-environment": { + "summary": "", + "description": "" + }, + "/clusters": { + "summary": "", + "description": "" + }, + "/clusters/:cluster": { + "summary": "", + "description": "" + }, + "/clusters/:cluster/addons": { + "summary": "", + "description": "" + }, + "/clusters/:cluster/kubeconfig": { + "summary": "", + "description": "" + }, + "/clusters/{cluster}/proxy/{k8s_url}": { + "summary": "", + "description": "" + }, + "/compatibility/versions": { + "summary": "", + "description": "" + }, + "/compatibility/vm-templates": { + "summary": "", + "description": "" + }, + "/healthz": { + "summary": "", + "description": "" + }, + "/licenses/validate": { + "summary": "", + "description": "" + } + } +} \ No newline at end of file diff --git a/cloudtower-api-doc/swagger/utils/swagger.ts b/cloudtower-api-doc/swagger/utils/swagger.ts index 174683e9..cfc68d80 100644 --- a/cloudtower-api-doc/swagger/utils/swagger.ts +++ b/cloudtower-api-doc/swagger/utils/swagger.ts @@ -23,6 +23,11 @@ export const specMap = { } +export const sksSpecMap = { + '1.4.0': import('../../static/sks-specs/1.4.0-swagger.json'), +} + + export enum SupportLanguage { zh = "zh", en = "en", diff --git a/cloudtower-api-doc/swagger/utils/wrap.ts b/cloudtower-api-doc/swagger/utils/wrap.ts index 05eec320..206f89d1 100644 --- a/cloudtower-api-doc/swagger/utils/wrap.ts +++ b/cloudtower-api-doc/swagger/utils/wrap.ts @@ -15,24 +15,25 @@ const replaceTags = (tag:string) => { return tag; } -const getNs = (version: string) => { - return version.split('.').join('_'); +const getNs = (version: string, product?:string) => { + return `${product ? product + '_' : ''}${version.split('.').join('_')}`; } -const getFallbackNS = (version: string) => { - return fallbackNS.slice(fallbackNS.indexOf(getNs(version))) +const getFallbackNS = (version: string, product) => { + return fallbackNS.slice(fallbackNS.indexOf(getNs(version, product))) } export const wrapSpecWithI18n = ( spec: ISpec, language: string, - version: string + version: string, + product?: string, ) => { const cloneSpec = _.cloneDeep(spec); const { components, paths } = cloneSpec; const tags = new Set(); - const ns = getNs(version); - const fallbackNS = getFallbackNS(version); + const ns = getNs(version, product); + const fallbackNS = getFallbackNS(version, product); i18next.options.fallbackNS = fallbackNS; Object.keys(paths).forEach((p) => { const apiDoc = i18next.t(`${ns}.paths.${p}`, {lng: language, returnObjects: true }) as ApiDoc; diff --git a/package.json b/package.json index 3193544e..5499012d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "scripts": { "tauri": "tauri", "api:scan": "node ./cloudtower-api-doc/scripts/scan-missing.js", - "api:sync": "node ./cloudtower-api-doc/scripts/sync-swagger.js", "api:new": "node ./cloudtower-api-doc/scripts/create-new-api-doc.js", "api:new-example": "node ./cloudtower-api-doc/scripts/create-new-api-example.js", "api:docx": "node ./cloudtower-api-doc/scripts/build-docs.js", From 1cf487c965ebe8b7a69643859bad9e65e080e2bf Mon Sep 17 00:00:00 2001 From: estella Date: Mon, 27 May 2024 20:08:41 +0800 Subject: [PATCH 2/8] temp --- .../static/sks-specs/1.4.0-swagger.json | 3657 +++++++++++++++-- .../swagger/locales/en/sks-1.4.0.json | 839 +++- .../swagger/locales/zh/sks-1.4.0.json | 839 +++- 3 files changed, 4998 insertions(+), 337 deletions(-) diff --git a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json index 8fd39f66..aafef412 100644 --- a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json +++ b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json @@ -1,289 +1,225 @@ { - "components": { - "schemas": { - "cluster.KubeConfig": { - "properties": { - "data": { "description": "Base64 encoded string", "type": "string" } - }, - "type": "object" - }, - "errors.ErrorResponse": { - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "code": { - "description": "Suggested HTTP return code for this status, 0 if not set.", - "type": "integer" - }, - "details": { "$ref": "#/components/schemas/v1.StatusDetails" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "message": { - "description": "A human-readable description of the status of this operation.", - "type": "string" - }, - "metadata": { "$ref": "#/components/schemas/v1.ListMeta" }, - "reason": { "$ref": "#/components/schemas/v1.StatusReason" }, - "status": { - "description": "Status of the operation.\nOne of: \"Success\" or \"Failure\".\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - "type": "string" - } - }, - "type": "object" - }, - "instance.connectivityResponse": { - "properties": { - "connectable": { "description": "检查结果", "type": "boolean" }, - "host": { "type": "string" }, - "message": { "description": "附加消息", "type": "string" }, - "port": { "type": "integer" }, - "protocol": { - "type": "string", - "x-enum-varnames": [ - "ProtocolTCP", - "ProtocolUDP", - "ProtocolIPIP", - "ProtocolICMP", - "ProtocolSSH", - "ProtocolHTTP" - ] - }, - "success": { "description": "是否执行成功", "type": "boolean" } - }, - "type": "object" - }, - "instance.labelSets": { - "additionalProperties": { - "items": { "type": "string" }, - "type": "array" - }, - "type": "object" - }, - "intstr.IntOrString": { - "description": "The maximum number of machines that can be scheduled above the\ndesired number of machines.\nValue can be an absolute number (ex: 5) or a percentage of\ndesired machines (ex: 10%).\nThis can not be 0 if MaxUnavailable is 0.\nAbsolute number is calculated from percentage by rounding up.\nDefaults to 1.\nExample: when this is set to 30%, the new MachineSet can be scaled\nup immediately when the rolling update starts, such that the total\nnumber of old and new machines do not exceed 130% of desired\nmachines. Once old machines have been killed, new MachineSet can\nbe scaled up further, ensuring that total number of machines running\nat any time during the update is at most 130% of desired machines.", - "properties": { - "intVal": { "type": "integer" }, - "strVal": { "type": "string" }, - "type": { "$ref": "#/components/schemas/intstr.Type" } - }, - "type": "object" - }, - "intstr.Type": { - "type": "integer", - "x-enum-comments": { - "Int": "The IntOrString holds an int.", - "String": "The IntOrString holds a string." - }, - "x-enum-varnames": ["Int", "String"] - }, - "k8s_io_api_core_v1.ConditionStatus": { - "description": "+kubebuilder:validation:Type=string" - } - } - }, + "openapi": "3.0.1", "info": { - "contact": { "name": "SmartX Inc.", "url": "https://www.smartx.com/" }, + "title": "SKS REST API", "description": "This is the doc for SKS REST API.", "termsOfService": "http://swagger.io/terms/", - "title": "SKS REST API", + "contact": { + "name": "SmartX Inc.", + "url": "https://www.smartx.com/" + }, "version": "1.0" }, - "externalDocs": { "description": "", "url": "" }, + "servers": [ + { + "url": "/" + } + ], "paths": { "/api/v1/servers/connectivity-probes/:namespace/:name": { "post": { + "tags": [ + "instances" + ], + "summary": "Network connectivity probe on serverInstance.", "operationId": "instances/connectivity-probes", "parameters": [ { - "description": "serverInstance object on namespace name", - "in": "query", "name": "namespace", + "in": "query", + "description": "serverInstance object on namespace name", "required": true, - "schema": { "type": "string" } + "schema": { + "type": "string" + } }, { - "description": "ServerInstance object name", - "in": "query", "name": "name", + "in": "query", + "description": "ServerInstance object name", "required": true, - "schema": { "type": "string" } + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { "schema": { + "type": "array", "items": { "$ref": "#/components/schemas/instance.connectivityResponse" - }, - "type": "array" + } } } - }, - "description": "OK" + } }, "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Bad Request" + } }, "404": { + "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Not Found" + } }, "406": { + "description": "Not Acceptable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Not Acceptable" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Network connectivity probe on serverInstance.", - "tags": ["instances"] + } } }, "/api/v1/servers/labels": { "get": { + "tags": [ + "instances" + ], + "summary": "Get all Ready ServiceInstance label sets.", "operationId": "instances/jobs", - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/instance.labelSets" } + "schema": { + "$ref": "#/components/schemas/instance.labelSets" + } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Get all Ready ServiceInstance label sets.", - "tags": ["instances"] + } } }, "/api/v1/servers/prepare-environment": { "get": { + "tags": [ + "instances" + ], + "summary": "Download prepare environment command.", "operationId": "instances/commands", - "requestBody": { - "content": { "text/plain": { "schema": { "type": "string" } } } - }, "responses": { "200": { + "description": "OK", "content": { - "application/json": { "schema": { "type": "string" } }, - "text/plain": { "schema": { "type": "string" } } - }, - "description": "OK" + "text/plain": { + "schema": { + "type": "string" + } + } + } }, "500": { + "description": "Internal Server Error", "content": { - "application/json": { + "text/plain": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Download prepare environment command.", - "tags": ["instances"] + } } }, "/clusters": { "get": { + "tags": [ + "clusters" + ], + "summary": "Get all workload clusters.", "operationId": "ListClusters", "parameters": [ { - "description": "The namespace name. Default to all namespaces if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to all namespaces if not specified.", + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterList" } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Get all workload clusters.", - "tags": ["clusters"] + } }, "post": { + "tags": [ + "clusters" + ], + "summary": "Create a workload cluster", "operationId": "CreateCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } ], "requestBody": { + "description": "KubeSmartCluster spec", "content": { "application/json": { "schema": { @@ -291,442 +227,3501 @@ } } }, - "description": "KubeSmartCluster spec", "required": true }, "responses": { "201": { + "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" } } - }, - "description": "Created" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } }, - "summary": "Create a workload cluster", - "tags": ["clusters"] + "x-codegen-request-body-name": "cluster" } }, "/clusters/:cluster": { - "delete": { - "operationId": "DeleteCluster", + "get": { + "tags": [ + "clusters" + ], + "summary": "Get a workload cluster.", + "operationId": "GetCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } - }, - { - "description": "Whether to delete a cluster forcefully. Default to false if not specified.", "in": "query", - "name": "force", - "schema": { "type": "string" } + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { - "application/json": { "schema": { "type": "object" } } - }, - "description": "OK" + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Delete a workload cluster.", - "tags": ["clusters"] + } }, - "get": { - "operationId": "GetCluster", + "put": { + "tags": [ + "clusters" + ], + "summary": "Update a workload cluster.", + "operationId": "UpdateCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } ], "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } + "description": "KubeSmartCluster spec", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + } + }, + "required": true }, "responses": { "200": { + "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } }, - "summary": "Get a workload cluster.", - "tags": ["clusters"] + "x-codegen-request-body-name": "cluster" }, - "put": { - "operationId": "UpdateCluster", + "delete": { + "tags": [ + "clusters" + ], + "summary": "Delete a workload cluster.", + "operationId": "DeleteCluster", "parameters": [ { + "name": "namespace", + "in": "query", "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } + }, + { + "name": "force", "in": "query", - "name": "namespace", - "schema": { "type": "string" } + "description": "Whether to delete a cluster forcefully. Default to false if not specified.", + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" - } - } - }, - "description": "KubeSmartCluster spec", - "required": true - }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" - } - } - }, - "description": "OK" + "description": "OK", + "content": {} }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Update a workload cluster.", - "tags": ["clusters"] + } } }, "/clusters/:cluster/addons": { "get": { + "tags": [ + "clusters" + ], + "summary": "Get addons of a workload cluster.", "operationId": "listClusterAddons", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/v1alpha1.AddonList" } + "schema": { + "$ref": "#/components/schemas/v1alpha1.AddonList" + } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Get addons of a workload cluster.", - "tags": ["clusters"] + } } }, "/clusters/:cluster/kubeconfig": { "get": { + "tags": [ + "clusters" + ], + "summary": "Get the kubeconfig of a workload cluster.", "operationId": "GetClusterKubeconfig", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/cluster.KubeConfig" } + "schema": { + "$ref": "#/components/schemas/cluster.KubeConfig" + } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Get the kubeconfig of a workload cluster.", - "tags": ["clusters"] + } } }, "/clusters/{cluster}/proxy/{k8s_url}": { - "delete": { + "get": { + "tags": [ + "workload clusters" + ], + "summary": "Proxy all requests to the workload kubernetes cluster.", "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } + ] + }, + "put": { + "tags": [ + "workload clusters" ], - "responses": null, "summary": "Proxy all requests to the workload kubernetes cluster.", - "tags": ["workload clusters"] - }, - "get": { "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } + ] + }, + "post": { + "tags": [ + "workload clusters" ], - "responses": null, "summary": "Proxy all requests to the workload kubernetes cluster.", - "tags": ["workload clusters"] - }, - "head": { "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } + ] + }, + "delete": { + "tags": [ + "workload clusters" ], - "responses": null, "summary": "Proxy all requests to the workload kubernetes cluster.", - "tags": ["workload clusters"] - }, - "patch": { "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } + ] + }, + "head": { + "tags": [ + "workload clusters" ], - "responses": null, "summary": "Proxy all requests to the workload kubernetes cluster.", - "tags": ["workload clusters"] - }, - "post": { "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } + ] + }, + "patch": { + "tags": [ + "workload clusters" ], - "responses": null, "summary": "Proxy all requests to the workload kubernetes cluster.", - "tags": ["workload clusters"] - }, - "put": { "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "description": "The namespace name. Default to default namespace if not specified.", - "in": "query", "name": "namespace", - "schema": { "type": "string" } + "in": "query", + "description": "The namespace name. Default to default namespace if not specified.", + "schema": { + "type": "string" + } } - ], - "responses": null, - "summary": "Proxy all requests to the workload kubernetes cluster.", - "tags": ["workload clusters"] + ] } }, "/compatibility/versions": { "get": { + "tags": [ + "upgrade" + ], + "summary": "Get the current SKS compatible sksVersion list", "operationId": "compatibleSKSVersion", - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { - "schema": { "items": { "type": "string" }, "type": "array" } + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Get the current SKS compatible sksVersion list", - "tags": ["upgrade"] + } } }, "/compatibility/vm-templates": { "get": { + "tags": [ + "upgrade" + ], + "summary": "Get Compatible vm template sks Version List", "operationId": "compatibleVmTemplate", - "requestBody": { - "content": { "application/json": { "schema": { "type": "object" } } } - }, "responses": { "200": { + "description": "OK", "content": { "application/json": { - "schema": { "items": { "type": "string" }, "type": "array" } + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } - }, - "summary": "Get Compatible vm template sks Version List", - "tags": ["upgrade"] + } } }, "/healthz": { "get": { + "tags": [ + "healthz" + ], + "summary": "Check service health.", "operationId": "GetHealth", "responses": { "200": { + "description": "{\"message\": \"healthy\"}", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/restful.Info" } + "schema": { + "$ref": "#/components/schemas/restful.Info" + } } - }, - "description": "{\"message\": \"healthy\"}" + } } - }, - "summary": "Check service health.", - "tags": ["healthz"] + } } }, "/licenses/validate": { "post": { + "tags": [ + "license" + ], + "summary": "Validate and parse license code.", "operationId": "validateLicense", "requestBody": { + "description": "Issued by the license code", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/license.licenseCode" } + "schema": { + "$ref": "#/components/schemas/license.licenseCode" + } } }, - "description": "Issued by the license code", "required": true }, "responses": { "200": { + "description": "OK", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/license.License" } + "schema": { + "$ref": "#/components/schemas/license.License" + } } - }, - "description": "OK" + } }, "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/errors.ErrorResponse" } } - }, - "description": "Internal Server Error" + } } }, - "summary": "Validate and parse license code.", - "tags": ["license"] + "x-codegen-request-body-name": "code" + } + } + }, + "components": { + "schemas": { + "cluster.KubeConfig": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "Base64 encoded string" + } + } + }, + "errors.ErrorResponse": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "code": { + "type": "integer", + "description": "Suggested HTTP return code for this status, 0 if not set." + }, + "continue": { + "type": "string", + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." + }, + "details": { + "$ref": "#/components/schemas/v1.StatusDetails" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "message": { + "type": "string", + "description": "A human-readable description of the status of this operation." + }, + "reason": { + "type": "string", + "description": "A machine-readable description of why this operation is in the\n\"Failure\" status. If this value is empty there\nis no information available. A Reason clarifies an HTTP status\ncode but does not override it." + }, + "remainingItemCount": { + "type": "integer", + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + }, + "status": { + "type": "string", + "description": "Status of the operation.\nOne of: \"Success\" or \"Failure\".\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + } + }, + "instance.connectivityResponse": { + "type": "object", + "properties": { + "connectable": { + "type": "boolean", + "description": "检查结果" + }, + "host": { + "type": "string" + }, + "message": { + "type": "string", + "description": "附加消息" + }, + "port": { + "type": "integer" + }, + "protocol": { + "type": "string" + }, + "success": { + "type": "boolean", + "description": "是否执行成功" + } + } + }, + "instance.labelSets": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "intstr.IntOrString": { + "type": "object", + "properties": { + "intVal": { + "type": "integer" + }, + "strVal": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "license.License": { + "type": "object", + "properties": { + "license_type": { + "type": "integer", + "description": "The license type." + }, + "max_socket_num": { + "type": "integer", + "description": "the max allow machine cpu socket num." + }, + "max_vcpu_num": { + "type": "integer", + "description": "The max allowed vcpu num." + }, + "period": { + "type": "integer", + "description": "The license valid period in unit second." + }, + "product_name": { + "type": "string", + "description": "The product_name must be SKS." + }, + "serial": { + "type": "string", + "description": "The serial number of the product instance." + }, + "sign_date": { + "type": "integer", + "description": "The license signed date." + }, + "software_edition": { + "type": "integer", + "description": "The software edition." + } + } + }, + "license.licenseCode": { + "type": "object", + "properties": { + "code": { + "type": "string" + } + } + }, + "resource.Quantity": { + "type": "object", + "properties": { + "Format": { + "type": "string" + } + } + }, + "restful.Info": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "runtime.RawExtension": { + "type": "object" + }, + "sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "The hostname on which the API server is serving." + }, + "port": { + "type": "integer", + "description": "The port on which the API server is serving." + } + } + }, + "sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { + "type": "object", + "properties": { + "advertiseAddress": { + "type": "string", + "description": "AdvertiseAddress sets the IP address for the API server to advertise." + }, + "bindPort": { + "type": "integer", + "description": "BindPort sets the secure port for the API Server to bind to.\nDefaults to 6443." + } + } + }, + "v1.Duration": { + "type": "object", + "properties": { + "time.Duration": { + "type": "integer" + } + } + }, + "v1.FieldsV1": { + "type": "object" + }, + "v1.LabelSelector": { + "type": "object", + "properties": { + "matchExpressions": { + "type": "array", + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "items": { + "$ref": "#/components/schemas/v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed." + } + } + }, + "v1.LabelSelectorRequirement": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "key is the label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + }, + "values": { + "type": "array", + "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.", + "items": { + "type": "string" + } + } + } + }, + "v1.ManagedFieldsEntry": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted." + }, + "fieldsType": { + "type": "string", + "description": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"" + }, + "fieldsV1": { + "$ref": "#/components/schemas/v1.FieldsV1" + }, + "manager": { + "type": "string", + "description": "Manager is an identifier of the workflow managing these fields." + }, + "operation": { + "type": "string", + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'." + }, + "subresource": { + "type": "string", + "description": "Subresource is the name of the subresource used to update that object, or\nempty string if the object was updated through the main resource. The\nvalue of this field is used to distinguish between managers, even if they\nshare the same name. For example, a status update will be distinct from a\nregular update using the same manager name.\nNote that the APIVersion field is not related to the Subresource field and\nit always corresponds to the version of the main resource." + }, + "time": { + "type": "string", + "description": "Time is the timestamp of when the ManagedFields entry was added. The\ntimestamp will also be updated if a field is added, the manager\nchanges any of the owned fields value or removes a field. The\ntimestamp does not update when a field is removed from the entry\nbecause another manager took it over." + } + } + }, + "v1.ObjectReference": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "fieldPath": { + "type": "string", + "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.\nTODO: this design is not final and this field is subject to change in the future." + }, + "kind": { + "type": "string", + "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + }, + "namespace": { + "type": "string", + "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" + }, + "resourceVersion": { + "type": "string", + "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "uid": { + "type": "string", + "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids" + } + } + }, + "v1.OwnerReference": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nSee https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion\nfor how the garbage collector interacts with this field and enforces the foreground deletion.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned." + }, + "controller": { + "type": "boolean", + "description": "If true, this reference points to the managing controller." + }, + "kind": { + "type": "string", + "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + }, + "uid": { + "type": "string", + "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + } + } + }, + "v1.SecretReference": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name is unique within a namespace to reference a secret resource." + }, + "namespace": { + "type": "string", + "description": "namespace defines the space within which the secret name must be unique." + } + } + }, + "v1.StatusCause": { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "The field of the resource that has caused this error, as named by its JSON\nserialization. May include dot and postfix notation for nested attributes.\nArrays are zero-indexed. Fields may appear more than once in an array of\ncauses due to fields having multiple errors.\nOptional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"" + }, + "message": { + "type": "string", + "description": "A human-readable description of the cause of the error. This field may be\npresented as-is to a reader." + }, + "reason": { + "type": "string", + "description": "A machine-readable description of the cause of the error. If this value is\nempty there is no information available." + } + } + }, + "v1.StatusDetails": { + "type": "object", + "properties": { + "causes": { + "type": "array", + "description": "The Causes array includes more details associated with the StatusReason\nfailure. Not all StatusReasons may provide detailed causes.", + "items": { + "$ref": "#/components/schemas/v1.StatusCause" + } + }, + "group": { + "type": "string", + "description": "The group attribute of the resource associated with the status StatusReason." + }, + "kind": { + "type": "string", + "description": "The kind attribute of the resource associated with the status StatusReason.\nOn some operations may differ from the requested resource Kind.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "description": "The name attribute of the resource associated with the status StatusReason\n(when there is a single name which can be described)." + }, + "retryAfterSeconds": { + "type": "integer", + "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate\nthe client must take an alternate action - for those errors this field may indicate how long to wait\nbefore taking the alternate action." + }, + "uid": { + "type": "string", + "description": "UID of the resource.\n(when there is a single resource which can be described).\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + } + } + }, + "v1.Taint": { + "type": "object", + "properties": { + "effect": { + "type": "string", + "description": "Required. The effect of the taint on pods\nthat do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute." + }, + "key": { + "type": "string", + "description": "Required. The taint key to be applied to a node." + }, + "timeAdded": { + "type": "string", + "description": "TimeAdded represents the time at which the taint was added.\nIt is only written for NoExecute taints." + }, + "value": { + "type": "string", + "description": "The taint value corresponding to the taint key." + } + } + }, + "v1.TypedObjectReference": { + "type": "object", + "properties": { + "apiGroup": { + "type": "string", + "description": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required." + }, + "kind": { + "type": "string", + "description": "Kind is the type of resource being referenced" + }, + "name": { + "type": "string", + "description": "Name is the name of resource being referenced" + }, + "namespace": { + "type": "string", + "description": "Namespace is the namespace of resource being referenced\nNote that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.\n(Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.\n+featureGate=CrossNamespaceVolumeDataSource" + } + } + }, + "v1alpha1.Addon": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "creationTimestamp": { + "type": "string", + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only." + }, + "deletionTimestamp": { + "type": "string", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "finalizers": { + "type": "array", + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+patchStrategy=merge", + "items": { + "type": "string" + } + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" + }, + "generation": { + "type": "integer", + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" + }, + "managedFields": { + "type": "array", + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n", + "items": { + "$ref": "#/components/schemas/v1.ManagedFieldsEntry" + } + }, + "name": { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" + }, + "ownerReferences": { + "type": "array", + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+patchMergeKey=uid\n+patchStrategy=merge", + "items": { + "$ref": "#/components/schemas/v1.OwnerReference" + } + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + }, + "spec": { + "$ref": "#/components/schemas/v1alpha1.AddonSpec" + }, + "status": { + "$ref": "#/components/schemas/v1alpha1.AddonStatus" + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + } + } + }, + "v1alpha1.AddonDataValues": { + "type": "object", + "properties": { + "secretRef": { + "$ref": "#/components/schemas/v1.SecretReference" + }, + "yaml": { + "type": "string", + "description": "Yaml is the inline yaml for the addon configuration." + } + } + }, + "v1alpha1.AddonList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "continue": { + "type": "string", + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/v1alpha1.Addon" + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "remainingItemCount": { + "type": "integer", + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + } + } + }, + "v1alpha1.AddonPackage": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name is the addon package name." + }, + "version": { + "type": "string", + "description": "Version is the addon package version." + } + } + }, + "v1alpha1.AddonSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "package": { + "$ref": "#/components/schemas/v1alpha1.AddonPackage" + }, + "paused": { + "type": "boolean", + "description": "Paused can be used to prevent controllers from processing this addon and all its associated objects." + } + } + }, + "v1alpha1.AddonStatus": { + "type": "object", + "properties": { + "failureMessage": { + "type": "string", + "description": "FailureMessage indicates that there is a fatal problem reconciling the\nstate, and will be set to a descriptive error message." + }, + "phase": { + "type": "string", + "description": "Phase represents the current phase of cluster actuation.\nE.g. Pending, Running, Terminating, Failed etc." + }, + "ready": { + "type": "boolean", + "description": "Ready indicates whether the addon is installed successfully." + }, + "version": { + "type": "string", + "description": "Version is the applied addon package version." + } + } + }, + "v1alpha1.AddonsStatus": { + "type": "object", + "properties": { + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/v1alpha1.AddonStatus" + }, + "description": "Details is the detail status of all addons." + }, + "progress": { + "type": "string", + "description": "Progress is ReadyCount/TotalCount for indicating the progress of addons creation." + }, + "readyCount": { + "type": "integer", + "description": "Total number of addons in Ready status." + }, + "totalCount": { + "type": "integer", + "description": "Total number of expected addons." + } + } + }, + "v1alpha1.AgentComponentsConfig": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "hostConfigAgent": { + "$ref": "#/components/schemas/v1alpha1.HostConfigAgentSpec" + } + } + }, + "v1alpha1.CNIConfig": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "ecpConfig": { + "$ref": "#/components/schemas/v1alpha1.ECPConfig" + }, + "name": { + "type": "string", + "description": "Name is the CNI name, e.g. calico, ecp, everoute-cni, stub-cni, etc." + }, + "version": { + "type": "string", + "description": "Version is the CNI version." + } + } + }, + "v1alpha1.CSIAddonConfig": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "name": { + "type": "string", + "description": "Name is the CSI addon name." + }, + "version": { + "type": "string", + "description": "Version is the CSI addon version." + } + } + }, + "v1alpha1.CSIConfig": { + "type": "object", + "properties": { + "elf": { + "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + }, + "stub": { + "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + }, + "zbs": { + "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + } + } + }, + "v1alpha1.CertManagerComponentsConfig": { + "type": "object", + "properties": { + "certManager": { + "$ref": "#/components/schemas/v1alpha1.CertManagerSpec" + }, + "enabled": { + "type": "boolean" + } + } + }, + "v1alpha1.CertManagerSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.CloudProviderSpec": { + "type": "object", + "properties": { + "cloudtower": { + "$ref": "#/components/schemas/v1alpha1.CloudTowerSpec" + }, + "ksph": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartPhysicalHostSpec" + }, + "name": { + "type": "string", + "description": "Name is the name of the cloud provider used for this cluster.\nIt can be cloudtower, ksph, etc." + } + } + }, + "v1alpha1.CloudTowerConnect": { + "type": "object", + "properties": { + "authMode": { + "type": "string", + "description": "AuthMode is the authentication mode of CloudTower server." + }, + "password": { + "type": "string", + "description": "Password is the password for authenticating the CloudTower server." + }, + "server": { + "type": "string", + "description": "Server is the URI for CloudTower server API." + }, + "skipTLSVerify": { + "type": "boolean", + "description": "SkipTLSVerify indicates whether to skip verification for the TLS certificate of the CloudTower server." + }, + "username": { + "type": "string", + "description": "Username is the username for authenticating the CloudTower server." + } + } + }, + "v1alpha1.CloudTowerServer": { + "type": "object", + "properties": { + "secretRef": { + "$ref": "#/components/schemas/v1.SecretReference" + }, + "spec": { + "$ref": "#/components/schemas/v1alpha1.CloudTowerConnect" + } + } + }, + "v1alpha1.CloudTowerSpec": { + "type": "object", + "properties": { + "cloudtowerServer": { + "$ref": "#/components/schemas/v1alpha1.CloudTowerServer" + }, + "elfCluster": { + "type": "string", + "description": "ElfCluster is the id of ELF cluster managed by the CloudTower server in which the VMs will be created." + }, + "elfVlan": { + "type": "string", + "description": "ElfVlan is the VLAN id in the CloudTower server." + }, + "vmTemplate": { + "type": "string", + "description": "VMTemplate is the name or id of VM template in the Tower Content Library from which the VMs are cloned." + }, + "zbsVip": { + "type": "string", + "description": "ZBS cluster VIP." + } + } + }, + "v1alpha1.ClusterAutoscalerConfig": { + "type": "object", + "properties": { + "clusterAutoscaler": { + "$ref": "#/components/schemas/v1alpha1.ClusterAutoscalerSpec" + }, + "enabled": { + "type": "boolean" + } + } + }, + "v1alpha1.ClusterAutoscalerSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.ClusterConfigurationSpec": { + "type": "object", + "properties": { + "autoResourceReserved": { + "type": "boolean", + "description": "AutoResourceReserved specifies whether to automatically configure resource reservations." + }, + "caCerts": { + "type": "string" + }, + "certificatesExpiryDays": { + "type": "integer", + "description": "CertificatesExpiryDays indicates a rollout needs to be performed if the\ncertificates of the ControlPlane machine will expire within the specified days.\nIf this value is nil, the default certificatesExpiryDays will be used instead.\nDefaults to 30 days." + }, + "customImageRegistry": { + "type": "string" + }, + "kubernetes": { + "$ref": "#/components/schemas/v1alpha1.KubernetesConfiguration" + }, + "nodeDrainTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "nodeVolumeDetachTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "operation": { + "$ref": "#/components/schemas/v1alpha1.OperationConfiguration" + }, + "proxy": { + "$ref": "#/components/schemas/v1alpha1.ProxyConfiguration" + }, + "security": { + "$ref": "#/components/schemas/v1alpha1.SecurityConfiguration" + }, + "skipCreateEverouteNetworkPolicy": { + "type": "boolean", + "description": "SkipCreateEverouteNetworkPolicy specifies whether to skip automatic creation of the Everoute network policies for the cluster to allow cluster nodes inter connection." + }, + "skipTLSVerify": { + "type": "boolean" + }, + "timezone": { + "$ref": "#/components/schemas/v1alpha1.TimezoneConfiguration" + } + } + }, + "v1alpha1.ClusterResources": { + "type": "object", + "properties": { + "controlPlane": { + "$ref": "#/components/schemas/v1alpha1.Resources" + }, + "total": { + "$ref": "#/components/schemas/v1alpha1.Resources" + }, + "workers": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/v1alpha1.Resources" + }, + "description": "Workers is the resources map allocated to all worker groups." + } + } + }, + "v1alpha1.ClusterTopology": { + "type": "object", + "properties": { + "controlPlane": { + "$ref": "#/components/schemas/v1alpha1.ControlPlaneGroup" + }, + "workers": { + "type": "array", + "description": "WorkerGroups are the node groups for Worker nodes.", + "items": { + "$ref": "#/components/schemas/v1alpha1.WorkerGroup" + } + } + } + }, + "v1alpha1.ComponentsConfig": { + "type": "object", + "properties": { + "agents": { + "$ref": "#/components/schemas/v1alpha1.AgentComponentsConfig" + }, + "certManager": { + "$ref": "#/components/schemas/v1alpha1.CertManagerComponentsConfig" + }, + "clusterAutoscaler": { + "$ref": "#/components/schemas/v1alpha1.ClusterAutoscalerConfig" + }, + "ecpadapter": { + "$ref": "#/components/schemas/v1alpha1.ECPAdapterConfig" + }, + "externaldns": { + "$ref": "#/components/schemas/v1alpha1.ExternalDNSConfig" + }, + "gpu": { + "$ref": "#/components/schemas/v1alpha1.GPUComponentsConfig" + }, + "ingress": { + "$ref": "#/components/schemas/v1alpha1.IngressComponentsConfig" + }, + "loadbalancer": { + "$ref": "#/components/schemas/v1alpha1.LoadBalancerComponentsConfig" + }, + "logging": { + "$ref": "#/components/schemas/v1alpha1.LoggingComponentsConfig" + }, + "monitoring": { + "$ref": "#/components/schemas/v1alpha1.MonitoringComponentsConfig" + } + } + }, + "v1alpha1.ContourSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.ControlPlaneGroup": { + "type": "object", + "properties": { + "autoResourceReserved": { + "type": "boolean", + "description": "AutoResourceReserved specifies whether to automatically configure resource reservations." + }, + "cloudProvider": { + "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + }, + "machineHealthCheck": { + "$ref": "#/components/schemas/v1alpha1.MachineHealthCheck" + }, + "name": { + "type": "string", + "description": "Name is the name of this node group." + }, + "nodeAutoscaler": { + "$ref": "#/components/schemas/v1alpha1.NodeAutoscaler" + }, + "nodeConfig": { + "$ref": "#/components/schemas/v1alpha1.NodeConfig" + }, + "nodeDrainTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "nodeVolumeDetachTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "placementGroup": { + "$ref": "#/components/schemas/v1alpha1.PlacementGroup" + }, + "replicas": { + "type": "integer", + "description": "Replicas is the number of nodes in this node group." + }, + "rolloutBefore": { + "$ref": "#/components/schemas/v1beta1.RolloutBefore" + } + } + }, + "v1alpha1.ECPAdapterConfig": { + "type": "object", + "properties": { + "ecpadapter": { + "$ref": "#/components/schemas/v1alpha1.ECPAdapterSpec" + }, + "enabled": { + "type": "boolean" + } + } + }, + "v1alpha1.ECPAdapterSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.ECPConfig": { + "type": "object", + "properties": { + "fakeIP": { + "type": "string", + "description": "ECP internal gateway any don't conflict" + }, + "ippools": { + "type": "array", + "description": "IP pools for pods", + "items": { + "$ref": "#/components/schemas/v1alpha1.ECPIPPool" + } + }, + "uplink": { + "type": "string", + "description": "The NIC name" + }, + "uplinkIP": { + "type": "string", + "description": "The NIC IP/Prefix" + } + } + }, + "v1alpha1.ECPIPPool": { + "type": "object", + "properties": { + "cidr": { + "type": "string", + "description": "CIDR for Pod network segment" + }, + "end": { + "type": "string", + "description": "End is the end ip of an ip range, required Start" + }, + "except": { + "type": "array", + "description": "Except is IP net string array, e.g. [192.168.1.0/24, 192.168.2.1/32], when allocate ip to Pod, ip in Except won't be allocated", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string", + "description": "Subnet gateway" + }, + "name": { + "type": "string", + "description": "IP pool name" + }, + "start": { + "type": "string", + "description": "Start is the start ip of an ip range, required End" + }, + "subnet": { + "type": "string", + "description": "CIDR entire subnet and default to `CIDR`" + } + } + }, + "v1alpha1.ElasticCurator": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.ElasticSearchSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.EventExporter": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.ExternalDNSConfig": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "externaldns": { + "$ref": "#/components/schemas/v1alpha1.ExternalDNSSpec" + } + } + }, + "v1alpha1.ExternalDNSSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.FailureDetails": { + "type": "object", + "properties": { + "causes": { + "type": "array", + "description": "Causes represents all causes of FailureReason, possibly more than one.", + "items": { + "$ref": "#/components/schemas/v1.StatusCause" + } + } + } + }, + "v1alpha1.FluentBitSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.GPUComponentsConfig": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "nvidiaGPUOperator": { + "$ref": "#/components/schemas/v1alpha1.NVIDIAGPUOperatorSpec" + } + } + }, + "v1alpha1.GPUPassthroughDeviceSpec": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Count is the number of GPU. Defaults to 1." + }, + "model": { + "type": "string", + "description": "Model is the model name of a physical GPU, e.g. 'A16'." + } + } + }, + "v1alpha1.HostConfigAgentSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.IngressComponentsConfig": { + "type": "object", + "properties": { + "contour": { + "$ref": "#/components/schemas/v1alpha1.ContourSpec" + }, + "enabled": { + "type": "boolean" + } + } + }, + "v1alpha1.KibanaSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.KubePrometheusSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.KubeSmartCluster": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "creationTimestamp": { + "type": "string", + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only." + }, + "deletionTimestamp": { + "type": "string", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "finalizers": { + "type": "array", + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+patchStrategy=merge", + "items": { + "type": "string" + } + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" + }, + "generation": { + "type": "integer", + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" + }, + "managedFields": { + "type": "array", + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n", + "items": { + "$ref": "#/components/schemas/v1.ManagedFieldsEntry" + } + }, + "name": { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" + }, + "ownerReferences": { + "type": "array", + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+patchMergeKey=uid\n+patchStrategy=merge", + "items": { + "$ref": "#/components/schemas/v1.OwnerReference" + } + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + }, + "spec": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterSpec" + }, + "status": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterStatus" + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + } + } + }, + "v1alpha1.KubeSmartClusterList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "continue": { + "type": "string", + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartCluster" + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "remainingItemCount": { + "type": "integer", + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + } + } + }, + "v1alpha1.KubeSmartClusterSpec": { + "type": "object", + "properties": { + "cloudProvider": { + "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + }, + "clusterConfiguration": { + "$ref": "#/components/schemas/v1alpha1.ClusterConfigurationSpec" + }, + "components": { + "$ref": "#/components/schemas/v1alpha1.ComponentsConfig" + }, + "controlPlaneEndpoint": { + "$ref": "#/components/schemas/sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint" + }, + "network": { + "$ref": "#/components/schemas/v1alpha1.NetworkConfig" + }, + "paused": { + "type": "boolean", + "description": "Paused can be used to prevent controllers from processing the Cluster and all its associated objects." + }, + "platform": { + "$ref": "#/components/schemas/v1alpha1.Platform" + }, + "storage": { + "$ref": "#/components/schemas/v1alpha1.StorageConfig" + }, + "topology": { + "$ref": "#/components/schemas/v1alpha1.ClusterTopology" + }, + "version": { + "type": "string", + "description": "Version specifies the K8s version for the cluster." + } + } + }, + "v1alpha1.KubeSmartClusterStatus": { + "type": "object", + "properties": { + "addons": { + "$ref": "#/components/schemas/v1alpha1.AddonsStatus" + }, + "addonsReady": { + "type": "boolean", + "description": "AddonsReady indicates whether all cluster addons are in Ready state." + }, + "clusterInfraType": { + "type": "string", + "description": "ClusterInfraType records the cloud infrastructure type for the cluster." + }, + "conditions": { + "type": "array", + "description": "Conditions defines current service state of the KubeSmartCluster.", + "items": { + "$ref": "#/components/schemas/v1beta1.Condition" + } + }, + "controlPlaneAvailable": { + "type": "boolean", + "description": "ControlPlaneAvailable indicates that the first control plane instance has completed the kubeadm init operation\nand so the control plane is available and an API server instance is ready for processing requests. It doesn't require CNI is installed." + }, + "controlPlaneReady": { + "type": "boolean", + "description": "ControlPlaneReady indicates whether the ControlPlane nodes are in Ready state. It means CNI is installed." + }, + "controlPlanes": { + "$ref": "#/components/schemas/v1alpha1.NodesStatus" + }, + "csiNames": { + "type": "string", + "description": "CSINames is the names of installed CSI." + }, + "failureDetails": { + "$ref": "#/components/schemas/v1alpha1.FailureDetails" + }, + "failureMessage": { + "type": "string", + "description": "FailureMessage indicates that there is a fatal problem reconciling the\nstate, and will be set to a descriptive error message." + }, + "failureReason": { + "type": "string", + "description": "FailureReason indicates that there is a fatal problem reconciling the\nstate, and will be set to a token value suitable for\nprogrammatic interpretation." + }, + "kappControllerPodReady": { + "type": "boolean", + "description": "KappControllerPodReady indicates whether kapp-controller pod is ready." + }, + "kubeconfigRef": { + "$ref": "#/components/schemas/v1.SecretReference" + }, + "nodesReady": { + "type": "boolean", + "description": "NodesReady indicates whether all ControlPlane and Worker nodes are in Ready state." + }, + "operation": { + "$ref": "#/components/schemas/v1alpha1.OperationStatus" + }, + "packageManagerReady": { + "type": "boolean", + "description": "PackageManagerReady indicates whether kapp-controller is ready and PackageRepository is reconciled.\nAddons can be installed only after PackageManagerReady is true because kapp-controller is the addon package manager." + }, + "phase": { + "type": "string", + "description": "Phase represents the current operation phase of the cluster.\nE.g. Creating, Running, Updating, Upgrading, Deleting, Failed etc." + }, + "platform": { + "$ref": "#/components/schemas/v1alpha1.Platform" + }, + "ready": { + "type": "boolean", + "description": "Ready indicates whether the cluster is ready for use. It means all nodes and addons are ready." + }, + "requiredNetworkPorts": { + "$ref": "#/components/schemas/v1alpha1.RequiredNetworkPorts" + }, + "resources": { + "$ref": "#/components/schemas/v1alpha1.ClusterResources" + }, + "serverUrl": { + "type": "string", + "description": "ServerURL is the URL of the created K8s cluster API Server." + }, + "sksOriginalVersion": { + "type": "string", + "description": "SKSOriginalVersion is the SKS controller version for the cluster when it's created." + }, + "sksVersion": { + "type": "string", + "description": "SKSVersion is the SKS controller version for the cluster." + }, + "sksYttManifestsVersion": { + "type": "string", + "description": "SKSYttManifestsVersion is the ytt manifests version for the cluster." + }, + "version": { + "type": "string", + "description": "Version is the Kubernetes version for the cluster when the cluster was created/updated successfully." + }, + "vipClaim": { + "$ref": "#/components/schemas/v1alpha1.VIPClaim" + }, + "vmTemplate": { + "type": "string", + "description": "VMTemplate is id of VM template from which the VMs are cloned when the cluster was created/updated successfully." + }, + "workers": { + "$ref": "#/components/schemas/v1alpha1.NodesStatus" + }, + "workersReady": { + "type": "boolean", + "description": "WorkersReady indicates whether all Worker nodes are in Ready state." + } + } + }, + "v1alpha1.KubeSmartPhysicalHostSpec": { + "type": "object", + "properties": { + "fileServerURL": { + "type": "string", + "description": "FileServerURL specifies the address of the file server." + }, + "instanceLabelSelector": { + "$ref": "#/components/schemas/v1.LabelSelector" + }, + "instanceObjectSelector": { + "type": "array", + "description": "InstanceObjectSelector specifies a list of ServerInstances to explicitly use.", + "items": { + "$ref": "#/components/schemas/v1alpha1.ObjectKey" + } + } + } + }, + "v1alpha1.KubernetesConfiguration": { + "type": "object", + "properties": { + "controlPlane": { + "$ref": "#/components/schemas/v1beta1.KubeadmConfigSpec" + }, + "kubeletConfiguration": { + "$ref": "#/components/schemas/runtime.RawExtension" + }, + "workers": { + "$ref": "#/components/schemas/v1beta1.KubeadmConfigSpec" + } + } + }, + "v1alpha1.LoadBalancerComponentsConfig": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "metallb": { + "$ref": "#/components/schemas/v1alpha1.MetalLBSpec" + } + } + }, + "v1alpha1.LoggingComponentsConfig": { + "type": "object", + "properties": { + "elasticcurator": { + "$ref": "#/components/schemas/v1alpha1.ElasticCurator" + }, + "elasticsearch": { + "$ref": "#/components/schemas/v1alpha1.ElasticSearchSpec" + }, + "enabled": { + "type": "boolean" + }, + "eventexporter": { + "$ref": "#/components/schemas/v1alpha1.EventExporter" + }, + "fluentbit": { + "$ref": "#/components/schemas/v1alpha1.FluentBitSpec" + }, + "kibana": { + "$ref": "#/components/schemas/v1alpha1.KibanaSpec" + }, + "loggingoperator": { + "$ref": "#/components/schemas/v1alpha1.LoggingOperatorSpec" + } + } + }, + "v1alpha1.LoggingOperatorSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.MachineHealthCheck": { + "type": "object", + "properties": { + "maxUnhealthy": { + "$ref": "#/components/schemas/intstr.IntOrString" + }, + "nodeStartupTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "remediationTemplate": { + "$ref": "#/components/schemas/v1.ObjectReference" + }, + "unhealthyConditions": { + "type": "array", + "description": "UnhealthyConditions contains a list of the conditions that determine\nwhether a node is considered unhealthy. The conditions are combined in a\nlogical OR, i.e. if any of the conditions is met, the node is unhealthy.", + "items": { + "$ref": "#/components/schemas/v1beta1.UnhealthyCondition" + } + }, + "unhealthyRange": { + "type": "string", + "description": "Any further remediation is only allowed if the number of machines selected by \"selector\" as not healthy\nis within the range of \"UnhealthyRange\". Takes precedence over MaxUnhealthy.\nEg. \"[3-5]\" - This means that remediation will be allowed only when:\n(a) there are at least 3 unhealthy machines (and)\n(b) there are at most 5 unhealthy machines" + } + } + }, + "v1alpha1.MetalLBSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.MonitoringComponentsConfig": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "kubeprometheus": { + "$ref": "#/components/schemas/v1alpha1.KubePrometheusSpec" + } + } + }, + "v1alpha1.NVIDIAGPUOperatorSpec": { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + }, + "disabled": { + "type": "boolean" + }, + "version": { + "type": "string" + } + } + }, + "v1alpha1.Network": { + "type": "object", + "properties": { + "devices": { + "type": "array", + "description": "Devices is the list of network devices used by the node.", + "items": { + "$ref": "#/components/schemas/v1alpha1.NetworkDevice" + } + }, + "ipPoolRef": { + "$ref": "#/components/schemas/v1.TypedObjectReference" + }, + "nameservers": { + "type": "array", + "description": "Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS nameservers.", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1.NetworkConfig": { + "type": "object", + "properties": { + "apiServerPort": { + "type": "integer", + "description": "APIServerPort specifies the port the API Server should bind to.\nDefaults to 6443." + }, + "cni": { + "$ref": "#/components/schemas/v1alpha1.CNIConfig" + }, + "ipPoolRef": { + "$ref": "#/components/schemas/v1.TypedObjectReference" + }, + "managementNetworkInterface": { + "type": "string", + "description": "ManagementNetworkInterface specifies the management network inferface name in the cluster VM. It varies in different OSes, e.g. 'eth0' in CentOS 7.9 and 'ens4' in Rocky Linux 8.6." + }, + "pods": { + "$ref": "#/components/schemas/v1beta1.NetworkRanges" + }, + "serviceDomain": { + "type": "string", + "description": "Domain name for services." + }, + "services": { + "$ref": "#/components/schemas/v1beta1.NetworkRanges" + } + } + }, + "v1alpha1.NetworkDevice": { + "type": "object", + "properties": { + "ipAddrs": { + "type": "array", + "description": "IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign\nto this device.\nRequired when DHCP4 and DHCP6 are both false.", + "items": { + "type": "string" + } + }, + "ipPoolRefs": { + "type": "array", + "description": "IPPoolRefs refers to IPPool objects.", + "items": { + "$ref": "#/components/schemas/v1.TypedObjectReference" + } + }, + "macAddr": { + "type": "string", + "description": "MACAddr is the MAC address used by this device.\nIt is generally a good idea to omit this field and allow a MAC address\nto be generated." + }, + "netmask": { + "type": "string", + "description": "Netmask is the subnet mask used by this device.\nRequired when DHCP4 is false." + }, + "networkType": { + "type": "string", + "description": "NetworkType is the VM network type, default IPV4_DHCP" + }, + "routes": { + "type": "array", + "description": "Required when DHCP4 is false.", + "items": { + "$ref": "#/components/schemas/v1alpha1.NetworkDeviceRoute" + } + }, + "tag": { + "type": "string", + "description": "The network device tag" + }, + "vlan": { + "type": "string", + "description": "Vlan is the virtual LAN used by the node." + } + } + }, + "v1alpha1.NetworkDeviceRoute": { + "type": "object", + "properties": { + "gateway": { + "type": "string", + "description": "Gateway is the IPv4 gateway used by this route." + }, + "netmask": { + "type": "string", + "description": "Netmask is the subnet mask used by this route." + }, + "network": { + "type": "string", + "description": "Network is the route network address." + } + } + }, + "v1alpha1.NodeAutoscaler": { + "type": "object", + "properties": { + "maxSize": { + "type": "integer", + "description": "MaxSize specifies the maximum number of nodes for the node group.\nThe autoscaler will not scale the group above this number." + }, + "minSize": { + "type": "integer", + "description": "MinSize specifies the minimum number of nodes for the node group.\nThe autoscaler will not scale the group below this number." + } + } + }, + "v1alpha1.NodeConfig": { + "type": "object", + "properties": { + "cloneMode": { + "type": "string", + "description": "CloneMode is the clone type of the node." + }, + "cpuCores": { + "type": "integer", + "description": "CPUCores is the number of cpu cores of the node." + }, + "diskSizeGB": { + "type": "integer", + "description": "DiskSizeGB is the system disk size of the node." + }, + "gpuDevices": { + "type": "array", + "description": "GPUDevices is the list of physical GPUs used by the virtual machine.", + "items": { + "$ref": "#/components/schemas/v1alpha1.GPUPassthroughDeviceSpec" + } + }, + "memoryMB": { + "type": "integer", + "description": "MemoryMB is the memory size of the node." + }, + "network": { + "$ref": "#/components/schemas/v1alpha1.Network" + }, + "vgpuDevices": { + "type": "array", + "description": "VGPUDevices is the list of virtual GPUs used by the virtual machine.", + "items": { + "$ref": "#/components/schemas/v1alpha1.VGPUDeviceSpec" + } + }, + "vmTemplate": { + "type": "string", + "description": "VMTemplate is id of VM template from which the VMs are cloned." + } + } + }, + "v1alpha1.NodesStatus": { + "type": "object", + "properties": { + "observedCount": { + "type": "integer", + "description": "Total number of obverserd replicas. These replicas can be in Ready status or scaling up/down.\nThis is finally to be equal to the replica count defined in spec field." + }, + "progress": { + "type": "string", + "description": "Progress is ReadyCount/TotalCount for indicating the progress of nodes creation." + }, + "readyCount": { + "type": "integer", + "description": "Total number of nodes in Ready status." + }, + "totalCount": { + "type": "integer", + "description": "Total number of expected nodes." + } + } + }, + "v1alpha1.ObjectKey": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name is unique within a namespace to reference a object resource." + }, + "namespace": { + "type": "string", + "description": "namespace defines the space within which the object name must be unique." + } + } + }, + "v1alpha1.OperationConfiguration": { + "type": "object", + "properties": { + "createClusterTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "rollbackClusterTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "updateClusterTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "upgradeClusterTimeout": { + "$ref": "#/components/schemas/v1.Duration" + } + } + }, + "v1alpha1.OperationStatus": { + "type": "object", + "properties": { + "phase": { + "type": "string", + "description": "Phase represents the current operation phase of the cluster." + }, + "startTime": { + "type": "string", + "description": "StartTime is the time when the operation started." + }, + "timeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "type": { + "type": "string", + "description": "Type is operation type, e.g. Create, Update, etc.." + } + } + }, + "v1alpha1.PlacementGroup": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name is the name of this placement group" + } + } + }, + "v1alpha1.Platform": { + "type": "object", + "properties": { + "architecture": { + "type": "string", + "description": "+kubebuilder:validation:Enum=x86_64;AArch64" + } + } + }, + "v1alpha1.ProtocolPort": { + "type": "object", + "properties": { + "note": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "protocol": { + "type": "string" + } + } + }, + "v1alpha1.ProxyConfiguration": { + "type": "object", + "properties": { + "http": { + "type": "string" + }, + "https": { + "type": "string" + }, + "noProxy": { + "type": "string" + } + } + }, + "v1alpha1.RequiredNetworkPorts": { + "type": "object", + "properties": { + "clusterInterConnection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/v1alpha1.ProtocolPort" + } + } + } + }, + "v1alpha1.Resources": { + "type": "object", + "properties": { + "cpuCore": { + "type": "integer", + "description": "CPUCore is the total number of CPU cores of the physical machine node." + }, + "cpuSocket": { + "type": "integer", + "description": "CPUSocket is the total number of CPU sockets of the physical machine node.\nIt represents the number of CPU sockets on the infrastructure cluster when the cluster/node group runs on virtual machine.\nIt represents the number of CPU sockets on the physical machine when the cluster/node group runs on physical machine." + }, + "cpuThread": { + "type": "integer", + "description": "CPUThread is the total number of CPU threads of the physical machine node." + }, + "gpu": { + "type": "integer", + "description": "GPU is the total number of physical GPUs." + }, + "memory": { + "$ref": "#/components/schemas/resource.Quantity" + }, + "vcpu": { + "type": "integer", + "description": "VCPU is the total number of vCPUs of the virtual machine node." + }, + "vgpu": { + "type": "integer", + "description": "VGPU is the total number of virtual GPUs." + } + } + }, + "v1alpha1.SecurityConfiguration": { + "type": "object", + "properties": { + "sshAuthorizedPublicKey": { + "type": "string" + }, + "sshPassword": { + "type": "string" + }, + "trustedImageRegistries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/v1alpha1.TrustedImageRegistry" + } + } + } + }, + "v1alpha1.StorageConfig": { + "type": "object", + "properties": { + "csi": { + "$ref": "#/components/schemas/v1alpha1.CSIConfig" + } + } + }, + "v1alpha1.TimezoneConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name is the timezone name, e.g. \"Asia/Shanghai\".\nRefer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones." + } + } + }, + "v1alpha1.TrustedImageRegistry": { + "type": "object", + "properties": { + "caCerts": { + "type": "string", + "description": "CaCerts is the base64 encoded CA certificates of the image registry server." + }, + "desc": { + "type": "string", + "description": "Description is the descriptive information of the image registry server." + }, + "skipTLSVerify": { + "type": "boolean", + "description": "SkipTLSVerify is the flag to skip TLS certificate verification for the image registry server." + }, + "uri": { + "type": "string", + "description": "URI is the URI of the image registry server.\ne.g. 192.168.100.100, registry.example.com, 192.168.100.100:8443, registry.example.com:8443/project, http://192.168.100.100, https://192.168.100.100" + } + } + }, + "v1alpha1.VGPUDeviceSpec": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Count is the number of vGPU. Defaults to 1." + }, + "type": { + "type": "string", + "description": "Type is the type name of a virtual GPU, e.g. 'NVIDIA A16-16A'." + } + } + }, + "v1alpha1.VIPClaim": { + "type": "object", + "properties": { + "ipClaimName": { + "type": "string" + }, + "ipPoolName": { + "type": "string" + }, + "ipPoolNamespace": { + "type": "string" + } + } + }, + "v1alpha1.WorkerGroup": { + "type": "object", + "properties": { + "autoResourceReserved": { + "type": "boolean", + "description": "AutoResourceReserved specifies whether to automatically configure resource reservations." + }, + "cloudProvider": { + "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + }, + "machineHealthCheck": { + "$ref": "#/components/schemas/v1alpha1.MachineHealthCheck" + }, + "name": { + "type": "string", + "description": "Name is the name of this node group." + }, + "nodeAutoscaler": { + "$ref": "#/components/schemas/v1alpha1.NodeAutoscaler" + }, + "nodeConfig": { + "$ref": "#/components/schemas/v1alpha1.NodeConfig" + }, + "nodeDrainTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "nodeVolumeDetachTimeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "placementGroup": { + "$ref": "#/components/schemas/v1alpha1.PlacementGroup" + }, + "replicas": { + "type": "integer", + "description": "Replicas is the number of nodes in this node group." + }, + "rolloutStrategy": { + "$ref": "#/components/schemas/v1beta1.MachineDeploymentStrategy" + } + } + }, + "v1beta1.APIServer": { + "type": "object", + "properties": { + "certSANs": { + "type": "array", + "description": "CertSANs sets extra Subject Alternative Names for the API Server signing cert.", + "items": { + "type": "string" + } + }, + "extraArgs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "ExtraArgs is an extra set of flags to pass to the control plane component.\nTODO: This is temporary and ideally we would like to switch all components to\nuse ComponentConfig + ConfigMaps." + }, + "extraVolumes": { + "type": "array", + "description": "ExtraVolumes is an extra set of host volumes, mounted to the control plane component.", + "items": { + "$ref": "#/components/schemas/v1beta1.HostPathMount" + } + }, + "timeoutForControlPlane": { + "$ref": "#/components/schemas/v1.Duration" + } + } + }, + "v1beta1.BootstrapToken": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description sets a human-friendly message why this token exists and what it's used\nfor, so other administrators can know its purpose." + }, + "expires": { + "type": "string", + "description": "Expires specifies the timestamp when this token expires. Defaults to being set\ndynamically at runtime based on the TTL. Expires and TTL are mutually exclusive." + }, + "groups": { + "type": "array", + "description": "Groups specifies the extra groups that this token will authenticate as when/if\nused for authentication", + "items": { + "type": "string" + } + }, + "token": { + "$ref": "#/components/schemas/v1beta1.BootstrapTokenString" + }, + "ttl": { + "$ref": "#/components/schemas/v1.Duration" + }, + "usages": { + "type": "array", + "description": "Usages describes the ways in which this token can be used. Can by default be used\nfor establishing bidirectional trust, but that can be changed here.", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.BootstrapTokenDiscovery": { + "type": "object", + "properties": { + "apiServerEndpoint": { + "type": "string", + "description": "APIServerEndpoint is an IP or domain name to the API server from which info will be fetched." + }, + "caCertHashes": { + "type": "array", + "description": "CACertHashes specifies a set of public key pins to verify\nwhen token-based discovery is used. The root CA found during discovery\nmust match one of these values. Specifying an empty set disables root CA\npinning, which can be unsafe. Each hash is specified as \":\",\nwhere the only currently supported type is \"sha256\". This is a hex-encoded\nSHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded\nASN.1. These hashes can be calculated using, for example, OpenSSL:\nopenssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex", + "items": { + "type": "string" + } + }, + "token": { + "type": "string", + "description": "Token is a token used to validate cluster information\nfetched from the control-plane." + }, + "unsafeSkipCAVerification": { + "type": "boolean", + "description": "UnsafeSkipCAVerification allows token-based discovery\nwithout CA verification via CACertHashes. This can weaken\nthe security of kubeadm since other nodes can impersonate the control-plane." + } + } + }, + "v1beta1.BootstrapTokenString": { + "type": "object" + }, + "v1beta1.ClusterConfiguration": { + "type": "object", + "properties": { + "apiServer": { + "$ref": "#/components/schemas/v1beta1.APIServer" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "certificatesDir": { + "type": "string", + "description": "CertificatesDir specifies where to store or look for all required certificates.\nNB: if not provided, this will default to `/etc/kubernetes/pki`" + }, + "clusterName": { + "type": "string", + "description": "The cluster name" + }, + "controlPlaneEndpoint": { + "type": "string", + "description": "ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it\ncan be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port.\nIn case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort\nare used; in case the ControlPlaneEndpoint is specified but without a TCP port,\nthe BindPort is used.\nPossible usages are:\ne.g. In a cluster with more than one control plane instances, this field should be\nassigned the address of the external load balancer in front of the\ncontrol plane instances.\ne.g. in environments with enforced node recycling, the ControlPlaneEndpoint\ncould be used for assigning a stable DNS to the control plane.\nNB: This value defaults to the first value in the Cluster object status.apiEndpoints array." + }, + "controllerManager": { + "$ref": "#/components/schemas/v1beta1.ControlPlaneComponent" + }, + "dns": { + "$ref": "#/components/schemas/v1beta1.DNS" + }, + "etcd": { + "$ref": "#/components/schemas/v1beta1.Etcd" + }, + "featureGates": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "description": "FeatureGates enabled by the user." + }, + "imageRepository": { + "type": "string", + "description": "ImageRepository sets the container registry to pull images from.\n* If not set, the default registry of kubeadm will be used, i.e.\n * registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0\n * k8s.gcr.io (old registry): all older versions\n Please note that when imageRepository is not set we don't allow upgrades to\n versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use\n a newer patch version with the new registry instead (i.e. >= v1.22.17,\n >= v1.23.15, >= v1.24.9, >= v1.25.0).\n* If the version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)\n `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components\n and for kube-proxy, while `registry.k8s.io` will be used for all the other images." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "kubernetesVersion": { + "type": "string", + "description": "KubernetesVersion is the target version of the control plane.\nNB: This value defaults to the Machine object spec.version" + }, + "networking": { + "$ref": "#/components/schemas/v1beta1.Networking" + }, + "scheduler": { + "$ref": "#/components/schemas/v1beta1.ControlPlaneComponent" + } + } + }, + "v1beta1.Condition": { + "type": "object", + "properties": { + "lastTransitionTime": { + "type": "string", + "description": "Last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when\nthe API field changed is acceptable." + }, + "message": { + "type": "string", + "description": "A human readable message indicating details about the transition.\nThis field may be empty." + }, + "reason": { + "type": "string", + "description": "The reason for the condition's last transition in CamelCase.\nThe specific API may choose whether or not this field is considered a guaranteed API.\nThis field may not be empty." + }, + "severity": { + "type": "string", + "description": "Severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe Severity field MUST be set only when Status=False." + }, + "status": { + "type": "string", + "description": "Status of the condition, one of True, False, Unknown." + }, + "type": { + "type": "string", + "description": "Type of condition in CamelCase or in foo.example.com/CamelCase.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important." + } + } + }, + "v1beta1.ContainerLinuxConfig": { + "type": "object", + "properties": { + "additionalConfig": { + "type": "string", + "description": "AdditionalConfig contains additional configuration to be merged with the Ignition\nconfiguration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging\n\nThe data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/" + }, + "strict": { + "type": "boolean", + "description": "Strict controls if AdditionalConfig should be strictly parsed. If so, warnings are treated as errors." + } + } + }, + "v1beta1.ControlPlaneComponent": { + "type": "object", + "properties": { + "extraArgs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "ExtraArgs is an extra set of flags to pass to the control plane component.\nTODO: This is temporary and ideally we would like to switch all components to\nuse ComponentConfig + ConfigMaps." + }, + "extraVolumes": { + "type": "array", + "description": "ExtraVolumes is an extra set of host volumes, mounted to the control plane component.", + "items": { + "$ref": "#/components/schemas/v1beta1.HostPathMount" + } + } + } + }, + "v1beta1.DNS": { + "type": "object", + "properties": { + "imageRepository": { + "type": "string", + "description": "ImageRepository sets the container registry to pull images from.\nif not set, the ImageRepository defined in ClusterConfiguration will be used instead." + }, + "imageTag": { + "type": "string", + "description": "ImageTag allows to specify a tag for the image.\nIn case this value is set, kubeadm does not change automatically the version of the above components during upgrades." + } + } + }, + "v1beta1.Discovery": { + "type": "object", + "properties": { + "bootstrapToken": { + "$ref": "#/components/schemas/v1beta1.BootstrapTokenDiscovery" + }, + "file": { + "$ref": "#/components/schemas/v1beta1.FileDiscovery" + }, + "timeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "tlsBootstrapToken": { + "type": "string", + "description": "TLSBootstrapToken is a token used for TLS bootstrapping.\nIf .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden.\nIf .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information" + } + } + }, + "v1beta1.DiskSetup": { + "type": "object", + "properties": { + "filesystems": { + "type": "array", + "description": "Filesystems specifies the list of file systems to setup.", + "items": { + "$ref": "#/components/schemas/v1beta1.Filesystem" + } + }, + "partitions": { + "type": "array", + "description": "Partitions specifies the list of the partitions to setup.", + "items": { + "$ref": "#/components/schemas/v1beta1.Partition" + } + } + } + }, + "v1beta1.Etcd": { + "type": "object", + "properties": { + "external": { + "$ref": "#/components/schemas/v1beta1.ExternalEtcd" + }, + "local": { + "$ref": "#/components/schemas/v1beta1.LocalEtcd" + } + } + }, + "v1beta1.ExternalEtcd": { + "type": "object", + "properties": { + "caFile": { + "type": "string", + "description": "CAFile is an SSL Certificate Authority file used to secure etcd communication.\nRequired if using a TLS connection." + }, + "certFile": { + "type": "string", + "description": "CertFile is an SSL certification file used to secure etcd communication.\nRequired if using a TLS connection." + }, + "endpoints": { + "type": "array", + "description": "Endpoints of etcd members. Required for ExternalEtcd.", + "items": { + "type": "string" + } + }, + "keyFile": { + "type": "string", + "description": "KeyFile is an SSL key file used to secure etcd communication.\nRequired if using a TLS connection." + } + } + }, + "v1beta1.File": { + "type": "object", + "properties": { + "append": { + "type": "boolean", + "description": "Append specifies whether to append Content to existing file if Path exists." + }, + "content": { + "type": "string", + "description": "Content is the actual content of the file." + }, + "contentFrom": { + "$ref": "#/components/schemas/v1beta1.FileSource" + }, + "encoding": { + "type": "string", + "description": "Encoding specifies the encoding of the file contents." + }, + "owner": { + "type": "string", + "description": "Owner specifies the ownership of the file, e.g. \"root:root\"." + }, + "path": { + "type": "string", + "description": "Path specifies the full path on disk where to store the file." + }, + "permissions": { + "type": "string", + "description": "Permissions specifies the permissions to assign to the file, e.g. \"0640\"." + } + } + }, + "v1beta1.FileDiscovery": { + "type": "object", + "properties": { + "kubeConfigPath": { + "type": "string", + "description": "KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information" + } + } + }, + "v1beta1.FileSource": { + "type": "object", + "properties": { + "secret": { + "$ref": "#/components/schemas/v1beta1.SecretFileSource" + } + } + }, + "v1beta1.Filesystem": { + "type": "object", + "properties": { + "device": { + "type": "string", + "description": "Device specifies the device name" + }, + "extraOpts": { + "type": "array", + "description": "ExtraOpts defined extra options to add to the command for creating the file system.", + "items": { + "type": "string" + } + }, + "filesystem": { + "type": "string", + "description": "Filesystem specifies the file system type." + }, + "label": { + "type": "string", + "description": "Label specifies the file system label to be used. If set to None, no label is used." + }, + "overwrite": { + "type": "boolean", + "description": "Overwrite defines whether or not to overwrite any existing filesystem.\nIf true, any pre-existing file system will be destroyed. Use with Caution." + }, + "partition": { + "type": "string", + "description": "Partition specifies the partition to use. The valid options are: \"auto|any\", \"auto\", \"any\", \"none\", and , where NUM is the actual partition number." + }, + "replaceFS": { + "type": "string", + "description": "ReplaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of .\nNOTE: unless you define a label, this requires the use of the 'any' partition directive." + } + } + }, + "v1beta1.HostPathMount": { + "type": "object", + "properties": { + "hostPath": { + "type": "string", + "description": "HostPath is the path in the host that will be mounted inside\nthe pod." + }, + "mountPath": { + "type": "string", + "description": "MountPath is the path inside the pod where hostPath will be mounted." + }, + "name": { + "type": "string", + "description": "Name of the volume inside the pod template." + }, + "pathType": { + "type": "string", + "description": "PathType is the type of the HostPath." + }, + "readOnly": { + "type": "boolean", + "description": "ReadOnly controls write access to the volume" + } + } + }, + "v1beta1.IgnitionSpec": { + "type": "object", + "properties": { + "containerLinuxConfig": { + "$ref": "#/components/schemas/v1beta1.ContainerLinuxConfig" + } + } + }, + "v1beta1.InitConfiguration": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "bootstrapTokens": { + "type": "array", + "description": "BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create.\nThis information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature", + "items": { + "$ref": "#/components/schemas/v1beta1.BootstrapToken" + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "localAPIEndpoint": { + "$ref": "#/components/schemas/sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint" + }, + "nodeRegistration": { + "$ref": "#/components/schemas/v1beta1.NodeRegistrationOptions" + }, + "patches": { + "$ref": "#/components/schemas/v1beta1.Patches" + }, + "skipPhases": { + "type": "array", + "description": "SkipPhases is a list of phases to skip during command execution.\nThe list of phases can be obtained with the \"kubeadm init --help\" command.\nThis option takes effect only on Kubernetes >=1.22.0.", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.JoinConfiguration": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "caCertPath": { + "type": "string", + "description": "CACertPath is the path to the SSL certificate authority used to\nsecure comunications between node and control-plane.\nDefaults to \"/etc/kubernetes/pki/ca.crt\".\nTODO: revisit when there is defaulting from k/k" + }, + "controlPlane": { + "$ref": "#/components/schemas/v1beta1.JoinControlPlane" + }, + "discovery": { + "$ref": "#/components/schemas/v1beta1.Discovery" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "nodeRegistration": { + "$ref": "#/components/schemas/v1beta1.NodeRegistrationOptions" + }, + "patches": { + "$ref": "#/components/schemas/v1beta1.Patches" + }, + "skipPhases": { + "type": "array", + "description": "SkipPhases is a list of phases to skip during command execution.\nThe list of phases can be obtained with the \"kubeadm init --help\" command.\nThis option takes effect only on Kubernetes >=1.22.0.", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.JoinControlPlane": { + "type": "object", + "properties": { + "localAPIEndpoint": { + "$ref": "#/components/schemas/sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint" + } + } + }, + "v1beta1.KubeadmConfigSpec": { + "type": "object", + "properties": { + "clusterConfiguration": { + "$ref": "#/components/schemas/v1beta1.ClusterConfiguration" + }, + "diskSetup": { + "$ref": "#/components/schemas/v1beta1.DiskSetup" + }, + "files": { + "type": "array", + "description": "Files specifies extra files to be passed to user_data upon creation.", + "items": { + "$ref": "#/components/schemas/v1beta1.File" + } + }, + "format": { + "type": "string", + "description": "Format specifies the output format of the bootstrap data" + }, + "ignition": { + "$ref": "#/components/schemas/v1beta1.IgnitionSpec" + }, + "initConfiguration": { + "$ref": "#/components/schemas/v1beta1.InitConfiguration" + }, + "joinConfiguration": { + "$ref": "#/components/schemas/v1beta1.JoinConfiguration" + }, + "mounts": { + "type": "array", + "description": "Mounts specifies a list of mount points to be setup.", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "ntp": { + "$ref": "#/components/schemas/v1beta1.NTP" + }, + "postKubeadmCommands": { + "type": "array", + "description": "PostKubeadmCommands specifies extra commands to run after kubeadm runs", + "items": { + "type": "string" + } + }, + "preKubeadmCommands": { + "type": "array", + "description": "PreKubeadmCommands specifies extra commands to run before kubeadm runs", + "items": { + "type": "string" + } + }, + "useExperimentalRetryJoin": { + "type": "boolean", + "description": "UseExperimentalRetryJoin replaces a basic kubeadm command with a shell\nscript with retries for joins.\n\nThis is meant to be an experimental temporary workaround on some environments\nwhere joins fail due to timing (and other issues). The long term goal is to add retries to\nkubeadm proper and use that functionality.\n\nThis will add about 40KB to userdata\n\nFor more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055.\n\nDeprecated: This experimental fix is no longer needed and this field will be removed in a future release.\nWhen removing also remove from staticcheck exclude-rules for SA1019 in golangci.yml" + }, + "users": { + "type": "array", + "description": "Users specifies extra users to add", + "items": { + "$ref": "#/components/schemas/v1beta1.User" + } + }, + "verbosity": { + "type": "integer", + "description": "Verbosity is the number for the kubeadm log level verbosity.\nIt overrides the `--v` flag in kubeadm commands." + } + } + }, + "v1beta1.LocalEtcd": { + "type": "object", + "properties": { + "dataDir": { + "type": "string", + "description": "DataDir is the directory etcd will place its data.\nDefaults to \"/var/lib/etcd\"." + }, + "extraArgs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "ExtraArgs are extra arguments provided to the etcd binary\nwhen run inside a static pod." + }, + "imageRepository": { + "type": "string", + "description": "ImageRepository sets the container registry to pull images from.\nif not set, the ImageRepository defined in ClusterConfiguration will be used instead." + }, + "imageTag": { + "type": "string", + "description": "ImageTag allows to specify a tag for the image.\nIn case this value is set, kubeadm does not change automatically the version of the above components during upgrades." + }, + "peerCertSANs": { + "type": "array", + "description": "PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert.", + "items": { + "type": "string" + } + }, + "serverCertSANs": { + "type": "array", + "description": "ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert.", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.MachineDeploymentStrategy": { + "type": "object", + "properties": { + "rollingUpdate": { + "$ref": "#/components/schemas/v1beta1.MachineRollingUpdateDeployment" + }, + "type": { + "type": "string", + "description": "Type of deployment. Allowed values are RollingUpdate and OnDelete.\nThe default is RollingUpdate." + } + } + }, + "v1beta1.MachineRollingUpdateDeployment": { + "type": "object", + "properties": { + "deletePolicy": { + "type": "string", + "description": "DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling.\nValid values are \"Random, \"Newest\", \"Oldest\"\nWhen no value is supplied, the default DeletePolicy of MachineSet is used" + }, + "maxSurge": { + "$ref": "#/components/schemas/intstr.IntOrString" + }, + "maxUnavailable": { + "$ref": "#/components/schemas/intstr.IntOrString" + } + } + }, + "v1beta1.NTP": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enabled specifies whether NTP should be enabled" + }, + "servers": { + "type": "array", + "description": "Servers specifies which NTP servers to use", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.NetworkRanges": { + "type": "object", + "properties": { + "cidrBlocks": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.Networking": { + "type": "object", + "properties": { + "dnsDomain": { + "type": "string", + "description": "DNSDomain is the dns domain used by k8s services. Defaults to \"cluster.local\"." + }, + "podSubnet": { + "type": "string", + "description": "PodSubnet is the subnet used by pods.\nIf unset, the API server will not allocate CIDR ranges for every node.\nDefaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set" + }, + "serviceSubnet": { + "type": "string", + "description": "ServiceSubnet is the subnet used by k8s services.\nDefaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or\nto \"10.96.0.0/12\" if that's unset." + } + } + }, + "v1beta1.NodeRegistrationOptions": { + "type": "object", + "properties": { + "criSocket": { + "type": "string", + "description": "CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use" + }, + "ignorePreflightErrors": { + "type": "array", + "description": "IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered.", + "items": { + "type": "string" + } + }, + "imagePullPolicy": { + "type": "string", + "description": "ImagePullPolicy specifies the policy for image pulling\nduring kubeadm \"init\" and \"join\" operations. The value of\nthis field must be one of \"Always\", \"IfNotPresent\" or\n\"Never\". Defaults to \"IfNotPresent\". This can be used only\nwith Kubernetes version equal to 1.22 and later." + }, + "kubeletExtraArgs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file\nkubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap\nFlags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on." + }, + "name": { + "type": "string", + "description": "Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation.\nThis field is also used in the CommonName field of the kubelet's client certificate to the API server.\nDefaults to the hostname of the node if not provided." + }, + "taints": { + "type": "array", + "description": "Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process\nit will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=\"\"'}. If you don't want to taint your control-plane node, set this field to an\nempty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration.", + "items": { + "$ref": "#/components/schemas/v1.Taint" + } + } + } + }, + "v1beta1.Partition": { + "type": "object", + "properties": { + "device": { + "type": "string", + "description": "Device is the name of the device." + }, + "layout": { + "type": "boolean", + "description": "Layout specifies the device layout.\nIf it is true, a single partition will be created for the entire device.\nWhen layout is false, it means don't partition or ignore existing partitioning." + }, + "overwrite": { + "type": "boolean", + "description": "Overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device.\nUse with caution. Default is 'false'." + }, + "tableType": { + "type": "string", + "description": "TableType specifies the tupe of partition table. The following are supported:\n'mbr': default and setups a MS-DOS partition table\n'gpt': setups a GPT partition table" + } + } + }, + "v1beta1.PasswdSource": { + "type": "object", + "properties": { + "secret": { + "$ref": "#/components/schemas/v1beta1.SecretPasswdSource" + } + } + }, + "v1beta1.Patches": { + "type": "object", + "properties": { + "directory": { + "type": "string", + "description": "Directory is a path to a directory that contains files named \"target[suffix][+patchtype].extension\".\nFor example, \"kube-apiserver0+merge.yaml\" or just \"etcd.json\". \"target\" can be one of\n\"kube-apiserver\", \"kube-controller-manager\", \"kube-scheduler\", \"etcd\". \"patchtype\" can be one\nof \"strategic\" \"merge\" or \"json\" and they match the patch formats supported by kubectl.\nThe default \"patchtype\" is \"strategic\". \"extension\" must be either \"json\" or \"yaml\".\n\"suffix\" is an optional string that can be used to determine which patches are applied\nfirst alpha-numerically.\nThese files can be written into the target directory via KubeadmConfig.Files which\nspecifies additional files to be created on the machine, either with content inline or\nby referencing a secret." + } + } + }, + "v1beta1.RolloutBefore": { + "type": "object", + "properties": { + "certificatesExpiryDays": { + "type": "integer", + "description": "CertificatesExpiryDays indicates a rollout needs to be performed if the\ncertificates of the machine will expire within the specified days." + } + } + }, + "v1beta1.SecretFileSource": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key is the key in the secret's data map for this value." + }, + "name": { + "type": "string", + "description": "Name of the secret in the KubeadmBootstrapConfig's namespace to use." + } + } + }, + "v1beta1.SecretPasswdSource": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Key is the key in the secret's data map for this value." + }, + "name": { + "type": "string", + "description": "Name of the secret in the KubeadmBootstrapConfig's namespace to use." + } + } + }, + "v1beta1.UnhealthyCondition": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "+kubebuilder:validation:Type=string" + }, + "timeout": { + "$ref": "#/components/schemas/v1.Duration" + }, + "type": { + "type": "string", + "description": "+kubebuilder:validation:Type=string" + } + } + }, + "v1beta1.User": { + "type": "object", + "properties": { + "gecos": { + "type": "string", + "description": "Gecos specifies the gecos to use for the user" + }, + "groups": { + "type": "string", + "description": "Groups specifies the additional groups for the user" + }, + "homeDir": { + "type": "string", + "description": "HomeDir specifies the home directory to use for the user" + }, + "inactive": { + "type": "boolean", + "description": "Inactive specifies whether to mark the user as inactive" + }, + "lockPassword": { + "type": "boolean", + "description": "LockPassword specifies if password login should be disabled" + }, + "name": { + "type": "string", + "description": "Name specifies the user name" + }, + "passwd": { + "type": "string", + "description": "Passwd specifies a hashed password for the user" + }, + "passwdFrom": { + "$ref": "#/components/schemas/v1beta1.PasswdSource" + }, + "primaryGroup": { + "type": "string", + "description": "PrimaryGroup specifies the primary group for the user" + }, + "shell": { + "type": "string", + "description": "Shell specifies the user's shell" + }, + "sshAuthorizedKeys": { + "type": "array", + "description": "SSHAuthorizedKeys specifies a list of ssh authorized keys for the user", + "items": { + "type": "string" + } + }, + "sudo": { + "type": "string", + "description": "Sudo specifies a sudo role for the user" + } + } } } }, - "openapi": "3.1.0" -} + "x-original-swagger-version": "2.0" +} \ No newline at end of file diff --git a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json index 40763021..bbabdecd 100644 --- a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json +++ b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json @@ -6,11 +6,14 @@ "errors.ErrorResponse": { "apiVersion": "", "code": "", + "continue": "", "details": "", "kind": "", "message": "", - "metadata": "", "reason": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "", "status": "" }, "instance.connectivityResponse": { @@ -21,14 +24,844 @@ "protocol": "", "success": "" }, - "instance.labelSets": {}, "intstr.IntOrString": { "intVal": "", "strVal": "", "type": "" }, "intstr.Type": {}, - "k8s_io_api_core_v1.ConditionStatus": {} + "k8s_io_api_core_v1.ConditionStatus": {}, + "instance.labelSets": {}, + "license.License": { + "license_type": "", + "max_socket_num": "", + "max_vcpu_num": "", + "period": "", + "product_name": "", + "serial": "", + "sign_date": "", + "software_edition": "" + }, + "license.licenseCode": { + "code": "" + }, + "resource.Quantity": { + "Format": "" + }, + "restful.Info": { + "message": "" + }, + "runtime.RawExtension": {}, + "sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint": { + "host": "", + "port": "" + }, + "sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { + "advertiseAddress": "", + "bindPort": "" + }, + "v1.Duration": { + "time.Duration": "" + }, + "v1.FieldsV1": {}, + "v1.LabelSelector": { + "matchExpressions": "", + "matchLabels": "" + }, + "v1.LabelSelectorRequirement": { + "key": "", + "operator": "", + "values": "" + }, + "v1.ManagedFieldsEntry": { + "apiVersion": "", + "fieldsType": "", + "fieldsV1": "", + "manager": "", + "operation": "", + "subresource": "", + "time": "" + }, + "v1.ObjectReference": { + "apiVersion": "", + "fieldPath": "", + "kind": "", + "name": "", + "namespace": "", + "resourceVersion": "", + "uid": "" + }, + "v1.OwnerReference": { + "apiVersion": "", + "blockOwnerDeletion": "", + "controller": "", + "kind": "", + "name": "", + "uid": "" + }, + "v1.SecretReference": { + "name": "", + "namespace": "" + }, + "v1.StatusCause": { + "field": "", + "message": "", + "reason": "" + }, + "v1.StatusDetails": { + "causes": "", + "group": "", + "kind": "", + "name": "", + "retryAfterSeconds": "", + "uid": "" + }, + "v1.Taint": { + "effect": "", + "key": "", + "timeAdded": "", + "value": "" + }, + "v1.TypedObjectReference": { + "apiGroup": "", + "kind": "", + "name": "", + "namespace": "" + }, + "v1alpha1.Addon": { + "annotations": "", + "apiVersion": "", + "creationTimestamp": "", + "deletionGracePeriodSeconds": "", + "deletionTimestamp": "", + "finalizers": "", + "generateName": "", + "generation": "", + "kind": "", + "labels": "", + "managedFields": "", + "name": "", + "namespace": "", + "ownerReferences": "", + "resourceVersion": "", + "selfLink": "", + "spec": "", + "status": "", + "uid": "" + }, + "v1alpha1.AddonDataValues": { + "secretRef": "", + "yaml": "" + }, + "v1alpha1.AddonList": { + "apiVersion": "", + "continue": "", + "kind": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "" + }, + "v1alpha1.AddonPackage": { + "name": "", + "version": "" + }, + "v1alpha1.AddonSpec": { + "config": "", + "package": "", + "paused": "" + }, + "v1alpha1.AddonStatus": { + "failureMessage": "", + "phase": "", + "ready": "", + "version": "" + }, + "v1alpha1.AddonsStatus": { + "details": "", + "progress": "", + "readyCount": "", + "totalCount": "" + }, + "v1alpha1.AgentComponentsConfig": { + "enabled": "", + "hostConfigAgent": "" + }, + "v1alpha1.CNIConfig": { + "config": "", + "ecpConfig": "", + "name": "", + "version": "" + }, + "v1alpha1.CSIAddonConfig": { + "config": "", + "name": "", + "version": "" + }, + "v1alpha1.CSIConfig": { + "elf": "", + "stub": "", + "zbs": "" + }, + "v1alpha1.CertManagerComponentsConfig": { + "certManager": "", + "enabled": "" + }, + "v1alpha1.CertManagerSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.CloudProviderSpec": { + "cloudtower": "", + "ksph": "", + "name": "" + }, + "v1alpha1.CloudTowerConnect": { + "authMode": "", + "password": "", + "server": "", + "skipTLSVerify": "", + "username": "" + }, + "v1alpha1.CloudTowerServer": { + "secretRef": "", + "spec": "" + }, + "v1alpha1.CloudTowerSpec": { + "cloudtowerServer": "", + "elfCluster": "", + "elfVlan": "", + "vmTemplate": "", + "zbsVip": "" + }, + "v1alpha1.ClusterAutoscalerConfig": { + "clusterAutoscaler": "", + "enabled": "" + }, + "v1alpha1.ClusterAutoscalerSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ClusterConfigurationSpec": { + "autoResourceReserved": "", + "caCerts": "", + "certificatesExpiryDays": "", + "customImageRegistry": "", + "kubernetes": "", + "nodeDrainTimeout": "", + "nodeVolumeDetachTimeout": "", + "operation": "", + "proxy": "", + "security": "", + "skipCreateEverouteNetworkPolicy": "", + "skipTLSVerify": "", + "timezone": "" + }, + "v1alpha1.ClusterResources": { + "controlPlane": "", + "total": "", + "workers": "" + }, + "v1alpha1.ClusterTopology": { + "controlPlane": "", + "workers": "" + }, + "v1alpha1.ComponentsConfig": { + "agents": "", + "certManager": "", + "clusterAutoscaler": "", + "ecpadapter": "", + "externaldns": "", + "gpu": "", + "ingress": "", + "loadbalancer": "", + "logging": "", + "monitoring": "" + }, + "v1alpha1.ContourSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ControlPlaneGroup": { + "autoResourceReserved": "", + "cloudProvider": "", + "machineHealthCheck": "", + "name": "", + "nodeAutoscaler": "", + "nodeConfig": "", + "nodeDrainTimeout": "", + "nodeVolumeDetachTimeout": "", + "placementGroup": "", + "replicas": "", + "rolloutBefore": "" + }, + "v1alpha1.ECPAdapterConfig": { + "ecpadapter": "", + "enabled": "" + }, + "v1alpha1.ECPAdapterSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ECPConfig": { + "fakeIP": "", + "ippools": "", + "uplink": "", + "uplinkIP": "" + }, + "v1alpha1.ECPIPPool": { + "cidr": "", + "end": "", + "except": "", + "gateway": "", + "name": "", + "start": "", + "subnet": "" + }, + "v1alpha1.ElasticCurator": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ElasticSearchSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.EventExporter": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ExternalDNSConfig": { + "enabled": "", + "externaldns": "" + }, + "v1alpha1.ExternalDNSSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.FailureDetails": { + "causes": "" + }, + "v1alpha1.FluentBitSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.GPUComponentsConfig": { + "enabled": "", + "nvidiaGPUOperator": "" + }, + "v1alpha1.GPUPassthroughDeviceSpec": { + "count": "", + "model": "" + }, + "v1alpha1.HostConfigAgentSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.IngressComponentsConfig": { + "contour": "", + "enabled": "" + }, + "v1alpha1.KibanaSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.KubePrometheusSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.KubeSmartCluster": { + "annotations": "", + "apiVersion": "", + "creationTimestamp": "", + "deletionGracePeriodSeconds": "", + "deletionTimestamp": "", + "finalizers": "", + "generateName": "", + "generation": "", + "kind": "", + "labels": "", + "managedFields": "", + "name": "", + "namespace": "", + "ownerReferences": "", + "resourceVersion": "", + "selfLink": "", + "spec": "", + "status": "", + "uid": "" + }, + "v1alpha1.KubeSmartClusterList": { + "apiVersion": "", + "continue": "", + "kind": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "" + }, + "v1alpha1.KubeSmartClusterSpec": { + "cloudProvider": "", + "clusterConfiguration": "", + "components": "", + "controlPlaneEndpoint": "", + "network": "", + "paused": "", + "platform": "", + "storage": "", + "topology": "", + "version": "" + }, + "v1alpha1.KubeSmartClusterStatus": { + "addons": "", + "addonsReady": "", + "clusterInfraType": "", + "conditions": "", + "controlPlaneAvailable": "", + "controlPlaneReady": "", + "controlPlanes": "", + "csiNames": "", + "failureDetails": "", + "failureMessage": "", + "failureReason": "", + "kappControllerPodReady": "", + "kubeconfigRef": "", + "nodesReady": "", + "operation": "", + "packageManagerReady": "", + "phase": "", + "platform": "", + "ready": "", + "requiredNetworkPorts": "", + "resources": "", + "serverUrl": "", + "sksOriginalVersion": "", + "sksVersion": "", + "sksYttManifestsVersion": "", + "version": "", + "vipClaim": "", + "vmTemplate": "", + "workers": "", + "workersReady": "" + }, + "v1alpha1.KubeSmartPhysicalHostSpec": { + "fileServerURL": "", + "instanceLabelSelector": "", + "instanceObjectSelector": "" + }, + "v1alpha1.KubernetesConfiguration": { + "controlPlane": "", + "kubeletConfiguration": "", + "workers": "" + }, + "v1alpha1.LoadBalancerComponentsConfig": { + "enabled": "", + "metallb": "" + }, + "v1alpha1.LoggingComponentsConfig": { + "elasticcurator": "", + "elasticsearch": "", + "enabled": "", + "eventexporter": "", + "fluentbit": "", + "kibana": "", + "loggingoperator": "" + }, + "v1alpha1.LoggingOperatorSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.MachineHealthCheck": { + "maxUnhealthy": "", + "nodeStartupTimeout": "", + "remediationTemplate": "", + "unhealthyConditions": "", + "unhealthyRange": "" + }, + "v1alpha1.MetalLBSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.MonitoringComponentsConfig": { + "enabled": "", + "kubeprometheus": "" + }, + "v1alpha1.NVIDIAGPUOperatorSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.Network": { + "devices": "", + "ipPoolRef": "", + "nameservers": "" + }, + "v1alpha1.NetworkConfig": { + "apiServerPort": "", + "cni": "", + "ipPoolRef": "", + "managementNetworkInterface": "", + "pods": "", + "serviceDomain": "", + "services": "" + }, + "v1alpha1.NetworkDevice": { + "ipAddrs": "", + "ipPoolRefs": "", + "macAddr": "", + "netmask": "", + "networkType": "", + "routes": "", + "tag": "", + "vlan": "" + }, + "v1alpha1.NetworkDeviceRoute": { + "gateway": "", + "netmask": "", + "network": "" + }, + "v1alpha1.NodeAutoscaler": { + "maxSize": "", + "minSize": "" + }, + "v1alpha1.NodeConfig": { + "cloneMode": "", + "cpuCores": "", + "diskSizeGB": "", + "gpuDevices": "", + "memoryMB": "", + "network": "", + "vgpuDevices": "", + "vmTemplate": "" + }, + "v1alpha1.NodesStatus": { + "observedCount": "", + "progress": "", + "readyCount": "", + "totalCount": "" + }, + "v1alpha1.ObjectKey": { + "name": "", + "namespace": "" + }, + "v1alpha1.OperationConfiguration": { + "createClusterTimeout": "", + "rollbackClusterTimeout": "", + "updateClusterTimeout": "", + "upgradeClusterTimeout": "" + }, + "v1alpha1.OperationStatus": { + "phase": "", + "startTime": "", + "timeout": "", + "type": "" + }, + "v1alpha1.PlacementGroup": { + "name": "" + }, + "v1alpha1.Platform": { + "architecture": "" + }, + "v1alpha1.ProtocolPort": { + "note": "", + "port": "", + "protocol": "" + }, + "v1alpha1.ProxyConfiguration": { + "http": "", + "https": "", + "noProxy": "" + }, + "v1alpha1.RequiredNetworkPorts": { + "clusterInterConnection": "" + }, + "v1alpha1.Resources": { + "cpuCore": "", + "cpuSocket": "", + "cpuThread": "", + "gpu": "", + "memory": "", + "vcpu": "", + "vgpu": "" + }, + "v1alpha1.SecurityConfiguration": { + "sshAuthorizedPublicKey": "", + "sshPassword": "", + "trustedImageRegistries": "" + }, + "v1alpha1.StorageConfig": { + "csi": "" + }, + "v1alpha1.TimezoneConfiguration": { + "name": "" + }, + "v1alpha1.TrustedImageRegistry": { + "caCerts": "", + "desc": "", + "skipTLSVerify": "", + "uri": "" + }, + "v1alpha1.VGPUDeviceSpec": { + "count": "", + "type": "" + }, + "v1alpha1.VIPClaim": { + "ipClaimName": "", + "ipPoolName": "", + "ipPoolNamespace": "" + }, + "v1alpha1.WorkerGroup": { + "autoResourceReserved": "", + "cloudProvider": "", + "machineHealthCheck": "", + "name": "", + "nodeAutoscaler": "", + "nodeConfig": "", + "nodeDrainTimeout": "", + "nodeVolumeDetachTimeout": "", + "placementGroup": "", + "replicas": "", + "rolloutStrategy": "" + }, + "v1beta1.APIServer": { + "certSANs": "", + "extraArgs": "", + "extraVolumes": "", + "timeoutForControlPlane": "" + }, + "v1beta1.BootstrapToken": { + "description": "", + "expires": "", + "groups": "", + "token": "", + "ttl": "", + "usages": "" + }, + "v1beta1.BootstrapTokenDiscovery": { + "apiServerEndpoint": "", + "caCertHashes": "", + "token": "", + "unsafeSkipCAVerification": "" + }, + "v1beta1.BootstrapTokenString": {}, + "v1beta1.ClusterConfiguration": { + "apiServer": "", + "apiVersion": "", + "certificatesDir": "", + "clusterName": "", + "controlPlaneEndpoint": "", + "controllerManager": "", + "dns": "", + "etcd": "", + "featureGates": "", + "imageRepository": "", + "kind": "", + "kubernetesVersion": "", + "networking": "", + "scheduler": "" + }, + "v1beta1.Condition": { + "lastTransitionTime": "", + "message": "", + "reason": "", + "severity": "", + "status": "", + "type": "" + }, + "v1beta1.ContainerLinuxConfig": { + "additionalConfig": "", + "strict": "" + }, + "v1beta1.ControlPlaneComponent": { + "extraArgs": "", + "extraVolumes": "" + }, + "v1beta1.DNS": { + "imageRepository": "", + "imageTag": "" + }, + "v1beta1.Discovery": { + "bootstrapToken": "", + "file": "", + "timeout": "", + "tlsBootstrapToken": "" + }, + "v1beta1.DiskSetup": { + "filesystems": "", + "partitions": "" + }, + "v1beta1.Etcd": { + "external": "", + "local": "" + }, + "v1beta1.ExternalEtcd": { + "caFile": "", + "certFile": "", + "endpoints": "", + "keyFile": "" + }, + "v1beta1.File": { + "append": "", + "content": "", + "contentFrom": "", + "encoding": "", + "owner": "", + "path": "", + "permissions": "" + }, + "v1beta1.FileDiscovery": { + "kubeConfigPath": "" + }, + "v1beta1.FileSource": { + "secret": "" + }, + "v1beta1.Filesystem": { + "device": "", + "extraOpts": "", + "filesystem": "", + "label": "", + "overwrite": "", + "partition": "", + "replaceFS": "" + }, + "v1beta1.HostPathMount": { + "hostPath": "", + "mountPath": "", + "name": "", + "pathType": "", + "readOnly": "" + }, + "v1beta1.IgnitionSpec": { + "containerLinuxConfig": "" + }, + "v1beta1.InitConfiguration": { + "apiVersion": "", + "bootstrapTokens": "", + "kind": "", + "localAPIEndpoint": "", + "nodeRegistration": "", + "patches": "", + "skipPhases": "" + }, + "v1beta1.JoinConfiguration": { + "apiVersion": "", + "caCertPath": "", + "controlPlane": "", + "discovery": "", + "kind": "", + "nodeRegistration": "", + "patches": "", + "skipPhases": "" + }, + "v1beta1.JoinControlPlane": { + "localAPIEndpoint": "" + }, + "v1beta1.KubeadmConfigSpec": { + "clusterConfiguration": "", + "diskSetup": "", + "files": "", + "format": "", + "ignition": "", + "initConfiguration": "", + "joinConfiguration": "", + "mounts": "", + "ntp": "", + "postKubeadmCommands": "", + "preKubeadmCommands": "", + "useExperimentalRetryJoin": "", + "users": "", + "verbosity": "" + }, + "v1beta1.LocalEtcd": { + "dataDir": "", + "extraArgs": "", + "imageRepository": "", + "imageTag": "", + "peerCertSANs": "", + "serverCertSANs": "" + }, + "v1beta1.MachineDeploymentStrategy": { + "rollingUpdate": "", + "type": "" + }, + "v1beta1.MachineRollingUpdateDeployment": { + "deletePolicy": "", + "maxSurge": "", + "maxUnavailable": "" + }, + "v1beta1.NTP": { + "enabled": "", + "servers": "" + }, + "v1beta1.NetworkRanges": { + "cidrBlocks": "" + }, + "v1beta1.Networking": { + "dnsDomain": "", + "podSubnet": "", + "serviceSubnet": "" + }, + "v1beta1.NodeRegistrationOptions": { + "criSocket": "", + "ignorePreflightErrors": "", + "imagePullPolicy": "", + "kubeletExtraArgs": "", + "name": "", + "taints": "" + }, + "v1beta1.Partition": { + "device": "", + "layout": "", + "overwrite": "", + "tableType": "" + }, + "v1beta1.PasswdSource": { + "secret": "" + }, + "v1beta1.Patches": { + "directory": "" + }, + "v1beta1.RolloutBefore": { + "certificatesExpiryDays": "" + }, + "v1beta1.SecretFileSource": { + "key": "", + "name": "" + }, + "v1beta1.SecretPasswdSource": { + "key": "", + "name": "" + }, + "v1beta1.UnhealthyCondition": { + "status": "", + "timeout": "", + "type": "" + }, + "v1beta1.User": { + "gecos": "", + "groups": "", + "homeDir": "", + "inactive": "", + "lockPassword": "", + "name": "", + "passwd": "", + "passwdFrom": "", + "primaryGroup": "", + "shell": "", + "sshAuthorizedKeys": "", + "sudo": "" + } }, "tags": [ { diff --git a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json index 40763021..bbabdecd 100644 --- a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json +++ b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json @@ -6,11 +6,14 @@ "errors.ErrorResponse": { "apiVersion": "", "code": "", + "continue": "", "details": "", "kind": "", "message": "", - "metadata": "", "reason": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "", "status": "" }, "instance.connectivityResponse": { @@ -21,14 +24,844 @@ "protocol": "", "success": "" }, - "instance.labelSets": {}, "intstr.IntOrString": { "intVal": "", "strVal": "", "type": "" }, "intstr.Type": {}, - "k8s_io_api_core_v1.ConditionStatus": {} + "k8s_io_api_core_v1.ConditionStatus": {}, + "instance.labelSets": {}, + "license.License": { + "license_type": "", + "max_socket_num": "", + "max_vcpu_num": "", + "period": "", + "product_name": "", + "serial": "", + "sign_date": "", + "software_edition": "" + }, + "license.licenseCode": { + "code": "" + }, + "resource.Quantity": { + "Format": "" + }, + "restful.Info": { + "message": "" + }, + "runtime.RawExtension": {}, + "sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint": { + "host": "", + "port": "" + }, + "sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { + "advertiseAddress": "", + "bindPort": "" + }, + "v1.Duration": { + "time.Duration": "" + }, + "v1.FieldsV1": {}, + "v1.LabelSelector": { + "matchExpressions": "", + "matchLabels": "" + }, + "v1.LabelSelectorRequirement": { + "key": "", + "operator": "", + "values": "" + }, + "v1.ManagedFieldsEntry": { + "apiVersion": "", + "fieldsType": "", + "fieldsV1": "", + "manager": "", + "operation": "", + "subresource": "", + "time": "" + }, + "v1.ObjectReference": { + "apiVersion": "", + "fieldPath": "", + "kind": "", + "name": "", + "namespace": "", + "resourceVersion": "", + "uid": "" + }, + "v1.OwnerReference": { + "apiVersion": "", + "blockOwnerDeletion": "", + "controller": "", + "kind": "", + "name": "", + "uid": "" + }, + "v1.SecretReference": { + "name": "", + "namespace": "" + }, + "v1.StatusCause": { + "field": "", + "message": "", + "reason": "" + }, + "v1.StatusDetails": { + "causes": "", + "group": "", + "kind": "", + "name": "", + "retryAfterSeconds": "", + "uid": "" + }, + "v1.Taint": { + "effect": "", + "key": "", + "timeAdded": "", + "value": "" + }, + "v1.TypedObjectReference": { + "apiGroup": "", + "kind": "", + "name": "", + "namespace": "" + }, + "v1alpha1.Addon": { + "annotations": "", + "apiVersion": "", + "creationTimestamp": "", + "deletionGracePeriodSeconds": "", + "deletionTimestamp": "", + "finalizers": "", + "generateName": "", + "generation": "", + "kind": "", + "labels": "", + "managedFields": "", + "name": "", + "namespace": "", + "ownerReferences": "", + "resourceVersion": "", + "selfLink": "", + "spec": "", + "status": "", + "uid": "" + }, + "v1alpha1.AddonDataValues": { + "secretRef": "", + "yaml": "" + }, + "v1alpha1.AddonList": { + "apiVersion": "", + "continue": "", + "kind": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "" + }, + "v1alpha1.AddonPackage": { + "name": "", + "version": "" + }, + "v1alpha1.AddonSpec": { + "config": "", + "package": "", + "paused": "" + }, + "v1alpha1.AddonStatus": { + "failureMessage": "", + "phase": "", + "ready": "", + "version": "" + }, + "v1alpha1.AddonsStatus": { + "details": "", + "progress": "", + "readyCount": "", + "totalCount": "" + }, + "v1alpha1.AgentComponentsConfig": { + "enabled": "", + "hostConfigAgent": "" + }, + "v1alpha1.CNIConfig": { + "config": "", + "ecpConfig": "", + "name": "", + "version": "" + }, + "v1alpha1.CSIAddonConfig": { + "config": "", + "name": "", + "version": "" + }, + "v1alpha1.CSIConfig": { + "elf": "", + "stub": "", + "zbs": "" + }, + "v1alpha1.CertManagerComponentsConfig": { + "certManager": "", + "enabled": "" + }, + "v1alpha1.CertManagerSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.CloudProviderSpec": { + "cloudtower": "", + "ksph": "", + "name": "" + }, + "v1alpha1.CloudTowerConnect": { + "authMode": "", + "password": "", + "server": "", + "skipTLSVerify": "", + "username": "" + }, + "v1alpha1.CloudTowerServer": { + "secretRef": "", + "spec": "" + }, + "v1alpha1.CloudTowerSpec": { + "cloudtowerServer": "", + "elfCluster": "", + "elfVlan": "", + "vmTemplate": "", + "zbsVip": "" + }, + "v1alpha1.ClusterAutoscalerConfig": { + "clusterAutoscaler": "", + "enabled": "" + }, + "v1alpha1.ClusterAutoscalerSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ClusterConfigurationSpec": { + "autoResourceReserved": "", + "caCerts": "", + "certificatesExpiryDays": "", + "customImageRegistry": "", + "kubernetes": "", + "nodeDrainTimeout": "", + "nodeVolumeDetachTimeout": "", + "operation": "", + "proxy": "", + "security": "", + "skipCreateEverouteNetworkPolicy": "", + "skipTLSVerify": "", + "timezone": "" + }, + "v1alpha1.ClusterResources": { + "controlPlane": "", + "total": "", + "workers": "" + }, + "v1alpha1.ClusterTopology": { + "controlPlane": "", + "workers": "" + }, + "v1alpha1.ComponentsConfig": { + "agents": "", + "certManager": "", + "clusterAutoscaler": "", + "ecpadapter": "", + "externaldns": "", + "gpu": "", + "ingress": "", + "loadbalancer": "", + "logging": "", + "monitoring": "" + }, + "v1alpha1.ContourSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ControlPlaneGroup": { + "autoResourceReserved": "", + "cloudProvider": "", + "machineHealthCheck": "", + "name": "", + "nodeAutoscaler": "", + "nodeConfig": "", + "nodeDrainTimeout": "", + "nodeVolumeDetachTimeout": "", + "placementGroup": "", + "replicas": "", + "rolloutBefore": "" + }, + "v1alpha1.ECPAdapterConfig": { + "ecpadapter": "", + "enabled": "" + }, + "v1alpha1.ECPAdapterSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ECPConfig": { + "fakeIP": "", + "ippools": "", + "uplink": "", + "uplinkIP": "" + }, + "v1alpha1.ECPIPPool": { + "cidr": "", + "end": "", + "except": "", + "gateway": "", + "name": "", + "start": "", + "subnet": "" + }, + "v1alpha1.ElasticCurator": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ElasticSearchSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.EventExporter": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.ExternalDNSConfig": { + "enabled": "", + "externaldns": "" + }, + "v1alpha1.ExternalDNSSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.FailureDetails": { + "causes": "" + }, + "v1alpha1.FluentBitSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.GPUComponentsConfig": { + "enabled": "", + "nvidiaGPUOperator": "" + }, + "v1alpha1.GPUPassthroughDeviceSpec": { + "count": "", + "model": "" + }, + "v1alpha1.HostConfigAgentSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.IngressComponentsConfig": { + "contour": "", + "enabled": "" + }, + "v1alpha1.KibanaSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.KubePrometheusSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.KubeSmartCluster": { + "annotations": "", + "apiVersion": "", + "creationTimestamp": "", + "deletionGracePeriodSeconds": "", + "deletionTimestamp": "", + "finalizers": "", + "generateName": "", + "generation": "", + "kind": "", + "labels": "", + "managedFields": "", + "name": "", + "namespace": "", + "ownerReferences": "", + "resourceVersion": "", + "selfLink": "", + "spec": "", + "status": "", + "uid": "" + }, + "v1alpha1.KubeSmartClusterList": { + "apiVersion": "", + "continue": "", + "kind": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "" + }, + "v1alpha1.KubeSmartClusterSpec": { + "cloudProvider": "", + "clusterConfiguration": "", + "components": "", + "controlPlaneEndpoint": "", + "network": "", + "paused": "", + "platform": "", + "storage": "", + "topology": "", + "version": "" + }, + "v1alpha1.KubeSmartClusterStatus": { + "addons": "", + "addonsReady": "", + "clusterInfraType": "", + "conditions": "", + "controlPlaneAvailable": "", + "controlPlaneReady": "", + "controlPlanes": "", + "csiNames": "", + "failureDetails": "", + "failureMessage": "", + "failureReason": "", + "kappControllerPodReady": "", + "kubeconfigRef": "", + "nodesReady": "", + "operation": "", + "packageManagerReady": "", + "phase": "", + "platform": "", + "ready": "", + "requiredNetworkPorts": "", + "resources": "", + "serverUrl": "", + "sksOriginalVersion": "", + "sksVersion": "", + "sksYttManifestsVersion": "", + "version": "", + "vipClaim": "", + "vmTemplate": "", + "workers": "", + "workersReady": "" + }, + "v1alpha1.KubeSmartPhysicalHostSpec": { + "fileServerURL": "", + "instanceLabelSelector": "", + "instanceObjectSelector": "" + }, + "v1alpha1.KubernetesConfiguration": { + "controlPlane": "", + "kubeletConfiguration": "", + "workers": "" + }, + "v1alpha1.LoadBalancerComponentsConfig": { + "enabled": "", + "metallb": "" + }, + "v1alpha1.LoggingComponentsConfig": { + "elasticcurator": "", + "elasticsearch": "", + "enabled": "", + "eventexporter": "", + "fluentbit": "", + "kibana": "", + "loggingoperator": "" + }, + "v1alpha1.LoggingOperatorSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.MachineHealthCheck": { + "maxUnhealthy": "", + "nodeStartupTimeout": "", + "remediationTemplate": "", + "unhealthyConditions": "", + "unhealthyRange": "" + }, + "v1alpha1.MetalLBSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.MonitoringComponentsConfig": { + "enabled": "", + "kubeprometheus": "" + }, + "v1alpha1.NVIDIAGPUOperatorSpec": { + "config": "", + "disabled": "", + "version": "" + }, + "v1alpha1.Network": { + "devices": "", + "ipPoolRef": "", + "nameservers": "" + }, + "v1alpha1.NetworkConfig": { + "apiServerPort": "", + "cni": "", + "ipPoolRef": "", + "managementNetworkInterface": "", + "pods": "", + "serviceDomain": "", + "services": "" + }, + "v1alpha1.NetworkDevice": { + "ipAddrs": "", + "ipPoolRefs": "", + "macAddr": "", + "netmask": "", + "networkType": "", + "routes": "", + "tag": "", + "vlan": "" + }, + "v1alpha1.NetworkDeviceRoute": { + "gateway": "", + "netmask": "", + "network": "" + }, + "v1alpha1.NodeAutoscaler": { + "maxSize": "", + "minSize": "" + }, + "v1alpha1.NodeConfig": { + "cloneMode": "", + "cpuCores": "", + "diskSizeGB": "", + "gpuDevices": "", + "memoryMB": "", + "network": "", + "vgpuDevices": "", + "vmTemplate": "" + }, + "v1alpha1.NodesStatus": { + "observedCount": "", + "progress": "", + "readyCount": "", + "totalCount": "" + }, + "v1alpha1.ObjectKey": { + "name": "", + "namespace": "" + }, + "v1alpha1.OperationConfiguration": { + "createClusterTimeout": "", + "rollbackClusterTimeout": "", + "updateClusterTimeout": "", + "upgradeClusterTimeout": "" + }, + "v1alpha1.OperationStatus": { + "phase": "", + "startTime": "", + "timeout": "", + "type": "" + }, + "v1alpha1.PlacementGroup": { + "name": "" + }, + "v1alpha1.Platform": { + "architecture": "" + }, + "v1alpha1.ProtocolPort": { + "note": "", + "port": "", + "protocol": "" + }, + "v1alpha1.ProxyConfiguration": { + "http": "", + "https": "", + "noProxy": "" + }, + "v1alpha1.RequiredNetworkPorts": { + "clusterInterConnection": "" + }, + "v1alpha1.Resources": { + "cpuCore": "", + "cpuSocket": "", + "cpuThread": "", + "gpu": "", + "memory": "", + "vcpu": "", + "vgpu": "" + }, + "v1alpha1.SecurityConfiguration": { + "sshAuthorizedPublicKey": "", + "sshPassword": "", + "trustedImageRegistries": "" + }, + "v1alpha1.StorageConfig": { + "csi": "" + }, + "v1alpha1.TimezoneConfiguration": { + "name": "" + }, + "v1alpha1.TrustedImageRegistry": { + "caCerts": "", + "desc": "", + "skipTLSVerify": "", + "uri": "" + }, + "v1alpha1.VGPUDeviceSpec": { + "count": "", + "type": "" + }, + "v1alpha1.VIPClaim": { + "ipClaimName": "", + "ipPoolName": "", + "ipPoolNamespace": "" + }, + "v1alpha1.WorkerGroup": { + "autoResourceReserved": "", + "cloudProvider": "", + "machineHealthCheck": "", + "name": "", + "nodeAutoscaler": "", + "nodeConfig": "", + "nodeDrainTimeout": "", + "nodeVolumeDetachTimeout": "", + "placementGroup": "", + "replicas": "", + "rolloutStrategy": "" + }, + "v1beta1.APIServer": { + "certSANs": "", + "extraArgs": "", + "extraVolumes": "", + "timeoutForControlPlane": "" + }, + "v1beta1.BootstrapToken": { + "description": "", + "expires": "", + "groups": "", + "token": "", + "ttl": "", + "usages": "" + }, + "v1beta1.BootstrapTokenDiscovery": { + "apiServerEndpoint": "", + "caCertHashes": "", + "token": "", + "unsafeSkipCAVerification": "" + }, + "v1beta1.BootstrapTokenString": {}, + "v1beta1.ClusterConfiguration": { + "apiServer": "", + "apiVersion": "", + "certificatesDir": "", + "clusterName": "", + "controlPlaneEndpoint": "", + "controllerManager": "", + "dns": "", + "etcd": "", + "featureGates": "", + "imageRepository": "", + "kind": "", + "kubernetesVersion": "", + "networking": "", + "scheduler": "" + }, + "v1beta1.Condition": { + "lastTransitionTime": "", + "message": "", + "reason": "", + "severity": "", + "status": "", + "type": "" + }, + "v1beta1.ContainerLinuxConfig": { + "additionalConfig": "", + "strict": "" + }, + "v1beta1.ControlPlaneComponent": { + "extraArgs": "", + "extraVolumes": "" + }, + "v1beta1.DNS": { + "imageRepository": "", + "imageTag": "" + }, + "v1beta1.Discovery": { + "bootstrapToken": "", + "file": "", + "timeout": "", + "tlsBootstrapToken": "" + }, + "v1beta1.DiskSetup": { + "filesystems": "", + "partitions": "" + }, + "v1beta1.Etcd": { + "external": "", + "local": "" + }, + "v1beta1.ExternalEtcd": { + "caFile": "", + "certFile": "", + "endpoints": "", + "keyFile": "" + }, + "v1beta1.File": { + "append": "", + "content": "", + "contentFrom": "", + "encoding": "", + "owner": "", + "path": "", + "permissions": "" + }, + "v1beta1.FileDiscovery": { + "kubeConfigPath": "" + }, + "v1beta1.FileSource": { + "secret": "" + }, + "v1beta1.Filesystem": { + "device": "", + "extraOpts": "", + "filesystem": "", + "label": "", + "overwrite": "", + "partition": "", + "replaceFS": "" + }, + "v1beta1.HostPathMount": { + "hostPath": "", + "mountPath": "", + "name": "", + "pathType": "", + "readOnly": "" + }, + "v1beta1.IgnitionSpec": { + "containerLinuxConfig": "" + }, + "v1beta1.InitConfiguration": { + "apiVersion": "", + "bootstrapTokens": "", + "kind": "", + "localAPIEndpoint": "", + "nodeRegistration": "", + "patches": "", + "skipPhases": "" + }, + "v1beta1.JoinConfiguration": { + "apiVersion": "", + "caCertPath": "", + "controlPlane": "", + "discovery": "", + "kind": "", + "nodeRegistration": "", + "patches": "", + "skipPhases": "" + }, + "v1beta1.JoinControlPlane": { + "localAPIEndpoint": "" + }, + "v1beta1.KubeadmConfigSpec": { + "clusterConfiguration": "", + "diskSetup": "", + "files": "", + "format": "", + "ignition": "", + "initConfiguration": "", + "joinConfiguration": "", + "mounts": "", + "ntp": "", + "postKubeadmCommands": "", + "preKubeadmCommands": "", + "useExperimentalRetryJoin": "", + "users": "", + "verbosity": "" + }, + "v1beta1.LocalEtcd": { + "dataDir": "", + "extraArgs": "", + "imageRepository": "", + "imageTag": "", + "peerCertSANs": "", + "serverCertSANs": "" + }, + "v1beta1.MachineDeploymentStrategy": { + "rollingUpdate": "", + "type": "" + }, + "v1beta1.MachineRollingUpdateDeployment": { + "deletePolicy": "", + "maxSurge": "", + "maxUnavailable": "" + }, + "v1beta1.NTP": { + "enabled": "", + "servers": "" + }, + "v1beta1.NetworkRanges": { + "cidrBlocks": "" + }, + "v1beta1.Networking": { + "dnsDomain": "", + "podSubnet": "", + "serviceSubnet": "" + }, + "v1beta1.NodeRegistrationOptions": { + "criSocket": "", + "ignorePreflightErrors": "", + "imagePullPolicy": "", + "kubeletExtraArgs": "", + "name": "", + "taints": "" + }, + "v1beta1.Partition": { + "device": "", + "layout": "", + "overwrite": "", + "tableType": "" + }, + "v1beta1.PasswdSource": { + "secret": "" + }, + "v1beta1.Patches": { + "directory": "" + }, + "v1beta1.RolloutBefore": { + "certificatesExpiryDays": "" + }, + "v1beta1.SecretFileSource": { + "key": "", + "name": "" + }, + "v1beta1.SecretPasswdSource": { + "key": "", + "name": "" + }, + "v1beta1.UnhealthyCondition": { + "status": "", + "timeout": "", + "type": "" + }, + "v1beta1.User": { + "gecos": "", + "groups": "", + "homeDir": "", + "inactive": "", + "lockPassword": "", + "name": "", + "passwd": "", + "passwdFrom": "", + "primaryGroup": "", + "shell": "", + "sshAuthorizedKeys": "", + "sudo": "" + } }, "tags": [ { From f526219f714a41b2b067d7575e88e95ccc7d29cd Mon Sep 17 00:00:00 2001 From: "haijian.yang" Date: Thu, 30 May 2024 16:33:39 +0800 Subject: [PATCH 3/8] test --- .../static/sks-specs/1.4.0-swagger.json | 2033 +++++++++++++---- 1 file changed, 1575 insertions(+), 458 deletions(-) diff --git a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json index aafef412..e56caa2d 100644 --- a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json +++ b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json @@ -19,7 +19,7 @@ "/api/v1/servers/connectivity-probes/:namespace/:name": { "post": { "tags": [ - "instances" + "Instances" ], "summary": "Network connectivity probe on serverInstance.", "operationId": "instances/connectivity-probes", @@ -103,7 +103,7 @@ "/api/v1/servers/labels": { "get": { "tags": [ - "instances" + "Instances" ], "summary": "Get all Ready ServiceInstance label sets.", "operationId": "instances/jobs", @@ -134,7 +134,7 @@ "/api/v1/servers/prepare-environment": { "get": { "tags": [ - "instances" + "Instances" ], "summary": "Download prepare environment command.", "operationId": "instances/commands", @@ -165,7 +165,7 @@ "/clusters": { "get": { "tags": [ - "clusters" + "Clusters" ], "summary": "Get all workload clusters.", "operationId": "ListClusters", @@ -204,7 +204,7 @@ }, "post": { "tags": [ - "clusters" + "Clusters" ], "summary": "Create a workload cluster", "operationId": "CreateCluster", @@ -257,7 +257,7 @@ "/clusters/:cluster": { "get": { "tags": [ - "clusters" + "Clusters" ], "summary": "Get a workload cluster.", "operationId": "GetCluster", @@ -296,7 +296,7 @@ }, "put": { "tags": [ - "clusters" + "Clusters" ], "summary": "Update a workload cluster.", "operationId": "UpdateCluster", @@ -347,7 +347,7 @@ }, "delete": { "tags": [ - "clusters" + "Clusters" ], "summary": "Delete a workload cluster.", "operationId": "DeleteCluster", @@ -390,7 +390,7 @@ "/clusters/:cluster/addons": { "get": { "tags": [ - "clusters" + "Clusters" ], "summary": "Get addons of a workload cluster.", "operationId": "listClusterAddons", @@ -431,7 +431,7 @@ "/clusters/:cluster/kubeconfig": { "get": { "tags": [ - "clusters" + "Clusters" ], "summary": "Get the kubeconfig of a workload cluster.", "operationId": "GetClusterKubeconfig", @@ -472,84 +472,30 @@ "/clusters/{cluster}/proxy/{k8s_url}": { "get": { "tags": [ - "workload clusters" + "Workload Clusters" ], "summary": "Proxy all requests to the workload kubernetes cluster.", - "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", + "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}. Support any HTTP method of the proxied API (GET, POST, DELETE, PUT, PATCH, etc.)", "operationId": "ProxyRequestToWorkloadCluster", "parameters": [ { - "name": "namespace", - "in": "query", - "description": "The namespace name. Default to default namespace if not specified.", - "schema": { - "type": "string" - } - } - ] - }, - "put": { - "tags": [ - "workload clusters" - ], - "summary": "Proxy all requests to the workload kubernetes cluster.", - "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", - "operationId": "ProxyRequestToWorkloadCluster", - "parameters": [ - { - "name": "namespace", - "in": "query", - "description": "The namespace name. Default to default namespace if not specified.", - "schema": { - "type": "string" - } - } - ] - }, - "post": { - "tags": [ - "workload clusters" - ], - "summary": "Proxy all requests to the workload kubernetes cluster.", - "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", - "operationId": "ProxyRequestToWorkloadCluster", - "parameters": [ - { - "name": "namespace", - "in": "query", - "description": "The namespace name. Default to default namespace if not specified.", + "name": "cluster", + "in": "path", + "description": "The cluster ID.", + "required": true, "schema": { "type": "string" } - } - ] - }, - "delete": { - "tags": [ - "workload clusters" - ], - "summary": "Proxy all requests to the workload kubernetes cluster.", - "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", - "operationId": "ProxyRequestToWorkloadCluster", - "parameters": [ + }, { - "name": "namespace", - "in": "query", - "description": "The namespace name. Default to default namespace if not specified.", + "name": "k8s_url", + "in": "path", + "description": "The url of the proxied kubernetes API.", + "required": true, "schema": { "type": "string" } - } - ] - }, - "head": { - "tags": [ - "workload clusters" - ], - "summary": "Proxy all requests to the workload kubernetes cluster.", - "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", - "operationId": "ProxyRequestToWorkloadCluster", - "parameters": [ + }, { "name": "namespace", "in": "query", @@ -558,31 +504,25 @@ "type": "string" } } - ] - }, - "patch": { - "tags": [ - "workload clusters" ], - "summary": "Proxy all requests to the workload kubernetes cluster.", - "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}.", - "operationId": "ProxyRequestToWorkloadCluster", - "parameters": [ - { - "name": "namespace", - "in": "query", - "description": "The namespace name. Default to default namespace if not specified.", - "schema": { - "type": "string" + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/errors.ErrorResponse" + } + } } } - ] + } } }, "/compatibility/versions": { "get": { "tags": [ - "upgrade" + "SKS Version" ], "summary": "Get the current SKS compatible sksVersion list", "operationId": "compatibleSKSVersion", @@ -616,7 +556,7 @@ "/compatibility/vm-templates": { "get": { "tags": [ - "upgrade" + "SKS Version" ], "summary": "Get Compatible vm template sks Version List", "operationId": "compatibleVmTemplate", @@ -650,7 +590,7 @@ "/healthz": { "get": { "tags": [ - "healthz" + "Healthz" ], "summary": "Check service health.", "operationId": "GetHealth", @@ -671,7 +611,7 @@ "/licenses/validate": { "post": { "tags": [ - "license" + "License" ], "summary": "Validate and parse license code.", "operationId": "validateLicense", @@ -734,12 +674,14 @@ "type": "integer", "description": "Suggested HTTP return code for this status, 0 if not set." }, - "continue": { - "type": "string", - "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." - }, "details": { - "$ref": "#/components/schemas/v1.StatusDetails" + "type": "object", + "description": "Extended data associated with the reason. Each reason may define its\nown extended details. This field is optional and the data returned\nis not guaranteed to conform to any schema except that defined by\nthe reason type.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.StatusDetails" + } + ] }, "kind": { "type": "string", @@ -749,21 +691,23 @@ "type": "string", "description": "A human-readable description of the status of this operation." }, - "reason": { - "type": "string", - "description": "A machine-readable description of why this operation is in the\n\"Failure\" status. If this value is empty there\nis no information available. A Reason clarifies an HTTP status\ncode but does not override it." - }, - "remainingItemCount": { - "type": "integer", - "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." - }, - "resourceVersion": { - "type": "string", - "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + "metadata": { + "type": "object", + "description": "Standard list metadata.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "allOf": [ + { + "$ref": "#/components/schemas/v1.ListMeta" + } + ] }, - "selfLink": { - "type": "string", - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + "reason": { + "type": "object", + "description": "A machine-readable description of why this operation is in the\n\"Failure\" status. If this value is empty there\nis no information available. A Reason clarifies an HTTP status\ncode but does not override it.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.StatusReason" + } + ] }, "status": { "type": "string", @@ -789,7 +733,7 @@ "type": "integer" }, "protocol": { - "type": "string" + "$ref": "#/components/schemas/v1alpha1.ProtocolType" }, "success": { "type": "boolean", @@ -816,16 +760,49 @@ "type": "string" }, "type": { - "type": "integer" + "$ref": "#/components/schemas/intstr.Type" } } }, + "intstr.Type": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "x-enum-comments": { + "Int": "The IntOrString holds an int.", + "String": "The IntOrString holds a string." + }, + "x-enum-varnames": [ + "Int", + "String" + ] + }, + "k8s_io_api_core_v1.ConditionStatus": { + "type": "string", + "enum": [ + "True", + "False", + "Unknown" + ], + "x-enum-varnames": [ + "ConditionTrue", + "ConditionFalse", + "ConditionUnknown" + ] + }, "license.License": { "type": "object", "properties": { "license_type": { - "type": "integer", - "description": "The license type." + "type": "object", + "description": "The license type.", + "allOf": [ + { + "$ref": "#/components/schemas/license.LicenseType" + } + ] }, "max_socket_num": { "type": "integer", @@ -852,11 +829,40 @@ "description": "The license signed date." }, "software_edition": { - "type": "integer", - "description": "The software edition." + "type": "object", + "description": "The software edition.", + "allOf": [ + { + "$ref": "#/components/schemas/license.SoftwareEdition" + } + ] } } }, + "license.LicenseType": { + "type": "integer", + "enum": [ + 1, + 2, + 3 + ], + "x-enum-varnames": [ + "LicenseType_TRIAL", + "LicenseType_PERPETUAL", + "LicenseType_SUBSCRIPTION" + ] + }, + "license.SoftwareEdition": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "x-enum-varnames": [ + "SoftwareEdition_STANDARD", + "SoftwareEdition_ENTERPRISE" + ] + }, "license.licenseCode": { "type": "object", "properties": { @@ -884,7 +890,7 @@ "runtime.RawExtension": { "type": "object" }, - "sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint": { + "sigs_k8s_io_cluster-api_api_v1beta1.APIEndpoint": { "type": "object", "properties": { "host": { @@ -897,7 +903,7 @@ } } }, - "sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { + "sigs_k8s_io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { "type": "object", "properties": { "advertiseAddress": { @@ -910,17 +916,83 @@ } } }, + "v1.CauseType": { + "type": "string", + "enum": [ + "FieldValueNotFound", + "FieldValueRequired", + "FieldValueDuplicate", + "FieldValueInvalid", + "FieldValueNotSupported", + "FieldValueForbidden", + "FieldValueTooLong", + "FieldValueTooMany", + "InternalError", + "FieldValueTypeInvalid", + "UnexpectedServerResponse", + "FieldManagerConflict", + "ResourceVersionTooLarge" + ], + "x-enum-varnames": [ + "CauseTypeFieldValueNotFound", + "CauseTypeFieldValueRequired", + "CauseTypeFieldValueDuplicate", + "CauseTypeFieldValueInvalid", + "CauseTypeFieldValueNotSupported", + "CauseTypeForbidden", + "CauseTypeTooLong", + "CauseTypeTooMany", + "CauseTypeInternal", + "CauseTypeTypeInvalid", + "CauseTypeUnexpectedServerResponse", + "CauseTypeFieldManagerConflict", + "CauseTypeResourceVersionTooLarge" + ] + }, "v1.Duration": { "type": "object", "properties": { "time.Duration": { - "type": "integer" + "type": "integer", + "x-enum-varnames": [ + "minDuration", + "maxDuration", + "Nanosecond", + "Microsecond", + "Millisecond", + "Second", + "Minute", + "Hour" + ] } } }, "v1.FieldsV1": { "type": "object" }, + "v1.HostPathType": { + "type": "string", + "enum": [ + "", + "DirectoryOrCreate", + "Directory", + "FileOrCreate", + "File", + "Socket", + "CharDevice", + "BlockDevice" + ], + "x-enum-varnames": [ + "HostPathUnset", + "HostPathDirectoryOrCreate", + "HostPathDirectory", + "HostPathFileOrCreate", + "HostPathFile", + "HostPathSocket", + "HostPathCharDev", + "HostPathBlockDev" + ] + }, "v1.LabelSelector": { "type": "object", "properties": { @@ -940,6 +1012,21 @@ } } }, + "v1.LabelSelectorOperator": { + "type": "string", + "enum": [ + "In", + "NotIn", + "Exists", + "DoesNotExist" + ], + "x-enum-varnames": [ + "LabelSelectorOpIn", + "LabelSelectorOpNotIn", + "LabelSelectorOpExists", + "LabelSelectorOpDoesNotExist" + ] + }, "v1.LabelSelectorRequirement": { "type": "object", "properties": { @@ -948,8 +1035,13 @@ "description": "key is the label key that the selector applies to." }, "operator": { - "type": "string", - "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + "type": "object", + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.LabelSelectorOperator" + } + ] }, "values": { "type": "array", @@ -960,6 +1052,27 @@ } } }, + "v1.ListMeta": { + "type": "object", + "properties": { + "continue": { + "type": "string", + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." + }, + "remainingItemCount": { + "type": "integer", + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + } + } + }, "v1.ManagedFieldsEntry": { "type": "object", "properties": { @@ -972,15 +1085,26 @@ "description": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"" }, "fieldsV1": { - "$ref": "#/components/schemas/v1.FieldsV1" + "type": "object", + "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.FieldsV1" + } + ] }, "manager": { "type": "string", "description": "Manager is an identifier of the workflow managing these fields." }, "operation": { - "type": "string", - "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'." + "type": "object", + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.ManagedFieldsOperationType" + } + ] }, "subresource": { "type": "string", @@ -992,6 +1116,114 @@ } } }, + "v1.ManagedFieldsOperationType": { + "type": "string", + "enum": [ + "Apply", + "Update" + ], + "x-enum-varnames": [ + "ManagedFieldsOperationApply", + "ManagedFieldsOperationUpdate" + ] + }, + "v1.NodeConditionType": { + "type": "string", + "enum": [ + "Ready", + "MemoryPressure", + "DiskPressure", + "PIDPressure", + "NetworkUnavailable" + ], + "x-enum-varnames": [ + "NodeReady", + "NodeMemoryPressure", + "NodeDiskPressure", + "NodePIDPressure", + "NodeNetworkUnavailable" + ] + }, + "v1.ObjectMeta": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" + }, + "creationTimestamp": { + "type": "string", + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only." + }, + "deletionTimestamp": { + "type": "string", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "finalizers": { + "type": "array", + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+patchStrategy=merge", + "items": { + "type": "string" + } + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" + }, + "generation": { + "type": "integer", + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" + }, + "managedFields": { + "type": "array", + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n", + "items": { + "$ref": "#/components/schemas/v1.ManagedFieldsEntry" + } + }, + "name": { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" + }, + "ownerReferences": { + "type": "array", + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+patchMergeKey=uid\n+patchStrategy=merge", + "items": { + "$ref": "#/components/schemas/v1.OwnerReference" + } + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" + }, + "selfLink": { + "type": "string", + "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + } + } + }, "v1.ObjectReference": { "type": "object", "properties": { @@ -1079,8 +1311,13 @@ "description": "A human-readable description of the cause of the error. This field may be\npresented as-is to a reader." }, "reason": { - "type": "string", - "description": "A machine-readable description of the cause of the error. If this value is\nempty there is no information available." + "type": "object", + "description": "A machine-readable description of the cause of the error. If this value is\nempty there is no information available.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.CauseType" + } + ] } } }, @@ -1116,12 +1353,62 @@ } } }, + "v1.StatusReason": { + "type": "string", + "enum": [ + "", + "Unauthorized", + "Forbidden", + "NotFound", + "AlreadyExists", + "Conflict", + "Gone", + "Invalid", + "ServerTimeout", + "Timeout", + "TooManyRequests", + "BadRequest", + "MethodNotAllowed", + "NotAcceptable", + "RequestEntityTooLarge", + "UnsupportedMediaType", + "InternalError", + "Expired", + "ServiceUnavailable" + ], + "x-enum-varnames": [ + "StatusReasonUnknown", + "StatusReasonUnauthorized", + "StatusReasonForbidden", + "StatusReasonNotFound", + "StatusReasonAlreadyExists", + "StatusReasonConflict", + "StatusReasonGone", + "StatusReasonInvalid", + "StatusReasonServerTimeout", + "StatusReasonTimeout", + "StatusReasonTooManyRequests", + "StatusReasonBadRequest", + "StatusReasonMethodNotAllowed", + "StatusReasonNotAcceptable", + "StatusReasonRequestEntityTooLarge", + "StatusReasonUnsupportedMediaType", + "StatusReasonInternalError", + "StatusReasonExpired", + "StatusReasonServiceUnavailable" + ] + }, "v1.Taint": { "type": "object", "properties": { "effect": { - "type": "string", - "description": "Required. The effect of the taint on pods\nthat do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute." + "type": "object", + "description": "Required. The effect of the taint on pods\nthat do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.TaintEffect" + } + ] }, "key": { "type": "string", @@ -1137,6 +1424,19 @@ } } }, + "v1.TaintEffect": { + "type": "string", + "enum": [ + "NoSchedule", + "PreferNoSchedule", + "NoExecute" + ], + "x-enum-varnames": [ + "TaintEffectNoSchedule", + "TaintEffectPreferNoSchedule", + "TaintEffectNoExecute" + ] + }, "v1.TypedObjectReference": { "type": "object", "properties": { @@ -1161,94 +1461,22 @@ "v1alpha1.Addon": { "type": "object", "properties": { - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" - }, "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" }, - "creationTimestamp": { - "type": "string", - "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "deletionGracePeriodSeconds": { - "type": "integer", - "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only." - }, - "deletionTimestamp": { - "type": "string", - "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "finalizers": { - "type": "array", - "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+patchStrategy=merge", - "items": { - "type": "string" - } - }, - "generateName": { - "type": "string", - "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" - }, - "generation": { - "type": "integer", - "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only." - }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" - }, - "managedFields": { - "type": "array", - "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n", - "items": { - "$ref": "#/components/schemas/v1.ManagedFieldsEntry" - } - }, - "name": { - "type": "string", - "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" - }, - "namespace": { - "type": "string", - "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" - }, - "ownerReferences": { - "type": "array", - "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+patchMergeKey=uid\n+patchStrategy=merge", - "items": { - "$ref": "#/components/schemas/v1.OwnerReference" - } - }, - "resourceVersion": { - "type": "string", - "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" - }, - "selfLink": { - "type": "string", - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + "metadata": { + "$ref": "#/components/schemas/v1.ObjectMeta" }, "spec": { "$ref": "#/components/schemas/v1alpha1.AddonSpec" }, "status": { "$ref": "#/components/schemas/v1alpha1.AddonStatus" - }, - "uid": { - "type": "string", - "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" } } }, @@ -1256,7 +1484,13 @@ "type": "object", "properties": { "secretRef": { - "$ref": "#/components/schemas/v1.SecretReference" + "type": "object", + "description": "SecretRef specifies the secret which stores yaml for the addon configuration", + "allOf": [ + { + "$ref": "#/components/schemas/v1.SecretReference" + } + ] }, "yaml": { "type": "string", @@ -1271,10 +1505,6 @@ "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" }, - "continue": { - "type": "string", - "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." - }, "items": { "type": "array", "items": { @@ -1285,17 +1515,8 @@ "type": "string", "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" }, - "remainingItemCount": { - "type": "integer", - "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." - }, - "resourceVersion": { - "type": "string", - "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" - }, - "selfLink": { - "type": "string", - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + "metadata": { + "$ref": "#/components/schemas/v1.ListMeta" } } }, @@ -1303,8 +1524,13 @@ "type": "object", "properties": { "name": { - "type": "string", - "description": "Name is the addon package name." + "type": "object", + "description": "Name is the addon package name.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonType" + } + ] }, "version": { "type": "string", @@ -1316,10 +1542,22 @@ "type": "object", "properties": { "config": { - "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + "type": "object", + "description": "Config is the addon configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + } + ] }, "package": { - "$ref": "#/components/schemas/v1alpha1.AddonPackage" + "type": "object", + "description": "Package is the addon package to install in a KubeSmartCluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonPackage" + } + ] }, "paused": { "type": "boolean", @@ -1348,6 +1586,59 @@ } } }, + "v1alpha1.AddonType": { + "type": "string", + "enum": [ + "stub-cni", + "stub-csi", + "calico", + "cert-manager", + "ecp", + "everoute-cni", + "ecp-adapter", + "smtx-zbs-csi", + "smtx-elf-csi", + "logging-operator", + "elasticsearch", + "elasticcurator", + "fluent-bit", + "kibana", + "kube-prometheus", + "metallb", + "contour", + "external-dns", + "k8tz", + "cluster-autoscaler", + "event-exporter", + "nvidia-gpu-operator", + "host-config-agent" + ], + "x-enum-varnames": [ + "AddonTypeStubCNI", + "AddonTypeStubCSI", + "AddonTypeCalico", + "AddonTypeCertManager", + "AddonTypeECP", + "AddonTypeEverouteCNI", + "AddonTypeECPAdapter", + "AddonTypeSMTXZBSCSI", + "AddonTypeSMTXELFCSI", + "AddonTypeLoggingOperator", + "AddonTypeElasticSearch", + "AddonTypeElasticCurator", + "AddonTypeFluentBit", + "AddonTypeKibana", + "AddonTypeKubePrometheus", + "AddonTypeMetallb", + "AddonTypeContour", + "AddonTypeExternalDNS", + "AddonTypeK8TZ", + "AddonTypeClusterAutoscaler", + "AddonTypeEventExporter", + "AddonTypeNVIDIAGPUOperator", + "AddonTypeHostConfigAgent" + ] + }, "v1alpha1.AddonsStatus": { "type": "object", "properties": { @@ -1383,18 +1674,46 @@ } } }, + "v1alpha1.Architecture": { + "type": "string", + "enum": [ + "AArch64", + "x86_64" + ], + "x-enum-varnames": [ + "ArchitectureAARCH64", + "ArchitectureX8664" + ] + }, "v1alpha1.CNIConfig": { "type": "object", "properties": { "config": { - "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + "type": "object", + "description": "AddonConfig is the CNI configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + } + ] }, "ecpConfig": { - "$ref": "#/components/schemas/v1alpha1.ECPConfig" + "type": "object", + "description": "ECPConfig is the ECP CNI configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ECPConfig" + } + ] }, "name": { - "type": "string", - "description": "Name is the CNI name, e.g. calico, ecp, everoute-cni, stub-cni, etc." + "type": "object", + "description": "Name is the CNI name, e.g. calico, ecp, everoute-cni, stub-cni, etc.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonType" + } + ] }, "version": { "type": "string", @@ -1406,11 +1725,22 @@ "type": "object", "properties": { "config": { - "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + "type": "object", + "description": "AddonConfig is the CSI addon configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonDataValues" + } + ] }, "name": { - "type": "string", - "description": "Name is the CSI addon name." + "type": "object", + "description": "Name is the CSI addon name.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonType" + } + ] }, "version": { "type": "string", @@ -1422,13 +1752,31 @@ "type": "object", "properties": { "elf": { - "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + "type": "object", + "description": "ELF CSI.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + } + ] }, "stub": { - "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + "type": "object", + "description": "Stub CSI for satisfying the addon dependency.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + } + ] }, "zbs": { - "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + "type": "object", + "description": "ZBS CSI.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CSIAddonConfig" + } + ] } } }, @@ -1457,14 +1805,37 @@ } } }, + "v1alpha1.CloneMode": { + "type": "string", + "enum": [ + "FullClone", + "FastClone" + ], + "x-enum-varnames": [ + "FullClone", + "FastClone" + ] + }, "v1alpha1.CloudProviderSpec": { "type": "object", "properties": { "cloudtower": { - "$ref": "#/components/schemas/v1alpha1.CloudTowerSpec" + "type": "object", + "description": "CloudTower specifies the CloudTower server information.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloudTowerSpec" + } + ] }, "ksph": { - "$ref": "#/components/schemas/v1alpha1.KubeSmartPhysicalHostSpec" + "type": "object", + "description": "KubeSmartPhysicalHost specifies the configuration for KubeSmartPhysicalHost.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.KubeSmartPhysicalHostSpec" + } + ] }, "name": { "type": "string", @@ -1472,12 +1843,28 @@ } } }, + "v1alpha1.CloudTowerAuthMode": { + "type": "string", + "enum": [ + "LOCAL", + "LDAP" + ], + "x-enum-varnames": [ + "CloudTowerAuthLocal", + "CloudTowerAuthLDAP" + ] + }, "v1alpha1.CloudTowerConnect": { "type": "object", "properties": { "authMode": { - "type": "string", - "description": "AuthMode is the authentication mode of CloudTower server." + "type": "object", + "description": "AuthMode is the authentication mode of CloudTower server.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloudTowerAuthMode" + } + ] }, "password": { "type": "string", @@ -1501,7 +1888,13 @@ "type": "object", "properties": { "secretRef": { - "$ref": "#/components/schemas/v1.SecretReference" + "type": "object", + "description": "read config from secret", + "allOf": [ + { + "$ref": "#/components/schemas/v1.SecretReference" + } + ] }, "spec": { "$ref": "#/components/schemas/v1alpha1.CloudTowerConnect" @@ -1512,7 +1905,13 @@ "type": "object", "properties": { "cloudtowerServer": { - "$ref": "#/components/schemas/v1alpha1.CloudTowerServer" + "type": "object", + "description": "CloudTower server connection information", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloudTowerServer" + } + ] }, "elfCluster": { "type": "string", @@ -1578,10 +1977,22 @@ "$ref": "#/components/schemas/v1alpha1.KubernetesConfiguration" }, "nodeDrainTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.\nThe default value is 0, meaning that the node can be drained without any time limitations.\nNOTE: NodeDrainTimeout is different from `kubectl drain --timeout`", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "nodeVolumeDetachTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached.\nIf this value is nil, the default NodeVolumeDetachTimeout will be used instead.\nDefaults to 5 minutes.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "operation": { "$ref": "#/components/schemas/v1alpha1.OperationConfiguration" @@ -1604,14 +2015,56 @@ } } }, + "v1alpha1.ClusterInfraType": { + "type": "string", + "enum": [ + "VM", + "PHYSICAL", + "HYBRID" + ], + "x-enum-varnames": [ + "ClusterInfraTypeVirtualMachine", + "ClusterInfraTypePhysicalHost", + "ClusterInfraTypeHybrid" + ] + }, + "v1alpha1.ClusterOperation": { + "type": "string", + "enum": [ + "Upgrade", + "Scale", + "Create", + "Update", + "Rollback" + ], + "x-enum-varnames": [ + "OperationUpgrade", + "OperationScale", + "OperationCreate", + "OperationUpdate", + "OperationRollback" + ] + }, "v1alpha1.ClusterResources": { "type": "object", "properties": { "controlPlane": { - "$ref": "#/components/schemas/v1alpha1.Resources" + "type": "object", + "description": "ControlPlane is the resources allocated to the control plane.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.Resources" + } + ] }, "total": { - "$ref": "#/components/schemas/v1alpha1.Resources" + "type": "object", + "description": "Total is the total resources allocated to the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.Resources" + } + ] }, "workers": { "type": "object", @@ -1626,7 +2079,13 @@ "type": "object", "properties": { "controlPlane": { - "$ref": "#/components/schemas/v1alpha1.ControlPlaneGroup" + "type": "object", + "description": "ControlPlaneGroup is the node group for ControlPlane nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ControlPlaneGroup" + } + ] }, "workers": { "type": "array", @@ -1694,36 +2153,84 @@ "description": "AutoResourceReserved specifies whether to automatically configure resource reservations." }, "cloudProvider": { - "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + "type": "object", + "description": "CloudProvider specifies the IaaS Cloud Provider configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + } + ] }, "machineHealthCheck": { - "$ref": "#/components/schemas/v1alpha1.MachineHealthCheck" + "type": "object", + "description": "MachineHealthCheck defines a MachineHealthCheck for this node group.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.MachineHealthCheck" + } + ] }, "name": { "type": "string", "description": "Name is the name of this node group." }, "nodeAutoscaler": { - "$ref": "#/components/schemas/v1alpha1.NodeAutoscaler" + "type": "object", + "description": "NodeAutoscaler specifies the autoscaler configuration for node group.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NodeAutoscaler" + } + ] }, "nodeConfig": { - "$ref": "#/components/schemas/v1alpha1.NodeConfig" + "type": "object", + "description": "NodeConfig specifies the node configuration, such as cpu/memory/disk, etc.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NodeConfig" + } + ] }, "nodeDrainTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.\nIf this value is nil, the default NodeDrainTimeout will be used instead.\nDefaults to 5 minutes.\nNOTE: NodeDrainTimeout is different from `kubectl drain --timeout`", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "nodeVolumeDetachTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached.\nIf this value is nil, the default NodeVolumeDetachTimeout will be used instead.\nDefaults to 5 minutes.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "placementGroup": { - "$ref": "#/components/schemas/v1alpha1.PlacementGroup" + "type": "object", + "description": "PlacementGroup specifies the placement group configuration for node group.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.PlacementGroup" + } + ] }, "replicas": { "type": "integer", "description": "Replicas is the number of nodes in this node group." }, "rolloutBefore": { - "$ref": "#/components/schemas/v1beta1.RolloutBefore" + "type": "object", + "description": "RolloutBefore is a field to indicate a rollout should be performed\nif the specified criteria is met.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.RolloutBefore" + } + ] } } }, @@ -1985,94 +2492,22 @@ "v1alpha1.KubeSmartCluster": { "type": "object", "properties": { - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" - }, "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" }, - "creationTimestamp": { - "type": "string", - "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "deletionGracePeriodSeconds": { - "type": "integer", - "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only." - }, - "deletionTimestamp": { - "type": "string", - "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "finalizers": { - "type": "array", - "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+patchStrategy=merge", - "items": { - "type": "string" - } - }, - "generateName": { - "type": "string", - "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" - }, - "generation": { - "type": "integer", - "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only." - }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" - }, - "managedFields": { - "type": "array", - "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n", - "items": { - "$ref": "#/components/schemas/v1.ManagedFieldsEntry" - } - }, - "name": { - "type": "string", - "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" - }, - "namespace": { - "type": "string", - "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" - }, - "ownerReferences": { - "type": "array", - "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+patchMergeKey=uid\n+patchStrategy=merge", - "items": { - "$ref": "#/components/schemas/v1.OwnerReference" - } - }, - "resourceVersion": { - "type": "string", - "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" - }, - "selfLink": { - "type": "string", - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + "metadata": { + "$ref": "#/components/schemas/v1.ObjectMeta" }, "spec": { "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterSpec" }, - "status": { - "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterStatus" - }, - "uid": { - "type": "string", - "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + "status": { + "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterStatus" } } }, @@ -2083,10 +2518,6 @@ "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" }, - "continue": { - "type": "string", - "description": "continue may be set if the user set a limit on the number of items returned, and indicates that\nthe server has more data available. The value is opaque and may be used to issue another request\nto the endpoint that served this list to retrieve the next set of available objects. Continuing a\nconsistent list may not be possible if the server configuration has changed or more than a few\nminutes have passed. The resourceVersion field returned when using this continue value will be\nidentical to the value in the first response, unless you have received this token from an error\nmessage." - }, "items": { "type": "array", "items": { @@ -2097,17 +2528,8 @@ "type": "string", "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" }, - "remainingItemCount": { - "type": "integer", - "description": "remainingItemCount is the number of subsequent items in the list which are not included in this\nlist response. If the list request contained label or field selectors, then the number of\nremaining items is unknown and the field will be left unset and omitted during serialization.\nIf the list is complete (either because it is not chunking or because this is the last chunk),\nthen there are no more remaining items and this field will be left unset and omitted during\nserialization.\nServers older than v1.15 do not set this field.\nThe intended use of the remainingItemCount is *estimating* the size of a collection. Clients\nshould not rely on the remainingItemCount to be set or to be exact." - }, - "resourceVersion": { - "type": "string", - "description": "String that identifies the server's internal version of this object that\ncan be used by clients to determine when objects have changed.\nValue must be treated as opaque by clients and passed unmodified back to the server.\nPopulated by the system.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" - }, - "selfLink": { - "type": "string", - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system." + "metadata": { + "$ref": "#/components/schemas/v1.ListMeta" } } }, @@ -2115,32 +2537,80 @@ "type": "object", "properties": { "cloudProvider": { - "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + "type": "object", + "description": "CloudProvider specifies the IaaS Cloud Provider configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + } + ] }, "clusterConfiguration": { - "$ref": "#/components/schemas/v1alpha1.ClusterConfigurationSpec" + "type": "object", + "description": "ClusterConfiguration specifies the general configuration of the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ClusterConfigurationSpec" + } + ] }, "components": { - "$ref": "#/components/schemas/v1alpha1.ComponentsConfig" + "type": "object", + "description": "Components specify the configuration of cluster components.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ComponentsConfig" + } + ] }, "controlPlaneEndpoint": { - "$ref": "#/components/schemas/sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint" + "type": "object", + "description": "ControlPlaneEndpoint specifies the endpoint used to communicate with the control plane.", + "allOf": [ + { + "$ref": "#/components/schemas/sigs_k8s_io_cluster-api_api_v1beta1.APIEndpoint" + } + ] }, "network": { - "$ref": "#/components/schemas/v1alpha1.NetworkConfig" + "type": "object", + "description": "Network specifies the general network configuration for the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NetworkConfig" + } + ] }, "paused": { "type": "boolean", "description": "Paused can be used to prevent controllers from processing the Cluster and all its associated objects." }, "platform": { - "$ref": "#/components/schemas/v1alpha1.Platform" + "type": "object", + "description": "Platform contains the CPU architecture information of underlying infrastructure.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.Platform" + } + ] }, "storage": { - "$ref": "#/components/schemas/v1alpha1.StorageConfig" + "type": "object", + "description": "Storage specifies the general storage configuration for the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.StorageConfig" + } + ] }, "topology": { - "$ref": "#/components/schemas/v1alpha1.ClusterTopology" + "type": "object", + "description": "Topology defines the node groups for the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ClusterTopology" + } + ] }, "version": { "type": "string", @@ -2152,15 +2622,26 @@ "type": "object", "properties": { "addons": { - "$ref": "#/components/schemas/v1alpha1.AddonsStatus" + "type": "object", + "description": "Addons stores the status of addons.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.AddonsStatus" + } + ] }, "addonsReady": { "type": "boolean", "description": "AddonsReady indicates whether all cluster addons are in Ready state." }, "clusterInfraType": { - "type": "string", - "description": "ClusterInfraType records the cloud infrastructure type for the cluster." + "type": "object", + "description": "ClusterInfraType records the cloud infrastructure type for the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ClusterInfraType" + } + ] }, "conditions": { "type": "array", @@ -2178,14 +2659,26 @@ "description": "ControlPlaneReady indicates whether the ControlPlane nodes are in Ready state. It means CNI is installed." }, "controlPlanes": { - "$ref": "#/components/schemas/v1alpha1.NodesStatus" + "type": "object", + "description": "ControlPlanes stores the status of ControlPlane nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NodesStatus" + } + ] }, "csiNames": { "type": "string", "description": "CSINames is the names of installed CSI." }, "failureDetails": { - "$ref": "#/components/schemas/v1alpha1.FailureDetails" + "type": "object", + "description": "FailureDetails indicates more details associated with the FailureReason.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.FailureDetails" + } + ] }, "failureMessage": { "type": "string", @@ -2200,14 +2693,26 @@ "description": "KappControllerPodReady indicates whether kapp-controller pod is ready." }, "kubeconfigRef": { - "$ref": "#/components/schemas/v1.SecretReference" + "type": "object", + "description": "KubeconfigRef is a reference to cluster kubeconfig secret.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.SecretReference" + } + ] }, "nodesReady": { "type": "boolean", "description": "NodesReady indicates whether all ControlPlane and Worker nodes are in Ready state." }, "operation": { - "$ref": "#/components/schemas/v1alpha1.OperationStatus" + "type": "object", + "description": "OperationStatus defines the status of cluster current operation.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.OperationStatus" + } + ] }, "packageManagerReady": { "type": "boolean", @@ -2218,17 +2723,35 @@ "description": "Phase represents the current operation phase of the cluster.\nE.g. Creating, Running, Updating, Upgrading, Deleting, Failed etc." }, "platform": { - "$ref": "#/components/schemas/v1alpha1.Platform" + "type": "object", + "description": "Platform contains the CPU architecture information of underlying infrastructure.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.Platform" + } + ] }, "ready": { "type": "boolean", "description": "Ready indicates whether the cluster is ready for use. It means all nodes and addons are ready." }, "requiredNetworkPorts": { - "$ref": "#/components/schemas/v1alpha1.RequiredNetworkPorts" + "type": "object", + "description": "RequiredNetworkPorts is indicates the network protocols and ports that required in the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.RequiredNetworkPorts" + } + ] }, "resources": { - "$ref": "#/components/schemas/v1alpha1.ClusterResources" + "type": "object", + "description": "ClusterResources records the resources(CPU/Memory/GPU/vGPU) allocated for the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ClusterResources" + } + ] }, "serverUrl": { "type": "string", @@ -2251,14 +2774,26 @@ "description": "Version is the Kubernetes version for the cluster when the cluster was created/updated successfully." }, "vipClaim": { - "$ref": "#/components/schemas/v1alpha1.VIPClaim" + "type": "object", + "description": "VIPClaim stores the allocation status of VIP.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.VIPClaim" + } + ] }, "vmTemplate": { "type": "string", "description": "VMTemplate is id of VM template from which the VMs are cloned when the cluster was created/updated successfully." }, "workers": { - "$ref": "#/components/schemas/v1alpha1.NodesStatus" + "type": "object", + "description": "Workers stores the status of Worker nodes.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NodesStatus" + } + ] }, "workersReady": { "type": "boolean", @@ -2274,7 +2809,13 @@ "description": "FileServerURL specifies the address of the file server." }, "instanceLabelSelector": { - "$ref": "#/components/schemas/v1.LabelSelector" + "type": "object", + "description": "InstanceLabelSelector specifies matching criteria for labels on ServerInstance.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.LabelSelector" + } + ] }, "instanceObjectSelector": { "type": "array", @@ -2354,13 +2895,31 @@ "type": "object", "properties": { "maxUnhealthy": { - "$ref": "#/components/schemas/intstr.IntOrString" + "type": "object", + "description": "Any further remediation is only allowed if at most \"MaxUnhealthy\" machines selected by\n\"selector\" are not healthy.", + "allOf": [ + { + "$ref": "#/components/schemas/intstr.IntOrString" + } + ] }, "nodeStartupTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "Machines older than this duration without a node will be considered to have\nfailed and will be remediated.\nIf you wish to disable this feature, set the value explicitly to 0.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "remediationTemplate": { - "$ref": "#/components/schemas/v1.ObjectReference" + "type": "object", + "description": "RemediationTemplate is a reference to a remediation template\nprovided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller\ncreates a new object from the template referenced and hands off remediation of the machine to\na controller that lives outside of Cluster API.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.ObjectReference" + } + ] }, "unhealthyConditions": { "type": "array", @@ -2425,7 +2984,13 @@ } }, "ipPoolRef": { - "$ref": "#/components/schemas/v1.TypedObjectReference" + "type": "object", + "description": "IPPoolRef refers to an IPPool object.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.TypedObjectReference" + } + ] }, "nameservers": { "type": "array", @@ -2444,24 +3009,48 @@ "description": "APIServerPort specifies the port the API Server should bind to.\nDefaults to 6443." }, "cni": { - "$ref": "#/components/schemas/v1alpha1.CNIConfig" + "type": "object", + "description": "CNI specifies CNI configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CNIConfig" + } + ] }, "ipPoolRef": { - "$ref": "#/components/schemas/v1.TypedObjectReference" + "type": "object", + "description": "IPPoolRef refers to an IPPool object.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.TypedObjectReference" + } + ] }, "managementNetworkInterface": { "type": "string", "description": "ManagementNetworkInterface specifies the management network inferface name in the cluster VM. It varies in different OSes, e.g. 'eth0' in CentOS 7.9 and 'ens4' in Rocky Linux 8.6." }, "pods": { - "$ref": "#/components/schemas/v1beta1.NetworkRanges" + "type": "object", + "description": "The network ranges from which Pod networks are allocated.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.NetworkRanges" + } + ] }, "serviceDomain": { "type": "string", "description": "Domain name for services." }, "services": { - "$ref": "#/components/schemas/v1beta1.NetworkRanges" + "type": "object", + "description": "The network ranges from which service VIPs are allocated.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.NetworkRanges" + } + ] } } }, @@ -2491,8 +3080,13 @@ "description": "Netmask is the subnet mask used by this device.\nRequired when DHCP4 is false." }, "networkType": { - "type": "string", - "description": "NetworkType is the VM network type, default IPV4_DHCP" + "type": "object", + "description": "NetworkType is the VM network type, default IPV4_DHCP", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NetworkType" + } + ] }, "routes": { "type": "array", @@ -2502,8 +3096,13 @@ } }, "tag": { - "type": "string", - "description": "The network device tag" + "type": "object", + "description": "The network device tag", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NetworkTag" + } + ] }, "vlan": { "type": "string", @@ -2528,6 +3127,32 @@ } } }, + "v1alpha1.NetworkTag": { + "type": "string", + "enum": [ + "default", + "storage", + "ecp" + ], + "x-enum-varnames": [ + "NetworkTagDefault", + "NetworkTagStorage", + "NetworkTagECP" + ] + }, + "v1alpha1.NetworkType": { + "type": "string", + "enum": [ + "NONE", + "IPV4", + "IPV4_DHCP" + ], + "x-enum-varnames": [ + "NetworkTypeNone", + "NetworkTypeIPV4", + "NetworkTypeIPV4DHCP" + ] + }, "v1alpha1.NodeAutoscaler": { "type": "object", "properties": { @@ -2545,8 +3170,13 @@ "type": "object", "properties": { "cloneMode": { - "type": "string", - "description": "CloneMode is the clone type of the node." + "type": "object", + "description": "CloneMode is the clone type of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloneMode" + } + ] }, "cpuCores": { "type": "integer", @@ -2568,7 +3198,13 @@ "description": "MemoryMB is the memory size of the node." }, "network": { - "$ref": "#/components/schemas/v1alpha1.Network" + "type": "object", + "description": "Network is the network configuration of the node.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.Network" + } + ] }, "vgpuDevices": { "type": "array", @@ -2621,16 +3257,40 @@ "type": "object", "properties": { "createClusterTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "CreateClusterTimeout is the total amount of time that the create cluster operation spend on.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "rollbackClusterTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "RollbackClusterTimeout is the total amount of time that the rollback cluster operation spend on.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "updateClusterTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "UpdateClusterTimeout is the total amount of time that the update cluster operation spend on.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "upgradeClusterTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "UpgradeClusterTimeout is the total amount of time that the upgrade cluster operation spend on.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] } } }, @@ -2646,11 +3306,22 @@ "description": "StartTime is the time when the operation started." }, "timeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "Timeout is the maximum amount of time that the operation can take.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "type": { - "type": "string", - "description": "Type is operation type, e.g. Create, Update, etc.." + "type": "object", + "description": "Type is operation type, e.g. Create, Update, etc..", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.ClusterOperation" + } + ] } } }, @@ -2667,8 +3338,13 @@ "type": "object", "properties": { "architecture": { - "type": "string", - "description": "+kubebuilder:validation:Enum=x86_64;AArch64" + "type": "object", + "description": "+kubebuilder:validation:Enum=x86_64;AArch64", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.Architecture" + } + ] } } }, @@ -2682,10 +3358,29 @@ "type": "integer" }, "protocol": { - "type": "string" + "$ref": "#/components/schemas/v1alpha1.ProtocolType" } } }, + "v1alpha1.ProtocolType": { + "type": "string", + "enum": [ + "TCP", + "UDP", + "IPIP", + "ICMP", + "SSH", + "HTTP" + ], + "x-enum-varnames": [ + "ProtocolTCP", + "ProtocolUDP", + "ProtocolIPIP", + "ProtocolICMP", + "ProtocolSSH", + "ProtocolHTTP" + ] + }, "v1alpha1.ProxyConfiguration": { "type": "object", "properties": { @@ -2731,7 +3426,13 @@ "description": "GPU is the total number of physical GPUs." }, "memory": { - "$ref": "#/components/schemas/resource.Quantity" + "type": "object", + "description": "Memory is the total amount of memory.", + "allOf": [ + { + "$ref": "#/components/schemas/resource.Quantity" + } + ] }, "vcpu": { "type": "integer", @@ -2764,7 +3465,13 @@ "type": "object", "properties": { "csi": { - "$ref": "#/components/schemas/v1alpha1.CSIConfig" + "type": "object", + "description": "CSI specifies CSI configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CSIConfig" + } + ] } } }, @@ -2833,36 +3540,84 @@ "description": "AutoResourceReserved specifies whether to automatically configure resource reservations." }, "cloudProvider": { - "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + "type": "object", + "description": "CloudProvider specifies the IaaS Cloud Provider configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.CloudProviderSpec" + } + ] }, "machineHealthCheck": { - "$ref": "#/components/schemas/v1alpha1.MachineHealthCheck" + "type": "object", + "description": "MachineHealthCheck defines a MachineHealthCheck for this node group.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.MachineHealthCheck" + } + ] }, "name": { "type": "string", "description": "Name is the name of this node group." }, "nodeAutoscaler": { - "$ref": "#/components/schemas/v1alpha1.NodeAutoscaler" + "type": "object", + "description": "NodeAutoscaler specifies the autoscaler configuration for node group.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NodeAutoscaler" + } + ] }, "nodeConfig": { - "$ref": "#/components/schemas/v1alpha1.NodeConfig" + "type": "object", + "description": "NodeConfig specifies the node configuration, such as cpu/memory/disk, etc.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.NodeConfig" + } + ] }, "nodeDrainTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.\nIf this value is nil, the default NodeDrainTimeout will be used instead.\nDefaults to 5 minutes.\nNOTE: NodeDrainTimeout is different from `kubectl drain --timeout`", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "nodeVolumeDetachTimeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached.\nIf this value is nil, the default NodeVolumeDetachTimeout will be used instead.\nDefaults to 5 minutes.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "placementGroup": { - "$ref": "#/components/schemas/v1alpha1.PlacementGroup" + "type": "object", + "description": "PlacementGroup specifies the placement group configuration for node group.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.PlacementGroup" + } + ] }, "replicas": { "type": "integer", "description": "Replicas is the number of nodes in this node group." }, "rolloutStrategy": { - "$ref": "#/components/schemas/v1beta1.MachineDeploymentStrategy" + "type": "object", + "description": "RolloutStrategy defines the strategy to replace existing machines with new ones.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.MachineDeploymentStrategy" + } + ] } } }, @@ -2891,7 +3646,13 @@ } }, "timeoutForControlPlane": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "TimeoutForControlPlane controls the timeout that we use for API server to appear", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] } } }, @@ -2914,10 +3675,22 @@ } }, "token": { - "$ref": "#/components/schemas/v1beta1.BootstrapTokenString" + "type": "object", + "description": "Token is used for establishing bidirectional trust between nodes and control-planes.\nUsed for joining nodes in the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.BootstrapTokenString" + } + ] }, "ttl": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "TTL defines the time to live for this token. Defaults to 24h.\nExpires and TTL are mutually exclusive.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "usages": { "type": "array", @@ -2959,7 +3732,13 @@ "type": "object", "properties": { "apiServer": { - "$ref": "#/components/schemas/v1beta1.APIServer" + "type": "object", + "description": "APIServer contains extra settings for the API server control plane component", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.APIServer" + } + ] }, "apiVersion": { "type": "string", @@ -2978,13 +3757,31 @@ "description": "ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it\ncan be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port.\nIn case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort\nare used; in case the ControlPlaneEndpoint is specified but without a TCP port,\nthe BindPort is used.\nPossible usages are:\ne.g. In a cluster with more than one control plane instances, this field should be\nassigned the address of the external load balancer in front of the\ncontrol plane instances.\ne.g. in environments with enforced node recycling, the ControlPlaneEndpoint\ncould be used for assigning a stable DNS to the control plane.\nNB: This value defaults to the first value in the Cluster object status.apiEndpoints array." }, "controllerManager": { - "$ref": "#/components/schemas/v1beta1.ControlPlaneComponent" + "type": "object", + "description": "ControllerManager contains extra settings for the controller manager control plane component", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ControlPlaneComponent" + } + ] }, "dns": { - "$ref": "#/components/schemas/v1beta1.DNS" + "type": "object", + "description": "DNS defines the options for the DNS add-on installed in the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.DNS" + } + ] }, "etcd": { - "$ref": "#/components/schemas/v1beta1.Etcd" + "type": "object", + "description": "Etcd holds configuration for etcd.\nNB: This value defaults to a Local (stacked) etcd", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Etcd" + } + ] }, "featureGates": { "type": "object", @@ -3006,10 +3803,22 @@ "description": "KubernetesVersion is the target version of the control plane.\nNB: This value defaults to the Machine object spec.version" }, "networking": { - "$ref": "#/components/schemas/v1beta1.Networking" + "type": "object", + "description": "Networking holds configuration for the networking topology of the cluster.\nNB: This value defaults to the Cluster object spec.clusterNetwork.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Networking" + } + ] }, "scheduler": { - "$ref": "#/components/schemas/v1beta1.ControlPlaneComponent" + "type": "object", + "description": "Scheduler contains extra settings for the scheduler control plane component", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ControlPlaneComponent" + } + ] } } }, @@ -3029,19 +3838,100 @@ "description": "The reason for the condition's last transition in CamelCase.\nThe specific API may choose whether or not this field is considered a guaranteed API.\nThis field may not be empty." }, "severity": { - "type": "string", - "description": "Severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe Severity field MUST be set only when Status=False." + "type": "object", + "description": "Severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe Severity field MUST be set only when Status=False.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ConditionSeverity" + } + ] }, "status": { - "type": "string", - "description": "Status of the condition, one of True, False, Unknown." + "type": "object", + "description": "Status of the condition, one of True, False, Unknown.", + "allOf": [ + { + "$ref": "#/components/schemas/k8s_io_api_core_v1.ConditionStatus" + } + ] }, "type": { - "type": "string", - "description": "Type of condition in CamelCase or in foo.example.com/CamelCase.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important." + "type": "object", + "description": "Type of condition in CamelCase or in foo.example.com/CamelCase.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ConditionType" + } + ] } } }, + "v1beta1.ConditionSeverity": { + "type": "string", + "enum": [ + "Error", + "Warning", + "Info", + "" + ], + "x-enum-varnames": [ + "ConditionSeverityError", + "ConditionSeverityWarning", + "ConditionSeverityInfo", + "ConditionSeverityNone" + ] + }, + "v1beta1.ConditionType": { + "type": "string", + "enum": [ + "Ready", + "InfrastructureReady", + "VariablesReconciled", + "ControlPlaneInitialized", + "ControlPlaneReady", + "BootstrapReady", + "DrainingSucceeded", + "PreDrainDeleteHookSucceeded", + "PreTerminateDeleteHookSucceeded", + "VolumeDetachSucceeded", + "HealthCheckSucceeded", + "OwnerRemediated", + "ExternalRemediationTemplateAvailable", + "ExternalRemediationRequestAvailable", + "NodeHealthy", + "RemediationAllowed", + "Available", + "MachinesCreated", + "MachinesReady", + "Resized", + "TopologyReconciled", + "RefVersionsUpToDate" + ], + "x-enum-varnames": [ + "ReadyCondition", + "InfrastructureReadyCondition", + "ClusterClassVariablesReconciledCondition", + "ControlPlaneInitializedCondition", + "ControlPlaneReadyCondition", + "BootstrapReadyCondition", + "DrainingSucceededCondition", + "PreDrainDeleteHookSucceededCondition", + "PreTerminateDeleteHookSucceededCondition", + "VolumeDetachSucceededCondition", + "MachineHealthCheckSucceededCondition", + "MachineOwnerRemediatedCondition", + "ExternalRemediationTemplateAvailableCondition", + "ExternalRemediationRequestAvailableCondition", + "MachineNodeHealthyCondition", + "RemediationAllowedCondition", + "MachineDeploymentAvailableCondition", + "MachinesCreatedCondition", + "MachinesReadyCondition", + "ResizedCondition", + "TopologyReconciledCondition", + "ClusterClassRefVersionsUpToDateCondition" + ] + }, "v1beta1.ContainerLinuxConfig": { "type": "object", "properties": { @@ -3091,13 +3981,31 @@ "type": "object", "properties": { "bootstrapToken": { - "$ref": "#/components/schemas/v1beta1.BootstrapTokenDiscovery" + "type": "object", + "description": "BootstrapToken is used to set the options for bootstrap token based discovery\nBootstrapToken and File are mutually exclusive", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.BootstrapTokenDiscovery" + } + ] }, "file": { - "$ref": "#/components/schemas/v1beta1.FileDiscovery" + "type": "object", + "description": "File is used to specify a file or URL to a kubeconfig file from which to load cluster information\nBootstrapToken and File are mutually exclusive", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.FileDiscovery" + } + ] }, "timeout": { - "$ref": "#/components/schemas/v1.Duration" + "type": "object", + "description": "Timeout modifies the discovery timeout", + "allOf": [ + { + "$ref": "#/components/schemas/v1.Duration" + } + ] }, "tlsBootstrapToken": { "type": "string", @@ -3124,14 +4032,39 @@ } } }, + "v1beta1.Encoding": { + "type": "string", + "enum": [ + "base64", + "gzip", + "gzip+base64" + ], + "x-enum-varnames": [ + "Base64", + "Gzip", + "GzipBase64" + ] + }, "v1beta1.Etcd": { "type": "object", "properties": { "external": { - "$ref": "#/components/schemas/v1beta1.ExternalEtcd" + "type": "object", + "description": "External describes how to connect to an external etcd cluster\nLocal and External are mutually exclusive", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ExternalEtcd" + } + ] }, "local": { - "$ref": "#/components/schemas/v1beta1.LocalEtcd" + "type": "object", + "description": "Local provides configuration knobs for configuring the local etcd instance\nLocal and External are mutually exclusive", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.LocalEtcd" + } + ] } } }, @@ -3171,11 +4104,22 @@ "description": "Content is the actual content of the file." }, "contentFrom": { - "$ref": "#/components/schemas/v1beta1.FileSource" + "type": "object", + "description": "ContentFrom is a referenced source of content to populate the file.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.FileSource" + } + ] }, "encoding": { - "type": "string", - "description": "Encoding specifies the encoding of the file contents." + "type": "object", + "description": "Encoding specifies the encoding of the file contents.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Encoding" + } + ] }, "owner": { "type": "string", @@ -3204,7 +4148,13 @@ "type": "object", "properties": { "secret": { - "$ref": "#/components/schemas/v1beta1.SecretFileSource" + "type": "object", + "description": "Secret represents a secret that should populate this file.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.SecretFileSource" + } + ] } } }, @@ -3244,6 +4194,17 @@ } } }, + "v1beta1.Format": { + "type": "string", + "enum": [ + "cloud-config", + "ignition" + ], + "x-enum-varnames": [ + "CloudConfig", + "Ignition" + ] + }, "v1beta1.HostPathMount": { "type": "object", "properties": { @@ -3260,8 +4221,13 @@ "description": "Name of the volume inside the pod template." }, "pathType": { - "type": "string", - "description": "PathType is the type of the HostPath." + "type": "object", + "description": "PathType is the type of the HostPath.", + "allOf": [ + { + "$ref": "#/components/schemas/v1.HostPathType" + } + ] }, "readOnly": { "type": "boolean", @@ -3273,7 +4239,13 @@ "type": "object", "properties": { "containerLinuxConfig": { - "$ref": "#/components/schemas/v1beta1.ContainerLinuxConfig" + "type": "object", + "description": "ContainerLinuxConfig contains CLC specific configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ContainerLinuxConfig" + } + ] } } }, @@ -3296,13 +4268,31 @@ "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" }, "localAPIEndpoint": { - "$ref": "#/components/schemas/sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint" + "type": "object", + "description": "LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node\nIn HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint\nis the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This\nconfiguration object lets you customize what IP/DNS name and port the local API server advertises it's accessible\non. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process\nfails you may set the desired value here.", + "allOf": [ + { + "$ref": "#/components/schemas/sigs_k8s_io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint" + } + ] }, "nodeRegistration": { - "$ref": "#/components/schemas/v1beta1.NodeRegistrationOptions" + "type": "object", + "description": "NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.\nWhen used in the context of control plane nodes, NodeRegistration should remain consistent\nacross both InitConfiguration and JoinConfiguration", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.NodeRegistrationOptions" + } + ] }, "patches": { - "$ref": "#/components/schemas/v1beta1.Patches" + "type": "object", + "description": "Patches contains options related to applying patches to components deployed by kubeadm during\n\"kubeadm init\". The minimum kubernetes version needed to support Patches is v1.22", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Patches" + } + ] }, "skipPhases": { "type": "array", @@ -3325,20 +4315,44 @@ "description": "CACertPath is the path to the SSL certificate authority used to\nsecure comunications between node and control-plane.\nDefaults to \"/etc/kubernetes/pki/ca.crt\".\nTODO: revisit when there is defaulting from k/k" }, "controlPlane": { - "$ref": "#/components/schemas/v1beta1.JoinControlPlane" + "type": "object", + "description": "ControlPlane defines the additional control plane instance to be deployed on the joining node.\nIf nil, no additional control plane instance will be deployed.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.JoinControlPlane" + } + ] }, "discovery": { - "$ref": "#/components/schemas/v1beta1.Discovery" + "type": "object", + "description": "Discovery specifies the options for the kubelet to use during the TLS Bootstrap process\nTODO: revisit when there is defaulting from k/k", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Discovery" + } + ] }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" }, "nodeRegistration": { - "$ref": "#/components/schemas/v1beta1.NodeRegistrationOptions" + "type": "object", + "description": "NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.\nWhen used in the context of control plane nodes, NodeRegistration should remain consistent\nacross both InitConfiguration and JoinConfiguration", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.NodeRegistrationOptions" + } + ] }, "patches": { - "$ref": "#/components/schemas/v1beta1.Patches" + "type": "object", + "description": "Patches contains options related to applying patches to components deployed by kubeadm during\n\"kubeadm join\". The minimum kubernetes version needed to support Patches is v1.22", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Patches" + } + ] }, "skipPhases": { "type": "array", @@ -3353,7 +4367,13 @@ "type": "object", "properties": { "localAPIEndpoint": { - "$ref": "#/components/schemas/sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint" + "type": "object", + "description": "LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node.", + "allOf": [ + { + "$ref": "#/components/schemas/sigs_k8s_io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint" + } + ] } } }, @@ -3361,10 +4381,22 @@ "type": "object", "properties": { "clusterConfiguration": { - "$ref": "#/components/schemas/v1beta1.ClusterConfiguration" + "type": "object", + "description": "ClusterConfiguration along with InitConfiguration are the configurations necessary for the init command", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.ClusterConfiguration" + } + ] }, "diskSetup": { - "$ref": "#/components/schemas/v1beta1.DiskSetup" + "type": "object", + "description": "DiskSetup specifies options for the creation of partition tables and file systems on devices.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.DiskSetup" + } + ] }, "files": { "type": "array", @@ -3374,17 +4406,40 @@ } }, "format": { - "type": "string", - "description": "Format specifies the output format of the bootstrap data" + "type": "object", + "description": "Format specifies the output format of the bootstrap data", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.Format" + } + ] }, "ignition": { - "$ref": "#/components/schemas/v1beta1.IgnitionSpec" + "type": "object", + "description": "Ignition contains Ignition specific configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.IgnitionSpec" + } + ] }, "initConfiguration": { - "$ref": "#/components/schemas/v1beta1.InitConfiguration" + "type": "object", + "description": "InitConfiguration along with ClusterConfiguration are the configurations necessary for the init command", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.InitConfiguration" + } + ] }, "joinConfiguration": { - "$ref": "#/components/schemas/v1beta1.JoinConfiguration" + "type": "object", + "description": "JoinConfiguration is the kubeadm configuration for the join command", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.JoinConfiguration" + } + ] }, "mounts": { "type": "array", @@ -3397,7 +4452,13 @@ } }, "ntp": { - "$ref": "#/components/schemas/v1beta1.NTP" + "type": "object", + "description": "NTP specifies NTP configuration", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.NTP" + } + ] }, "postKubeadmCommands": { "type": "array", @@ -3472,14 +4533,36 @@ "type": "object", "properties": { "rollingUpdate": { - "$ref": "#/components/schemas/v1beta1.MachineRollingUpdateDeployment" + "type": "object", + "description": "Rolling update config params. Present only if\nMachineDeploymentStrategyType = RollingUpdate.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.MachineRollingUpdateDeployment" + } + ] }, "type": { - "type": "string", - "description": "Type of deployment. Allowed values are RollingUpdate and OnDelete.\nThe default is RollingUpdate." + "type": "object", + "description": "Type of deployment. Allowed values are RollingUpdate and OnDelete.\nThe default is RollingUpdate.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.MachineDeploymentStrategyType" + } + ] } } }, + "v1beta1.MachineDeploymentStrategyType": { + "type": "string", + "enum": [ + "RollingUpdate", + "OnDelete" + ], + "x-enum-varnames": [ + "RollingUpdateMachineDeploymentStrategyType", + "OnDeleteMachineDeploymentStrategyType" + ] + }, "v1beta1.MachineRollingUpdateDeployment": { "type": "object", "properties": { @@ -3488,10 +4571,22 @@ "description": "DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling.\nValid values are \"Random, \"Newest\", \"Oldest\"\nWhen no value is supplied, the default DeletePolicy of MachineSet is used" }, "maxSurge": { - "$ref": "#/components/schemas/intstr.IntOrString" + "type": "object", + "description": "The maximum number of machines that can be scheduled above the\ndesired number of machines.\nValue can be an absolute number (ex: 5) or a percentage of\ndesired machines (ex: 10%).\nThis can not be 0 if MaxUnavailable is 0.\nAbsolute number is calculated from percentage by rounding up.\nDefaults to 1.\nExample: when this is set to 30%, the new MachineSet can be scaled\nup immediately when the rolling update starts, such that the total\nnumber of old and new machines do not exceed 130% of desired\nmachines. Once old machines have been killed, new MachineSet can\nbe scaled up further, ensuring that total number of machines running\nat any time during the update is at most 130% of desired machines.", + "allOf": [ + { + "$ref": "#/components/schemas/intstr.IntOrString" + } + ] }, "maxUnavailable": { - "$ref": "#/components/schemas/intstr.IntOrString" + "type": "object", + "description": "The maximum number of machines that can be unavailable during the update.\nValue can be an absolute number (ex: 5) or a percentage of desired\nmachines (ex: 10%).\nAbsolute number is calculated from percentage by rounding down.\nThis can not be 0 if MaxSurge is 0.\nDefaults to 0.\nExample: when this is set to 30%, the old MachineSet can be scaled\ndown to 70% of desired machines immediately when the rolling update\nstarts. Once new machines are ready, old MachineSet can be scaled\ndown further, followed by scaling up the new MachineSet, ensuring\nthat the total number of machines available at all times\nduring the update is at least 70% of desired machines.", + "allOf": [ + { + "$ref": "#/components/schemas/intstr.IntOrString" + } + ] } } }, @@ -3602,7 +4697,13 @@ "type": "object", "properties": { "secret": { - "$ref": "#/components/schemas/v1beta1.SecretPasswdSource" + "type": "object", + "description": "Secret represents a secret that should populate this password.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.SecretPasswdSource" + } + ] } } }, @@ -3654,15 +4755,25 @@ "type": "object", "properties": { "status": { - "type": "string", - "description": "+kubebuilder:validation:Type=string" + "type": "object", + "description": "+kubebuilder:validation:Type=string", + "allOf": [ + { + "$ref": "#/components/schemas/k8s_io_api_core_v1.ConditionStatus" + } + ] }, "timeout": { "$ref": "#/components/schemas/v1.Duration" }, "type": { - "type": "string", - "description": "+kubebuilder:validation:Type=string" + "type": "object", + "description": "+kubebuilder:validation:Type=string", + "allOf": [ + { + "$ref": "#/components/schemas/v1.NodeConditionType" + } + ] } } }, @@ -3698,7 +4809,13 @@ "description": "Passwd specifies a hashed password for the user" }, "passwdFrom": { - "$ref": "#/components/schemas/v1beta1.PasswdSource" + "type": "object", + "description": "PasswdFrom is a referenced source of passwd to populate the passwd.", + "allOf": [ + { + "$ref": "#/components/schemas/v1beta1.PasswdSource" + } + ] }, "primaryGroup": { "type": "string", @@ -3724,4 +4841,4 @@ } }, "x-original-swagger-version": "2.0" -} \ No newline at end of file +} From 745c90c4c3862afb487163d77bb63e1e003b1084 Mon Sep 17 00:00:00 2001 From: wengxiaojun Date: Thu, 30 May 2024 17:23:21 +0800 Subject: [PATCH 4/8] temp-fix: remove wrap with i18n --- cloudtower-api-doc/swagger/SKS-App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudtower-api-doc/swagger/SKS-App.tsx b/cloudtower-api-doc/swagger/SKS-App.tsx index ad146fc9..9e12249d 100644 --- a/cloudtower-api-doc/swagger/SKS-App.tsx +++ b/cloudtower-api-doc/swagger/SKS-App.tsx @@ -8,7 +8,7 @@ import { ISpec, sksSpecMap as specMap, overwriteSchemaTitle, - wrapSpecWithI18n, + // wrapSpecWithI18n, } from "./utils"; import Redocly from "./redoc/Redoc"; import { LOCAL_STORAGE_SERVERS_KEY } from "./redoc/Console/ServerDropdown"; @@ -78,7 +78,7 @@ const App: React.FC = () => { const swaggerSpec: ISpec = _.cloneDeep(data.default); setRawSpec(swaggerSpec); i18next.changeLanguage(i18n.currentLocale); - setSpec(wrapSpecWithI18n(swaggerSpec, i18n.currentLocale, lastVersion, 'sks')); + setSpec(swaggerSpec); }) }, [version, i18n.currentLocale]); From ec9ca85dd44f103209f7b5ee14691242b81bf1b1 Mon Sep 17 00:00:00 2001 From: "haijian.yang" Date: Wed, 5 Jun 2024 16:38:00 +0800 Subject: [PATCH 5/8] test --- .../static/sks-specs/1.4.0-swagger.json | 81 +++++-- .../swagger/locales/en/sks-1.4.0.json | 174 ++++++++++----- .../swagger/locales/zh/sks-1.4.0.json | 198 ++++++++++++------ 3 files changed, 312 insertions(+), 141 deletions(-) diff --git a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json index e56caa2d..f70f25a1 100644 --- a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json +++ b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json @@ -19,7 +19,7 @@ "/api/v1/servers/connectivity-probes/:namespace/:name": { "post": { "tags": [ - "Instances" + "Instance" ], "summary": "Network connectivity probe on serverInstance.", "operationId": "instances/connectivity-probes", @@ -103,9 +103,9 @@ "/api/v1/servers/labels": { "get": { "tags": [ - "Instances" + "Instance" ], - "summary": "Get all Ready ServiceInstance label sets.", + "summary": "Get ready ServiceInstance label sets.", "operationId": "instances/jobs", "responses": { "200": { @@ -134,7 +134,7 @@ "/api/v1/servers/prepare-environment": { "get": { "tags": [ - "Instances" + "Instance" ], "summary": "Download prepare environment command.", "operationId": "instances/commands", @@ -165,9 +165,9 @@ "/clusters": { "get": { "tags": [ - "Clusters" + "Cluster" ], - "summary": "Get all workload clusters.", + "summary": "Get workload clusters.", "operationId": "ListClusters", "parameters": [ { @@ -204,7 +204,7 @@ }, "post": { "tags": [ - "Clusters" + "Cluster" ], "summary": "Create a workload cluster", "operationId": "CreateCluster", @@ -257,7 +257,7 @@ "/clusters/:cluster": { "get": { "tags": [ - "Clusters" + "Cluster" ], "summary": "Get a workload cluster.", "operationId": "GetCluster", @@ -296,7 +296,7 @@ }, "put": { "tags": [ - "Clusters" + "Cluster" ], "summary": "Update a workload cluster.", "operationId": "UpdateCluster", @@ -347,7 +347,7 @@ }, "delete": { "tags": [ - "Clusters" + "Cluster" ], "summary": "Delete a workload cluster.", "operationId": "DeleteCluster", @@ -390,7 +390,7 @@ "/clusters/:cluster/addons": { "get": { "tags": [ - "Clusters" + "Cluster" ], "summary": "Get addons of a workload cluster.", "operationId": "listClusterAddons", @@ -431,7 +431,7 @@ "/clusters/:cluster/kubeconfig": { "get": { "tags": [ - "Clusters" + "Cluster" ], "summary": "Get the kubeconfig of a workload cluster.", "operationId": "GetClusterKubeconfig", @@ -472,7 +472,7 @@ "/clusters/{cluster}/proxy/{k8s_url}": { "get": { "tags": [ - "Workload Clusters" + "Workload Cluster" ], "summary": "Proxy all requests to the workload kubernetes cluster.", "description": "The request uri format is like /api/v1/clusters/{cluster}/proxy/{k8s_url}. Support any HTTP method of the proxied API (GET, POST, DELETE, PUT, PATCH, etc.)", @@ -875,7 +875,22 @@ "type": "object", "properties": { "Format": { - "type": "string" + "type": "string", + "enum": [ + "DecimalExponent", + "BinarySI", + "DecimalSI" + ], + "x-enum-varnames": [ + "DecimalExponent", + "BinarySI", + "DecimalSI" + ], + "x-enum-comments": { + "BinarySI": "e.g., 12Mi (12 * 2^20)", + "DecimalExponent": "e.g., 12e6", + "DecimalSI": "e.g., 12M (12 * 10^6)" + } } } }, @@ -2533,6 +2548,33 @@ } } }, + "v1alpha1.KubeSmartClusterPhase": { + "type": "string", + "enum": [ + "Creating", + "Failed", + "Running", + "Ready", + "Paused", + "Updating", + "Upgrading", + "Rollbacking", + "Deleting", + "Deleted" + ], + "x-enum-varnames": [ + "KubeSmartClusterPhaseCreating", + "KubeSmartClusterPhaseFailed", + "KubeSmartClusterPhaseRunning", + "KubeSmartClusterPhaseReady", + "KubeSmartClusterPhasePaused", + "KubeSmartClusterPhaseUpdating", + "KubeSmartClusterPhaseUpgrading", + "KubeSmartClusterPhaseRollbacking", + "KubeSmartClusterPhaseDeleting", + "KubeSmartClusterPhaseDeleted" + ] + }, "v1alpha1.KubeSmartClusterSpec": { "type": "object", "properties": { @@ -3298,8 +3340,13 @@ "type": "object", "properties": { "phase": { - "type": "string", - "description": "Phase represents the current operation phase of the cluster." + "type": "object", + "description": "Phase represents the current operation phase of the cluster.", + "allOf": [ + { + "$ref": "#/components/schemas/v1alpha1.KubeSmartClusterPhase" + } + ] }, "startTime": { "type": "string", @@ -4841,4 +4888,4 @@ } }, "x-original-swagger-version": "2.0" -} +} \ No newline at end of file diff --git a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json index bbabdecd..4dcf84f6 100644 --- a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json +++ b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json @@ -6,14 +6,11 @@ "errors.ErrorResponse": { "apiVersion": "", "code": "", - "continue": "", "details": "", "kind": "", "message": "", + "metadata": "", "reason": "", - "remainingItemCount": "", - "resourceVersion": "", - "selfLink": "", "status": "" }, "instance.connectivityResponse": { @@ -24,14 +21,18 @@ "protocol": "", "success": "" }, + "instance.labelSets": {}, "intstr.IntOrString": { "intVal": "", "strVal": "", "type": "" }, - "intstr.Type": {}, - "k8s_io_api_core_v1.ConditionStatus": {}, - "instance.labelSets": {}, + "intstr.Type": { + "enum": "" + }, + "k8s_io_api_core_v1.ConditionStatus": { + "enum": "" + }, "license.License": { "license_type": "", "max_socket_num": "", @@ -42,37 +43,58 @@ "sign_date": "", "software_edition": "" }, + "license.LicenseType": { + "enum": "" + }, + "license.SoftwareEdition": { + "enum": "" + }, "license.licenseCode": { "code": "" }, "resource.Quantity": { - "Format": "" + "enum": "" }, "restful.Info": { "message": "" }, "runtime.RawExtension": {}, - "sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint": { + "sigs_k8s_io_cluster-api_api_v1beta1.APIEndpoint": { "host": "", "port": "" }, - "sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { + "sigs_k8s_io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { "advertiseAddress": "", "bindPort": "" }, + "v1.CauseType": { + "enum": "" + }, "v1.Duration": { "time.Duration": "" }, "v1.FieldsV1": {}, + "v1.HostPathType": { + "enum": "" + }, "v1.LabelSelector": { "matchExpressions": "", "matchLabels": "" }, + "v1.LabelSelectorOperator": { + "enum": "" + }, "v1.LabelSelectorRequirement": { "key": "", "operator": "", "values": "" }, + "v1.ListMeta": { + "continue": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "" + }, "v1.ManagedFieldsEntry": { "apiVersion": "", "fieldsType": "", @@ -82,6 +104,29 @@ "subresource": "", "time": "" }, + "v1.ManagedFieldsOperationType": { + "enum": "" + }, + "v1.NodeConditionType": { + "enum": "" + }, + "v1.ObjectMeta": { + "annotations": "", + "creationTimestamp": "", + "deletionGracePeriodSeconds": "", + "deletionTimestamp": "", + "finalizers": "", + "generateName": "", + "generation": "", + "labels": "", + "managedFields": "", + "name": "", + "namespace": "", + "ownerReferences": "", + "resourceVersion": "", + "selfLink": "", + "uid": "" + }, "v1.ObjectReference": { "apiVersion": "", "fieldPath": "", @@ -116,12 +161,18 @@ "retryAfterSeconds": "", "uid": "" }, + "v1.StatusReason": { + "enum": "" + }, "v1.Taint": { "effect": "", "key": "", "timeAdded": "", "value": "" }, + "v1.TaintEffect": { + "enum": "" + }, "v1.TypedObjectReference": { "apiGroup": "", "kind": "", @@ -129,25 +180,11 @@ "namespace": "" }, "v1alpha1.Addon": { - "annotations": "", "apiVersion": "", - "creationTimestamp": "", - "deletionGracePeriodSeconds": "", - "deletionTimestamp": "", - "finalizers": "", - "generateName": "", - "generation": "", "kind": "", - "labels": "", - "managedFields": "", - "name": "", - "namespace": "", - "ownerReferences": "", - "resourceVersion": "", - "selfLink": "", + "metadata": "", "spec": "", - "status": "", - "uid": "" + "status": "" }, "v1alpha1.AddonDataValues": { "secretRef": "", @@ -155,11 +192,8 @@ }, "v1alpha1.AddonList": { "apiVersion": "", - "continue": "", "kind": "", - "remainingItemCount": "", - "resourceVersion": "", - "selfLink": "" + "metadata": "" }, "v1alpha1.AddonPackage": { "name": "", @@ -176,6 +210,9 @@ "ready": "", "version": "" }, + "v1alpha1.AddonType": { + "enum": "" + }, "v1alpha1.AddonsStatus": { "details": "", "progress": "", @@ -186,6 +223,9 @@ "enabled": "", "hostConfigAgent": "" }, + "v1alpha1.Architecture": { + "enum": "" + }, "v1alpha1.CNIConfig": { "config": "", "ecpConfig": "", @@ -211,11 +251,17 @@ "disabled": "", "version": "" }, + "v1alpha1.CloneMode": { + "enum": "" + }, "v1alpha1.CloudProviderSpec": { "cloudtower": "", "ksph": "", "name": "" }, + "v1alpha1.CloudTowerAuthMode": { + "enum": "" + }, "v1alpha1.CloudTowerConnect": { "authMode": "", "password": "", @@ -258,6 +304,12 @@ "skipTLSVerify": "", "timezone": "" }, + "v1alpha1.ClusterInfraType": { + "enum": "" + }, + "v1alpha1.ClusterOperation": { + "enum": "" + }, "v1alpha1.ClusterResources": { "controlPlane": "", "total": "", @@ -381,33 +433,19 @@ "version": "" }, "v1alpha1.KubeSmartCluster": { - "annotations": "", "apiVersion": "", - "creationTimestamp": "", - "deletionGracePeriodSeconds": "", - "deletionTimestamp": "", - "finalizers": "", - "generateName": "", - "generation": "", "kind": "", - "labels": "", - "managedFields": "", - "name": "", - "namespace": "", - "ownerReferences": "", - "resourceVersion": "", - "selfLink": "", + "metadata": "", "spec": "", - "status": "", - "uid": "" + "status": "" }, "v1alpha1.KubeSmartClusterList": { "apiVersion": "", - "continue": "", "kind": "", - "remainingItemCount": "", - "resourceVersion": "", - "selfLink": "" + "metadata": "" + }, + "v1alpha1.KubeSmartClusterPhase": { + "enum": "" }, "v1alpha1.KubeSmartClusterSpec": { "cloudProvider": "", @@ -531,6 +569,12 @@ "netmask": "", "network": "" }, + "v1alpha1.NetworkTag": { + "enum": "" + }, + "v1alpha1.NetworkType": { + "enum": "" + }, "v1alpha1.NodeAutoscaler": { "maxSize": "", "minSize": "" @@ -578,6 +622,9 @@ "port": "", "protocol": "" }, + "v1alpha1.ProtocolType": { + "enum": "" + }, "v1alpha1.ProxyConfiguration": { "http": "", "https": "", @@ -679,6 +726,12 @@ "status": "", "type": "" }, + "v1beta1.ConditionSeverity": { + "enum": "" + }, + "v1beta1.ConditionType": { + "enum": "" + }, "v1beta1.ContainerLinuxConfig": { "additionalConfig": "", "strict": "" @@ -701,6 +754,9 @@ "filesystems": "", "partitions": "" }, + "v1beta1.Encoding": { + "enum": "" + }, "v1beta1.Etcd": { "external": "", "local": "" @@ -735,6 +791,9 @@ "partition": "", "replaceFS": "" }, + "v1beta1.Format": { + "enum": "" + }, "v1beta1.HostPathMount": { "hostPath": "", "mountPath": "", @@ -795,6 +854,9 @@ "rollingUpdate": "", "type": "" }, + "v1beta1.MachineDeploymentStrategyType": { + "enum": "" + }, "v1beta1.MachineRollingUpdateDeployment": { "deletePolicy": "", "maxSurge": "", @@ -865,32 +927,32 @@ }, "tags": [ { - "name": "instances", + "name": "Instance", "x-displayName": "", "description": "" }, { - "name": "clusters", + "name": "Cluster", "x-displayName": "", "description": "" }, { - "name": "workload clusters", + "name": "Workload Cluster", "x-displayName": "", "description": "" }, { - "name": "upgrade", + "name": "SKS Version", "x-displayName": "", "description": "" }, { - "name": "healthz", + "name": "Healthz", "x-displayName": "", "description": "" }, { - "name": "license", + "name": "License", "x-displayName": "", "description": "" } diff --git a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json index bbabdecd..c9ca174c 100644 --- a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json +++ b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json @@ -6,14 +6,11 @@ "errors.ErrorResponse": { "apiVersion": "", "code": "", - "continue": "", "details": "", "kind": "", "message": "", + "metadata": "", "reason": "", - "remainingItemCount": "", - "resourceVersion": "", - "selfLink": "", "status": "" }, "instance.connectivityResponse": { @@ -24,14 +21,18 @@ "protocol": "", "success": "" }, + "instance.labelSets": {}, "intstr.IntOrString": { "intVal": "", "strVal": "", "type": "" }, - "intstr.Type": {}, - "k8s_io_api_core_v1.ConditionStatus": {}, - "instance.labelSets": {}, + "intstr.Type": { + "enum": "" + }, + "k8s_io_api_core_v1.ConditionStatus": { + "enum": "" + }, "license.License": { "license_type": "", "max_socket_num": "", @@ -42,37 +43,58 @@ "sign_date": "", "software_edition": "" }, + "license.LicenseType": { + "enum": "" + }, + "license.SoftwareEdition": { + "enum": "" + }, "license.licenseCode": { "code": "" }, "resource.Quantity": { - "Format": "" + "enum": "" }, "restful.Info": { "message": "" }, "runtime.RawExtension": {}, - "sigs.k8s.io_cluster-api_api_v1beta1.APIEndpoint": { + "sigs_k8s_io_cluster-api_api_v1beta1.APIEndpoint": { "host": "", "port": "" }, - "sigs.k8s.io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { + "sigs_k8s_io_cluster-api_bootstrap_kubeadm_api_v1beta1.APIEndpoint": { "advertiseAddress": "", "bindPort": "" }, + "v1.CauseType": { + "enum": "" + }, "v1.Duration": { "time.Duration": "" }, "v1.FieldsV1": {}, + "v1.HostPathType": { + "enum": "" + }, "v1.LabelSelector": { "matchExpressions": "", "matchLabels": "" }, + "v1.LabelSelectorOperator": { + "enum": "" + }, "v1.LabelSelectorRequirement": { "key": "", "operator": "", "values": "" }, + "v1.ListMeta": { + "continue": "", + "remainingItemCount": "", + "resourceVersion": "", + "selfLink": "" + }, "v1.ManagedFieldsEntry": { "apiVersion": "", "fieldsType": "", @@ -82,6 +104,29 @@ "subresource": "", "time": "" }, + "v1.ManagedFieldsOperationType": { + "enum": "" + }, + "v1.NodeConditionType": { + "enum": "" + }, + "v1.ObjectMeta": { + "annotations": "", + "creationTimestamp": "", + "deletionGracePeriodSeconds": "", + "deletionTimestamp": "", + "finalizers": "", + "generateName": "", + "generation": "", + "labels": "", + "managedFields": "", + "name": "", + "namespace": "", + "ownerReferences": "", + "resourceVersion": "", + "selfLink": "", + "uid": "" + }, "v1.ObjectReference": { "apiVersion": "", "fieldPath": "", @@ -116,12 +161,18 @@ "retryAfterSeconds": "", "uid": "" }, + "v1.StatusReason": { + "enum": "" + }, "v1.Taint": { "effect": "", "key": "", "timeAdded": "", "value": "" }, + "v1.TaintEffect": { + "enum": "" + }, "v1.TypedObjectReference": { "apiGroup": "", "kind": "", @@ -129,25 +180,11 @@ "namespace": "" }, "v1alpha1.Addon": { - "annotations": "", "apiVersion": "", - "creationTimestamp": "", - "deletionGracePeriodSeconds": "", - "deletionTimestamp": "", - "finalizers": "", - "generateName": "", - "generation": "", "kind": "", - "labels": "", - "managedFields": "", - "name": "", - "namespace": "", - "ownerReferences": "", - "resourceVersion": "", - "selfLink": "", + "metadata": "", "spec": "", - "status": "", - "uid": "" + "status": "" }, "v1alpha1.AddonDataValues": { "secretRef": "", @@ -155,11 +192,8 @@ }, "v1alpha1.AddonList": { "apiVersion": "", - "continue": "", "kind": "", - "remainingItemCount": "", - "resourceVersion": "", - "selfLink": "" + "metadata": "" }, "v1alpha1.AddonPackage": { "name": "", @@ -176,6 +210,9 @@ "ready": "", "version": "" }, + "v1alpha1.AddonType": { + "enum": "" + }, "v1alpha1.AddonsStatus": { "details": "", "progress": "", @@ -186,6 +223,9 @@ "enabled": "", "hostConfigAgent": "" }, + "v1alpha1.Architecture": { + "enum": "" + }, "v1alpha1.CNIConfig": { "config": "", "ecpConfig": "", @@ -211,11 +251,17 @@ "disabled": "", "version": "" }, + "v1alpha1.CloneMode": { + "enum": "" + }, "v1alpha1.CloudProviderSpec": { "cloudtower": "", "ksph": "", "name": "" }, + "v1alpha1.CloudTowerAuthMode": { + "enum": "" + }, "v1alpha1.CloudTowerConnect": { "authMode": "", "password": "", @@ -258,6 +304,12 @@ "skipTLSVerify": "", "timezone": "" }, + "v1alpha1.ClusterInfraType": { + "enum": "" + }, + "v1alpha1.ClusterOperation": { + "enum": "" + }, "v1alpha1.ClusterResources": { "controlPlane": "", "total": "", @@ -381,33 +433,19 @@ "version": "" }, "v1alpha1.KubeSmartCluster": { - "annotations": "", "apiVersion": "", - "creationTimestamp": "", - "deletionGracePeriodSeconds": "", - "deletionTimestamp": "", - "finalizers": "", - "generateName": "", - "generation": "", "kind": "", - "labels": "", - "managedFields": "", - "name": "", - "namespace": "", - "ownerReferences": "", - "resourceVersion": "", - "selfLink": "", + "metadata": "", "spec": "", - "status": "", - "uid": "" + "status": "" }, "v1alpha1.KubeSmartClusterList": { "apiVersion": "", - "continue": "", "kind": "", - "remainingItemCount": "", - "resourceVersion": "", - "selfLink": "" + "metadata": "" + }, + "v1alpha1.KubeSmartClusterPhase": { + "enum": "" }, "v1alpha1.KubeSmartClusterSpec": { "cloudProvider": "", @@ -531,6 +569,12 @@ "netmask": "", "network": "" }, + "v1alpha1.NetworkTag": { + "enum": "" + }, + "v1alpha1.NetworkType": { + "enum": "" + }, "v1alpha1.NodeAutoscaler": { "maxSize": "", "minSize": "" @@ -578,6 +622,9 @@ "port": "", "protocol": "" }, + "v1alpha1.ProtocolType": { + "enum": "" + }, "v1alpha1.ProxyConfiguration": { "http": "", "https": "", @@ -679,6 +726,12 @@ "status": "", "type": "" }, + "v1beta1.ConditionSeverity": { + "enum": "" + }, + "v1beta1.ConditionType": { + "enum": "" + }, "v1beta1.ContainerLinuxConfig": { "additionalConfig": "", "strict": "" @@ -701,6 +754,9 @@ "filesystems": "", "partitions": "" }, + "v1beta1.Encoding": { + "enum": "" + }, "v1beta1.Etcd": { "external": "", "local": "" @@ -735,6 +791,9 @@ "partition": "", "replaceFS": "" }, + "v1beta1.Format": { + "enum": "" + }, "v1beta1.HostPathMount": { "hostPath": "", "mountPath": "", @@ -795,6 +854,9 @@ "rollingUpdate": "", "type": "" }, + "v1beta1.MachineDeploymentStrategyType": { + "enum": "" + }, "v1beta1.MachineRollingUpdateDeployment": { "deletePolicy": "", "maxSurge": "", @@ -865,34 +927,34 @@ }, "tags": [ { - "name": "instances", - "x-displayName": "", - "description": "" + "name": "Instance", + "x-displayName": "裸金属机器实例", + "description": "裸金属机器实例" }, { - "name": "clusters", - "x-displayName": "", - "description": "" + "name": "Cluster", + "x-displayName": "集群", + "description": "集群" }, { - "name": "workload clusters", - "x-displayName": "", - "description": "" + "name": "Workload Cluster", + "x-displayName": "工作负载集群", + "description": "工作负载集群" }, { - "name": "upgrade", - "x-displayName": "", - "description": "" + "name": "SKS Version", + "x-displayName": "SKS 版本", + "description": "SKS 版本" }, { - "name": "healthz", - "x-displayName": "", - "description": "" + "name": "Healthz", + "x-displayName": "服务可用", + "description": "服务可用" }, { - "name": "license", - "x-displayName": "", - "description": "" + "name": "License", + "x-displayName": "软件许可", + "description": "软件许可" } ], "paths": { From 3683ccf1b6ed88226f813224ad23df6a72b70144 Mon Sep 17 00:00:00 2001 From: wengxiaojun Date: Wed, 5 Jun 2024 17:53:04 +0800 Subject: [PATCH 6/8] fallback to origin --- cloudtower-api-doc/swagger/SKS-App.tsx | 4 ++-- cloudtower-api-doc/swagger/utils/wrap.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cloudtower-api-doc/swagger/SKS-App.tsx b/cloudtower-api-doc/swagger/SKS-App.tsx index 9e12249d..52f2294c 100644 --- a/cloudtower-api-doc/swagger/SKS-App.tsx +++ b/cloudtower-api-doc/swagger/SKS-App.tsx @@ -8,7 +8,7 @@ import { ISpec, sksSpecMap as specMap, overwriteSchemaTitle, - // wrapSpecWithI18n, + wrapSpecWithI18n, } from "./utils"; import Redocly from "./redoc/Redoc"; import { LOCAL_STORAGE_SERVERS_KEY } from "./redoc/Console/ServerDropdown"; @@ -78,7 +78,7 @@ const App: React.FC = () => { const swaggerSpec: ISpec = _.cloneDeep(data.default); setRawSpec(swaggerSpec); i18next.changeLanguage(i18n.currentLocale); - setSpec(swaggerSpec); + setSpec(wrapSpecWithI18n(swaggerSpec, i18n.currentLocale, version)); }) }, [version, i18n.currentLocale]); diff --git a/cloudtower-api-doc/swagger/utils/wrap.ts b/cloudtower-api-doc/swagger/utils/wrap.ts index 206f89d1..b3ea5cca 100644 --- a/cloudtower-api-doc/swagger/utils/wrap.ts +++ b/cloudtower-api-doc/swagger/utils/wrap.ts @@ -40,8 +40,9 @@ export const wrapSpecWithI18n = ( const method = Object.keys(paths[p])[0] const operationObj = paths[p][method] as OpenAPIV3.OperationObject; const { description, summary } = apiDoc; - operationObj .description = description; - operationObj .summary = summary; + const { description: originDes, summary: originSum } = operationObj; + operationObj.description = description || originDes; + operationObj.summary = summary || originSum; const example = swaggerSpecExample [p] || {}; if(example) { operationObj["x-codeSamples"] = [ @@ -88,7 +89,8 @@ export const wrapSpecWithI18n = ( schema: components.schemas[s], prefix: ["components", "schemas", s], describeFn: ({ prefix, path }) => { - _.set(cloneSpec, [...prefix, "description"], schema[path]); + const originDes = _.get(cloneSpec, [...prefix, 'description']); + _.set(cloneSpec, [...prefix, "description"], schema[path] || originDes); }, }); }); From defcb7f6bb1dc7aca33fa764c2a93f83c4f7075e Mon Sep 17 00:00:00 2001 From: estella Date: Fri, 7 Jun 2024 14:40:35 +0800 Subject: [PATCH 7/8] temp --- cloudtower-api-doc/swagger/SKS-App.tsx | 2 +- cloudtower-api-doc/swagger/i18n.ts | 4 ++-- cloudtower-api-doc/swagger/utils/wrap.ts | 29 +++++++++++++++--------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/cloudtower-api-doc/swagger/SKS-App.tsx b/cloudtower-api-doc/swagger/SKS-App.tsx index 52f2294c..0fea6852 100644 --- a/cloudtower-api-doc/swagger/SKS-App.tsx +++ b/cloudtower-api-doc/swagger/SKS-App.tsx @@ -78,7 +78,7 @@ const App: React.FC = () => { const swaggerSpec: ISpec = _.cloneDeep(data.default); setRawSpec(swaggerSpec); i18next.changeLanguage(i18n.currentLocale); - setSpec(wrapSpecWithI18n(swaggerSpec, i18n.currentLocale, version)); + setSpec(wrapSpecWithI18n(swaggerSpec, i18n.currentLocale, version, 'sks')); }) }, [version, i18n.currentLocale]); diff --git a/cloudtower-api-doc/swagger/i18n.ts b/cloudtower-api-doc/swagger/i18n.ts index 459ff1d1..516651dc 100644 --- a/cloudtower-api-doc/swagger/i18n.ts +++ b/cloudtower-api-doc/swagger/i18n.ts @@ -99,7 +99,7 @@ i18next.init({ ['3_4_0']: en3_4API, ['4_0_0']: en4_0API, ['4_1_0']: en4_1API, - ['sks_1_4_0']: [sksen1_4], + ['sks_1_4_0']: sksen1_4, components: enComponents, }, [SupportLanguage.zh]: { @@ -122,7 +122,7 @@ i18next.init({ ['3_4_0']: zh3_4API, ['4_0_0']: zh4_0API, ['4_1_0']: zh4_1API, - ['sks_1_4_0']: [skszh1_4], + ['sks_1_4_0']: skszh1_4, components: zhComponents, }, }, diff --git a/cloudtower-api-doc/swagger/utils/wrap.ts b/cloudtower-api-doc/swagger/utils/wrap.ts index b3ea5cca..650e7654 100644 --- a/cloudtower-api-doc/swagger/utils/wrap.ts +++ b/cloudtower-api-doc/swagger/utils/wrap.ts @@ -27,7 +27,7 @@ export const wrapSpecWithI18n = ( spec: ISpec, language: string, version: string, - product?: string, + product?: 'sks', ) => { const cloneSpec = _.cloneDeep(spec); const { components, paths } = cloneSpec; @@ -76,11 +76,13 @@ export const wrapSpecWithI18n = ( } } cloneSpec.paths[p][method] = operationObj; - operationObj.tags = operationObj.tags?.map(tag => { - const replaceTag = replaceTags(tag); - tags.add(replaceTag); - return replaceTag; - }) + if(!product) { + operationObj.tags = operationObj.tags?.map(tag => { + const replaceTag = replaceTags(tag); + tags.add(replaceTag); + return replaceTag; + }) + } }); // handle schemas Object.keys(components.schemas).forEach((s) => { @@ -101,11 +103,16 @@ export const wrapSpecWithI18n = ( _.set(cloneSpec, ["components","securitySchemes", s, "x-displayName"], schema['name']); }); - cloneSpec.tags = Array.from(tags).map(tag => ({ - name: tag, - "x-displayName": i18next.t(`components.${tag}`), - description: "" - })); + if(!product) { + cloneSpec.tags = Array.from(tags).map(tag => ({ + name: tag, + "x-displayName": i18next.t(`components.${tag}`), + description: "" + })); + } else { + cloneSpec.tags = i18next.t(`${ns}.tags`, {lng: language, returnObjects: true }) as OpenAPIV3.TagObject[]; + } + return cloneSpec; }; From 30a91c24df56d24d8b18d57cd4abff93de607c23 Mon Sep 17 00:00:00 2001 From: "haijian.yang" Date: Tue, 11 Jun 2024 11:48:04 +0800 Subject: [PATCH 8/8] test --- .../static/sks-specs/1.4.0-swagger.json | 10 ++-- .../swagger/locales/en/sks-1.4.0.json | 15 ++++-- .../swagger/locales/zh/sks-1.4.0.json | 54 +++++++++---------- 3 files changed, 42 insertions(+), 37 deletions(-) diff --git a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json index f70f25a1..478b0d83 100644 --- a/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json +++ b/cloudtower-api-doc/static/sks-specs/1.4.0-swagger.json @@ -19,15 +19,15 @@ "/api/v1/servers/connectivity-probes/:namespace/:name": { "post": { "tags": [ - "Instance" + "Server Instance" ], - "summary": "Network connectivity probe on serverInstance.", + "summary": "Network connectivity probe on ServiceInstance.", "operationId": "instances/connectivity-probes", "parameters": [ { "name": "namespace", "in": "query", - "description": "serverInstance object on namespace name", + "description": "ServiceInstance object on namespace name", "required": true, "schema": { "type": "string" @@ -103,7 +103,7 @@ "/api/v1/servers/labels": { "get": { "tags": [ - "Instance" + "Server Instance" ], "summary": "Get ready ServiceInstance label sets.", "operationId": "instances/jobs", @@ -134,7 +134,7 @@ "/api/v1/servers/prepare-environment": { "get": { "tags": [ - "Instance" + "Server Instance" ], "summary": "Download prepare environment command.", "operationId": "instances/commands", diff --git a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json index 4dcf84f6..c3b0f94c 100644 --- a/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json +++ b/cloudtower-api-doc/swagger/locales/en/sks-1.4.0.json @@ -21,7 +21,6 @@ "protocol": "", "success": "" }, - "instance.labelSets": {}, "intstr.IntOrString": { "intVal": "", "strVal": "", @@ -58,7 +57,6 @@ "restful.Info": { "message": "" }, - "runtime.RawExtension": {}, "sigs_k8s_io_cluster-api_api_v1beta1.APIEndpoint": { "host": "", "port": "" @@ -73,7 +71,6 @@ "v1.Duration": { "time.Duration": "" }, - "v1.FieldsV1": {}, "v1.HostPathType": { "enum": "" }, @@ -701,7 +698,6 @@ "token": "", "unsafeSkipCAVerification": "" }, - "v1beta1.BootstrapTokenString": {}, "v1beta1.ClusterConfiguration": { "apiServer": "", "apiVersion": "", @@ -923,7 +919,11 @@ "shell": "", "sshAuthorizedKeys": "", "sudo": "" - } + }, + "instance.labelSets": {}, + "runtime.RawExtension": {}, + "v1.FieldsV1": {}, + "v1beta1.BootstrapTokenString": {} }, "tags": [ { @@ -955,6 +955,11 @@ "name": "License", "x-displayName": "", "description": "" + }, + { + "name": "Server Instance", + "x-displayName": "", + "description": "" } ], "paths": { diff --git a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json index c9ca174c..b7441967 100644 --- a/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json +++ b/cloudtower-api-doc/swagger/locales/zh/sks-1.4.0.json @@ -21,7 +21,6 @@ "protocol": "", "success": "" }, - "instance.labelSets": {}, "intstr.IntOrString": { "intVal": "", "strVal": "", @@ -58,7 +57,6 @@ "restful.Info": { "message": "" }, - "runtime.RawExtension": {}, "sigs_k8s_io_cluster-api_api_v1beta1.APIEndpoint": { "host": "", "port": "" @@ -73,7 +71,6 @@ "v1.Duration": { "time.Duration": "" }, - "v1.FieldsV1": {}, "v1.HostPathType": { "enum": "" }, @@ -701,7 +698,6 @@ "token": "", "unsafeSkipCAVerification": "" }, - "v1beta1.BootstrapTokenString": {}, "v1beta1.ClusterConfiguration": { "apiServer": "", "apiVersion": "", @@ -923,38 +919,42 @@ "shell": "", "sshAuthorizedKeys": "", "sudo": "" - } + }, + "instance.labelSets": {}, + "runtime.RawExtension": {}, + "v1.FieldsV1": {}, + "v1beta1.BootstrapTokenString": {} }, "tags": [ - { - "name": "Instance", - "x-displayName": "裸金属机器实例", - "description": "裸金属机器实例" - }, { "name": "Cluster", "x-displayName": "集群", - "description": "集群" + "description": "" }, { "name": "Workload Cluster", "x-displayName": "工作负载集群", - "description": "工作负载集群" + "description": "" }, { "name": "SKS Version", "x-displayName": "SKS 版本", - "description": "SKS 版本" + "description": "" }, { "name": "Healthz", - "x-displayName": "服务可用", - "description": "服务可用" + "x-displayName": "健康检查", + "description": "" }, { "name": "License", "x-displayName": "软件许可", - "description": "软件许可" + "description": "" + }, + { + "name": "Server Instance", + "x-displayName": "物理机", + "description": "" } ], "paths": { @@ -963,7 +963,7 @@ "description": "" }, "/api/v1/servers/labels": { - "summary": "", + "summary": "获取物理机标签", "description": "" }, "/api/v1/servers/prepare-environment": { @@ -971,39 +971,39 @@ "description": "" }, "/clusters": { - "summary": "", + "summary": "获取集群", "description": "" }, "/clusters/:cluster": { - "summary": "", + "summary": "获取一个集群", "description": "" }, "/clusters/:cluster/addons": { - "summary": "", + "summary": "获取集群的插件", "description": "" }, "/clusters/:cluster/kubeconfig": { - "summary": "", + "summary": "获取集群的 KubeConfig", "description": "" }, "/clusters/{cluster}/proxy/{k8s_url}": { - "summary": "", - "description": "" + "summary": "代理转发工作负载集群请求", + "description": "请求 uri 格式为 /api/v1/clusters/{cluster}/proxy/{k8s_url}。支持代理所有类型的 HTTP 方法(GET、POST、DELETE、PUT、PATCH 等)" }, "/compatibility/versions": { - "summary": "", + "summary": "获取当前 SKS 版本兼容的 SKS 版本", "description": "" }, "/compatibility/vm-templates": { - "summary": "", + "summary": "获取当前 SKS 版本兼容的节点虚拟机模板", "description": "" }, "/healthz": { - "summary": "", + "summary": "返回服务当前健康状况", "description": "" }, "/licenses/validate": { - "summary": "", + "summary": "验证软件许可码", "description": "" } }