import requests
url = "https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/host-config"
payload = { "swap_gibibytes": 512 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({swap_gibibytes: 512})
};
fetch('https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/host-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/host-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"swap_gibibytes": 512
}
'{
"group_name": "<string>",
"swap_gibibytes": 123,
"existing_workers": 123,
"message": "<string>",
"swap_behavior": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Update node-group host config
Sets the encrypted swap a node group’s new nodes are built with (swap_gibibytes, swap_behavior). Node swap is served for OVH k3s workers only, so on a Proxmox VE cluster the route validates the body and answers 409 naming the unsupported provider.
import requests
url = "https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/host-config"
payload = { "swap_gibibytes": 512 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({swap_gibibytes: 512})
};
fetch('https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/host-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/proxmox/{cluster_id}/node-groups/{group_name}/host-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"swap_gibibytes": 512
}
'{
"group_name": "<string>",
"swap_gibibytes": 123,
"existing_workers": 123,
"message": "<string>",
"swap_behavior": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Size in GiB of the encrypted swap the group's new nodes are built with, 1 to 1024. 0 clears the setting.
0 <= x <= 1024Kubelet swap behaviour of those nodes. Defaults to LimitedSwap when a size is set; refused with 0.
LimitedSwap Response
Successful response
The size now set, 0 when the setting was cleared.
Workers already in the group, none of which were changed.
Plain statement of what changed, and that existing nodes did not.
The behaviour now set. Omitted when the setting was cleared.