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: kubectl with gke-gcloud-auth-plugin, unbound variable #77

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

tino415
Copy link
Contributor

@tino415 tino415 commented May 17, 2023

Remove forcing all variables to be bound in shell scripts that are run when gcloud commands are executed

Description

Remove set -u option from scripts executed when gcloud commands are executed to support commands without arguments for instance gke-gcloud-auth-plugin

Motivation and Context

gcloud kubectl was not working because it is using command without argument under the hood.
It fixes this issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Usage examples

kubectl get pods without error.

How Has This Been Tested?

Installed locally and tried to run kubectl get pods

Checklist:

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@tino415 tino415 changed the title Fix kubectl with gke-gcloud-auth-plugin, unbound variable fix: kubectl with gke-gcloud-auth-plugin, unbound variable May 17, 2023
@tino415 tino415 force-pushed the fix/gcloud-kubernetes branch from ead982a to ed1501c Compare May 17, 2023 20:15
@sodabrew
Copy link

sodabrew commented May 18, 2023

+1 this worked for me, too. (comment edit: removed red herring alternative suggestion)

Copy link
Owner

@jthegedus jthegedus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, thanks for the update 💯

@jthegedus jthegedus merged commit d13787e into jthegedus:main Jun 18, 2023
@tino415 tino415 deleted the fix/gcloud-kubernetes branch July 12, 2023 07:56
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: Using gcloud without any parameters will crash
3 participants