NetApp / trident

Storage orchestrator for containers
Apache License 2.0
756 stars 219 forks source link

tridentctl erroneously captures kubectl stderr output #892

Closed magicite closed 2 months ago

magicite commented 6 months ago

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

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.

vasum0406 commented 2 months ago

This issue has been fixed in 24.06 release.