Skip to content

Commit 911d2a5

Browse files
committed
cleanup gateways on exit
Change-Id: Id3978b11c99f9c037fd34a8377150a17fd178d33 create gateways using dynamic configuration Change-Id: I0c5dcf01463ba908b90e454c5be57fdb2e028d5e refactor gateway and envoy Change-Id: I30bb99651ece4178090aa81231f61592040b189c configure envoy control plane Change-Id: Ieda6d51e92ee7378e7a1a029960c0d1f364133ef create gateway Change-Id: I7e2d8ba74c5ad6ef0b6d2915e4fa61b2c6dd655a fix example gateway Change-Id: Ic99bf4bc2a357bc77ae273f7abfeb9d4f2637e09 fix linter errors Change-Id: I295f90814f642a7a2e1f5e5d23befc280c1f8fa4 fix examples Change-Id: I4fa958f14ed9c347d16c03435ca936d975217f12 add conformance gateway test Change-Id: Ic2816c9371e963e8f295e5574213ed0c8744f579 fix gateway creation Change-Id: If69343d87be030b1348a95d8c0563d6d784ed248 expose xds cache Change-Id: I5dde4c3fe59fe2f1d5d57893b0e121f9abfdf35e fix panic looking for httproute namespace Change-Id: I5c7b7b419a509ad70bc621e3dd3f74ce5fd607cd fix gateway cleanup Change-Id: I95224fd22d115c4abf2eea48f7ae61f0524c62c9 process all gateway logic in a single worker Change-Id: Ie228405370e5e90b7a030c03cd086a379818d36c process routes for gateway Change-Id: If9522e9446f7363a1a4d18dfcc9576ff0241ed93 reorganize code Change-Id: Iec3093b5cd52ff2c64b7ecb1d359843dcae8312c fix typo on gateway test Change-Id: If666da6854085fe1abd8d7b46f15d2890b8322ef add missing implmenetations flags Change-Id: Ifacc55d417934afdf3a33908b6aec7d317d67d0a fix gw class observed generation Change-Id: I6ca5fcef1ea7613b64165d81d55bf9922fe164bd set conditions Change-Id: I065470d6986fbe23ab053fbb77daa7f178981e9e remove workqueue Change-Id: I8085f88783dac5c19649d3a6bd57021e90dc80e2 reorganize code Change-Id: I930d9f9b5e292fa548a560189b54b3be487f273f fix status report Change-Id: I2d4e67ad6d90a71782c85dcb885720fafcaf21ba update crds Change-Id: Ifa577cbf3ff76ccea661311f4f525ed05f4a94df scaffolding for routes Change-Id: I3ca023216321668303eb5a35044af1f62d8fc540 add httproutes Change-Id: I25ceffb1871e0ca73106236fa0eb4770228f949d fix linter Change-Id: I761e550ef0e0eff4cafd02ad13ac9f378270561e fix tests Change-Id: Id336ba7dc75dec2fcf66fd93e3ef9c006fbec8e8 publish addresses Change-Id: I2ab9156410d042a871337306e35f1205d5534f36 tests Change-Id: I6b5c1d592566a697e5590fb7ab4b4e559c818aa7 add callbacks Change-Id: I83e05e0bb3397f96e32e2da987c57d9bd894445a remove vendor folder Change-Id: I76f64cbd32368587c8c428d2a5ca557ccb10bdf4 do not check snapshot consistency Change-Id: I9ee3b38b0b0fb702be05c994be349733f46278c7 decouple listener logic Change-Id: I98d5a291b85c8ad2e68a75d044ded69a7a379bc6 fix listener Change-Id: Ic698eaf68037442e37bc9598ef544e8d28844464 listener Change-Id: I3e68009a97adb2206f29a09f8ed74ad4e196ce9b go mod update Change-Id: I104e501bfd861ca426f3257ce8a8f10827ab8c65 bump docker 28 Change-Id: Ie0590ef63b9d551946593e780ccf6806704fb7b1
1 parent 4cba14e commit 911d2a5

File tree

5,103 files changed

+2864
-1624981
lines changed

Some content is hidden

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

5,103 files changed

+2864
-1624981
lines changed

