Skip to content

Commit

Permalink
No need to lowercase namespaces
Browse files Browse the repository at this point in the history
They are lowercase and that's enforced by Kubernetes.
  • Loading branch information
ash2k committed Nov 5, 2021
1 parent 8da7837 commit 38f7478
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/apply/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"fmt"
"sort"
"strings"
"time"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -309,12 +308,11 @@ func handleError(eventChannel chan event.Event, err error) {
func localNamespaces(localInv inventory.InventoryInfo, localObjs []object.ObjMetadata) sets.String {
namespaces := sets.NewString()
for _, obj := range localObjs {
namespace := strings.ToLower(obj.Namespace)
if namespace != "" {
namespaces.Insert(namespace)
if obj.Namespace != "" {
namespaces.Insert(obj.Namespace)
}
}
invNamespace := strings.ToLower(localInv.Namespace())
invNamespace := localInv.Namespace()
if invNamespace != "" {
namespaces.Insert(invNamespace)
}
Expand Down

0 comments on commit 38f7478

Please sign in to comment.