mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 06:15:40 +00:00
Make configmapref check case insensitive (#6804)
* Make configmapref check case insensitive Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com> * update resourcemodfier test case to validate case Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com> --------- Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com> Signed-off-by: Anshul Ahuja <anshulahuja@microsoft.com> Co-authored-by: Anshul Ahuja <anshulahuja@microsoft.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -376,7 +377,7 @@ func (r *restoreReconciler) validateAndComplete(restore *api.Restore) (backupInf
|
||||
}
|
||||
|
||||
var resourceModifiers *resourcemodifiers.ResourceModifiers = nil
|
||||
if restore.Spec.ResourceModifier != nil && restore.Spec.ResourceModifier.Kind == resourcemodifiers.ConfigmapRefType {
|
||||
if restore.Spec.ResourceModifier != nil && strings.EqualFold(restore.Spec.ResourceModifier.Kind, resourcemodifiers.ConfigmapRefType) {
|
||||
ResourceModifierConfigMap := &corev1api.ConfigMap{}
|
||||
err := r.kbClient.Get(context.Background(), client.ObjectKey{Namespace: restore.Namespace, Name: restore.Spec.ResourceModifier.Name}, ResourceModifierConfigMap)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user