curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/clusters/global-status \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/clusters/global-status"
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}/clusters/global-status', 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}/clusters/global-status",
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}/clusters/global-status"
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}/clusters/global-status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/clusters/global-status")
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": "GlobalClusterStatus",
"spec": {
"totalClusters": 2,
"healthyClusters": 1,
"degradedClusters": 0,
"offlineClusters": 1,
"clusters": [
{
"name": "prod-us-east-1",
"namespace": "chatcli-system",
"displayName": "Production US East 1",
"region": "us-east-1",
"environment": "prod",
"tier": "critical",
"connected": true,
"version": "v1.31.2",
"nodeCount": 12,
"namespaceCount": 25,
"activeIssues": 2,
"activeRemediations": 1,
"lastHealthCheck": "2026-03-19T15:29:00Z",
"creationTimestamp": "2026-01-05T10:00:00Z"
},
{
"name": "staging-us-east-1",
"namespace": "chatcli-system",
"displayName": "Staging US East 1",
"region": "us-east-1",
"environment": "staging",
"tier": "standard",
"connected": false,
"lastHealthCheck": "2026-03-19T15:10:00Z",
"creationTimestamp": "2026-02-01T14:00:00Z"
}
]
}
}
Status Global dos Clusters
Retorna a contagem de clusters saudáveis, degradados e offline de todos os ClusterRegistrations, junto com a lista de clusters
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/clusters/global-status \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/clusters/global-status"
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}/clusters/global-status', 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}/clusters/global-status",
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}/clusters/global-status"
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}/clusters/global-status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/clusters/global-status")
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": "GlobalClusterStatus",
"spec": {
"totalClusters": 2,
"healthyClusters": 1,
"degradedClusters": 0,
"offlineClusters": 1,
"clusters": [
{
"name": "prod-us-east-1",
"namespace": "chatcli-system",
"displayName": "Production US East 1",
"region": "us-east-1",
"environment": "prod",
"tier": "critical",
"connected": true,
"version": "v1.31.2",
"nodeCount": 12,
"namespaceCount": 25,
"activeIssues": 2,
"activeRemediations": 1,
"lastHealthCheck": "2026-03-19T15:29:00Z",
"creationTimestamp": "2026-01-05T10:00:00Z"
},
{
"name": "staging-us-east-1",
"namespace": "chatcli-system",
"displayName": "Staging US East 1",
"region": "us-east-1",
"environment": "staging",
"tier": "standard",
"connected": false,
"lastHealthCheck": "2026-03-19T15:10:00Z",
"creationTimestamp": "2026-02-01T14:00:00Z"
}
]
}
}
viewer. Não recebe parâmetros. O endpoint lista todos os ClusterRegistrations de todos os namespaces e conta:
totalClusters: todos os registroshealthyClusters: registros conectados (status.connected: true) cuja condiçãoDegradednão éTruedegradedClusters: registros conectados cuja condiçãoDegradedéTrue(alguns nós não estão Ready)offlineClusters: registros que não estão conectados
clusters traz cada registro com os campos descritos em Listar Clusters; vem null quando não há registros. Não há agregados de nós, recursos, SLOs ou incidentes aqui; para totais de issues, use Status da federação.
{
"apiVersion": "v1",
"kind": "GlobalClusterStatus",
"spec": {
"totalClusters": 2,
"healthyClusters": 1,
"degradedClusters": 0,
"offlineClusters": 1,
"clusters": [
{
"name": "prod-us-east-1",
"namespace": "chatcli-system",
"displayName": "Production US East 1",
"region": "us-east-1",
"environment": "prod",
"tier": "critical",
"connected": true,
"version": "v1.31.2",
"nodeCount": 12,
"namespaceCount": 25,
"activeIssues": 2,
"activeRemediations": 1,
"lastHealthCheck": "2026-03-19T15:29:00Z",
"creationTimestamp": "2026-01-05T10:00:00Z"
},
{
"name": "staging-us-east-1",
"namespace": "chatcli-system",
"displayName": "Staging US East 1",
"region": "us-east-1",
"environment": "staging",
"tier": "standard",
"connected": false,
"lastHealthCheck": "2026-03-19T15:10:00Z",
"creationTimestamp": "2026-02-01T14:00:00Z"
}
]
}
}
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).