1.16.2. 路径
1.16.2.1. 创建 DiscoveryConfig 复制链接链接已复制到粘贴板!
POST /app.k8s.io/v1alpha1/namespaces/{namespace}/discoveryconfigs
1.16.2.1.1. 描述 复制链接链接已复制到粘贴板!
创建 DiscoveryConfig。
1.16.2.1.2. 参数 复制链接链接已复制到粘贴板!
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| Header |
COOKIE | 身份验证:Bearer {ACCESS_TOKEN} ; ACCESS_TOKEN 是用户访问令牌。 | 字符串 |
| 路径 |
namespace | 要使用的命名空间,如 default。 | 字符串 |
| Body |
body | 描述要创建的 DiscoveryConfig 的参数。 | DiscoveryConfig |
1.16.2.1.3. 响应 复制链接链接已复制到粘贴板!
| HTTP 代码 | 描述 | 模式 |
|---|---|---|
| 200 | 成功 | 无内容 |
| 403 | 禁止访问 | 无内容 |
| 404 | 未找到资源 | 无内容 |
| 500 | 内部服务错误 | 无内容 |
| 503 | 服务不可用 | 无内容 |
1.16.2.1.4. 使用 复制链接链接已复制到粘贴板!
-
discoveryconfigs/yaml
1.16.2.1.5. Tags 复制链接链接已复制到粘贴板!
- discoveryconfigs.discovery.open-cluster-management.io
1.16.2.1.5.1. 请求正文 复制链接链接已复制到粘贴板!
{
"apiVersion": "apiextensions.k8s.io/v1",
"kind": "CustomResourceDefinition",
"metadata": {
"annotations": {
"controller-gen.kubebuilder.io/version": "v0.4.1",
},
"creationTimestamp": null,
"name": "discoveryconfigs.discovery.open-cluster-management.io",
},
"spec": {
"group": "discovery.open-cluster-management.io",
"names": {
"kind": "DiscoveryConfig",
"listKind": "DiscoveryConfigList",
"plural": "discoveryconfigs",
"singular": "discoveryconfig"
},
"scope": "Namespaced",
"versions": [
{
"name": "v1alpha1",
"schema": {
"openAPIV3Schema": {
"description": "DiscoveryConfig is the Schema for the discoveryconfigs API",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "DiscoveryConfigSpec defines the desired state of DiscoveryConfig",
"properties": {
"credential": {
"description": "Credential is the secret containing credentials to connect to the OCM api on behalf of a user",
"type": "string"
},
"filters": {
"description": "Sets restrictions on what kind of clusters to discover",
"properties": {
"lastActive": {
"description": "LastActive is the last active in days of clusters to discover, determined by activity timestamp",
"type": "integer"
},
"openShiftVersions": {
"description": "OpenShiftVersions is the list of release versions of OpenShift of the form \"<Major>.<Minor>\"",
"items": {
"description": "Semver represents a partial semver string with the major and minor version in the form \"<Major>.<Minor>\". For example: \"4.5\"",
"pattern": "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$",
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"required": [
"credential"
],
"type": "object"
},
"status": {
"description": "DiscoveryConfigStatus defines the observed state of DiscoveryConfig",
"type": "object"
}
},
"type": "object"
}
},
"served": true,
"storage": true,
"subresources": {
"status": {}
}
}
]
},
"status": {
"acceptedNames": {
"kind": "",
"plural": ""
},
"conditions": [],
"storedVersions": []
}
}