Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in e2e tests and update its dependencies #3421

Merged
merged 4 commits into from
Feb 19, 2025
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
13 changes: 8 additions & 5 deletions .github/workflows/run-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ concurrency:

env:
clusterName: tetragon-ci
ciliumCliVersion: v0.15.0

jobs:
prepare:
Expand Down Expand Up @@ -92,10 +91,14 @@ jobs:
- name: Install kubectl, kind and cilium CLI
uses: alexellis/arkade-get@master
with:
kubectl: latest
helm: v3.12.1
kind: v0.20.0
cilium: ${{ env.ciliumCliVersion }}
# renovate: datasource=github-releases depName=kubernetes/kubernetes
kubectl: v1.32.2
# renovate: datasource=github-releases depName=helm/helm
helm: v3.17.1
# renovate: datasource=github-releases depName=kubernetes-sigs/kind
kind: v0.27.0
# renovate: datasource=github-releases depName=cilium/cilium-cli
cilium: v0.16.24
print-summary: false

- name: Pull Tetragon Images
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
k8s.io/klog/v2 v2.130.1
sigs.k8s.io/controller-runtime v0.20.1
sigs.k8s.io/controller-tools v0.16.5
sigs.k8s.io/e2e-framework v0.2.0
sigs.k8s.io/e2e-framework v0.6.0
sigs.k8s.io/yaml v1.4.0
)

Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/vishvananda/netns v0.0.5 // indirect
github.com/vladimirvivien/gexe v0.2.0 // indirect
github.com/vladimirvivien/gexe v0.4.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ github.com/vishvananda/netlink v1.3.1-0.20250209162617-655392bc778a/go.mod h1:i6
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zdEY=
github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
github.com/vladimirvivien/gexe v0.2.0 h1:nbdAQ6vbZ+ZNsolCgSVb9Fno60kzSuvtzVh6Ytqi/xY=
github.com/vladimirvivien/gexe v0.2.0/go.mod h1:LHQL00w/7gDUKIak24n801ABp8C+ni6eBht9vGVst8w=
github.com/vladimirvivien/gexe v0.4.1 h1:W9gWkp8vSPjDoXDu04Yp4KljpVMaSt8IQuHswLDd5LY=
github.com/vladimirvivien/gexe v0.4.1/go.mod h1:3gjgTqE2c0VyHnU5UOIwk7gyNzZDGulPb/DJPgcw64E=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
Expand Down Expand Up @@ -621,8 +621,8 @@ sigs.k8s.io/controller-runtime v0.20.1 h1:JbGMAG/X94NeM3xvjenVUaBjy6Ui4Ogd/J5Ztj
sigs.k8s.io/controller-runtime v0.20.1/go.mod h1:BrP3w158MwvB3ZbNpaAcIKkHQ7YGpYnzpoSTZ8E14WU=
sigs.k8s.io/controller-tools v0.16.5 h1:5k9FNRqziBPwqr17AMEPPV/En39ZBplLAdOwwQHruP4=
sigs.k8s.io/controller-tools v0.16.5/go.mod h1:8vztuRVzs8IuuJqKqbXCSlXcw+lkAv/M2sTpg55qjMY=
sigs.k8s.io/e2e-framework v0.2.0 h1:gD6AWWAHFcHibI69E9TgkNFhh0mVwWtRCHy2RU057jQ=
sigs.k8s.io/e2e-framework v0.2.0/go.mod h1:E6JXj/V4PIlb95jsn2WrNKG+Shb45xaaI7C0+BH4PL8=
sigs.k8s.io/e2e-framework v0.6.0 h1:p7hFzHnLKO7eNsWGI2AbC1Mo2IYxidg49BiT4njxkrM=
sigs.k8s.io/e2e-framework v0.6.0/go.mod h1:IREnCHnKgRCioLRmNi0hxSJ1kJ+aAdjEKK/gokcZu4k=
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA=
Expand Down
7 changes: 4 additions & 3 deletions tests/e2e/helpers/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"sigs.k8s.io/e2e-framework/pkg/envconf"
"sigs.k8s.io/e2e-framework/pkg/envfuncs"
"sigs.k8s.io/e2e-framework/pkg/features"
"sigs.k8s.io/e2e-framework/support/kind"
)

const configPath = "/tmp/tetragon-e2e-kind.yaml"
Expand Down Expand Up @@ -48,7 +49,7 @@ var (
func init() {
flag.StringVar(&clusterName, "cluster-name", "tetragon-ci", "Set the name of the k8s cluster being used")
// renovate: datasource=docker
flag.StringVar(&clusterImage, "cluster-image", "kindest/node:v1.29.12", "Set the node image for the kind cluster")
flag.StringVar(&clusterImage, "cluster-image", "kindest/node:v1.32.2", "Set the node image for the kind cluster")
}

// GetClusterName fetches the cluster name configured with -cluster-name or the temporary
Expand Down Expand Up @@ -147,7 +148,7 @@ func MaybeCreateTempKindCluster(testenv env.Environment, namePrefix string) env.
if err != nil {
return ctx, err
}
ctx, err = envfuncs.CreateKindClusterWithConfig(name, clusterImage, configPath)(ctx, cfg)
ctx, err = envfuncs.CreateClusterWithConfig(kind.NewProvider(), name, configPath, kind.WithImage(clusterImage))(ctx, cfg)
if err != nil {
return ctx, err
}
Expand All @@ -165,7 +166,7 @@ func deleteTempKindCluster(clusterName string) env.Func {
return func(ctx context.Context, cfg *envconf.Config) (context.Context, error) {
klog.Infof("Deleting temporary kind cluster %s", clusterName)
var err error
ctx, err = envfuncs.DestroyKindCluster(clusterName)(ctx, cfg)
ctx, err = envfuncs.DestroyCluster(clusterName)(ctx, cfg)
if err != nil {
return ctx, err
}
Expand Down
6 changes: 1 addition & 5 deletions tests/e2e/helpers/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ func LoadObjects(namespace string, objs []k8s.Object, waitForPods bool) env.Func
r.List(ctx, podList)
wait.For(conditions.New(r).ResourcesMatch(podList, func(object k8s.Object) bool {
o := object.(*v1.Pod)
done, err := conditions.New(r).PodRunning(o)()
if done && err == nil {
return true
}
return false
return o.Status.Phase == v1.PodRunning || o.Status.Phase == v1.PodSucceeded
}))

klog.Infof("Resources created and all pods in %s ready!", namespace)
Expand Down
6 changes: 4 additions & 2 deletions vendor/github.com/vladimirvivien/gexe/TODO.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 0 additions & 41 deletions vendor/github.com/vladimirvivien/gexe/config.go

This file was deleted.

21 changes: 19 additions & 2 deletions vendor/github.com/vladimirvivien/gexe/echo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading