Chore: bump testing to Kubernetes v1.26 (#5816)

* Chore: bump testing to Kubernetes v1.25

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix condition in e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Bump e2e-multicluster-test to v1.25

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Bump e2e-rollout-test and rebase

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: EndpointSlice v1beta1 is depracated

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix vela ql test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove comment

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Bump all e2e test environment to v1.26

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
This commit is contained in:
qiaozp
2023-04-07 17:28:51 +08:00
committed by GitHub
parent 76dc154e92
commit 5ef0798d89
5 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
k8s-version: ["v1.20","v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
@@ -71,7 +71,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
+2 -2
View File
@@ -44,7 +44,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
k8s-version: ["v1.20","v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
@@ -71,7 +71,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
+2 -2
View File
@@ -44,7 +44,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
k8s-version: ["v1.20","v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
@@ -71,7 +71,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
+8 -2
View File
@@ -20,6 +20,7 @@ import (
context2 "context"
"encoding/json"
"fmt"
"regexp"
"strings"
"time"
@@ -33,6 +34,7 @@ import (
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
"github.com/oam-dev/kubevela/e2e"
"github.com/oam-dev/kubevela/pkg/oam/util"
"github.com/oam-dev/kubevela/pkg/utils/common"
)
@@ -76,7 +78,6 @@ var _ = ginkgo.Describe("Test Vela Application", func() {
e2e.JsonAppFileContext("json appfile apply", testDeleteJsonAppFile)
ApplicationDeleteWithForceOptions("test delete with force option", "test-vela-delete")
e2e.JsonAppFileContext("json appfile apply", testDeleteJsonAppFile)
VelaQLPodListContext("ql", velaQL)
e2e.JsonAppFileContextWithWait("json appfile apply with wait", waitAppfileToSuccess)
@@ -283,11 +284,16 @@ var VelaQLPodListContext = func(context string, velaQL string) bool {
componentView := new(corev1.ConfigMap)
gomega.Eventually(func(g gomega.Gomega) {
g.Expect(common.ReadYamlToObject("./component-pod-view.yaml", componentView)).Should(gomega.BeNil())
g.Expect(k8sClient.Create(ctx, componentView)).Should(gomega.Succeed())
g.Expect(k8sClient.Create(ctx, componentView)).Should(gomega.SatisfyAny(gomega.Succeed(), util.AlreadyExistMatcher{}))
}, time.Second*3, time.Millisecond*300).Should(gomega.Succeed())
cli := fmt.Sprintf("vela ql %s", velaQL)
output, err := e2e.Exec(cli)
// remove warning like: W0406 14:07:49.832144 2443978 tree.go:958] ignore list resources: EndpointSlice as no matches for kind "EndpointSlice" in version "discovery.k8s.io/v1beta1"
re := regexp.MustCompile(`W\d{4}.*`)
output = re.ReplaceAllString(output, "")
gomega.Expect(err).NotTo(gomega.HaveOccurred())
var list PodList
err = json.Unmarshal([]byte(output), &list)
+3
View File
@@ -123,6 +123,9 @@ func init() {
{
ResourceType: ResourceType{APIVersion: "discovery.k8s.io/v1beta1", Kind: "EndpointSlice"},
},
{
ResourceType: ResourceType{APIVersion: "discovery.k8s.io/v1", Kind: "EndpointSlice"},
},
{
ResourceType: ResourceType{APIVersion: "v1", Kind: "Endpoints"},
listOptions: service2EndpointListOption,