k8sgpt/pkg/server
gossion df17e3e728
fix: config ai provider in query (#1457)
Signed-off-by: Guoxun Wei <guwe@microsoft.com>
2025-04-15 11:11:40 +01:00
..
analyze fix: prevent npe by handling checking error in NewAnalysis call (#1365) 2025-01-31 14:26:35 +00:00
config feat!: Removal of Trivy (#1386) 2025-03-04 07:33:14 +00:00
query fix: config ai provider in query (#1457) 2025-04-15 11:11:40 +01:00
log.go feat: refactoring to the new schema (#1219) 2024-08-15 14:42:55 +01:00
README.md feat!: Removal of Trivy (#1386) 2025-03-04 07:33:14 +00:00
server_test.go feat: testupdate (#1315) 2024-11-10 15:33:50 +00:00
server.go fix: [Bug] Make lint command is not working (#1282) 2024-10-30 10:49:44 +00:00

serve

The serve commands allow you to run k8sgpt in a grpc server mode. This would be enabled typically through k8sgpt serve and is how the in-cluster k8sgpt deployment functions when managed by the k8sgpt-operator

The grpc interface that is served is hosted on buf and the repository for this is here

grpcurl

A fantastic tool for local debugging and development is grpcurl It allows you to form curl like requests that are http2 e.g.

grpcurl -plaintext -d '{"namespace": "k8sgpt", "explain" : "true"}' localhost:8080 schema.v1.ServiceAnalyzeService/Analyze
grpcurl -plaintext  localhost:8080 schema.v1.ServiceConfigService/ListIntegrations
{
  "integrations": [
    "prometheus"
  ]
}

grpcurl -plaintext -d '{"integrations":{"prometheus":{"enabled":"true","namespace":"default","skipInstall":"false"}}}' localhost:8080 schema.v1.ServiceConfigService/AddConfig