Create or Update Golden Rules
This endpoint is used to create or update golden rules for an existing orchestrator.
POST /openapi/v1/orchestrator/{scope}/{id}/gr
Parameters:
Attribute |
Type |
Description |
---|---|---|
kubelet_port |
integer |
Kubelet node-local API port |
services |
Array |
Array of Kubernetes Services objects |
Sample python code
req_payload = {
"kubelet_port":10255,
"services": [
{
"description": "kube-dns",
"addresses": [ "10.0.1.1:53/TCP", "10.0.1.1:53/UDP" ],
"consumed_by": [ "NODES", "PODS"],
}
]
}
resp = restclient.post('/orchestrator/{scope_id}/{orchestrator_id}/gr', json_body=json.dumps(req_payload))