.github/workflows/gateway.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: gateway
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
env:
9+
GO_VERSION: "1.24"
10+
K8S_VERSION: "v1.32.0"
11+
KIND_VERSION: "v0.27.0"
12+
KIND_CLUSTER_NAME: "kind-cloud"
13+
14+
jobs:
15+
gateway:
16+
name: gateway
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 100
19+
env:
20+
JOB_NAME: "cloud-provider-kind-e2e-gateway"
21+
steps:
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: ${{ env.GO_VERSION }}
26+
id: go
27+
28+
- name: Check out code
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
- name: Enable ipv4 and ipv6 forwarding
32+
run: |
33+
sudo sysctl -w net.ipv6.conf.all.forwarding=1
34+
sudo sysctl -w net.ipv4.ip_forward=1
35+
36+
- name: Set up environment (download dependencies)
37+
run: |
38+
TMP_DIR=$(mktemp -d)
39+
# Test binaries
40+
git clone --depth 1 https://github.com/kubernetes-sigs/gateway-api.git ${TMP_DIR}
41+
cd ${TMP_DIR}
42+
go test ./conformance/ -c
43+
cd -
44+
sudo cp ${TMP_DIR}/conformance.test /usr/local/bin/conformance.test
45+
sudo chmod +x /usr/local/bin/conformance.test
46+
# kubectl
47+
curl -L https://dl.k8s.io/${{ env.K8S_VERSION }}/bin/linux/amd64/kubectl -o ${TMP_DIR}/kubectl
48+
# kind
49+
curl -Lo ${TMP_DIR}/kind https://kind.sigs.k8s.io/dl/${{ env.KIND_VERSION }}/kind-linux-amd64
50+
# Install
51+
sudo cp ${TMP_DIR}/kubectl /usr/local/bin/kubectl
52+
sudo cp ${TMP_DIR}/kind /usr/local/bin/kind
53+
sudo chmod +x /usr/local/bin/kubectl
54+
sudo chmod +x /usr/local/bin/kind
55+
# Create folder to store artifacts
56+
mkdir -p _artifacts
57+
58+
- name: Run cloud-provider-kind
59+
run: |
60+
make
61+
nohup bin/cloud-provider-kind -v 2 --enable-log-dumping --logs-dir ./_artifacts/loadbalancers > ./_artifacts/ccm-kind.log 2>&1 &
62+
63+
- name: Create multi node cluster
64+
run: |
65+
# create cluster
66+
cat <<EOF | /usr/local/bin/kind create cluster \
67+
--name ${{ env.KIND_CLUSTER_NAME}} \
68+
--image kindest/node:${{ env.K8S_VERSION }} \
69+
-v7 --wait 1m --retain --config=-
70+
kind: Cluster
71+
apiVersion: kind.x-k8s.io/v1alpha4
72+
nodes:
73+
- role: control-plane
74+
- role: worker
75+
- role: worker
76+
kubeadmConfigPatches:
77+
- |
78+
kind: ClusterConfiguration
79+
apiServer:
80+
extraArgs:
81+
cloud-provider: "external"
82+
v: "5"
83+
controllerManager:
84+
extraArgs:
85+
cloud-provider: "external"
86+
v: "5"
87+
---
88+
kind: InitConfiguration
89+
nodeRegistration:
90+
kubeletExtraArgs:
91+
cloud-provider: "external"
92+
v: "5"
93+
---
94+
kind: JoinConfiguration
95+
nodeRegistration:
96+
kubeletExtraArgs:
97+
cloud-provider: "external"
98+
v: "5"
99+
EOF
100+
/usr/local/bin/kind get kubeconfig --name ${{ env.KIND_CLUSTER_NAME}} > _artifacts/kubeconfig.conf
101+
102+
- name: Get Cluster status
103+
run: |
104+
/usr/local/bin/kubectl get nodes -o yaml
105+
/usr/local/bin/kubectl get pods -A -o wide
106+
# wait network is ready
107+
/usr/local/bin/kubectl wait --for=condition=ready pods --namespace=kube-system -l k8s-app=kube-dns --timeout=3m
108+
/usr/local/bin/kubectl get nodes -o wide
109+
/usr/local/bin/kubectl get pods -A
110+
111+
- name: Run tests
112+
run: |
113+
/usr/local/bin/conformance.test -test.run TestConformance \
114+
--kubeconfig=_artifacts/kubeconfig.conf \
115+
--organization=sigs.k8s.io \
116+
--project=cloud-provider-kind \
117+
--url=https://github.com/kubernetes-sigs/cloud-provider-kind \
118+
--version=test \
119+
--contact=antonio.ojea.garcia@gmail.com \
120+
--gateway-class=cloud-provider-kind \
121+
--supported-features=Gateway,HTTPRoute \
122+
--report-output=./_artifacts
123+
124+
- name: Export logs
125+
if: always()
126+
run: |
127+
/usr/local/bin/kind export logs --name ${{ env.KIND_CLUSTER_NAME}} ./_artifacts/logs
128+
cp ./_artifacts/ccm-kind.log ./_artifacts/logs
129+
cp ./_artifacts/loadbalancers/* ./_artifacts/logs
130+
131+
- name: Upload logs
132+
if: always()
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
136+
path: ./_artifacts

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ ARG TARGETARCH
99
RUN GOARCH=$TARGETARCH make build
1010

1111
# build real cloud-provider-kind image
12-
FROM docker:25.0-cli
12+
FROM docker:28-cli
1313
COPY --from=0 --chown=root:root ./go/src/bin/cloud-provider-kind /bin/cloud-provider-kind
1414
ENTRYPOINT ["/bin/cloud-provider-kind"]

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ lint:
2828
hack/lint.sh
2929

3030
update:
31-
go mod tidy && go mod vendor
32-
31+
go mod tidy
3332

3433
# get image name from directory we're building
3534
IMAGE_NAME?=cloud-provider-kind

examples/gateway_httproute_simple.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
apiVersion: apps/v1
2828
kind: Deployment
2929
metadata:
30-
name: MyApp
30+
name: myapp
3131
spec:
3232
selector:
3333
matchLabels:
@@ -39,7 +39,7 @@ spec:
3939
app: MyApp
4040
spec:
4141
containers:
42-
- name: MyApp
42+
- name: myapp
4343
image: registry.k8s.io/e2e-test-images/agnhost:2.39
4444
args:
4545
- netexec

go.mod

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ toolchain go1.24.2
66

77
require (
88
github.com/envoyproxy/go-control-plane v0.13.4
9-
github.com/envoyproxy/go-control-plane/envoy v1.32.3
9+
github.com/envoyproxy/go-control-plane/envoy v1.32.4
1010
github.com/google/go-cmp v0.7.0
1111
github.com/lithammer/dedent v1.1.0
1212
github.com/pkg/errors v0.9.1
13-
google.golang.org/grpc v1.68.1
13+
google.golang.org/grpc v1.71.1
14+
google.golang.org/protobuf v1.36.6
1415
k8s.io/api v0.33.0
1516
k8s.io/apimachinery v0.33.0
1617
k8s.io/apiserver v0.33.0
@@ -19,8 +20,8 @@ require (
1920
k8s.io/component-base v0.33.0
2021
k8s.io/controller-manager v0.33.0
2122
k8s.io/klog/v2 v2.130.1
22-
k8s.io/utils v0.0.0-20241210054802-24370beab758
23-
sigs.k8s.io/gateway-api v1.2.1
23+
k8s.io/utils v0.0.0-20250502105355-0f33e8f1c979
24+
sigs.k8s.io/gateway-api v1.3.0
2425
sigs.k8s.io/kind v0.27.0
2526
)
2627

@@ -31,11 +32,11 @@ require (
3132
github.com/beorn7/perks v1.0.1 // indirect
3233
github.com/blang/semver/v4 v4.0.0 // indirect
3334
github.com/cespare/xxhash/v2 v2.3.0 // indirect
34-
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect
35+
github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect
3536
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3637
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
3738
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 // indirect
38-
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
39+
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
3940
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
4041
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
4142
github.com/go-logr/logr v1.4.2 // indirect
@@ -66,22 +67,21 @@ require (
6667
github.com/x448/float16 v0.8.4 // indirect
6768
go.opentelemetry.io/otel v1.34.0 // indirect
6869
go.opentelemetry.io/otel/trace v1.34.0 // indirect
69-
golang.org/x/net v0.38.0 // indirect
70+
golang.org/x/net v0.39.0 // indirect
7071
golang.org/x/oauth2 v0.27.0 // indirect
71-
golang.org/x/sys v0.31.0 // indirect
72-
golang.org/x/term v0.30.0 // indirect
73-
golang.org/x/text v0.23.0 // indirect
72+
golang.org/x/sys v0.32.0 // indirect
73+
golang.org/x/term v0.31.0 // indirect
74+
golang.org/x/text v0.24.0 // indirect
7475
golang.org/x/time v0.10.0 // indirect
75-
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
76-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
77-
google.golang.org/protobuf v1.36.5 // indirect
76+
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
77+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
7878
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7979
gopkg.in/inf.v0 v0.9.1 // indirect
8080
gopkg.in/yaml.v3 v3.0.1 // indirect
8181
k8s.io/component-helpers v0.33.0 // indirect
8282
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
8383
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
8484
sigs.k8s.io/randfill v1.0.0 // indirect
85-
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
85+
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
8686
sigs.k8s.io/yaml v1.4.0 // indirect
8787
)

0 commit comments

Comments
 (0)