Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configs/controlplane/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ adminRuntime:
writeTimeout: "30s"
idleTimeout: "2m"
dataplaneAggregation:
serviceName: "nantian-dataplane-admin"
serviceName: "nantian-gw-dataplane-admin"
namespace: "nantian-gw"
portName: "admin"
timeout: "2s"
Expand All @@ -55,7 +55,7 @@ adminAuth:
dashboardApi:
enabled: true
basePath: "/api/dashboard"
dataplaneAdminUrl: "http://nantian-dataplane-admin.nantian-gw.svc.cluster.local:19080"
dataplaneAdminUrl: "http://nantian-gw-dataplane-admin.nantian-gw.svc.cluster.local:19080"
requestTimeout: "5s"
resourceMutationsEnabled: true
pprof:
Expand Down
27 changes: 11 additions & 16 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ Fixed Service roles currently include:
- `admin`
- `metrics`

The only fixed Service renamed in this refactor is the controlplane gRPC Service:

- Old name: `nantian-controlplane`
- New name: `nantian-controlplane-grpc`

This aligns with the naming style of `-admin` and `-metrics`, so you no longer have to guess whether it's the workload itself when reading directories or troubleshooting.
Static install resources now use the `nantian-gw-<component>` prefix consistently. Fixed Services use `nantian-gw-<component>-<role>`, so controlplane and dataplane admin, metrics, and gRPC endpoints are distinguishable from their workloads when reading directories or troubleshooting.

Additionally, fixed static resources now include standard `app.kubernetes.io/*` labels wherever possible.
If you use `kubectl get all --show-labels` or filter by labels in the cluster, it is now easier to distinguish controlplane, dataplane, and fixed Service roles than before.
Expand All @@ -106,16 +101,16 @@ If you use `kubectl get all --show-labels` or filter by labels in the cluster, i

| Service | Port | Purpose | Who Accesses It |
| --- | --- | --- | --- |
| `nantian-controlplane-grpc` | `18080` | controlplane gRPC / xDS publish entry | dataplane |
| `nantian-controlplane-admin` | `18081` | controlplane admin API | Ops entry, `kubectl port-forward`, controlled proxies |
| `nantian-controlplane-metrics` | `18082` | controlplane metrics scrape entry | Prometheus or other scrapers |
| `nantian-dataplane-admin` | `19080` | dataplane admin API | Ops entry, `kubectl port-forward`, controlled proxies |
| `nantian-dataplane-metrics` | `19080` | dataplane metrics scrape entry, currently reuses admin server port | Prometheus or other scrapers |
| `nantian-gw-controlplane-grpc` | `18080` | controlplane gRPC / xDS publish entry | dataplane |
| `nantian-gw-controlplane-admin` | `18081` | controlplane admin API | Ops entry, `kubectl port-forward`, controlled proxies |
| `nantian-gw-controlplane-metrics` | `18082` | controlplane metrics scrape entry | Prometheus or other scrapers |
| `nantian-gw-dataplane-admin` | `19080` | dataplane admin API | Ops entry, `kubectl port-forward`, controlled proxies |
| `nantian-gw-dataplane-metrics` | `19080` | dataplane metrics scrape entry, currently reuses admin server port | Prometheus or other scrapers |
| `nantian-gw-dashboard` | `8080` | Web admin console, Node server serves SPA and same-origin proxies admin API | Ops entry, `kubectl port-forward`, controlled proxies |

Notes:

- `nantian-dataplane-metrics` and `nantian-dataplane-admin` both currently point to the dataplane `admin` port; the difference lies in purpose and scrape entry point, not in backend port numbers.
- `nantian-gw-dataplane-metrics` and `nantian-gw-dataplane-admin` both currently point to the dataplane `admin` port; the difference lies in purpose and scrape entry point, not in backend port numbers.
- `nantian-gw-dashboard` does not directly access the Kubernetes API; it only proxies controlplane / dataplane admin Services through the container-internal Node server.
- These Services are all part of the fixed static manifest and are suitable for writing into operations documentation, scripts, and monitoring configurations.
- These fixed Services are all part of the base static manifest, currently defined in `deploy/kubernetes/base/services-networkpolicy.yaml`, not dynamically generated runtime objects.
Expand All @@ -140,12 +135,12 @@ The two most important dynamic Services currently are:

| Service | Source | Default Type | Purpose | Carries Business Traffic? |
| --- | --- | --- | --- | --- |
| `nantian-dataplane` | shared dataplane Service | `NodePort` | Aggregates all current Gateway listener ports, providing a unified frontend entry for the dataplane | Yes |
| `nantian-gw-dataplane` | shared dataplane Service | `NodePort` | Aggregates all current Gateway listener ports, providing a unified frontend entry for the dataplane | Yes |
| `nantian-gw-<gatewayName>` | per-Gateway Service | `ClusterIP` | Dedicated frontend Service for a single Gateway, individually exposable per Gateway infrastructure parameters | Yes |

Notes:

- `nantian-dataplane` is the shared frontend entry; current Kind smoke defaults to using it.
- `nantian-gw-dataplane` is the shared frontend entry; current Kind smoke defaults to using it.
- `nantian-gw-<gatewayName>` is a dedicated Service derived from the Gateway name; for example, if the `Gateway` is named `edge`, the corresponding Service is typically `nantian-gw-edge`.
- per-Gateway Services default to `ClusterIP`, but can be lowered to `NodePort` or `LoadBalancer` via `Gateway.spec.infrastructure.parametersRef`, making them the more natural north-south exposure point in long-term environments.
- These objects are maintained by the control plane reconcile loop and are not static install assets from `deploy/kubernetes/base/`.
Expand Down Expand Up @@ -179,7 +174,7 @@ The most easily confused aspect of the current repository is that the entries se

| Scenario | Default Entry | Notes |
| --- | --- | --- |
| Kind / smoke | `nantian-dataplane` | Shared dataplane Service uses `NodePort`; Kind overlay maps HTTP `18080`, HTTPS/TLS `18443`, UDP `5300` / `5301`, TCPRoute `19000` / `19001` by default |
| Kind / smoke | `nantian-gw-dataplane` | Shared dataplane Service uses `NodePort`; Kind overlay maps HTTP `18080`, HTTPS/TLS `18443`, UDP `5300` / `5301`, TCPRoute `19000` / `19001` by default |
| Long-term / production | `nantian-gw-<gatewayName>` | Better to expose per Gateway individually, then control `ClusterIP` / `NodePort` / `LoadBalancer` via `parametersRef` |

So if you see locally:
Expand Down Expand Up @@ -212,4 +207,4 @@ If you're troubleshooting "why doesn't a certain Gateway have an external addres
- Grafana observability dashboard:
Use `deploy/observability/grafana/nantian-gw-observability-dashboard.json`

