@@ -329,8 +329,9 @@ func (r *NamespaceScopeReconciler) DeleteRbacFromUnmanagedNamespace(ctx context.
329
329
return err
330
330
}
331
331
unmanagedNss := util .GetListDifference (nsInCm , nsInCr )
332
+ configmapValue := util .GetFirstNCharacter (instance .Spec .ConfigmapName + "-" + instance .Namespace , 63 )
332
333
labels := map [string ]string {
333
- "namespace-scope-configmap" : instance . Namespace + "-" + instance . Spec . ConfigmapName ,
334
+ "namespace-scope-configmap" : configmapValue ,
334
335
}
335
336
336
337
operatorNs , err := util .GetOperatorNamespace ()
@@ -364,8 +365,9 @@ func (r *NamespaceScopeReconciler) DeleteRbacFromUnmanagedNamespace(ctx context.
364
365
365
366
// When delete NamespaceScope instance, cleanup all RBAC resources
366
367
func (r * NamespaceScopeReconciler ) DeleteAllRbac (ctx context.Context , instance * operatorv1.NamespaceScope ) error {
368
+ configmapValue := util .GetFirstNCharacter (instance .Spec .ConfigmapName + "-" + instance .Namespace , 63 )
367
369
labels := map [string ]string {
368
- "namespace-scope-configmap" : instance . Namespace + "-" + instance . Spec . ConfigmapName ,
370
+ "namespace-scope-configmap" : configmapValue ,
369
371
}
370
372
371
373
operatorNs , err := util .GetOperatorNamespace ()
@@ -461,8 +463,9 @@ func (r *NamespaceScopeReconciler) updateRuntimeRoleForNSS(ctx context.Context,
461
463
}
462
464
463
465
func (r * NamespaceScopeReconciler ) generateRBACToNamespace (ctx context.Context , instance * operatorv1.NamespaceScope , saNames []string , fromNs , toNs string ) error {
466
+ configmapValue := util .GetFirstNCharacter (instance .Spec .ConfigmapName + "-" + instance .Namespace , 63 )
464
467
labels := map [string ]string {
465
- "namespace-scope-configmap" : instance . Namespace + "-" + instance . Spec . ConfigmapName ,
468
+ "namespace-scope-configmap" : configmapValue ,
466
469
"app.kubernetes.io/instance" : "namespace-scope" ,
467
470
"app.kubernetes.io/managed-by" : "ibm-namespace-scope-operator" ,
468
471
"app.kubernetes.io/name" : instance .Spec .ConfigmapName ,
0 commit comments