Skip to content

Commit f6adc6a

Browse files
committed
feat: complete M7 closed-loop + T7 traffic steering + Closed Loop dashboard
M7 (Observe→Analyze→Act closed-loop): - Phase A: intentd v2 async TMF921 pipeline (LLM/Git/Porch integration) - Phase B: Full E2E chain (E2 KPM → scale_out → Git PR → Porch Proposed) - Phase C: DemoRunner + CLI + Grafana dashboard (16 panels) + deep code review (23 issues fixed) - Prometheus metrics module (8 metrics, histogram p95, JSON snapshot API) T7 (Traffic Steering): - A1 client + PolicyType 20008 + CQI analyzer + dual-path closed-loop - ricxapp-scaling v2.2 (Go, Redis, Prometheus, non-root, Alpine 3.21) Frontend: - New "Closed Loop" dashboard (5th nav tab) — Overview, E2 KPM PRB gauges, Pipeline latency bars, GitOps/Porch panels - /api/metrics/json endpoint for structured metric consumption Tests: 417 unit + 21 integration + 24 vitest = 462 total, all green
1 parent 33c6bd4 commit f6adc6a

61 files changed

Lines changed: 10562 additions & 129 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@ replace_section*
340340
.conductor-state.json
341341
**/.*-state.json
342342
internal/loop/.conductor-state.json
343+
.state/
344+
345+
# Generated intent instance packages (created by pipeline runs / demos)
346+
packages/instances/intent-*
343347

344348
# Test reports and validation artifacts
345349
tests/unit/test-report-*.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scaling-xapp
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM golang:1.26-alpine AS builder
2+
3+
WORKDIR /app
4+
COPY go.mod go.sum ./
5+
RUN go mod download
6+
7+
COPY *.go ./
8+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o scaling-xapp .
9+
10+
FROM alpine:3.21
11+
RUN apk --no-cache add ca-certificates
12+
WORKDIR /home/nobody
13+
COPY --from=builder /app/scaling-xapp .
14+
15+
USER 65534
16+
EXPOSE 2112
17+
CMD ["./scaling-xapp"]
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: ricxapp-scaling
5+
namespace: ricxapp
6+
labels:
7+
app: ricxapp-scaling
8+
component: xapp
9+
spec:
10+
replicas: 1
11+
selector:
12+
matchLabels:
13+
app: ricxapp-scaling
14+
template:
15+
metadata:
16+
annotations:
17+
prometheus.io/path: /metrics
18+
prometheus.io/port: "2112"
19+
prometheus.io/scrape: "true"
20+
labels:
21+
app: ricxapp-scaling
22+
component: xapp
23+
spec:
24+
serviceAccountName: scaling-xapp
25+
securityContext:
26+
runAsNonRoot: true
27+
runAsUser: 65534
28+
runAsGroup: 65534
29+
fsGroup: 65534
30+
seccompProfile:
31+
type: RuntimeDefault
32+
containers:
33+
- name: scaling-xapp
34+
image: scaling-xapp:latest
35+
imagePullPolicy: Never
36+
securityContext:
37+
allowPrivilegeEscalation: false
38+
readOnlyRootFilesystem: true
39+
capabilities:
40+
drop: ["ALL"]
41+
env:
42+
- name: A1_MEDIATOR_URL
43+
value: "http://service-ricplt-a1mediator-http.ricplt.svc.cluster.local:10000"
44+
- name: REDIS_ADDRESS
45+
value: "a1-status-store.ricplt:6379"
46+
- name: POLL_INTERVAL
47+
value: "30s"
48+
ports:
49+
- containerPort: 2112
50+
name: metrics
51+
protocol: TCP
52+
livenessProbe:
53+
httpGet:
54+
path: /health
55+
port: 2112
56+
initialDelaySeconds: 10
57+
periodSeconds: 30
58+
readinessProbe:
59+
httpGet:
60+
path: /health
61+
port: 2112
62+
initialDelaySeconds: 5
63+
periodSeconds: 10
64+
resources:
65+
requests:
66+
cpu: 50m
67+
memory: 128Mi
68+
limits:
69+
cpu: 500m
70+
memory: 512Mi
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
module scaling-xapp
2+
3+
go 1.26
4+
5+
require (
6+
github.com/prometheus/client_golang v1.18.0
7+
github.com/redis/go-redis/v9 v9.7.0
8+
k8s.io/apimachinery v0.29.0
9+
k8s.io/client-go v0.29.0
10+
)
11+
12+
require (
13+
github.com/beorn7/perks v1.0.1 // indirect
14+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
15+
github.com/davecgh/go-spew v1.1.1 // indirect
16+
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
17+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
18+
github.com/go-logr/logr v1.3.0 // indirect
19+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
20+
github.com/go-openapi/jsonreference v0.20.2 // indirect
21+
github.com/go-openapi/swag v0.22.3 // indirect
22+
github.com/gogo/protobuf v1.3.2 // indirect
23+
github.com/golang/protobuf v1.5.3 // indirect
24+
github.com/google/gnostic-models v0.6.8 // indirect
25+
github.com/google/gofuzz v1.2.0 // indirect
26+
github.com/google/uuid v1.3.0 // indirect
27+
github.com/josharian/intern v1.0.0 // indirect
28+
github.com/json-iterator/go v1.1.12 // indirect
29+
github.com/mailru/easyjson v0.7.7 // indirect
30+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
31+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
32+
github.com/modern-go/reflect2 v1.0.2 // indirect
33+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
34+
github.com/prometheus/client_model v0.5.0 // indirect
35+
github.com/prometheus/common v0.45.0 // indirect
36+
github.com/prometheus/procfs v0.12.0 // indirect
37+
golang.org/x/net v0.17.0 // indirect
38+
golang.org/x/oauth2 v0.12.0 // indirect
39+
golang.org/x/sys v0.15.0 // indirect
40+
golang.org/x/term v0.13.0 // indirect
41+
golang.org/x/text v0.13.0 // indirect
42+
golang.org/x/time v0.3.0 // indirect
43+
google.golang.org/appengine v1.6.7 // indirect
44+
google.golang.org/protobuf v1.31.0 // indirect
45+
gopkg.in/inf.v0 v0.9.1 // indirect
46+
gopkg.in/yaml.v2 v2.4.0 // indirect
47+
gopkg.in/yaml.v3 v3.0.1 // indirect
48+
k8s.io/api v0.29.0 // indirect
49+
k8s.io/klog/v2 v2.110.1 // indirect
50+
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
51+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
52+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
53+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
54+
sigs.k8s.io/yaml v1.3.0 // indirect
55+
)

0 commit comments

Comments
 (0)