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

feat: sessions for namespaces #60

Merged
merged 28 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Probably most of the speed gains are because I am bypassing kubectl and just edi
#### Binary
Download and extract the binary.
```zsh
KUBESESS_VERSION=1.2.11 && \
KUBESESS_VERSION=2.0.0 && \
KUBESESS_OS=x86_64-unknown-linux-gnu && \
wget "https://github.com/Ramilito/kubesess/releases/download/${KUBESESS_VERSION}/kubesess_${KUBESESS_VERSION}_${KUBESESS_OS}.tar.gz" && \
mkdir -p $HOME/.kube/kubesess && tar zxpf kubesess_${KUBESESS_VERSION}_${KUBESESS_OS}.tar.gz -C $HOME/.kube/kubesess && \
Expand Down Expand Up @@ -159,7 +159,7 @@ export KUBECONFIG=$HOME/.kube/config:$HOME/.kube/config-demo:$HOME/.kube/config-

> :Note: **The order is important*: the first file will be the master config!

The second way is to let Kubesess handle it by adding one or more .yaml files under the $HOME/.kube folder and it will be automatically merged.
The second way is to let Kubesess handle it by adding one or more config files under the $HOME/.kube folder and it will be automatically merged.

#### Add information to prompt (there are other good tools for this, kube-ps1 and p10k)
```
Expand Down Expand Up @@ -202,8 +202,8 @@ RPROMPT='$(prompt_context)'
- [x] Add tab completion - https://github.com/clap-rs/clap/issues/1232
- [x] Add to brew
- [x] Add support for multiple .kube/config files
- [ ] Add support for multiple namespace per session
- [ ] Add error handling
- [x] Add support for multiple namespace per session
- [x] Add error handling

## Troubleshooting

Expand All @@ -224,14 +224,21 @@ This is how the ```$KUBECONFIG``` should look like (replace ```${USER}``` with y

This is how the generated file should look like:
```yaml
kind: Config
apiVersion: v1
current-context: docker-desktop
clusters:
- name: docker-desktop
cluster:
server: https://kubernetes.docker.internal:6443
certificate-authority-data: REDACTED
users:
- name: docker-desktop
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
contexts:
- context:
namespace: default
- name: docker-desktop
context:
cluster: docker-desktop
user: docker-desktop
name: docker-desktop
namespace: default
current-context: docker-desktop
```

5 changes: 0 additions & 5 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: tale/kubectl-action@v1
with:
base64-kube-config: ${{ inputs.KUBECONFIG }}
- name: Test
run: |
cargo check
cargo test --all
env:
KUBECONFIG: "/home/runner/.kube/config"

Loading
Loading