Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tridentctl erroneously captures kubectl stderr output #892

Open
magicite opened this issue Mar 13, 2024 · 0 comments
Open

tridentctl erroneously captures kubectl stderr output #892

magicite opened this issue Mar 13, 2024 · 0 comments

Comments

@magicite
Copy link

Describe the bug
It looks like tridentctl is erroneously intercepting kubectl stderr. Example:

% ./trident-installer-24.02.0/extras/macos/bin/tridentctl -d version
DEBU[2024-03-12T14:10:11-05:00] >>>> command.ExecuteWithoutLog                args="[get serviceaccount default -o=json]" command=kubectl
DEBU[2024-03-12T14:10:12-05:00] <<<< command.ExecuteWithoutLog                command=kubectl error="<nil>"
Error: invalid character 'W' looking for beginning of value

kubectl in my environment (rancher-deployed cluster) is currently emitting a warning:

% kubectl get nodes
Warning: Use tokens from the TokenRequest API or manually created secret-based tokens instead of auto-generated secret-based tokens.
NAME             STATUS   ROLES                       AGE   VERSION
...

Environment

  • Rancher-deployed cluster, v1.27.11+rke2r1.
  • Trident version: 24.02.0

To Reproduce
Run tridentctl with underlying kubectl configuration using legacy tokens

Expected behavior
tridentctl version output emitted.

Additional context
One way to work around this, which we've done for now, is to disable the LegacyServiceAccountTokenTracking k8s feature gate. That makes the kubectl warning go away, which makes things work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants