Skip to content

Commit 58eb5ae

Browse files
committed
refactor: flatten controlplane/ into gateway/ root
Move all controlplane/ contents (cmd, internal, config, vendor, conformance) directly into gateway/ root. Update all import paths, Makefile, Dockerfile, CI workflows, and README to reflect the new flat structure. - go.mod: module path -> github.com/nantian-gw/gateway - 188 Go files: import paths updated - Makefile: remove cd controlplane && prefixes - Dockerfile: simplify COPY paths - CI workflows: update go-version-file and cache-dependency-path - .gitignore/.dockerignore: remove controlplane/ prefix - README: update badge link and directory tree
1 parent bdece36 commit 58eb5ae

5,758 files changed

Lines changed: 390 additions & 1503572 deletions

File tree

Some content is hidden

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

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.git
22
target
33
dataplane/target
4-
controlplane/bin
4+
bin
55
tmp
66
coverage
77
dashboard/.next

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-go@v5
1818
with:
19-
go-version-file: controlplane/go.mod
20-
cache-dependency-path: controlplane/go.sum
19+
go-version-file: go.mod
20+
cache-dependency-path: go.sum
2121
- name: Build
2222
run: cd controlplane && go build ./...
2323

@@ -27,8 +27,8 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-go@v5
2929
with:
30-
go-version-file: controlplane/go.mod
31-
cache-dependency-path: controlplane/go.sum
30+
go-version-file: go.mod
31+
cache-dependency-path: go.sum
3232
- name: Test
3333
run: cd controlplane && go test ./...
3434

@@ -38,8 +38,8 @@ jobs:
3838
- uses: actions/checkout@v4
3939
- uses: actions/setup-go@v5
4040
with:
41-
go-version-file: controlplane/go.mod
42-
cache-dependency-path: controlplane/go.sum
41+
go-version-file: go.mod
42+
cache-dependency-path: go.sum
4343
- name: Verify go mod tidy
4444
run: |
4545
cd controlplane
@@ -61,7 +61,7 @@ jobs:
6161
- uses: actions/checkout@v4
6262
- uses: actions/setup-go@v5
6363
with:
64-
go-version-file: controlplane/go.mod
65-
cache-dependency-path: controlplane/go.sum
64+
go-version-file: go.mod
65+
cache-dependency-path: go.sum
6666
- name: Run benchmarks
6767
run: cd controlplane && go test -bench=. -benchtime=1x ./...

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: CodeQL
77
paths:
88
- ".github/workflows/**"
99
- "Makefile"
10-
- "controlplane/**"
10+
- "**"
1111
- "proto/**"
1212
- "tests/conformance-harness/**"
1313
pull_request:
@@ -16,7 +16,7 @@ name: CodeQL
1616
paths:
1717
- ".github/workflows/**"
1818
- "Makefile"
19-
- "controlplane/**"
19+
- "**"
2020
- "proto/**"
2121
- "tests/conformance-harness/**"
2222
schedule:
@@ -46,9 +46,9 @@ jobs:
4646
- name: Set up Go
4747
uses: actions/setup-go@v5
4848
with:
49-
go-version-file: controlplane/go.mod
49+
go-version-file: go.mod
5050
cache-dependency-path: |
51-
controlplane/go.sum
51+
go.sum
5252
tests/conformance-harness/go.sum
5353
5454
- name: Install Go build dependencies

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ jobs:
7676
- name: Set up Go
7777
uses: actions/setup-go@v5
7878
with:
79-
go-version-file: controlplane/go.mod
80-
cache-dependency-path: controlplane/go.sum
79+
go-version-file: go.mod
80+
cache-dependency-path: go.sum
8181

8282
- name: Run Go unit tests
8383
working-directory: controlplane
@@ -100,8 +100,8 @@ jobs:
100100
- name: Set up Go
101101
uses: actions/setup-go@v5
102102
with:
103-
go-version-file: controlplane/go.mod
104-
cache-dependency-path: controlplane/go.sum
103+
go-version-file: go.mod
104+
cache-dependency-path: go.sum
105105

