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
Feature request :: Talos context support #1808
Comments
Thanks for posting the code. Given that it invokes I clicked on https://www.talos.dev/ and then on Try it now. The latter gave me 404. I gave up there. |
Don't mind my example above, that was just a personal workaround for illustrative purposes. I agree asynchronous invocation and / or caching is more UX friendly as derived from the current Kubernetes implementation in If you'd like to give it a go, loosely following the Kubernetes example in Regarding some implied questions you had:
Example Talos configuration file: context: orange-spoon
contexts:
orange-spoon:
endpoints:
- talos-control-plane.subnetwork.domain.tld
nodes:
- talos-control-plane-a2c.subnetwork.domain.tld
- talos-control-plane-b8d.subnetwork.domain.tld
- talos-control-plane-c6b.subnetwork.domain.tld
- talos-control-plane-d9f.subnetwork.domain.tld
- talos-control-plane-e1a.subnetwork.domain.tld
- talos-worker-a3d.subnetwork.domain.tld
- talos-worker-b4c.subnetwork.domain.tld
- talos-worker-c8f.subnetwork.domain.tld
- talos-worker-d1a.subnetwork.domain.tld
- talos-worker-e7b.subnetwork.domain.tld
ca: <certificate-contents>
crt: <certificate-contents>
key: <key-contents> Output $ talosctl config info
Current context: orange-spoon
Nodes: talos-control-plane-a2c.subnetwork.domain.tld, talos-control-plane-b8d.subnetwork.domain.tld, talos-control-plane-c6b.subnetwork.domain.tld, talos-control-plane-d9f.subnetwork.domain.tld, talos-control-plane-e1a.subnetwork.domain.tld, talos-worker-a3d.subnetwork.domain.tld, talos-worker-b4c.subnetwork.domain.tld, talos-worker-c8f.subnetwork.domain.tld, talos-worker-d1a.subnetwork.domain.tld, talos-worker-e7b.subnetwork.domain.tld
Endpoints: talos-control-plane.subnetwork.domain.tld
Roles: os:admin
Certificate expires: 10 years from now (2032-03-04) |
Thanks for the info. This should in theory allow me to add |
Thank you for the great Z shell theme, i'm using it daily with great pleasure.
I was wondering if you could consider including suport for Talos context support. As the CLI tool
talosctl
shares similarities withkubectl
, i've skimmed the p10k source for Kubernetes prompt segments and took a stab at it. It kinda worked except for the caching that seemed to give inconsistent results and even show the prompt when there was no Talos configuration set. So instead I made a simple custom section that is less then ideal (see snippet below) to get it working for now.The Talos CLI tool
talosctl
shares similarities withkubectl
in the sense that they can both set contexts (talosctl config context <context-name>
) and can use an environment variable to determine it's current configuration (file)$TALOSCONFIG
. Info regarding the currently set context can be retrieved from the set Talos configuration file or using the CLItalosctl config info
.Currently used snippet (yes, i'm aware of the suboptimal delay due to the recurring
talosctl config info
command that is ran at every new prompt line):Example of a Talos configuration file:
$ cat ~/.talos/config context: orange-spoon contexts: orange-spoon: endpoints: - talos-control-plane.subnetwork.domain.tld ca: ... crt: ... key: ...
If you'd like more information or some testing to be done, let me know. Cheers
The text was updated successfully, but these errors were encountered: