upgrade K8s dependency lib to v0.21 (#1985)

* upgrade K8s dependency to v0.21

* update CRD for new version of controller-runtime

* fix ci component revision create must fill Raw in runtime.RawExtension

* try fix test

* start control plane timeout set to 1min and fix tests

* add timeout for env test start and stop

* longer timeout time for BeforeSuit function

* upgrade kubebuilder and k8s cluster version to match with v1.21.2 in github action

* fix test

* fix resource tracker ownerRef override

* update developer guides
This commit is contained in:
Jianbo Sun
2021-08-03 11:30:02 +08:00
committed by GitHub
parent 7a1f95773d
commit aa87d3da24
194 changed files with 23780 additions and 7287 deletions

View File

@@ -22,6 +22,7 @@ import (
"os"
"path/filepath"
"testing"
"time"
"github.com/ghodss/yaml"
. "github.com/onsi/ginkgo"
@@ -66,8 +67,10 @@ var _ = BeforeSuite(func(done Done) {
By("bootstrapping test environment")
useExistCluster := false
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "charts", "vela-core", "crds")},
UseExistingCluster: &useExistCluster,
ControlPlaneStartTimeout: time.Minute,
ControlPlaneStopTimeout: time.Minute,
CRDDirectoryPaths: []string{filepath.Join("..", "..", "charts", "vela-core", "crds")},
UseExistingCluster: &useExistCluster,
}
var err error
@@ -106,7 +109,7 @@ var _ = BeforeSuite(func(done Done) {
Expect(k8sClient.Create(ctx, &terraformDefinition)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{}))
close(done)
}, 60)
}, 120)
var _ = AfterSuite(func() {
By("tearing down the test environment")

View File

@@ -20,6 +20,7 @@ import (
"io/ioutil"
"path/filepath"
"testing"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -61,8 +62,10 @@ var _ = BeforeSuite(func(done Done) {
By("bootstrapping test environment")
useExistCluster := false
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "charts", "vela-core", "crds")},
UseExistingCluster: &useExistCluster,
ControlPlaneStartTimeout: time.Minute,
ControlPlaneStopTimeout: time.Minute,
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "charts", "vela-core", "crds")},
UseExistingCluster: &useExistCluster,
}
var err error