generated from mathias/template-go-web
feat(atlas): Phase C — live CD/deploy state on stage 07
Stage 07 now shows the pod's own live deploy state — deployed image tag + N/M replicas ready, green only when the rollout is fully ready — read from the k8s Deployment in-cluster (new namespaced deployments-read Role). DeployState/ DeployNode test-first; prepended to the authored CD narrative, fallback-safe. Verified: build/vet/lint(0)/test green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,11 @@ func Nodes() ([]byte, error) { return get("/api/v1/nodes") }
|
||||
// Namespaces returns the raw /api/v1/namespaces JSON from the in-cluster API server.
|
||||
func Namespaces() ([]byte, error) { return get("/api/v1/namespaces") }
|
||||
|
||||
// Deployment returns the raw JSON for the cad-atlas Deployment (its own live state).
|
||||
func Deployment() ([]byte, error) {
|
||||
return get("/apis/apps/v1/namespaces/cad-atlas/deployments/cad-atlas")
|
||||
}
|
||||
|
||||
func get(path string) ([]byte, error) {
|
||||
host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT")
|
||||
if host == "" || port == "" {
|
||||
|
||||
Reference in New Issue
Block a user