Skip to content

Commit edb6f19

Browse files
authored
Merge pull request #10 from aojea/migrate_ksigs
Migrate ksigs
2 parents cf6b965 + cac6007 commit edb6f19

File tree

20 files changed

+325
-156
lines changed

20 files changed

+325
-156
lines changed

.github/workflows/e2e.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ on:
1515

1616
env:
1717
GO_VERSION: "1.24"
18-
K8S_VERSION: "v1.32.2"
19-
KIND_VERSION: "v0.27.0"
18+
K8S_VERSION: "v1.34.0"
19+
KIND_VERSION: "v0.30.0"
2020
KIND_CLUSTER_NAME: "kindnet"
21-
REGISTRY: ghcr.io
22-
IMAGE_NAME: aojea/kindnetd
2321

2422
jobs:
2523
build:
@@ -37,14 +35,14 @@ jobs:
3735

3836
- name: Build
3937
run: |
40-
docker build -t ghcr.io/aojea/kindnetd:test -f Dockerfile .
38+
docker build -t registry.k8s.io/networking/kindnet:test -f Dockerfile .
4139
mkdir _output
42-
docker save ghcr.io/aojea/kindnetd:test > _output/kindnetd-image.tar
40+
docker save registry.k8s.io/networking/kindnet:test > _output/kindnet-image.tar
4341
4442
- uses: actions/upload-artifact@v4
4543
with:
4644
name: test-image
47-
path: _output/kindnetd-image.tar
45+
path: _output/kindnet-image.tar
4846

4947
e2e:
5048
name: e2e
@@ -58,7 +56,7 @@ jobs:
5856
ipFamily: ["ipv4", "ipv6", "dual"]
5957
cniMode: ["ptp","ipsec"]
6058
env:
61-
JOB_NAME: "kindnetd-e2e-${{ matrix.ipFamily }}-${{ matrix.cniMode }}"
59+
JOB_NAME: "kindnet-e2e-${{ matrix.ipFamily }}-${{ matrix.cniMode }}"
6260
IP_FAMILY: ${{ matrix.ipFamily }}
6361
steps:
6462
- name: Check out code
@@ -109,12 +107,6 @@ jobs:
109107
- role: control-plane
110108
- role: worker
111109
- role: worker
112-
featureGates:
113-
# Enable the corresponding DRA feature gates
114-
DynamicResourceAllocation: true
115-
DRAResourceClaimDeviceStatus: true
116-
runtimeConfig:
117-
api/beta : true
118110
EOF
119111
# dump the kubeconfig for later
120112
/usr/local/bin/kind get kubeconfig --name ${{ env.KIND_CLUSTER_NAME}} > _artifacts/kubeconfig.conf
@@ -123,24 +115,24 @@ jobs:
123115
with:
124116
name: test-image
125117

126-
- name: Install kindnetd
118+
- name: Install kindnet
127119
run: |
128-
# preload kindnetd image
129-
docker load --input kindnetd-image.tar
130-
/usr/local/bin/kind load docker-image ghcr.io/aojea/kindnetd:test --name ${{ env.KIND_CLUSTER_NAME}}
120+
# preload kindnet image
121+
docker load --input kindnet-image.tar
122+
/usr/local/bin/kind load docker-image registry.k8s.io/networking/kindnet:test --name ${{ env.KIND_CLUSTER_NAME}}
131123
132124
- name: install ptp plugin
133125
if: ${{ matrix.cniMode == 'ptp' }}
134126
run: |
135-
sed -i s#aojea/kindnetd.*#aojea/kindnetd:test# install-kindnet.yaml
127+
sed -i s#networking/kindnet.*#networking/kindnet:test# install-kindnet.yaml
136128
# Debug CI failures
137129
sed -i s#--v=2#--v=4# install-kindnet.yaml
138130
/usr/local/bin/kubectl apply -f ./install-kindnet.yaml
139131
140132
- name: enable ipsec
141133
if: ${{ matrix.cniMode == 'ipsec' }}
142134
run: |
143-
sed -i s#aojea/kindnetd.*#aojea/kindnetd:test# install-kindnet.yaml
135+
sed -i s#networking/kindnet.*#networking/kindnet:test# install-kindnet.yaml
144136
sed -i s#ipsec-overlay=false#ipsec-overlay=true# install-kindnet.yaml
145137
/usr/local/bin/kubectl apply -f ./install-kindnet.yaml
146138

.github/workflows/nightly.yml

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

.github/workflows/release.yml

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

.github/workflows/test.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Test
22

33
on: [push, pull_request]
44

5-
env:
6-
REGISTRY: ghcr.io
7-
IMAGE_NAME: aojea/kindnetd
8-
permissions: write-all
9-
105
jobs:
116
test:
127
strategy:

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ update:
2828
hack/update-license-header.sh
2929

3030
# get image name from directory we're building
31-
IMAGE_NAME=kindnetd
31+
IMAGE_NAME=kindnet
3232
# docker image registry, default to upstream
33-
REGISTRY?=ghcr.io/aojea
33+
REGISTRY?=gcr.io/k8s-staging-networking
3434
# tag based on date-sha
3535
TAG?=$(shell echo "$$(date +v%Y%m%d)-$$(git describe --always --dirty)")
3636
# the full image tag
@@ -45,3 +45,12 @@ image-build:
4545
--progress="${PROGRESS}" \
4646
--platform="${PLATFORMS}" \
4747
--tag="${IMAGE}" --load
48+
49+
image-push:
50+
docker buildx build . \
51+
--progress="${PROGRESS}" \
52+
--platform="${PLATFORMS}" \
53+
--tag="${IMAGE}" --push
54+
55+
release: build image-push
56+
@echo "Released image: ${IMAGE}"

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ Kindnet evolved adding new features, as an embedded ipmasq agent and nowadays,
2222
is the default CNI plugin for [KIND](https://github.com/kubernetes-sigs/kind)
2323
and is used for testing the [Kubernetes project](https://github.com/kubernetes/kubernetes).
2424

25-
All the stable code moves to the KIND project in-tree.
26-
This repo is kept only for new features development and get feedback of people
27-
using it on "real" clusters.
25+
The KIND project uses a subset of this project that is maintained in-tree.
2826

2927
## Features
3028

@@ -43,14 +41,14 @@ using it on "real" clusters.
4341

4442
## How it Works
4543

46-
Kindnet uses a simple point to point model to connect pods within the same node. It leverages the host's network stack for external communication, eliminating the need for complex overlay networks.
44+
Kindnet uses a simple point to point model to connect pods within the same node. It leverages the host's network stack for external communication, eliminating the need for complex overlay networks.
4745

4846
## Installation
4947

5048
Kindnet can be installed on your cluster using the manifest [install-kindnet.yaml](install-kindnet.yaml)
5149

5250
```sh
53-
kubectl create -f https://raw.githubusercontent.com/aojea/kindnet/main/install-kindnet.yaml
51+
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/kindnet/refs/heads/main/install-kindnet.yaml
5452
```
5553

5654
## Contributing

cloudbuild.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See https://cloud.google.com/cloud-build/docs/build-config
2+
options:
3+
substitution_option: ALLOW_LOOSE
4+
machineType: E2_HIGHCPU_32
5+
steps:
6+
- name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud
7+
entrypoint: make
8+
env:
9+
- REGISTRY=gcr.io/k8s-staging-networking
10+
- IMAGE_NAME=kube-network-policies
11+
args: ['release']

cmd/kindnetd/main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ import (
3030
"runtime/debug"
3131
"time"
3232

33-
"github.com/aojea/kindnet/pkg/conntrack"
34-
"github.com/aojea/kindnet/pkg/dnscache"
35-
"github.com/aojea/kindnet/pkg/fastpath"
36-
"github.com/aojea/kindnet/pkg/masq"
37-
kindnetnat64 "github.com/aojea/kindnet/pkg/nat64"
38-
"github.com/aojea/kindnet/pkg/nflog"
39-
kindnetnode "github.com/aojea/kindnet/pkg/node"
33+
"sigs.k8s.io/kindnet/pkg/conntrack"
34+
"sigs.k8s.io/kindnet/pkg/dnscache"
35+
"sigs.k8s.io/kindnet/pkg/fastpath"
36+
"sigs.k8s.io/kindnet/pkg/masq"
37+
kindnetnat64 "sigs.k8s.io/kindnet/pkg/nat64"
38+
"sigs.k8s.io/kindnet/pkg/nflog"
39+
kindnetnode "sigs.k8s.io/kindnet/pkg/node"
4040

4141
"github.com/prometheus/client_golang/prometheus/promhttp"
4242
"golang.org/x/sys/unix"

docs/Kubernetes-IPv6-Cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Overview
44

55
If you want to try Kubernetes with IPv6 you can have a working IPv6 cluster using
6-
then [kindnet CNI plugin](https://github.com/aojea/kindnet)
6+
then [kindnet CNI plugin](https://sigs.k8s.io/kindnet)
77

88
To test it we can use the [kind project](https://github.com/kubernetes-sigs/kind)
99
to create a Docker in Docker Kubernetes cluster in your host.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/aojea/kindnet
1+
module sigs.k8s.io/kindnet
22

33
go 1.24.0
44

0 commit comments

Comments
 (0)