Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
m-yosefpor committed Feb 28, 2022
1 parent 4286866 commit be67be3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/namespace_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ func (r *NamespaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
name := secret.Annotations[corev1.ServiceAccountNameKey]
uid := secret.Annotations[corev1.ServiceAccountUIDKey]
tokenData := secret.Data[corev1.ServiceAccountTokenKey]
//tmp
logger.Info("token data", "token", string(tokenData))
logger.Info("token meta", "name", name, "uid", uid, "ref.Name", ref.Name, "ref.UID", ref.UID)
if name == ref.Name && uid == string(ref.UID) && len(tokenData) > 0 {
// found token, the first token found is used
token = string(tokenData)
logger.Info("Found token", "token", token)
break
}

Expand Down

0 comments on commit be67be3

Please sign in to comment.