From fbfec3b01972f7a51f018733c28578d82afb5922 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 23 Nov 2023 07:53:14 -0800 Subject: [PATCH] Test against k8s 1.28.0 (#271) Signed-off-by: Tamal Saha --- .github/workflows/ci.yml | 2 +- Makefile | 2 +- go.mod | 4 ++-- tests/check-charts_test.go | 10 ++++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4adc9dfe4..bdf126f38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: needs: build strategy: matrix: - k8s: [v1.19.16, v1.20.15, v1.21.14, v1.22.17, v1.23.17, v1.24.12, v1.25.8, v1.26.3, v1.27.1] + k8s: [v1.20.15, v1.21.14, v1.22.17, v1.23.17, v1.24.12, v1.25.8, v1.26.3, v1.27.1, v1.28.0] steps: - uses: actions/checkout@v1 diff --git a/Makefile b/Makefile index 5ee21e560..69c5abe65 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) BASEIMAGE_PROD ?= gcr.io/distroless/static-debian11 BASEIMAGE_DBG ?= debian:bullseye -GO_VERSION ?= 1.20 +GO_VERSION ?= 1.21 BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION) CHART_TEST_IMAGE ?= quay.io/helmpack/chart-testing:v3.5.1 diff --git a/go.mod b/go.mod index f92e9f7db..6adef3239 100644 --- a/go.mod +++ b/go.mod @@ -5,13 +5,13 @@ go 1.18 require ( go.openviz.dev/installer v0.0.0-20230802073927-bc7c337886e9 gomodules.xyz/go-sh v0.1.0 - gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.25.3 k8s.io/apimachinery v0.25.4 kmodules.xyz/objectstore-api v0.25.1 kmodules.xyz/resource-metadata v0.17.39-0.20231101070123-9cfd0519c7f9 kmodules.xyz/schema-checker v0.4.1 kubeops.dev/external-dns-operator v0.0.6 + sigs.k8s.io/yaml v1.3.0 stash.appscode.dev/apimachinery v0.32.0 ) @@ -81,6 +81,7 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.3 // indirect k8s.io/client-go v0.25.3 // indirect k8s.io/klog/v2 v2.80.1 // indirect @@ -91,7 +92,6 @@ require ( sigs.k8s.io/controller-runtime v0.13.1 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect x-helm.dev/apimachinery v0.0.15 // indirect ) diff --git a/tests/check-charts_test.go b/tests/check-charts_test.go index 70eb43e57..0564a39e0 100644 --- a/tests/check-charts_test.go +++ b/tests/check-charts_test.go @@ -26,9 +26,11 @@ import ( "go.bytebuilders.dev/installer/apis/installer/v1alpha1" shell "gomodules.xyz/go-sh" - "gopkg.in/yaml.v3" + "sigs.k8s.io/yaml" ) +const ociReg = "oci://ghcr.io/appscode-charts/" + func Test_checkVersions(t *testing.T) { if err := checkAceInstallerVersions(); err != nil { t.Errorf("checkVersions() error = %v", err) @@ -64,7 +66,7 @@ func checkAceInstallerVersions() error { for k, v := range spec.Helm.Releases { // helm pull appscode/ace-installer --version=v2023.03.23 - fullname := "oci://ghcr.io/appscode-charts/" + k + fullname := ociReg + k err := sh.Command("helm", "pull", fullname, "--version", v.Version).Run() if err != nil { return err @@ -96,7 +98,7 @@ func checkAceOcmAddonsVersions() error { for k, v := range spec.Helm.Releases { // helm pull appscode/ace-installer --version=v2023.03.23 - fullname := "oci://ghcr.io/appscode-charts/" + k + fullname := ociReg + k err := sh.Command("helm", "pull", fullname, "--version", v.Version).Run() if err != nil { return err @@ -128,7 +130,7 @@ func checkOpscenterFeaturesVersions() error { for k, v := range spec.Helm.Releases { // helm pull appscode/ace-installer --version=v2023.03.23 - fullname := "oci://ghcr.io/appscode-charts/" + k + fullname := ociReg + k err := sh.Command("helm", "pull", fullname, "--version", v.Version).Run() if err != nil { return err