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

fix: Bypass OAuth errors in lke_cluster_info module #264

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Jan 17, 2023

📝 Description

This change adds logic to the lke_cluster_info module to ignore OAuth errors when attempting to obtain a cluster's KubeConfig. This is necessary as lke:read_only users cannot read a cluster's KubeConfig but should be able to get other info about the cluster.

Additionally, this change alters the token module to return the full PAT after a token is created. This is necessary as the API returns a shortened token on subsequent GET requests.

Resolves #261

✔️ How to Test

make TEST_ARGS="-v lke_cluster_info_ro" test
make TEST_ARGS="-v token_basic" test

@lgarber-akamai lgarber-akamai merged commit 7e27d9c into linode:main Jan 19, 2023
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

Successfully merging this pull request may close these issues.

[Bug]: Need a K8S Read and Write token to see something with lke_cluster_info
3 participants