Skip to content

Commit 3129094

Browse files
committed
feat: renamed to kty
1 parent 9d4bb3b commit 3129094

29 files changed

+217
-201
lines changed

.envrc.example

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22

3-
export LOCAL_REGISTRY="kuberift:5432"
3+
export RUST_LOG=none,kuberift=debug
4+
export LOCAL_REGISTRY="kty:5432"
45

5-
export GHCR_USER="me"
6-
export GHCR_TOKEN="token"
6+
# export GHCR_USER="me"
7+
# export GHCR_TOKEN="token"
8+
9+
# Egress Tunnel
10+
# export HOSTNAME="nginx-deployment-65fcddc477-7hbsr"
11+
# export POD_UID="bb907585-5a0e-4920-b789-7d23aa31113e"
12+
# export POD_IP="198.19.248.254"

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ jobs:
5555
5656
- name: rename
5757
run: |-
58-
cp target/release/kuberift kuberift-${{ matrix.os }}-${{ matrix.arch }}
58+
cp target/release/kty kty-${{ matrix.os }}-${{ matrix.arch }}
5959
6060
- uses: actions/upload-artifact@v4
6161
with:
62-
name: kuberift-${{ matrix.os }}-${{ matrix.arch }}
63-
path: kuberift*
62+
name: kty-${{ matrix.os }}-${{ matrix.arch }}
63+
path: kty*
6464
retention-days: 1
6565

6666
# The state of include/exclude in matrices is tough because we want to add the

.github/workflows/docker.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ env:
2828
RUST_BACKTRACE: 1
2929
CARGO_INCREMENTAL: 0
3030
RUSTFLAGS: -D warnings
31-
IMAGE: ghcr.io/grampelberg/kuberift
32-
CACHE: ghcr.io/grampelberg/cache/kuberift
31+
IMAGE: ghcr.io/grampelberg/kty
32+
CACHE: ghcr.io/grampelberg/cache/kty
3333

3434
jobs:
3535
build:
@@ -67,7 +67,7 @@ jobs:
6767
uses: docker/build-push-action@v6
6868
with:
6969
context: .
70-
file: docker/kuberift.dockerfile
70+
file: docker/kty.dockerfile
7171
platforms: ${{ inputs.os }}/${{ inputs.arch }}
7272

7373
cache-from: type=registry,ref=${{ env.CACHE }}

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- v*
99

1010
env:
11-
IMAGE: ghcr.io/grampelberg/kuberift
11+
IMAGE: ghcr.io/grampelberg/kty
1212

