Skip to content

Commit

Permalink
Feat: upgrade k8s.io to 0.26 and kubevela to 1.9.0 (#783)
Browse files Browse the repository at this point in the history
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
  • Loading branch information
nuclearwu committed Apr 23, 2023
1 parent eca8d1d commit b0c407f
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 234 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ e2e-setup-core: install-vela install-core install-addon

.PHONY: install-vela
install-vela:
curl -fsSl https://kubevela.io/script/install.sh | bash
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.9.0-alpha.2
install-core:
vela install -y
install-addon:
Expand Down
5 changes: 5 additions & 0 deletions addon/config-templates/image-registry.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import (
"encoding/base64"
"encoding/json"
"strconv"
"vela/config"
)

metadata: {
Expand Down Expand Up @@ -52,6 +53,10 @@ template: {
}
}

validation: config.#ImageRegistry & {
$params: parameter
}

parameter: {
// +usage=Image registry FQDN, such as: index.docker.io
registry: *"index.docker.io" | string
Expand Down
140 changes: 65 additions & 75 deletions go.mod

Large diffs are not rendered by default.

335 changes: 188 additions & 147 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/plugin/proxy/proxy_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
}

By("start kube test env")
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/domain/repository/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
CRDDirectoryPaths: []string{"../../../../test/crds"},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/server/domain/service/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
CRDDirectoryPaths: []string{"../../../../test/crds", "./testdata/crds"},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/server/event/collect/suit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
CRDDirectoryPaths: []string{"../../../../test/crds"},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/server/event/sync/suit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
CRDDirectoryPaths: []string{"../../../../test/crds"},
}

Expand Down
5 changes: 4 additions & 1 deletion pkg/server/event/sync/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func (a *ApplicationSync) Start(ctx context.Context, errorChan chan error) {
klog.Infof("delete the application (%s/%s) metadata successfully", app.Namespace, app.Name)
},
}
informer.AddEventHandler(handlers)
_, err = informer.AddEventHandler(handlers)
if err != nil {
klog.ErrorS(err, "failed to add event handler for application sync")
}
klog.Info("app syncing started")
informer.Run(ctx.Done())
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
}

By("start kube test env")
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/interfaces/api/api_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = BeforeSuite(func(done Done) {
testEnv = &envtest.Environment{
ControlPlaneStartTimeout: time.Minute * 3,
ControlPlaneStopTimeout: time.Minute,
UseExistingCluster: pointer.BoolPtr(false),
UseExistingCluster: pointer.Bool(false),
CRDDirectoryPaths: []string{"../../../test/crds"},
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/server/utils/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (c *authClient) Status() client.StatusWriter {
}

// Get .
func (c *authClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error {
func (c *authClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, _ ...client.GetOption) error {
ctx = ContextWithUserInfo(ctx)
return c.Client.Get(ctx, key, obj)
}
Expand Down Expand Up @@ -141,13 +141,13 @@ type authAppStatusClient struct {
}

// Update .
func (c *authAppStatusClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error {
func (c *authAppStatusClient) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error {
ctx = ContextWithUserInfo(ctx)
return c.StatusWriter.Update(ctx, obj, opts...)
}

// Patch .
func (c *authAppStatusClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error {
func (c *authAppStatusClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error {
ctx = ContextWithUserInfo(ctx)
return c.StatusWriter.Patch(ctx, obj, patch, opts...)
}

0 comments on commit b0c407f

Please sign in to comment.