Skip to content

Commit

Permalink
add pod name and namespace to vault logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bakito committed Apr 23, 2024
1 parent f4171f4 commit 2b6778c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controllers/pod-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ func (r *PodReconciler) reconcileVaultPod(ctx context.Context, l logr.Logger, po
return reconcile.Result{}, nil
}

vaultLog := ctrl.Log.WithName("vault").WithValues("stateful-set", vi.StatefulSet)
vaultLog := ctrl.Log.WithName("vault").WithValues(
"namespace", pod.GetNamespace(),
"pod", pod.GetName(),
"stateful-set", vi.StatefulSet,
)

// If the Vault server is sealed, unseal it.
if st.Data.Sealed {
Expand Down

0 comments on commit 2b6778c

Please sign in to comment.