1313
concurrency:
1414
group: |-
@@ -88,7 +88,7 @@ jobs:
8888
- uses: actions/upload-artifact@v4
8989
if: ${{ github.event_name != 'pull_request' }}
9090
with:
91-
name: kuberift-docker-binaries
91+
name: kty-docker-binaries
9292
path: /tmp/bins/*
9393
retention-days: 1
9494

@@ -149,7 +149,7 @@ jobs:
149149
- uses: actions/download-artifact@v4
150150
with:
151151
path: /tmp/binaries
152-
pattern: kuberift-*
152+
pattern: kty-*
153153
merge-multiple: true
154154

155155
- uses: actions/download-artifact@v4

Cargo.lock

+61-61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
2-
name = "kuberift"
2+
name = "kty"
33
version.workspace = true
44
authors.workspace = true
5-
description = "SSH into a Kubernetes cluster"
5+
description = "SSH into Kubernetes"
6+
homepage.workspace = true
67
documentation.workspace = true
78
license-file.workspace = true
89
edition.workspace = true
@@ -13,12 +14,13 @@ categories.workspace = true
1314
[workspace.package]
1415
version = "0.0.0-UNSTABLE"
1516
authors = ["Thomas Rampelberg <thomas@saunter.org>"]
16-
documentation = "https://github.com/grampelberg/kubrift"
17+
homepage = "https://kty.dev"
18+
documentation = "https://kty.dev"
1719
edition = "2021"
1820
license-file = "LICENSE"
19-
repository = "https://github.com/grampelberg/kuberift"
21+
repository = "https://github.com/grampelberg/kty"
2022
keywords = ["cli", "kubernetes", "ssh", "tui", "terminal"]
21-
categories = ["command-line-interface"]
23+
categories = ["command-line-interface", "development-tools", "virtualization"]
2224

2325
[dependencies]
2426
ansi-to-tui = "6.0.0"

DEVELOPMENT.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ want to upload directly to github.
3838
We recommend using [k3d][k3d] to run a local cluster. To setup:
3939

4040
```bash
41-
k3d cluster create kuberift --registry-create kuberift:5432
41+
k3d cluster create kty --registry-create kty:5432
4242
```
4343

4444
Next, you'll want to add the registry to your `/etc/hosts`:
4545

4646
```bash
47-
echo "127.0.0.1 kuberift" | sudo tee -a /etc/hosts
47+
echo "127.0.0.1 kty" | sudo tee -a /etc/hosts
4848
```
4949

50-
When you run `just dev-push`, an image at `kuberift:5432/kuberift:latest` will
51-
be available to run inside the cluster.
50+
When you run `just dev-push`, an image at `kty:5432/kty:latest` will be
51+
available to run inside the cluster.
5252

5353
[k3d]: https://k3d.io/v5.6.3/#releases
5454

@@ -57,7 +57,7 @@ be available to run inside the cluster.
5757
The global debug level can be overly noisy. Instead of doing `-vvvv`, try:
5858

5959
```bash
60-
RUST_LOG=none,kuberift=debug
60+
RUST_LOG=none,kty=debug
6161
```
6262

6363
## Ingress Tunnel

README.md

+24-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
# kuberift
1+
# kty
22

3-
SSH into your Kubernetes cluster! kuberift is an SSH server that provides a
4-
TUI-based dashboard in your cluster. There's no need to manage SSH keys however.
5-
It works with OpenID providers, such as Github or Google and impersonates users
6-
to provide them with the same permissions they normally would have - all based
7-
on the standard RBAC mechanisms.
3+
SSH into Kubernetes. kty is the easiest way to access resources such as pods on
4+
your cluster - all without `kubectl`. Once kty is installed on your cluster,
5+
`ssh` gives you a dashboard to interact with the cluster.
86

97
You can:
108

11-
- Get a shell in running pods - just like you would with SSH normally.
9+
- Use your Github or Google account to log into the cluster. No more annoying
10+
`kubectl` auth plugins.
11+
- Get a shell running in pods - just like you would when SSH'n into a host
12+
normally.
1213
- Access the logs for running and exited containers in a pod.
13-
- Forward a local port remotely, allowing access to services and pods in the
14-
cluster.
15-
- Forward a remote service to your local system.
16-
- `scp` files from pods. sftp clients work as well.
14+
- Forward traffic from your local machine into the cluster or from the cluster
15+
to your local machine.
16+
- `scp` or `sftp` files from pods.
17+
- Access the cluster from any device that has an SSH client, from phones to
18+
embedded devices.
19+
20+
kty is an SSH server written in rust which provides a TUI-based dashboard that
21+
maps Kubernetes concepts to SSH. It relies on OpenID providers such as Github or
22+
Google to verify your identity. Kubernetes RBAC validates access, just like
23+
`kubectl` does, respecting your organizational policies.
1724

1825
![demo](./assets/demo.gif)
1926

@@ -25,7 +32,7 @@ You can:
2532
- [Deployment](docs/deployment.md) - Figure out how to get running on your own
2633
cluster.
2734
- [Development](DEVELOPMENT.md) - Some tips and tricks for doing development on
28-
kuberift itself.
35+
kty itself.
2936
- [Metrics](docs/metrics.md) - List of the possible metrics exported via.
3037
prometheus.
3138

@@ -45,13 +52,13 @@ You can:
4552
login and the providers available can all be configured.
4653

4754
```bash
48-
kuberift users grant <cluster-role> <email-address>
55+
kty users grant <cluster-role> <email-address>
4956
```
5057

5158
1. Start the server.
5259

5360
```bash
54-
kuberift --serve
61+
kty --serve
5562
```
5663

5764
1. SSH into your cluster!
@@ -81,7 +88,7 @@ From this point, here's a few suggestions for things to check out:
8188
Note: you'll want to install on-cluster to use the tunnelling functionality.
8289
Check out the [helm](docs/deployment.md#helm) docs for a quick way to do that.
8390

84-
[cli-download]: https://github.com/grampelberg/kuberift/releases
91+
[cli-download]: https://github.com/grampelberg/kty/releases
8592
[k3d]: https://k3d.io
8693

8794
## Interaction
@@ -132,11 +139,11 @@ ssh my-node-username@localhost -p 3333
132139

133140
You can forward a remote service on your cluster to a port on your local host.
134141

135-
To forward port 8080 on service `default/kuberift` to port `9090` on your local
142+
To forward port 8080 on service `default/kty` to port `9090` on your local
136143
system, you can run:
137144

138145
```bash
139-
ssh me@my-cluster -p 2222 -R default/kuberift:8080:localhost:9090
146+
ssh me@my-cluster -p 2222 -R default/kty:8080:localhost:9090
140147
```
141148

142149
The format for service definitions is `<namespace>/<service-name>`.

TODO.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@
105105

106106
- Figure out why `git cliff` goes `0.2.0` -> `0.2.1` -> `0.3.0` instead of
107107
`0.2.2`.
108-
- Move client_id and config_url to a build-time concern.
108+
- Move client_id and config_url to a build-time concern. I'm not sure this will
109+
be great for the development experience. Is there a way to have defaults but
110+
override them? Maybe with a dev instance of auth0?
111+
- Publish to crates.io.
109112

110113
## Deployment
111114

build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Build script for kuberift.
1+
//! Build script for kty.
22
33
static PH_VAR: &str = "POSTHOG_API_KEY";
44

docker/kuberift.dockerfile docker/kty.dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ RUN apt-get update && apt-get install -y \
3030
&& \
3131
apt-get clean
3232

33-
COPY --from=builder /app/target/release/kuberift /usr/local/bin
34-
CMD ["/usr/local/bin/kuberift", "serve", "-vv"]
33+
COPY --from=builder /app/target/release/kty /usr/local/bin
34+
CMD ["/usr/local/bin/kty", "serve", "-vv"]

docs/architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Architecture
22

3-
Kuberift is a standalone SSH server which provides much of the standard SSH
3+
kty is a standalone SSH server which provides much of the standard SSH
44
functionality as if a Kubernetes cluster was a single host. This allows for
55
`ssh me@my-cluster` to provide a shell in a running pod, tunneling between
66
resources without a VPN and copying files from the cluster. By leveraging OpenID

0 commit comments

Comments
 (0)