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

add option to use kubectl with sudo #57

Merged
merged 2 commits into from
Oct 5, 2021
Merged

Conversation

Corwind
Copy link
Contributor

@Corwind Corwind commented Sep 29, 2021

It's useful when using user other than root to be able to use sudo to run kubectl, especially on operating systems that do not allow root login from ssh.

The default behavior does not change as the default value for the new variable is "false" and thus the default command to invoke kubectl does not change either.

@xunleii
Copy link
Owner

xunleii commented Oct 2, 2021

Hi @Corwind, sorry to respond lately.

Thanks for your contribution, I appreciate. This PR just need two things:

  • Running tf fmt in order to keep the code clean (wrong identation)
  • Ignoring the trigger kubectl_cmd on lifecycle because we don't want to recreate resources if we change this value.

@Corwind
Copy link
Contributor Author

Corwind commented Oct 4, 2021

Hi @xunleii I'll look into it today or tomorrow depending on how busy I am today :)

@Corwind
Copy link
Contributor Author

Corwind commented Oct 4, 2021

@xunleii I had a little time to work on it, I updated my version if you want to have a look at it. I added the kubectl_cmd trigger to be ignored on lifecyle and I ran terraform fmt.

@xunleii
Copy link
Owner

xunleii commented Oct 5, 2021

I'll check that this noon or after work. Thanks for your changes 😄

Copy link
Owner

@xunleii xunleii left a comment

Choose a reason for hiding this comment

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

LGTM

@xunleii xunleii merged commit cbdb0d0 into xunleii:master Oct 5, 2021
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.

2 participants