mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Fix: system crd validation hook should not always use the default vela system (#5711)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit b4b0f99f41)
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
co-authored by
Somefive
parent
f8285df49d
commit
3d410fed5f
@@ -22,6 +22,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/kubevela/pkg/util/compression"
|
||||
"github.com/kubevela/pkg/util/k8s"
|
||||
"github.com/kubevela/pkg/util/singleton"
|
||||
"k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/klog/v2"
|
||||
@@ -55,7 +56,7 @@ func (in *SystemCRDValidationHook) Run(ctx context.Context) error {
|
||||
feature.DefaultMutableFeatureGate.Enabled(features.GzipApplicationRevision) {
|
||||
appRev := &v1beta1.ApplicationRevision{}
|
||||
appRev.Name = fmt.Sprintf("core.pre-check.%d", time.Now().UnixNano())
|
||||
appRev.Namespace = types.DefaultKubeVelaNS
|
||||
appRev.Namespace = k8s.GetRuntimeNamespace()
|
||||
key := client.ObjectKeyFromObject(appRev)
|
||||
appRev.SetLabels(map[string]string{oam.LabelPreCheck: types.VelaCoreName})
|
||||
appRev.Spec.Application.Name = appRev.Name
|
||||
|
||||
Reference in New Issue
Block a user