Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.
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 .github/workflows/bats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:

env:
GO_VERSION: "1.24"
K8S_VERSION: "v1.33.1"
KIND_VERSION: "v0.28.0"
K8S_VERSION: "v1.34.0"
KIND_VERSION: "v0.30.0"
IMAGE_NAME: ghcr.io/google/dranet
KIND_CLUSTER_NAME: kind

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:

env:
GO_VERSION: "1.24"
K8S_VERSION: "v1.34.0-rc.0"
KIND_VERSION: "v0.28.0"
K8S_VERSION: "v1.34.0"
KIND_VERSION: "v0.30.0"
IMAGE_NAME: ghcr.io/google/dranet
KIND_CLUSTER_NAME: kind

Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ require (
golang.org/x/time v0.12.0
google.golang.org/api v0.248.0
google.golang.org/protobuf v1.36.8
k8s.io/api v0.34.0-rc.0
k8s.io/apimachinery v0.34.0-rc.0
k8s.io/client-go v0.34.0-rc.0
k8s.io/api v0.34.0
k8s.io/apimachinery v0.34.0
k8s.io/client-go v0.34.0
k8s.io/cloud-provider-gcp v0.0.0-20250326051131-7056e3facd39
k8s.io/component-helpers v0.34.0-rc.0
k8s.io/dynamic-resource-allocation v0.34.0-rc.0
k8s.io/component-helpers v0.34.0
k8s.io/dynamic-resource-allocation v0.34.0
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8
Expand Down Expand Up @@ -113,7 +113,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
howett.net/plist v1.0.2-0.20250314012144-ee69052608d9 // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
k8s.io/kubelet v0.34.0-rc.0 // indirect
k8s.io/kubelet v0.34.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -290,24 +290,24 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
howett.net/plist v1.0.2-0.20250314012144-ee69052608d9 h1:eeH1AIcPvSc0Z25ThsYF+Xoqbn0CI/YnXVYoTLFdGQw=
howett.net/plist v1.0.2-0.20250314012144-ee69052608d9/go.mod h1:fyFX5Hj5tP1Mpk8obqA9MZgXT416Q5711SDT7dQLTLk=
k8s.io/api v0.34.0-rc.0 h1:0jrCG9TkH250E5wTqchpijMoMxmQ6FEl9xNum25FFSk=
k8s.io/api v0.34.0-rc.0/go.mod h1:H2VCZSAruVExfN0k+jj42LXFGQOvRhZDVbY1JlHGtHE=
k8s.io/apimachinery v0.34.0-rc.0 h1:PjXj9Fp/f53PN7JMtGnR7AldAbdztqNqT3SjABe99D8=
k8s.io/apimachinery v0.34.0-rc.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
k8s.io/client-go v0.34.0-rc.0 h1:x5GuVy31GD3UJwKrM5Zo/Y0yRD/iJmgRahYvExVW72c=
k8s.io/client-go v0.34.0-rc.0/go.mod h1:3ze7gaPrEhj27r19dZFMl7f6vHcHx6MGhVyPVr0i0xw=
k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE=
k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug=
k8s.io/apimachinery v0.34.0 h1:eR1WO5fo0HyoQZt1wdISpFDffnWOvFLOOeJ7MgIv4z0=
k8s.io/apimachinery v0.34.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo=
k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY=
k8s.io/cloud-provider-gcp v0.0.0-20250326051131-7056e3facd39 h1:2m5DoDX46TPMmpcLRzrOWdBqouWChgbp4F/qlf/lIGc=
k8s.io/cloud-provider-gcp v0.0.0-20250326051131-7056e3facd39/go.mod h1:NZrMafedcWXEFDubORCpHuWMp8cUS1TItObinH7vpwg=
k8s.io/component-helpers v0.34.0-rc.0 h1:jAhYXVt89gjpQqva+U4W2cXngB6ry4ByLjZvTwcPJ2M=
k8s.io/component-helpers v0.34.0-rc.0/go.mod h1:zY2NY9VnM5OuhfJoVWuxiYnUijkCTzHrCwb3lE6R4b4=
k8s.io/dynamic-resource-allocation v0.34.0-rc.0 h1:QGlgUJ1LnDL0bl1+2Znj1ReRU/OaIma7fnINEcLssac=
k8s.io/dynamic-resource-allocation v0.34.0-rc.0/go.mod h1:FaVYUaqpZmOhpnsNcRJCja1+tH+nVXCjiY0bDAIBdHA=
k8s.io/component-helpers v0.34.0 h1:5T7P9XGMoUy1JDNKzHf0p/upYbeUf8ZaSf9jbx0QlIo=
k8s.io/component-helpers v0.34.0/go.mod h1:kaOyl5tdtnymriYcVZg4uwDBe2d1wlIpXyDkt6sVnt4=
k8s.io/dynamic-resource-allocation v0.34.0 h1:RrFNZXb2s5cvvf+KKdO92ss/e+zjGFFaDKAIpzA+Pu8=
k8s.io/dynamic-resource-allocation v0.34.0/go.mod h1:aqmoDIvXjQRhSgxQkFLl6+Ndg6MfdEOI+TQsj1j9V+g=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
k8s.io/kubelet v0.34.0-rc.0 h1:WuP08sc1XwFP+gi+R4Wan11TUPGycDlwD+/LA5MZNGw=
k8s.io/kubelet v0.34.0-rc.0/go.mod h1:JFRoqbpR3n/mscB3RsEoLD5BKrmHiZNapdQY1lfnkKI=
k8s.io/kubelet v0.34.0 h1:1nZt1Q6Kfx7xCaTS9vnqR9sjZDxf3cRSQkAFCczULmc=
k8s.io/kubelet v0.34.0/go.mod h1:NqbF8ViVettlZbf9hw9DJhubaWn7rGvDDTcLMDm6tQ0=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
Expand Down
6 changes: 3 additions & 3 deletions kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.34.0@7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
image: kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
kubeadmConfigPatches:
# Enable the corresponding version of the resource.k8s.io API
- |
Expand All @@ -33,15 +33,15 @@ nodes:
kubeletExtraArgs:
v: "5"
- role: worker
image: kindest/node:v1.34.0@7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
image: kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
v: "5"
- role: worker
image: kindest/node:v1.34.0@7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
image: kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
kubeadmConfigPatches:
- |
kind: JoinConfiguration
Expand Down
28 changes: 18 additions & 10 deletions tests/setup_suite.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,30 @@ function setup_suite {
# Define the name of the kind cluster
export CLUSTER_NAME="dranet-test-cluster"
export IMAGE_NAME="ghcr.io/google/dranet"

# Build the image
docker build -t "$IMAGE_NAME":test -f Dockerfile "$BATS_TEST_DIRNAME"/.. --load

# Build the kind image, needed for newest GA APIs
revision=$(curl --fail --silent --show-error --location https://dl.k8s.io/ci/fast/latest-fast.txt)
kind_node_source="https://dl.k8s.io/ci/fast/$revision/kubernetes-server-linux-amd64.tar.gz"
kind build node-image --image=dra/node:latest "${kind_node_source}"
# Define the kind arguments in an array
kind_args=(
create cluster
--name "$CLUSTER_NAME"
-v7 --wait 1m --retain
--config="$BATS_TEST_DIRNAME"/../kind.yaml
)

if [[ "${USE_LATEST:-false}" == "true" ]]; then
revision=$(curl --fail --silent --show-error --location https://dl.k8s.io/ci/fast/latest-fast.txt)
kind_node_source="https://dl.k8s.io/ci/fast/$revision/kubernetes-server-linux-amd64.tar.gz"
kind build node-image --image=dra/node:latest "${kind_node_source}"
kind_args+=(--image dra/node:latest)
fi

mkdir -p _artifacts
rm -rf _artifacts/*
# create cluster
kind create cluster \
--image dra/node:latest \
--name $CLUSTER_NAME \
-v7 --wait 1m --retain \
--config="$BATS_TEST_DIRNAME"/../kind.yaml

kind "${kind_args[@]}"

kind load docker-image "$IMAGE_NAME":test --name "$CLUSTER_NAME"

Expand All @@ -47,4 +55,4 @@ function setup_suite {
function teardown_suite {
kind export logs "$BATS_TEST_DIRNAME"/../_artifacts --name "$CLUSTER_NAME"
kind delete cluster --name "$CLUSTER_NAME"
}
}
Loading