Skip to content

Allow using custom kubectl binary#46

Closed
steeve wants to merge 1 commit intomainfrom
unknown repository
Closed

Allow using custom kubectl binary#46
steeve wants to merge 1 commit intomainfrom
unknown repository

Conversation

@steeve
Copy link
Copy Markdown

@steeve steeve commented Oct 28, 2020

Description

Add a kubectl attribute to k8s_deploy, allowing to specify a custom
kubectl binary.

Fix #33

Related Issue

#33

Motivation and Context

Allows for easily wrapping or sandboxing the kubectl binary.

How Has This Been Tested?

Tested locally on macOS with a k3s cluster running in Docker for Mac.

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)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Add a `kubectl` attribute to k8s_deploy, allowing to specify a custom
kubectl binary.

Fix #33

Signed-off-by: Steeve Morin <steeve@zen.ly>
@steeve steeve requested a review from a team as a code owner October 28, 2020 22:18
Copy link
Copy Markdown
Member

@kzadorozhny kzadorozhny left a comment

Choose a reason for hiding this comment

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

My only concern with the change, is that the new k8s_deploy parameter will need to be supported alongside with the toolchain kubectl configuration (which is planned). Overall LGTM. The are couple change requests, tough:

@steeve
Copy link
Copy Markdown
Author

steeve commented Oct 29, 2020

I figure I’d get some feedback before going all the way.

@steeve
Copy link
Copy Markdown
Author

steeve commented Oct 29, 2020

Actually you are right that using a toolchain might be cleaner. I’ll take a look.

@kzadorozhny
Copy link
Copy Markdown
Member

There is another contribution #22 that is left in unmerged state because it is waiting for the toolchain implementation. @michaelschiff is ok with using a fork for now.

I'm not objecting to merging this PR , tough.

"async \"${RUNFILES}/%s\"" % _get_runfile_path(ctx, exe.files_to_run.executable)
]
statements += [
"""async \"${{RUNFILES}}/{}\"""".format(_get_runfile_path(ctx, exe.files_to_run.executable))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any particular reason why you ha switched to a multiline string here (and couple other places)? Most of rules code originated from Google uses "double quoted strings" in situations like those.

This was referenced Feb 2, 2021
@ghost ghost closed this by deleting the head repository May 30, 2023
jinfwhuang pushed a commit to jinfwhuang/rules_gitops that referenced this pull request Dec 8, 2025
This pull request was closed.
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.

Pass custom kubectl binary

2 participants