106106
- name: Install release validation dependencies
107107
run: |
@@ -198,8 +198,8 @@ jobs:
198198
- name: Set up Go
199199
uses: actions/setup-go@v5
200200
with:
201-
go-version-file: controlplane/go.mod
202-
cache-dependency-path: controlplane/go.sum
201+
go-version-file: go.mod
202+
cache-dependency-path: go.sum
203203

204204
- name: Set up Docker Buildx
205205
uses: docker/setup-buildx-action@v4
@@ -216,7 +216,7 @@ jobs:
216216
uses: docker/build-push-action@v6
217217
with:
218218
context: .
219-
file: controlplane/Dockerfile
219+
file: Dockerfile
220220
push: true
221221
tags: ${{ needs.metadata.outputs.control_image }}
222222

.github/workflows/security-scans.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
- name: Set up Go
2626
uses: actions/setup-go@v5
2727
with:
28-
go-version-file: controlplane/go.mod
29-
cache-dependency-path: controlplane/go.sum
28+
go-version-file: go.mod
29+
cache-dependency-path: go.sum
3030

3131
- name: Install scanner prerequisites
3232
run: |

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ dist/
55
.vscode/
66
coverage/
77
tmp/
8-
controlplane/internal/gen/
9-
!controlplane/internal/gen/
10-
!controlplane/internal/gen/gateway/
11-
!controlplane/internal/gen/gateway/control/
12-
!controlplane/internal/gen/gateway/control/v1/
13-
!controlplane/internal/gen/gateway/control/v1/*.go
14-
controlplane/bin/
8+
internal/gen/
9+
!internal/gen/
10+
!internal/gen/gateway/
11+
!internal/gen/gateway/control/
12+
!internal/gen/gateway/control/v1/
13+
!internal/gen/gateway/control/v1/*.go
1514
.DS_Store
1615
build_push.sh
1716
.worktrees/
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ ENV GOPROXY=${GOPROXY}
77

88
WORKDIR /src
99

10-
COPY controlplane/go.mod controlplane/go.sum ./controlplane/
11-
COPY controlplane/vendor/ ./controlplane/vendor/
12-
WORKDIR /src/controlplane
10+
COPY go.mod go.sum ./
11+
COPY vendor/ ./vendor/
1312

14-
WORKDIR /src
15-
COPY controlplane/ ./controlplane/
16-
RUN cd ./controlplane \
17-
&& CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -ldflags="-s -w" -trimpath -o /out/nantian-controlplane ./cmd/manager
13+
COPY . .
14+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -ldflags="-s -w" -trimpath -o /out/nantian-controlplane ./cmd/manager
1815

1916
FROM ${RUNTIME_IMAGE}
2017

Makefile

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A Kubernetes Gateway API implementation targeting v1.5.1 with 55 declared supported features.
44

55
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
6-
[![Go](https://img.shields.io/badge/Go-1.26-00ADD8?logo=go)](controlplane/go.mod)
6+
[![Go](https://img.shields.io/badge/Go-1.26-00ADD8?logo=go)](go.mod)
77

88
## Overview
99

@@ -116,13 +116,13 @@ Governance files: `LICENSE`, `MAINTAINERS.md`, `GOVERNANCE.md`, `CODE_OF_CONDUCT
116116

117117
```
118118
nantian-gw/
119-
├── controlplane/ Go controller, translator, status, admin, xDS server
120-
├── proto/ gRPC config discovery protocol (single source of truth)
121-
├── deploy/ Kubernetes Kustomize base + overlays, observability assets
122-
├── tests/ Unit tests, Kind smoke, conformance harness
123-
├── docs/ Developer and user documentation
124-
├── scripts/ Build, test, and release automation
125-
── configs/ Local runtime configs for controlplane and dataplane
119+
├── cmd/ CLI entry points (manager, gateway-api-support, etc.)
120+
├── config/ CRD configuration templates
121+
├── internal/ Core packages: translator, xDS server, controllers, admin API
122+
├── configs/ Local runtime configs for controlplane and dataplane
123+
├── deploy/ Kubernetes Kustomize base + overlays, Helm chart, observability assets
124+
├── conformance/ Gateway API conformance test suite
125+
── vendor/ Go vendored dependencies
126126
```
127127

128128
## Project Status

0 commit comments

Comments
 (0)