Use factory.Namespace() to replace hardcoded velero namespace (#4346)

* Use factory.Namespace() to replace hardcoded velero namespace

Signed-off-by: half-life666 <half-life@jibudata.com>

* Add change log for pr 4346

Signed-off-by: half-life666 <half-life@jibudata.com>
pull/4372/head
Bruce 2021-11-16 09:36:29 +08:00 committed by GitHub
parent 7c4e03e9f9
commit 71d482360f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Use factory.Namespace() to replace hardcoded velero namespace

View File

@ -221,7 +221,7 @@ func userPriorityConfigMap() (*corev1.ConfigMap, error) {
return nil, errors.Wrap(err, "getting Kube client")
}
cm, err := kc.CoreV1().ConfigMaps("velero").Get(
cm, err := kc.CoreV1().ConfigMaps(fc.Namespace()).Get(
context.Background(),
"enableapigroupversions",
metav1.GetOptions{},