Allow using custom kubectl binary#46
Conversation
Add a `kubectl` attribute to k8s_deploy, allowing to specify a custom kubectl binary. Fix #33 Signed-off-by: Steeve Morin <steeve@zen.ly>
There was a problem hiding this comment.
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:
- Could you please run buildidifer (
bazel run //:buildifier) to let the CI to go through. - Please update e2e test (
examples/e2e-test.sh) to rely on the feature you are introducing. You can add customkubectlnoop script to https://github.com/adobe/rules_gitops/blob/master/examples/helloworld/BUILD#L50 - Please document new
k8s_deployparameter inREADME.md
|
I figure I’d get some feedback before going all the way. |
|
Actually you are right that using a toolchain might be cleaner. I’ll take a look. |
|
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)) |
There was a problem hiding this comment.
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.
Description
Add a
kubectlattribute to k8s_deploy, allowing to specify a customkubectl binary.
Fix #33
Related Issue
#33
Motivation and Context
Allows for easily wrapping or sandboxing the
kubectlbinary.How Has This Been Tested?
Tested locally on macOS with a k3s cluster running in Docker for Mac.
Types of changes
Checklist: