Skip to content

Commit

Permalink
fixed namespace handling
Browse files Browse the repository at this point in the history
  • Loading branch information
henderiw committed Dec 5, 2023
1 parent 4bde6cc commit 2811d7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/pkg/reconcilers/bootstrap-secret/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
// the controller uses the namespace of the cr by default and if the
// remoteNamespace annotation `"nephio.org/remote-namespace"` is set
// it will use the value of the annotation as the remote namespace
remoteNamespace := cr.Name
remoteNamespace := cr.Namespace
if rns, ok := cr.GetAnnotations()[remoteNamespaceKey]; ok {
remoteNamespace = rns
}
Expand All @@ -165,6 +165,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
})
newcr.ResourceVersion = ""
newcr.UID = ""
newcr.Namespace = remoteNamespace
log.Info("secret info", "secret", newcr.Annotations)
if err := clusterClient.Apply(ctx, newcr); err != nil {
msg := fmt.Sprintf("cannot apply secret to cluster %s", clusterName)
Expand Down

0 comments on commit 2811d7a

Please sign in to comment.