How can I go get
tsh packages, to embed tsh
in a similar way to how tsh
embeds kubectl
?
#40955
Unanswered
simoncrowe
asked this question in
Q&A
Replies: 1 comment
-
You may want to consider using Depending on your exact use case these may work for you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm part of a platform team working on a Go-based CLI to provide access to Kubernetes clusters, databases, test environments and so on.
We want to add shortcuts to perform common operations that don't exist in
tsh
. Internally, we use a python-based CLI that wrapstsh
with subprocess calls. One downside of this is that it's difficult to package and distribute to people working on different operating systems.In an ideal word, we would import what we need from
tsh
, add our functionality and compile the result into a static binary and ship this to users of the platform.Here's an example of how
kubectl
code is imported intotsh
: https://github.com/gravitational/teleport/blob/v14.3.16/tool/tsh/common/kube.go#L49-L53For Teleport version 14, if I run
I eventually get this error:
I'm not sure if I'm missing something because I'm unfamiliar with how go packaging works, of if version 14 of the code at least, cannot be imported into a n external Go module.
Beta Was this translation helpful? Give feedback.
All reactions