curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/federation/correlations \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/federation/correlations"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('{scheme}://{host}:{port}/{basePath}/federation/correlations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/federation/correlations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/{basePath}/federation/correlations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/federation/correlations")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/federation/correlations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "FederationCorrelations",
"metadata": {
"totalCount": 1,
"page": 1,
"pageSize": 1
},
"items": [
{
"correlationId": "xcluster-3f9a1c2e",
"issue": "payment-service-oom-kill-1773933600",
"namespace": "production",
"severity": "critical",
"signalType": "oom_kill",
"correlatedClusters": "3",
"elevated": true,
"cascade": false
}
]
}
Correlações da Federação
Retorna as correlações de issues entre clusters lidas das annotations dos Issues
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/federation/correlations \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/federation/correlations"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('{scheme}://{host}:{port}/{basePath}/federation/correlations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/federation/correlations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/{basePath}/federation/correlations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/federation/correlations")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/federation/correlations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "FederationCorrelations",
"metadata": {
"totalCount": 1,
"page": 1,
"pageSize": 1
},
"items": [
{
"correlationId": "xcluster-3f9a1c2e",
"issue": "payment-service-oom-kill-1773933600",
"namespace": "production",
"severity": "critical",
"signalType": "oom_kill",
"correlatedClusters": "3",
"elevated": true,
"cascade": false
}
]
}
viewer. Não recebe parâmetros. Lista os Issues deste cluster que têm um ID de correlação entre clusters, um item por ID distinto.
Quando o mesmo signalType está ativo em 3 ou mais clusters, o CorrelateAcrossClusters do controller de federação grava platform.chatcli.io/cross-cluster-correlation (xcluster-<id>) e platform.chatcli.io/affected-clusters (o número de clusters) em cada Issue correspondente e eleva spec.severity para critical, marcando os que ele elevou com platform.chatcli.io/elevated-severity: "true". Um grupo mantém um único ID: um novo Issue correspondente entra no ID que um Issue anterior já carrega.
Campos da correlação
| Campo | Origem |
|---|---|
correlationId | Annotation platform.chatcli.io/cross-cluster-correlation (a legada platform.chatcli.io/correlation-id ainda é lida) |
issue, namespace, severity, signalType | O primeiro Issue encontrado com esse ID |
correlatedClusters | Annotation platform.chatcli.io/affected-clusters, uma contagem em string (a legada platform.chatcli.io/correlated-clusters ainda é lida) |
elevated | Annotation platform.chatcli.io/elevated-severity igual a "true" |
cascade | Annotation platform.chatcli.io/cascade-detected igual a "true" |
DetectCascade marcou (cascade-detected, cascade-source-cluster, cascade-source-issue) só aparece aqui quando o Issue também tem um ID de correlação.
{
"apiVersion": "v1",
"kind": "FederationCorrelations",
"metadata": {
"totalCount": 1,
"page": 1,
"pageSize": 1
},
"items": [
{
"correlationId": "xcluster-3f9a1c2e",
"issue": "payment-service-oom-kill-1773933600",
"namespace": "production",
"severity": "critical",
"signalType": "oom_kill",
"correlatedClusters": "3",
"elevated": true,
"cascade": false
}
]
}
Autorizações
API key sent in the X-API-Key header. Keys are read from the Secret chatcli-operator-secrets, key api-keys (fallback: ConfigMap chatcli-operator-config, key api-keys) in the operator namespace, as a YAML list of {key, role, name, description} (name is the identity recorded on approval decisions); the operator chart creates it only with apiKeys.create: true. Roles: viewer < operator < admin — any other role string is denied everywhere. Changes are picked up within about 30 seconds; deleting both the Secret and the ConfigMap revokes every key. With no keys configured every /api/ call returns 401, unless CHATCLI_OPERATOR_DEV_MODE=true, which grants admin without a key (development only).