diff --git a/.github/workflows/make-test.yaml b/.github/workflows/make-test.yaml index 41dffdcd..8adc7c80 100644 --- a/.github/workflows/make-test.yaml +++ b/.github/workflows/make-test.yaml @@ -11,10 +11,13 @@ jobs: build: # Pull request has label 'ok-to-test' or the author is a member of the organization if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.pull_request.author_association) + strategy: + matrix: + k8s_version: [1.27.1,1.28.0,1.29.0] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: 1.22.1 - - run: make test + - run: ENVTEST_K8S_VERSION=${{ matrix.k8s_version }} make test diff --git a/Makefile b/Makefile index 24b334be..b065828e 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Image URL to use all building/pushing image targets IMG ?= ghcr.io/aenix-io/etcd-operator:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.29.0 +ENVTEST_K8S_VERSION ?= 1.29.0 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) diff --git a/internal/controller/factory/builders.go b/internal/controller/factory/builders.go index f6724515..c2b6a72d 100644 --- a/internal/controller/factory/builders.go +++ b/internal/controller/factory/builders.go @@ -42,9 +42,6 @@ func reconcileStatefulSet(ctx context.Context, rclient client.Client, crdName st return fmt.Errorf("cannot get existing statefulset: %s, for crd_object: %s, err: %w", sts.Name, crdName, err) } sts.Annotations = labels.Merge(currentSts.Annotations, sts.Annotations) - if sts.ResourceVersion != "" { - sts.ResourceVersion = currentSts.ResourceVersion - } sts.Status = currentSts.Status return rclient.Update(ctx, sts) } @@ -62,9 +59,6 @@ func reconcileConfigMap(ctx context.Context, rclient client.Client, crdName stri return fmt.Errorf("cannot get existing configMap: %s, for crd_object: %s, err: %w", configMap.Name, crdName, err) } configMap.Annotations = labels.Merge(currentConfigMap.Annotations, configMap.Annotations) - if configMap.ResourceVersion != "" { - configMap.ResourceVersion = currentConfigMap.ResourceVersion - } return rclient.Update(ctx, configMap) } @@ -81,9 +75,6 @@ func reconcileService(ctx context.Context, rclient client.Client, crdName string return fmt.Errorf("cannot get existing service: %s, for crd_object: %s, err: %w", svc.Name, crdName, err) } svc.Annotations = labels.Merge(currentSvc.Annotations, svc.Annotations) - if svc.ResourceVersion != "" { - svc.ResourceVersion = currentSvc.ResourceVersion - } svc.Status = currentSvc.Status return rclient.Update(ctx, svc) }