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

parse error: Invalid numeric literal at line 1, column 8 #42

Open
HGCH81 opened this issue Jun 11, 2024 · 1 comment
Open

parse error: Invalid numeric literal at line 1, column 8 #42

HGCH81 opened this issue Jun 11, 2024 · 1 comment

Comments

@HGCH81
Copy link

HGCH81 commented Jun 11, 2024

Hello,

with new kubernetes version v1.28.6 some cluster have problemes with secrets token like:

kubectl get node
Warning: Use tokens from the TokenRequest API or manually created secret-based tokens instead of auto-generated secret-based tokens.

this cause the exception:
parse error: Invalid numeric literal at line 1, column 8

i have had "grep" condition in line 124:

else
    data=$(eval timeout "$TIMEOUT" kubectl get --raw "/$api_path" | grep -i -v "Warn" 2>&1)

I hope this can help other people, and if possible add this to the main script.

In some cases you need to add Decrecated either

| grep -i -v "Warn" | grep -i -v "Deprecat"

Thx

@djerfy
Copy link
Contributor

djerfy commented Jun 11, 2024

Hello,

You can review/change your token, it's better :) It's a important change since Kubernetes v1.28.

Better patch is (for me):

data=$(eval timeout "$TIMEOUT" kubectl get --raw "/$api_path" 2>&1 | grep -Eiv "(Warn|Deprecat)")

Thx

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

No branches or pull requests

2 participants