We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48d3887 commit cf860efCopy full SHA for cf860ef
controllers/user/controllers/user_controller.go
@@ -21,6 +21,7 @@ import (
21
"errors"
22
"fmt"
23
"strconv"
24
+ "strings"
25
"time"
26
27
"github.com/go-logr/logr"
@@ -305,6 +306,12 @@ func (r *UserReconciler) syncNamespace(
305
306
ns.Annotations[userAnnotationOwnerKey] = user.Annotations[userAnnotationOwnerKey]
307
if ns.Name != "admin" {
308
ns.Labels = config.SetPodSecurity(ns.Labels)
309
+ } else {
310
+ for k := range ns.Labels {
311
+ if strings.HasPrefix(k, "pod-security.") {
312
+ delete(ns.Labels, k)
313
+ }
314
315
}
316
// add label for namespace to filter
317
ns.Labels[userLabelOwnerKey] = user.Annotations[userAnnotationOwnerKey]
0 commit comments