Skip to content

Commit 05da81e

Browse files
authored
Merge pull request #42 from thc1006/chore/conductor-setup
chore(conductor): add CODEOWNERS + CI (concurrency) + contracts in place
2 parents cb2107c + 1cc3a9a commit 05da81e

6 files changed

Lines changed: 211 additions & 33 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1 @@
1-
# CODEOWNERS for Nephoran Intent Operator
2-
3-
# Global owners
4-
* @nephoran/maintainers
5-
6-
# Documentation
7-
docs/ @nephoran/docs-team @nephoran/maintainers
8-
*.md @nephoran/docs-team @nephoran/maintainers
9-
mkdocs.yml @nephoran/docs-team @nephoran/maintainers
10-
11-
# GitHub workflows and configurations
12-
.github/ @nephoran/devops-team @nephoran/maintainers
13-
14-
# Core API definitions
15-
api/ @nephoran/api-team @nephoran/maintainers
16-
17-
# Deployment configurations
18-
deployments/ @nephoran/platform-team @nephoran/maintainers
19-
deployments/helm/ @nephoran/platform-team @nephoran/maintainers
20-
21-
# Security configurations
22-
deployments/security/ @nephoran/security-team @nephoran/maintainers
23-
deployments/rbac/ @nephoran/security-team @nephoran/maintainers
24-
25-
# O-RAN related code
26-
pkg/oran/ @nephoran/oran-team @nephoran/maintainers
27-
28-
# LLM and RAG components
29-
pkg/llm/ @nephoran/ai-team @nephoran/maintainers
30-
pkg/rag/ @nephoran/ai-team @nephoran/maintainers
31-
32-
# Network controllers
33-
pkg/controllers/ @nephoran/core-team @nephoran/maintainers
1+
* @thc1006

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: ci
2+
on:
3+
push:
4+
branches: [ main, integrate/mvp, "feat/**", "chore/**" ]
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.ref }} # 以分支為群組
9+
cancel-in-progress: true # 新的中斷舊的(避免同分支互踩)
10+
11+
jobs:
12+
build-test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: "1.24"
19+
- run: go version
20+
- run: go mod tidy
21+
- run: go test ./...
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://example.com/schemas/a1.policy.schema.json",
4+
"title": "ScalingThresholdPolicy",
5+
"type": "object",
6+
"additionalProperties": false,
7+
"required": ["policyTypeId", "scope", "rules"],
8+
"properties": {
9+
"policyTypeId": {
10+
"type": "string",
11+
"const": "oran.sim.scaling.v1"
12+
},
13+
"scope": {
14+
"type": "object",
15+
"additionalProperties": false,
16+
"required": ["namespace", "target"],
17+
"properties": {
18+
"namespace": { "type": "string", "minLength": 1 },
19+
"target": { "type": "string", "minLength": 1 }
20+
}
21+
},
22+
"rules": {
23+
"type": "object",
24+
"additionalProperties": false,
25+
"required": ["metric", "scale_out_threshold", "scale_in_threshold", "cooldown_seconds", "min_replicas", "max_replicas"],
26+
"properties": {
27+
"metric": {
28+
"type": "string",
29+
"enum": ["kpm.p95_latency_ms", "kpm.prb_utilization", "kpm.ue_count"]
30+
},
31+
"scale_out_threshold": { "type": "number" },
32+
"scale_in_threshold": { "type": "number" },
33+
"cooldown_seconds": { "type": "integer", "minimum": 0 },
34+
"min_replicas": { "type": "integer", "minimum": 1 },
35+
"max_replicas": { "type": "integer", "minimum": 1 }
36+
}
37+
},
38+
"notes": { "type": "string" }
39+
},
40+
"$comment": "This schema models a minimal A1 policy instance body to be pushed via A1 NBI."
41+
}

