Skip to content
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

Can I associate a context with a tab? #9090

Closed
pwright opened this issue Nov 7, 2022 · 6 comments
Closed

Can I associate a context with a tab? #9090

pwright opened this issue Nov 7, 2022 · 6 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@pwright
Copy link

pwright commented Nov 7, 2022

Trying to figure out the best way to create a notebook that switches kube context as they proceed thru steps.

With skupper.io we have automatically rendered README.md files to illustrate various examples, eg https://github.com/skupperproject/skupper-example-hello-world

I think it might be possible to redirect the markdown to kui to give a great experience for new skupper users, but I'm new to kui and don't know the best way to approach it.

With skupper, you switch between clusters/namespaces for each procedure 'step', and I thought I could use 'tabs' for this experience, for example:

image

but I'm not sure if it's possible to tie each tab to a kube context, or if there is another approach I should try?

thanks in advance for a super tool, any 'getting started' links appreciated.

currently using steps like:


=== "west"

    ~~~ shell
    kubectl create deployment frontend --image quay.io/skupper/hello-world-frontend
    ~~~

=== "east"

    ~~~ shell
    kubectl create deployment backend --image quay.io/skupper/hello-world-backend --replicas 3
    ~~~

@starpit
Copy link
Contributor

starpit commented Nov 7, 2022

hello there. thanks for sharing some great thoughts!

each top-level tab in kui should lock itself to a kubernetes context, but currently this only happens after a command execution, in that tab, to change context. it should be possible to add support for expressing the desire that this should happen onload, perhaps via a topmatter element.

markdown tabs currently do not have this capability. there also isn't a great way to add any kind of topmatter to a tab (we are using the pymdown/mkdocs syntax, which is pretty limiting in this respect)

one other thing we could do is add a bit of metadata support to kui's markdown code block implementation. right now, you can express things like

```shell
---
execute: now
---
```

i.e. kui does support adding a "topmatter" element to each code block (in this case, the execute: now tells kui that you want it to execute the code block on the initial render, rather than when the user clicks to execute.

we could add context: xxx support, perhaps? or maybe more generally, a suffix: --context west, where kui will automatically add the given suffix to the command line execution?

🤔

@pwright
Copy link
Author

pwright commented Nov 7, 2022

Thanks @starpit
So, if i was to approach this (without major customization), I would set up two top level tabs:

East
0. Set kube context

  1. Perform step
  2. Switch to West tab to perform step X
  3. Perform step

West
0. Set kube context

  1. Perform step
  2. Switch back to East tab to perform step Y
  3. Perform step

I'm not sure how auto-executing steps would help me, so, for now I think my best option is to generate markdown with the context embedded, eg skupper init --namespace west

thanks @starpit Any pointers for new kui users who want to create markdown notebooks, I'm currently using https://github.com/kui-shell/KuiClientTemplate but I dunno if that's the best option... Ideally I want the flow for skupper users to be:

  • Install kui
  • Run the skupper notebook

but is that what folks do? (I'm not finding any doc for that flow)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 5, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 7, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
@k8s-ci-robot
Copy link

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants