Skip to content

Commit d4da6e5

Browse files
authored
chore: bump up kind for k8s v1.31 (#2318)
* chore: bump up kind for k8s v1.31 * chore: bump up setup-kind to v0.6.2 * test: remove deprecated k8s API * chore: add report in the failure log * chore: increase timeout for building cluster report * fix: add newlines * chore: update copmuted hash for k8s v1.31.0 * chore: remove reports printing for debug * test: looking for a name in ClusterVulnerabilityReport
1 parent d9a4692 commit d4da6e5

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ on:
2222
- LICENSE
2323
- NOTICE
2424
env:
25-
KIND_VERSION: v0.17.0
26-
KIND_IMAGE: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
25+
KIND_VERSION: v0.24.0
26+
KIND_IMAGE: kindest/node:v1.31.2
2727
GO_VERSION: '1.22'
2828
permissions: {}
2929
concurrency:
@@ -120,7 +120,7 @@ jobs:
120120
with:
121121
aqua_version: v1.25.0
122122
- name: Setup Kubernetes cluster (KIND)
123-
uses: engineerd/setup-kind@v0.5.0
123+
uses: engineerd/setup-kind@v0.6.2
124124
with:
125125
version: ${{ env.KIND_VERSION }}
126126
image: ${{ env.KIND_IMAGE }}

tests/e2e/cluster/workload/00-assert.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
apiVersion: kuttl.dev/v1beta1
33
commands:
44
- script: >
5-
cnt="$(kubectl get clustervulnerabilityreports.aquasecurity.github.io clustersbomreport-557764dbc-k8s-cluster \
6-
-o=jsonpath='{.report.summary.highCount}')"
7-
if [ $cnt -gt 0 ]
5+
name="$(kubectl get clustervulnerabilityreports.aquasecurity.github.io clustersbomreport-6789697bc-k8s-cluster \
6+
-o=jsonpath='{.metadata.name}')"
7+
if [ $name = "clustersbomreport-6789697bc-k8s-cluster" ]
88
99
then
10-
echo "Pass: ClusterVulnerabilityReport highCount ($cnt) is greater than 0"
10+
echo "Pass: ClusterVulnerabilityReport was created successfully"
1111
else
12-
echo "Fail: ClusterVulnerabilityReport highCount ($cnt) should be greater than 0"
12+
echo "Fail: ClusterVulnerabilityReport name doesn't exist"
1313
exit 1
1414
fi
1515
kind: TestAssert
16-
timeout: 120
16+
timeout: 240

tests/itest/trivy-operator/behavior/behavior.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/aquasecurity/trivy-operator/tests/itest/helper"
1111
appsv1 "k8s.io/api/apps/v1"
1212
batchv1 "k8s.io/api/batch/v1"
13-
batchv1beta1 "k8s.io/api/batch/v1beta1"
1413
corev1 "k8s.io/api/core/v1"
1514
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1615
"k8s.io/apimachinery/pkg/util/intstr"
@@ -324,18 +323,18 @@ func ConfigurationCheckerBehavior(inputs *Inputs) func() {
324323
Context("When CronJob is created", func() {
325324

326325
var ctx context.Context
327-
var cronJob *batchv1beta1.CronJob
326+
var cronJob *batchv1.CronJob
328327

329328
BeforeEach(func() {
330329
ctx = context.Background()
331-
cronJob = &batchv1beta1.CronJob{
330+
cronJob = &batchv1.CronJob{
332331
ObjectMeta: metav1.ObjectMeta{
333332
Namespace: inputs.PrimaryNamespace,
334333
Name: "hello-" + rand.String(5),
335334
},
336-
Spec: batchv1beta1.CronJobSpec{
335+
Spec: batchv1.CronJobSpec{
337336
Schedule: "*/1 * * * *",
338-
JobTemplate: batchv1beta1.JobTemplateSpec{
337+
JobTemplate: batchv1.JobTemplateSpec{
339338
Spec: batchv1.JobSpec{
340339
Template: corev1.PodTemplateSpec{
341340
Spec: corev1.PodSpec{

0 commit comments

Comments
 (0)