差异化更新通知发送人
请求信息
请求行
PATCH /api/v1/namespaces/{namespace}/secrets/{name}
差异化更新指定的通知发送人。
请求行参数
名称 | 类型 | 是否必填项 | 描述 |
---|---|---|---|
name | string | 是 | 通知发送人的名称。 |
namespace | string | 是 | 命名空间。对象名称和身份验证范围,例如团队和项目。 |
请求体
Content-Type
application/json-patch+json
,
application/merge-patch+json
,
application/strategic-merge-patch+json
,
application/apply-patch+yaml
请求体示例
Patch 方法,为了给 Kubernetes Patch 请求体一个具体的名称和类型。
{
"metadata": {
"annotations": {
"lala": "xx"
}
}
}
返回信息
Content-Type
application/json
,
application/yaml
,
application/vnd.kubernetes.protobuf
状态码: 200
OK
返回体示例
Secret 包含某种类型的保密数据。数据字段中值的总字节数必须小于 MaxSecretSize 字节数。
{
"apiVersion": "v1",
"data": {
"User-Agent": "QWxhdWRhL0NvdXJpZXI="
},
"kind": "Secret",
"metadata": {
"annotations": {
"sync-mutable": ""
},
"creationTimestamp": "2021-06-21T05:07:17Z",
"labels": {
"cpaas.io/type": "webhook",
"cpaas.io/unique-name": "f54a41f84e0cacdaf7bb0d32b0a645b8",
"helm.sh/chart-name": "alauda-aiops",
"helm.sh/chart-version": "v3.5.5",
"helm.sh/release-name": "alauda-aiops",
"helm.sh/release-namespace": "cpaas-system"
},
"managedFields": [
{
"apiVersion": "v1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:data": {
".": {},
"f:User-Agent": {}
},
"f:metadata": {
"f:annotations": {
".": {},
"f:sync-mutable": {}
},
"f:labels": {
".": {},
"f:cpaas.io/type": {},
"f:cpaas.io/unique-name": {},
"f:helm.sh/chart-name": {},
"f:helm.sh/chart-version": {},
"f:helm.sh/release-name": {},
"f:helm.sh/release-namespace": {}
}
},
"f:type": {}
},
"manager": "Go-http-client",
"operation": "Update",
"time": "2021-06-21T05:07:17Z"
}
],
"name": "default-webhook-sender",
"namespace": "cpaas-system",
"resourceVersion": "22137",
"selfLink": "/api/v1/namespaces/cpaas-system/secrets/default-webhook-sender",
"uid": "96a2b908-2dab-4349-a4a1-6d836033c419"
},
"type": "NotificationSender"
}
返回体说明
名称 | 类型 | 描述 |
---|---|---|
apiVersion | string | 查看公共参数 |
data | object |
Data 包含了 secret 数据。每个键必须由字母、数字、字符、'-'、'_' 或 '.' 组成。secret 数据的序列化形式是一个 base64 编码的字符串,表示任意(可能是非字符串)的数据值。更多信息:https://tools.ietf.org/html/rfc4648#section-4
字段路径:data |
kind | string | 查看公共参数 |
metadata | object | 查看公共参数 |
type | string |
用于促进保密数据的程序化处理。
字段路径:type |