If you are choosing a business traffic entry point rather than an install entry point, see `docs/user/traffic-profiles.md`. That document provides north-south HTTP/gRPC, north-south TCP/UDP, and east-west service parent examples separately.
If you are choosing a business traffic entry point rather than an install entry point, see `docs/user/traffic-profiles.md`. That document provides north-south HTTP/gRPC, north-south TCP/UDP, and east-west service parent examples separately.
4 changes: 2 additions & 2 deletions deploy/kubernetes/addons/dataplane-hpa/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: nantian-dataplane
name: nantian-gw-dataplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -12,7 +12,7 @@ spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: nantian-dataplane
name: nantian-gw-dataplane
minReplicas: 2
maxReplicas: 10
metrics:
Expand Down
20 changes: 10 additions & 10 deletions deploy/kubernetes/base/controlplane.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nantian-controlplane
name: nantian-gw-controlplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -19,16 +19,16 @@ spec:
maxUnavailable: 0
selector:
matchLabels:
app: nantian-controlplane
app: nantian-gw-controlplane
template:
metadata:
labels:
app: nantian-controlplane
app: nantian-gw-controlplane
app.kubernetes.io/name: nantian-gw
app.kubernetes.io/part-of: nantian-gw
app.kubernetes.io/component: controlplane
spec:
serviceAccountName: nantian-controlplane
serviceAccountName: nantian-gw-controlplane
terminationGracePeriodSeconds: 30
securityContext:
runAsNonRoot: true
Expand All @@ -43,7 +43,7 @@ spec:
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: nantian-controlplane
app: nantian-gw-controlplane
containers:
- name: controlplane
image: nantian-controlplane:dev
Expand Down Expand Up @@ -110,20 +110,20 @@ spec:
volumes:
- name: config
configMap:
name: nantian-controlplane-config
name: nantian-gw-controlplane-config
- name: grpc-tls
secret:
secretName: nantian-controlplane-grpc-tls
secretName: nantian-gw-controlplane-grpc-tls
optional: true
- name: admin-auth
secret:
secretName: nantian-controlplane-admin-auth
secretName: nantian-gw-controlplane-admin-auth
optional: true
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: nantian-controlplane
name: nantian-gw-controlplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -133,4 +133,4 @@ spec:
minAvailable: 1
selector:
matchLabels:
app: nantian-controlplane
app: nantian-gw-controlplane
20 changes: 10 additions & 10 deletions deploy/kubernetes/base/dataplane.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nantian-dataplane
name: nantian-gw-dataplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -19,16 +19,16 @@ spec:
maxUnavailable: 0
selector:
matchLabels:
app: nantian-dataplane
app: nantian-gw-dataplane
template:
metadata:
labels:
app: nantian-dataplane
app: nantian-gw-dataplane
app.kubernetes.io/name: nantian-gw
app.kubernetes.io/part-of: nantian-gw
app.kubernetes.io/component: dataplane
spec:
serviceAccountName: nantian-dataplane
serviceAccountName: nantian-gw-dataplane
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
securityContext:
Expand All @@ -47,7 +47,7 @@ spec:
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: nantian-dataplane
app: nantian-gw-dataplane
containers:
- name: dataplane
image: nantian-dataplane:dev
Expand Down Expand Up @@ -114,14 +114,14 @@ spec:
volumes:
- name: config
configMap:
name: nantian-dataplane-config
name: nantian-gw-dataplane-config
- name: xds-tls
secret:
secretName: nantian-dataplane-xds-tls
secretName: nantian-gw-dataplane-xds-tls
optional: true
- name: admin-auth
secret:
secretName: nantian-dataplane-admin-auth
secretName: nantian-gw-dataplane-admin-auth
optional: true
- name: tmp
emptyDir:
Expand All @@ -130,7 +130,7 @@ spec:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: nantian-dataplane
name: nantian-gw-dataplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -140,4 +140,4 @@ spec:
minAvailable: 1
selector:
matchLabels:
app: nantian-dataplane
app: nantian-gw-dataplane
4 changes: 2 additions & 2 deletions deploy/kubernetes/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- name: nantian-controlplane-config
- name: nantian-gw-controlplane-config
namespace: nantian-gw
files:
- config.yaml=../../../configs/controlplane/config.yaml
- name: nantian-dataplane-config
- name: nantian-gw-dataplane-config
namespace: nantian-gw
files:
- config.yaml=../../../configs/dataplane/config.yaml
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/namespace-gatewayclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: nantian
name: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
app.kubernetes.io/part-of: nantian-gw
Expand Down
12 changes: 6 additions & 6 deletions deploy/kubernetes/base/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: nantian-controlplane
name: nantian-gw-controlplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -11,7 +11,7 @@ metadata:
apiVersion: v1
kind: ServiceAccount
metadata:
name: nantian-dataplane
name: nantian-gw-dataplane
namespace: nantian-gw
labels:
app.kubernetes.io/name: nantian-gw
Expand All @@ -22,7 +22,7 @@ automountServiceAccountToken: false
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nantian-controlplane
name: nantian-gw-controlplane
labels:
app.kubernetes.io/name: nantian-gw
app.kubernetes.io/part-of: nantian-gw
Expand Down Expand Up @@ -80,16 +80,16 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nantian-controlplane
name: nantian-gw-controlplane
labels:
app.kubernetes.io/name: nantian-gw
app.kubernetes.io/part-of: nantian-gw
app.kubernetes.io/component: controlplane
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nantian-controlplane
name: nantian-gw-controlplane
subjects:
- kind: ServiceAccount
name: nantian-controlplane
name: nantian-gw-controlplane
namespace: nantian-gw
Loading
Loading