ConfigMap Update
In the resource field under route, the actual value of {configmap_name} is the name of the ConfigMap configuration item in the message content.
Message instance
{
"header":{
"msg_id":"c8bbf78d-1320-4af1-9bcb-f92203f76fbf",
"parent_msg_id": "",
"timestamp":1652168693,
"resourceversion": "",
"sync":true
},
"route":{
"source":"controller",
"group":"resource",
"operation":"update",
"resource":"websocket/configmap/{configmap_name}"
},
"content":{}
}
Parameter description
The content message is described as follows:
{
"data":{
"aaa":"111",
"bbb":"222"
},
"metadata":{
"creationTimestamp":"2022-05-10T07:44:53Z",
"name":"{configmap_name}",
"namespace":"websocket",
"resourceVersion":"4518898",
"uid":"16594ec6-6223-4674-80de-ba5d80c1fbe2"
}
}
The following table describes some ConfigMap parameters. For details about other ConfigMap parameters, see the official Kubernetes documentation.
Level-1 Resource |
Level-2 Resource |
Description |
|---|---|---|
metadata |
- |
Type: struct |
- |
creationTimestamp |
Type: string Value: a string in the time.RFC3339 format |
- |
name |
Type: string Value: matching the regular expression ^[a-z0-9]([a-z0-9-]{0,126}[a-z0-9]){0,1}$ |
- |
namespace |
Optional field Type: string Value: websocket or mef-user |
- |
resourceVersion |
Type: string Value: matching the regular expression ^[a-zA-Z0-9]{0,64}$ |
- |
uid |
Type: string Value: matching the regular expression ^([0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}){0,1}$ |
data |
- |
Type: map[string]string Value: A maximum of 256 key-value pairs in a map is supported, and the key value matches the regular expression ^[a-zA-Z-]([a-zA-Z0-9-_.]){0,62}$. The value contains a maximum of 2048 characters. |
Result returned
{
"header": {
"id": "",
"msg_id": "6cae668c-a50d-407f-a4f1-45ab4eb301ef",
"parentId": "",
"parent_msg_id": "c8bbf78d-1320-4af1-9bcb-f92203f76fbf",
"timestamp": 1652168714420,
"version": "",
"resourceversion": "",
"isSync": false,
"sync": false,
"nodeId": "",
"peerInfo": {}
},
"router": {
"source": "",
"destination": "",
"option": "",
"resource": ""
},
"route": {
"source": "controller",
"group": "resource",
"operation": "response",
"resource": "websocket/configmap/{configmap_name}"
},
"content": "OK"
}