docs/contracts/e2.kpm.profile.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# E2SM-KPM Profile (MVP)
2+
3+
This profile defines the KPM measurements our planner consumes from Near-RT RIC (via E2SIM or srsRAN gNB with E2).
4+
It does not aim to cover the full KPM spec; it documents the minimal fields we rely on.
5+
6+
## Measurements (aggregated over 30s)
7+
- `kpm.p95_latency_ms` — p95 of end-to-end UL+DL latency proxy reported by the E2 node/xApp pipeline.
8+
- `kpm.prb_utilization` — physical resource block utilization ratio [0..1].
9+
- `kpm.ue_count` — number of connected UEs.
10+
11+
## Collection path
12+
E2 Node (E2SIM or srsRAN gNB) → E2 Termination (RIC) → KPM xApp/adapter → REST readout for planner.
13+
14+
## Sampling and freshness
15+
- Sampling window: 30s
16+
- Max staleness accepted by planner: 90s
17+
- Missing data handling: treat as no-op (do not scale)
18+
19+
## Mapping to simulator
20+
If using E2SIM: configure KPM model with these outputs.
21+
If using srsRAN: enable E2 and expose KPM stats per cell; provide a small adapter that emits the three aggregates.
22+
23+
## References
24+
- O-RAN SC RIC & A1 Mediator docs
25+
- srsRAN Near-RT RIC integration note
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"fault_example": {
3+
"event": {
4+
"commonEventHeader": {
5+
"version": "4.1",
6+
"domain": "fault",
7+
"eventName": "Fault_NFSim_LinkDown",
8+
"eventId": "fault-0001",
9+
"sequence": 0,
10+
"priority": "High",
11+
"reportingEntityName": "nf-sim",
12+
"sourceName": "nf-sim",
13+
"nfVendorName": "nephoran",
14+
"startEpochMicrosec": 1731000000000,
15+
"lastEpochMicrosec": 1731000000000,
16+
"timeZoneOffset": "+00:00"
17+
},
18+
"faultFields": {
19+
"faultFieldsVersion": "4.0",
20+
"alarmCondition": "LINK_DOWN",
21+
"eventSeverity": "CRITICAL",
22+
"specificProblem": "eth0 loss of signal",
23+
"eventSourceType": "other",
24+
"vfStatus": "Active",
25+
"alarmInterfaceA": "eth0"
26+
}
27+
}
28+
},
29+
"measurement_example": {
30+
"event": {
31+
"commonEventHeader": {
32+
"version": "4.1",
33+
"domain": "measurementsForVfScaling",
34+
"eventName": "Perf_NFSim_Metrics",
35+
"eventId": "perf-0001",
36+
"sequence": 0,
37+
"priority": "Normal",
38+
"reportingEntityName": "nf-sim",
39+
"sourceName": "nf-sim",
40+
"nfVendorName": "nephoran",
41+
"startEpochMicrosec": 1731000300000,
42+
"lastEpochMicrosec": 1731000360000,
43+
"timeZoneOffset": "+00:00"
44+
},
45+
"measurementsForVfScalingFields": {
46+
"measurementsForVfScalingVersion": "1.1",
47+
"vNicUsageArray": [{
48+
"vnfNetworkInterface": "eth0",
49+
"receivedOctetsDelta": 1200000,
50+
"transmittedOctetsDelta": 1800000
51+
}],
52+
"additionalFields": {
53+
"kpm.p95_latency_ms": 85.3,
54+
"kpm.prb_utilization": 0.62,
55+
"kpm.ue_count": 37
56+
}
57+
}
58+
}
59+
},
60+
"heartbeat_example": {
61+
"event": {
62+
"commonEventHeader": {
63+
"version": "4.1",
64+
"domain": "heartbeat",
65+
"eventName": "Heartbeat_NFSim",
66+
"eventId": "hb-0001",
67+
"sequence": 10,
68+
"priority": "Low",
69+
"reportingEntityName": "nf-sim",
70+
"sourceName": "nf-sim",
71+
"nfVendorName": "nephoran",
72+
"startEpochMicrosec": 1731000600000,
73+
"lastEpochMicrosec": 1731000600000,
74+
"timeZoneOffset": "+00:00"
75+
},
76+
"heartbeatFields": {
77+
"heartbeatFieldsVersion": "3.0",
78+
"heartbeatInterval": 30
79+
}
80+
}
81+
}
82+
}

docs/contracts/intent.schema.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://example.com/schemas/intent.schema.json",
4+
"title": "ScalingIntent",
5+
"type": "object",
6+
"additionalProperties": false,
7+
"required": ["intent_type", "target", "namespace", "replicas"],
8+
"properties": {
9+
"intent_type": {
10+
"const": "scaling",
11+
"description": "MVP supports only scaling"
12+
},
13+
"target": {
14+
"type": "string",
15+
"minLength": 1,
16+
"description": "Kubernetes Deployment name (CNF simulator)"
17+
},
18+
"namespace": {
19+
"type": "string",
20+
"minLength": 1
21+
},
22+
"replicas": {
23+
"type": "integer",
24+
"minimum": 1,
25+
"maximum": 100
26+
},
27+
"reason": {
28+
"type": "string",
29+
"maxLength": 512
30+
},
31+
"source": {
32+
"type": "string",
33+
"enum": ["user", "planner", "test"]
34+
},
35+
"correlation_id": {
36+
"type": "string",
37+
"description": "Optional id for tracing"
38+
}
39+
},
40+
"$comment": "Validated by admission webhook; replicas min/max may be further clamped by ConfigMap."
41+
}

0 commit comments

Comments
 (0)