GoogleContainerTools / container-debug-support

Language-runtime support files for in-container debugging
Apache License 2.0
93 stars 25 forks source link

Add Kubectl command executor. #11

Closed coollog closed 5 years ago

coollog commented 6 years ago

Should work similarly to (and share a lot of code with) Skaffold in #7.

Kubectl should run kubectl commands, including but not limited to:

TadCordle commented 6 years ago

Should we add a KubectlDownloader as well? Or are we assuming people already have it installed?

coollog commented 6 years ago

@TadCordle We'll assume (and check) that people have it installed. It could come from a variety of places including downloading the binary releases, building from source, installing via gcloud, etc.

TadCordle commented 6 years ago

A couple other questions: What are the intended use cases for this class? Should it be more generalized and low-level (i.e. you just pass in the kubectl flags and options as strings) or should there be specific method calls for each of our use cases (e.g. one for generating the k8s yaml, one of getting logs, etc.)?

coollog commented 6 years ago

@TadCordle

Use cases:

This class should be more low-level and provide just a wrapper for kubectl including subcommands and flags. The higher-level actions like generating YAML will be the responsibility of other classes.