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
32 changes: 12 additions & 20 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ on:

env:
GO_VERSION: "1.24"
K8S_VERSION: "v1.32.2"
KIND_VERSION: "v0.27.0"
K8S_VERSION: "v1.34.0"
KIND_VERSION: "v0.30.0"
KIND_CLUSTER_NAME: "kindnet"
REGISTRY: ghcr.io
IMAGE_NAME: aojea/kindnetd

jobs:
build:
Expand All @@ -37,14 +35,14 @@ jobs:

- name: Build
run: |
docker build -t ghcr.io/aojea/kindnetd:test -f Dockerfile .
docker build -t registry.k8s.io/networking/kindnet:test -f Dockerfile .
mkdir _output
docker save ghcr.io/aojea/kindnetd:test > _output/kindnetd-image.tar
docker save registry.k8s.io/networking/kindnet:test > _output/kindnet-image.tar

- uses: actions/upload-artifact@v4
with:
name: test-image
path: _output/kindnetd-image.tar
path: _output/kindnet-image.tar

e2e:
name: e2e
Expand All @@ -58,7 +56,7 @@ jobs:
ipFamily: ["ipv4", "ipv6", "dual"]
cniMode: ["ptp","ipsec"]
env:
JOB_NAME: "kindnetd-e2e-${{ matrix.ipFamily }}-${{ matrix.cniMode }}"
JOB_NAME: "kindnet-e2e-${{ matrix.ipFamily }}-${{ matrix.cniMode }}"
IP_FAMILY: ${{ matrix.ipFamily }}
steps:
- name: Check out code
Expand Down Expand Up @@ -109,12 +107,6 @@ jobs:
- role: control-plane
- role: worker
- role: worker
featureGates:
# Enable the corresponding DRA feature gates
DynamicResourceAllocation: true
DRAResourceClaimDeviceStatus: true
runtimeConfig:
api/beta : true
EOF
# dump the kubeconfig for later
/usr/local/bin/kind get kubeconfig --name ${{ env.KIND_CLUSTER_NAME}} > _artifacts/kubeconfig.conf
Expand All @@ -123,24 +115,24 @@ jobs:
with:
name: test-image

- name: Install kindnetd
- name: Install kindnet
run: |
# preload kindnetd image
docker load --input kindnetd-image.tar
/usr/local/bin/kind load docker-image ghcr.io/aojea/kindnetd:test --name ${{ env.KIND_CLUSTER_NAME}}
# preload kindnet image
docker load --input kindnet-image.tar
/usr/local/bin/kind load docker-image registry.k8s.io/networking/kindnet:test --name ${{ env.KIND_CLUSTER_NAME}}

- name: install ptp plugin
if: ${{ matrix.cniMode == 'ptp' }}
run: |
sed -i s#aojea/kindnetd.*#aojea/kindnetd:test# install-kindnet.yaml
sed -i s#networking/kindnet.*#networking/kindnet:test# install-kindnet.yaml
# Debug CI failures
sed -i s#--v=2#--v=4# install-kindnet.yaml
/usr/local/bin/kubectl apply -f ./install-kindnet.yaml

- name: enable ipsec
if: ${{ matrix.cniMode == 'ipsec' }}
run: |
sed -i s#aojea/kindnetd.*#aojea/kindnetd:test# install-kindnet.yaml
sed -i s#networking/kindnet.*#networking/kindnet:test# install-kindnet.yaml
sed -i s#ipsec-overlay=false#ipsec-overlay=true# install-kindnet.yaml
/usr/local/bin/kubectl apply -f ./install-kindnet.yaml

Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/nightly.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/release.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Test

on: [push, pull_request]

env:
REGISTRY: ghcr.io
IMAGE_NAME: aojea/kindnetd
permissions: write-all

jobs:
test:
strategy:
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ update:
hack/update-license-header.sh

# get image name from directory we're building
IMAGE_NAME=kindnetd
IMAGE_NAME=kindnet
# docker image registry, default to upstream
REGISTRY?=ghcr.io/aojea
REGISTRY?=gcr.io/k8s-staging-networking
# tag based on date-sha
TAG?=$(shell echo "$$(date +v%Y%m%d)-$$(git describe --always --dirty)")
# the full image tag
Expand All @@ -45,3 +45,12 @@ image-build:
--progress="${PROGRESS}" \
--platform="${PLATFORMS}" \
--tag="${IMAGE}" --load

image-push:
docker buildx build . \
--progress="${PROGRESS}" \
--platform="${PLATFORMS}" \
--tag="${IMAGE}" --push

release: build image-push
@echo "Released image: ${IMAGE}"
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ Kindnet evolved adding new features, as an embedded ipmasq agent and nowadays,
is the default CNI plugin for [KIND](https://github.com/kubernetes-sigs/kind)
and is used for testing the [Kubernetes project](https://github.com/kubernetes/kubernetes).

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

## Features

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

## How it Works

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.
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.

## Installation

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

```sh
kubectl create -f https://raw.githubusercontent.com/aojea/kindnet/main/install-kindnet.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/kindnet/refs/heads/main/install-kindnet.yaml
```

## Contributing
Expand Down
11 changes: 11 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://cloud.google.com/cloud-build/docs/build-config
options:
substitution_option: ALLOW_LOOSE
machineType: E2_HIGHCPU_32
steps:
- name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud
entrypoint: make
env:
- REGISTRY=gcr.io/k8s-staging-networking
- IMAGE_NAME=kube-network-policies
args: ['release']
14 changes: 7 additions & 7 deletions cmd/kindnetd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ import (
"runtime/debug"
"time"

"github.com/aojea/kindnet/pkg/conntrack"
"github.com/aojea/kindnet/pkg/dnscache"
"github.com/aojea/kindnet/pkg/fastpath"
"github.com/aojea/kindnet/pkg/masq"
kindnetnat64 "github.com/aojea/kindnet/pkg/nat64"
"github.com/aojea/kindnet/pkg/nflog"
kindnetnode "github.com/aojea/kindnet/pkg/node"
"sigs.k8s.io/kindnet/pkg/conntrack"
"sigs.k8s.io/kindnet/pkg/dnscache"
"sigs.k8s.io/kindnet/pkg/fastpath"
"sigs.k8s.io/kindnet/pkg/masq"
kindnetnat64 "sigs.k8s.io/kindnet/pkg/nat64"
"sigs.k8s.io/kindnet/pkg/nflog"
kindnetnode "sigs.k8s.io/kindnet/pkg/node"

"github.com/prometheus/client_golang/prometheus/promhttp"
"golang.org/x/sys/unix"
Expand Down
2 changes: 1 addition & 1 deletion docs/Kubernetes-IPv6-Cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Overview

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

To test it we can use the [kind project](https://github.com/kubernetes-sigs/kind)
to create a Docker in Docker Kubernetes cluster in your host.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/aojea/kindnet
module sigs.k8s.io/kindnet

go 1.24.0

Expand Down
Loading
Loading