jupyter-tunnel-secrets

by jupyterjsc

Helm chartv0.1.1App 1.0.0Verified publisher

ExternalSecrets for the Jupyter tunnel service

About this chart

Jupyter tunnel secrets

This chart reads one Vaultwarden item and creates three comparison Secrets: es-tunnel-generics, es-tunnel-keypairs, and es-tunnel-passwds in the release namespace. It does not modify existing Secrets or tunnel consumers. The SecretStore must be accessible from that namespace.

secretStore:
  name: bitwarden-fields
  kind: ClusterSecretStore
  id: vaultwarden-tunnel-item-id
users:
  - jupyterjsc
  - juniq
cleanup:
  - jupyterjsc
  - juniq
optionalFields:
  superuserPass: false
  cleanupEnabled: false

Leave secretStore.id unset to generate nothing. Each list has independent ordering, and hubs can be added without modifying templates. Slugs must consist of lowercase letters and digits, must be unique within each list, and cannot be tunnel (reserved for the superuser).

Vaultwarden item

Store values as plain text; Kubernetes handles Secret data encoding.

Vaultwarden fieldSecret output
sql_database, sql_engine, sql_host, sql_portSQL_DATABASE, SQL_ENGINE, SQL_HOST, SQL_PORT in es-tunnel-generics.
ssh_tunnel, ssh_remotetunnel, remote in es-tunnel-keypairs.
tunnel_username, password_tunnel, tunnel_groupsFirst entries in usernames, passwords, groups; the username must be tunnel. The same password is TUNNEL_USER_PASS.
username_<slug>, password_<slug>, groups_<slug>Subsequent aligned semicolon-separated entries in usernames, passwords, groups for each users slug. Group permissions for one user may be colon-separated.
password_<slug>, url_<slug>For each cleanup slug, aligned entries in JUPYTERHUB_CLEANUP_NAMES, JUPYTERHUB_CLEANUP_TOKENS, and JUPYTERHUB_CLEANUP_URLS; passwords are copied unchanged as tokens.
superuser_passSUPERUSER_PASS when optionalFields.superuserPass is true.
jupyterhub_cleanup_enabledJUPYTERHUB_CLEANUP_ENABLED when optionalFields.cleanupEnabled is true.

An empty cleanup list produces three empty cleanup values. Usernames, passwords, groups, and cleanup values must be nonempty and cannot contain semicolons. The jupyterhub-secrets chart can use the same item ID as secretStores.ids.tunnel; its username_<slug> and password_<slug> fields match this chart.

Existing SSH configurations may refer to per-hub key names such as remote_<slug>. This chart intentionally produces only tunnel and remote; update those configurations before using its keypair Secret.

The templates require an ESO v2 template engine with Sprig's fail function, as supported by ESO v2.0.1. Missing selected fields fail reconciliation.

Deploy jupyter-tunnel-secrets with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has jupyter-tunnel-secrets on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartjupyter-tunnel-secrets is pinned at v0.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply