diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d8c70c1..9d9bc978 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Render and lint all chart overlays run: make helm-lint - name: Package chart - run: helm package deploy/helm/openshell-dashboard --version 0.0.0-dev --app-version sha-test --destination "$RUNNER_TEMP" + run: helm package deploy/helm/console --version 0.0.0-dev --app-version sha-test --destination "$RUNNER_TEMP" - name: Helm unit tests run: | helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.3 @@ -42,7 +42,7 @@ jobs: - name: Generated chart README is current run: | make helm-docs - git diff --exit-code -- deploy/helm/openshell-dashboard/README.md + git diff --exit-code -- deploy/helm/console/README.md # On a pull request the two check-* jobs do their work only when their half # of the tree changed. On a push, to main or to a release branch, they always @@ -322,7 +322,9 @@ jobs: # the job's GitHub OIDC token for a one-hour token of the robot ai-openshell+console_release, # which can write quay.io/ai-openshell/console and its chart and nothing # else. Quay hands that token out only to the exact subject - # repo:ai-openshell/console:environment:release, and the environment admits + # repo:ai-openshell@311201172/console@1316331667:environment:release (the + # repository uses GitHub's immutable subjects, which carry the owner's and + # the repository's IDs; see docs/releasing.md), and the environment admits # main and release/** only, so a pull request cannot get it even if it edits # this file: its subject is ...:pull_request, which no robot trusts. A pull # request gets no image. @@ -566,10 +568,10 @@ jobs: if: steps.tip.outputs.is_tip == 'true' run: | set -euo pipefail - helm package deploy/helm/openshell-dashboard --version 0.0.0-dev \ + helm package deploy/helm/console --version 0.0.0-dev \ --app-version "sha-${GITHUB_SHA::7}" --destination "$RUNNER_TEMP" - helm push "$RUNNER_TEMP/openshell-dashboard-0.0.0-dev.tgz" \ - "oci://quay.io/${GITHUB_REPOSITORY,,}/helm-chart" + helm push "$RUNNER_TEMP/console-0.0.0-dev.tgz" \ + "oci://quay.io/ai-openshell/charts" # The release pipeline (publish.yml, scripts/release/) runs for real only on # main and on release branches, after a merge. This job is where a mistake in diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 10bc4b2f..71ba1ebc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -225,8 +225,8 @@ jobs: VERSION: ${{ needs.publish.outputs.version }} run: | set -euo pipefail - registry="oci://quay.io/${GITHUB_REPOSITORY,,}/helm-chart" - ref="$registry/openshell-dashboard" + registry="oci://quay.io/ai-openshell/charts" + ref="$registry/console" if helm show chart "$ref" --version "$VERSION" > "$RUNNER_TEMP/chart-lookup.log" 2>&1; then echo "Chart $ref:$VERSION already exists; leaving immutable version untouched." exit 0 @@ -235,6 +235,6 @@ jobs: cat "$RUNNER_TEMP/chart-lookup.log" exit 1 fi - helm package deploy/helm/openshell-dashboard --version "$VERSION" \ + helm package deploy/helm/console --version "$VERSION" \ --app-version "$VERSION" --destination "$RUNNER_TEMP" - helm push "$RUNNER_TEMP/openshell-dashboard-${VERSION}.tgz" "$registry" + helm push "$RUNNER_TEMP/console-${VERSION}.tgz" "$registry" diff --git a/AGENTS.md b/AGENTS.md index c5c67faa..0d07de8c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ backend/ Go BFF; the compat suite is in test/compat/ (make compat, ne pkg/clients/ Bearer forwarding (auth.go) and the direct gRPC calls (raw*.go) pkg/models/ Response DTOs (From*() converters) and request builders scripts/ Release and CI tooling (gateway-range.mjs, release/, retag-image.sh) and dev-env.sh (the local stack) -deploy/ Dockerfile, Helm chart (helm/openshell-dashboard), Keycloak realm (keycloak/), local stack (dev/), compat stack and gateway pins (ci/) +deploy/ Dockerfile, Helm chart (helm/console), Keycloak realm (keycloak/), local stack (dev/), compat stack and gateway pins (ci/) docs/ Guides (install, authentication, configuration, compatibility, development, architecture, releasing) and ADRs (adrs/) ``` diff --git a/Makefile b/Makefile index 22634105..d97438d7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -IMAGE_NAME ?= openshell-dashboard +IMAGE_NAME ?= console TAG ?= latest PLATFORMS ?= linux/amd64,linux/arm64 @@ -65,7 +65,7 @@ dev-reset: ## Stop it and delete its data and its sandboxes' containers scripts/dev-env.sh reset build: ## Build the container image (BFF + static frontend) - docker build -t openshell-dashboard:latest -f deploy/Dockerfile . + docker build -t console:latest -f deploy/Dockerfile . buildx: docker buildx build \ @@ -128,7 +128,7 @@ helm-lint: ## Lint and render Helm charts and their example values [ -f "$$chart_file" ] || continue; \ chart=$${chart_file%/Chart.yaml}; \ set --; \ - if [ "$$chart" = deploy/helm/openshell-dashboard ]; then \ + if [ "$$chart" = deploy/helm/console ]; then \ set -- --set-string oidc.issuer=https://idp.example.com/realms/openshell; \ fi; \ helm lint "$$chart" "$$@"; \ diff --git a/README.md b/README.md index eac6b209..f0f07429 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ The dashboard is installed with its Helm chart, in the namespace of the gateway Create the Secret the auth proxy reads: ```sh -kubectl -n openshell create secret generic openshell-dashboard-oidc \ - --from-literal=client-secret='' \ +kubectl -n openshell create secret generic console-oidc \ + --from-literal=client-secret='' \ --from-literal=cookie-secret="$(openssl rand -hex 16)" ``` @@ -55,8 +55,8 @@ networkPolicy: Install the chart: ```sh -helm upgrade --install openshell-dashboard \ - oci://quay.io/ai-openshell/console/helm-chart/openshell-dashboard \ +helm upgrade --install console \ + oci://quay.io/ai-openshell/charts/console \ --version --namespace openshell -f values.yaml ``` @@ -106,7 +106,7 @@ gateway does not return a total count. - [Architecture](docs/architecture.md): components, principles, roles - [Releasing](docs/releasing.md): how a release is cut and numbered - [Decision records](docs/adrs/README.md) -- [Helm chart](deploy/helm/openshell-dashboard/README.md): every chart value +- [Helm chart](deploy/helm/console/README.md): every chart value ## Development diff --git a/SECURITY.md b/SECURITY.md index df321de0..2464237d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -21,7 +21,7 @@ This policy covers the OpenShell Dashboard codebase: - **React frontend** (`frontend/`) — UI components and API hooks - **Container image** — Dockerfile, build pipeline - **CI/CD** — GitHub Actions workflows -- **Helm chart and example files** (`deploy/helm/openshell-dashboard`, `deploy/keycloak`) — the chart is what keeps the auth proxy the only path to the BFF +- **Helm chart and example files** (`deploy/helm/console`, `deploy/keycloak`) — the chart is what keeps the auth proxy the only path to the BFF For vulnerabilities in the OpenShell gateway itself, report to the [NVIDIA OpenShell project](https://github.com/NVIDIA/OpenShell) via NVIDIA PSIRT. diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 8ea4fac0..52400aa0 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -113,7 +113,7 @@ func main() { app.SetProviderProfiles(clients.raw) addr := net.JoinHostPort(*listenAddress, *port) - slog.Info("openshell-dashboard BFF listening", + slog.Info("console BFF listening", "addr", addr, "scheme", inboundScheme(*tlsCert, *tlsKey), "gateway", *gatewayURL, diff --git a/deploy/Dockerfile b/deploy/Dockerfile index dd15a82b..77ed83e9 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -30,7 +30,7 @@ RUN CGO_ENABLED=0 go build -o /out/server ./cmd/server FROM alpine:3.20 RUN adduser -D -u 1001 dashboard USER 1001 -COPY --from=backend /out/server /usr/local/bin/openshell-dashboard +COPY --from=backend /out/server /usr/local/bin/console COPY --from=frontend /app/frontend/dist /srv/static ENV PORT=8080 \ STATIC_DIR=/srv/static @@ -61,4 +61,4 @@ ARG OPENSHELL_SDK_VERSION="" LABEL io.github.ai-openshell.console.gateway.line="${GATEWAY_RELEASE_LINE}" \ io.github.ai-openshell.console.sdk="${OPENSHELL_SDK_VERSION}" -ENTRYPOINT ["/usr/local/bin/openshell-dashboard"] +ENTRYPOINT ["/usr/local/bin/console"] diff --git a/deploy/helm/openshell-dashboard/.helmignore b/deploy/helm/console/.helmignore similarity index 100% rename from deploy/helm/openshell-dashboard/.helmignore rename to deploy/helm/console/.helmignore diff --git a/deploy/helm/openshell-dashboard/Chart.yaml b/deploy/helm/console/Chart.yaml similarity index 90% rename from deploy/helm/openshell-dashboard/Chart.yaml rename to deploy/helm/console/Chart.yaml index aa50b0a1..0c3f7e02 100644 --- a/deploy/helm/openshell-dashboard/Chart.yaml +++ b/deploy/helm/console/Chart.yaml @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 OpenShell Dashboard contributors # SPDX-License-Identifier: Apache-2.0 apiVersion: v2 -name: openshell-dashboard +name: console description: OIDC-protected web dashboard for an OpenShell gateway type: application version: 0.0.0 diff --git a/deploy/helm/openshell-dashboard/README.md b/deploy/helm/console/README.md similarity index 88% rename from deploy/helm/openshell-dashboard/README.md rename to deploy/helm/console/README.md index e1ec2b2f..602da36f 100644 --- a/deploy/helm/openshell-dashboard/README.md +++ b/deploy/helm/console/README.md @@ -15,8 +15,8 @@ Deploys one stateless dashboard Deployment alongside an [OpenShell gateway](http - A Secret with that client's secret and a cookie secret. The chart does not create it: ```sh -kubectl -n openshell create secret generic openshell-dashboard-oidc \ - --from-literal=client-secret='' \ +kubectl -n openshell create secret generic console-oidc \ + --from-literal=client-secret='' \ --from-literal=cookie-secret="$(openssl rand -hex 16)" ``` @@ -48,8 +48,8 @@ networkPolicy: Install the published chart: ```sh -helm upgrade --install openshell-dashboard \ - oci://quay.io/ai-openshell/console/helm-chart/openshell-dashboard \ +helm upgrade --install console \ + oci://quay.io/ai-openshell/charts/console \ --version --namespace openshell -f values.yaml ``` @@ -63,14 +63,14 @@ These files are in the repository, not in the packaged chart. CI renders each on | File | When it applies | |---|---| -| [`values-keycloak.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-keycloak.yaml) | Keycloak as the identity provider: the role gate, PKCE, and a sign-out that ends the Keycloak session | -| [`values-gateway-api.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-gateway-api.yaml) | An HTTPRoute attached to an existing Gateway | -| [`values-port-forward.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-port-forward.yaml) | A trial through `kubectl port-forward`, without an ingress | -| [`values-route-edge.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-route-edge.yaml) | An OpenShift Route that terminates TLS at the router | -| [`values-route-reencrypt.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-route-reencrypt.yaml) | An OpenShift Route with reencrypt, where oauth2-proxy serves HTTPS | -| [`values-openshift-scc.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-openshift-scc.yaml) | OpenShift's `restricted-v2` SCC, which assigns the user and group | -| [`values-mtls-client-cert.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-mtls-client-cert.yaml) | A gateway that requires a client certificate and has no OIDC | -| [`values-tls-disabled.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-tls-disabled.yaml) | A gateway that runs without TLS, on a trusted network | +| [`values-keycloak.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-keycloak.yaml) | Keycloak as the identity provider: the role gate, PKCE, and a sign-out that ends the Keycloak session | +| [`values-gateway-api.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-gateway-api.yaml) | An HTTPRoute attached to an existing Gateway | +| [`values-port-forward.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-port-forward.yaml) | A trial through `kubectl port-forward`, without an ingress | +| [`values-route-edge.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-route-edge.yaml) | An OpenShift Route that terminates TLS at the router | +| [`values-route-reencrypt.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-route-reencrypt.yaml) | An OpenShift Route with reencrypt, where oauth2-proxy serves HTTPS | +| [`values-openshift-scc.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-openshift-scc.yaml) | OpenShift's `restricted-v2` SCC, which assigns the user and group | +| [`values-mtls-client-cert.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-mtls-client-cert.yaml) | A gateway that requires a client certificate and has no OIDC | +| [`values-tls-disabled.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-tls-disabled.yaml) | A gateway that runs without TLS, on a trusted network | ## Configuration notes @@ -153,7 +153,7 @@ These files are in the repository, not in the packaged chart. CI renders each on | httpRoute.gateway.sectionName | string | `""` | Listener name when attaching to an existing Gateway. Set it to the HTTPS listener: without it the route attaches to every listener that admits it. For a Gateway this chart creates, the chart sets it. | | httpRoute.hostnames | list | `[]` | Public hostnames; first hostname supplies callback URL if redirectURL is empty. | | imagePullSecrets | list | `[]` | Image pull secrets for the dashboard pod. | -| nameOverride | string | `"openshell-dashboard"` | Resource name override; pod identity label remains openshell-dashboard. | +| nameOverride | string | `"console"` | Resource name override; the pod's app.kubernetes.io/name label stays console. | | networkPolicy.enabled | bool | `true` | Restrict ingress to the proxy port from the ingress controller namespace. | | networkPolicy.ingressFrom | list | `[]` | Optional ingress peers replacing the default namespace selector (e.g. host-network routers or Gateway data-plane pods). | | networkPolicy.ingressNamespace | string | `""` | Namespace of ingress data-plane pods. Defaults to openshift-ingress for Routes; required for HTTPRoute unless ingressFrom is set. | @@ -164,10 +164,10 @@ These files are in the repository, not in the packaged chart. CI renders each on | oidc.audience | string | `"openshell-api"` | Expected audience claim for the API resource server. IdP must add it to token aud. Purely informational: the chart only prints it in the post-install notes. | | oidc.backendLogoutURL | string | `"auto"` | IdP logout URL oauth2-proxy calls from the pod when a user signs out (HTTP GET), so the IdP session ends too; {id_token} is replaced with the session ID token. `auto` derives it from the issuer for provider keycloak-oidc (`/protocol/openid-connect/logout?id_token_hint={id_token}`) and sets none for other providers. Empty disables backend logout. Separate from dashboard.logoutURL. | | oidc.caConfigMapName | string | `""` | ConfigMap with ca.crt to trust private issuer TLS (also set on gateway). | -| oidc.clientId | string | `"openshell-dashboard"` | OAuth2-proxy OIDC client ID. | +| oidc.clientId | string | `"console"` | OAuth2-proxy OIDC client ID. | | oidc.clientIdSecretKey | string | `""` | Optional key in oidc.existingSecret holding client ID; when set, takes precedence over oidc.clientId. | | oidc.codeChallengeMethod | string | `""` | PKCE challenge method (e.g. S256); empty disables PKCE for providers that do not support it. | -| oidc.existingSecret | string | `"openshell-dashboard-oidc"` | Existing Secret containing keys client-secret and cookie-secret. | +| oidc.existingSecret | string | `"console-oidc"` | Existing Secret containing keys client-secret and cookie-secret. | | oidc.issuer | string | `""` | OIDC issuer URL (e.g. https://keycloak.example.com/realms/openshell) | | oidc.provider | string | `"oidc"` | oauth2-proxy provider (oidc for generic OIDC, keycloak-oidc for Keycloak role filtering). | | oidc.redirectURL | string | `""` | Full public callback URL; required when host is dynamically allocated. Empty derives from Route/HTTPRoute host. | @@ -183,13 +183,13 @@ These files are in the repository, not in the packaged chart. CI renders each on | podLabels | object | `{}` | Extra pod labels; cannot override identity/instance selector labels. | | podLifecycle.terminationGracePeriodSeconds | int | `30` | Pod termination grace period in seconds. | | podSecurityContext.fsGroup | int | `1000` | fsGroup of the pod; on OpenShift set podSecurityContext to null. | -| probes.liveness.dashboardCommand | list | `["/usr/local/bin/openshell-dashboard","--healthcheck"]` | Dashboard exec command for liveness. | +| probes.liveness.dashboardCommand | list | `["/usr/local/bin/console","--healthcheck"]` | Dashboard exec command for liveness. | | probes.liveness.failureThreshold | int | `3` | Liveness probe failure threshold. | | probes.liveness.periodSeconds | int | `10` | Liveness probe period in seconds. | -| probes.readiness.dashboardCommand | list | `["/usr/local/bin/openshell-dashboard","--healthcheck"]` | Dashboard exec command for readiness. | +| probes.readiness.dashboardCommand | list | `["/usr/local/bin/console","--healthcheck"]` | Dashboard exec command for readiness. | | probes.readiness.failureThreshold | int | `3` | Readiness probe failure threshold. | | probes.readiness.periodSeconds | int | `5` | Readiness probe period in seconds. | -| probes.startup.dashboardCommand | list | `["/usr/local/bin/openshell-dashboard","--healthcheck"]` | Dashboard exec command; the default calls the BFF's loopback self-check. | +| probes.startup.dashboardCommand | list | `["/usr/local/bin/console","--healthcheck"]` | Dashboard exec command; the default calls the BFF's loopback self-check. | | probes.startup.failureThreshold | int | `30` | Startup probe failure threshold (dashboard and proxy). | | probes.startup.periodSeconds | int | `2` | Startup probe period in seconds. | | replicaCount | int | `1` | Number of stateless dashboard pods (ignored when autoscaling is enabled). | diff --git a/deploy/helm/openshell-dashboard/README.md.gotmpl b/deploy/helm/console/README.md.gotmpl similarity index 80% rename from deploy/helm/openshell-dashboard/README.md.gotmpl rename to deploy/helm/console/README.md.gotmpl index 048ffecd..5f374cd2 100644 --- a/deploy/helm/openshell-dashboard/README.md.gotmpl +++ b/deploy/helm/console/README.md.gotmpl @@ -15,8 +15,8 @@ Deploys one stateless dashboard Deployment alongside an [OpenShell gateway](http - A Secret with that client's secret and a cookie secret. The chart does not create it: ```sh -kubectl -n openshell create secret generic openshell-dashboard-oidc \ - --from-literal=client-secret='' \ +kubectl -n openshell create secret generic console-oidc \ + --from-literal=client-secret='' \ --from-literal=cookie-secret="$(openssl rand -hex 16)" ``` @@ -48,8 +48,8 @@ networkPolicy: Install the published chart: ```sh -helm upgrade --install openshell-dashboard \ - oci://quay.io/ai-openshell/console/helm-chart/openshell-dashboard \ +helm upgrade --install console \ + oci://quay.io/ai-openshell/charts/console \ --version --namespace openshell -f values.yaml ``` @@ -63,14 +63,14 @@ These files are in the repository, not in the packaged chart. CI renders each on | File | When it applies | |---|---| -| [`values-keycloak.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-keycloak.yaml) | Keycloak as the identity provider: the role gate, PKCE, and a sign-out that ends the Keycloak session | -| [`values-gateway-api.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-gateway-api.yaml) | An HTTPRoute attached to an existing Gateway | -| [`values-port-forward.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-port-forward.yaml) | A trial through `kubectl port-forward`, without an ingress | -| [`values-route-edge.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-route-edge.yaml) | An OpenShift Route that terminates TLS at the router | -| [`values-route-reencrypt.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-route-reencrypt.yaml) | An OpenShift Route with reencrypt, where oauth2-proxy serves HTTPS | -| [`values-openshift-scc.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-openshift-scc.yaml) | OpenShift's `restricted-v2` SCC, which assigns the user and group | -| [`values-mtls-client-cert.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-mtls-client-cert.yaml) | A gateway that requires a client certificate and has no OIDC | -| [`values-tls-disabled.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/openshell-dashboard/ci/values-tls-disabled.yaml) | A gateway that runs without TLS, on a trusted network | +| [`values-keycloak.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-keycloak.yaml) | Keycloak as the identity provider: the role gate, PKCE, and a sign-out that ends the Keycloak session | +| [`values-gateway-api.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-gateway-api.yaml) | An HTTPRoute attached to an existing Gateway | +| [`values-port-forward.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-port-forward.yaml) | A trial through `kubectl port-forward`, without an ingress | +| [`values-route-edge.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-route-edge.yaml) | An OpenShift Route that terminates TLS at the router | +| [`values-route-reencrypt.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-route-reencrypt.yaml) | An OpenShift Route with reencrypt, where oauth2-proxy serves HTTPS | +| [`values-openshift-scc.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-openshift-scc.yaml) | OpenShift's `restricted-v2` SCC, which assigns the user and group | +| [`values-mtls-client-cert.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-mtls-client-cert.yaml) | A gateway that requires a client certificate and has no OIDC | +| [`values-tls-disabled.yaml`](https://github.com/ai-openshell/console/blob/main/deploy/helm/console/ci/values-tls-disabled.yaml) | A gateway that runs without TLS, on a trusted network | ## Configuration notes diff --git a/deploy/helm/openshell-dashboard/ci/values-gateway-api.yaml b/deploy/helm/console/ci/values-gateway-api.yaml similarity index 100% rename from deploy/helm/openshell-dashboard/ci/values-gateway-api.yaml rename to deploy/helm/console/ci/values-gateway-api.yaml diff --git a/deploy/helm/openshell-dashboard/ci/values-keycloak.yaml b/deploy/helm/console/ci/values-keycloak.yaml similarity index 94% rename from deploy/helm/openshell-dashboard/ci/values-keycloak.yaml rename to deploy/helm/console/ci/values-keycloak.yaml index 40162abe..670a980a 100644 --- a/deploy/helm/openshell-dashboard/ci/values-keycloak.yaml +++ b/deploy/helm/console/ci/values-keycloak.yaml @@ -21,8 +21,8 @@ oidc: provider: keycloak-oidc issuer: https://keycloak.example.com/realms/openshell - clientId: openshell-dashboard - existingSecret: openshell-dashboard-oidc + clientId: console + existingSecret: console-oidc codeChallengeMethod: S256 adminRole: openshell-admin userRole: openshell-user diff --git a/deploy/helm/openshell-dashboard/ci/values-mtls-client-cert.yaml b/deploy/helm/console/ci/values-mtls-client-cert.yaml similarity index 100% rename from deploy/helm/openshell-dashboard/ci/values-mtls-client-cert.yaml rename to deploy/helm/console/ci/values-mtls-client-cert.yaml diff --git a/deploy/helm/openshell-dashboard/ci/values-openshift-scc.yaml b/deploy/helm/console/ci/values-openshift-scc.yaml similarity index 100% rename from deploy/helm/openshell-dashboard/ci/values-openshift-scc.yaml rename to deploy/helm/console/ci/values-openshift-scc.yaml diff --git a/deploy/helm/openshell-dashboard/ci/values-port-forward.yaml b/deploy/helm/console/ci/values-port-forward.yaml similarity index 84% rename from deploy/helm/openshell-dashboard/ci/values-port-forward.yaml rename to deploy/helm/console/ci/values-port-forward.yaml index b740485f..06ca576b 100644 --- a/deploy/helm/openshell-dashboard/ci/values-port-forward.yaml +++ b/deploy/helm/console/ci/values-port-forward.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # A trial without an ingress, reached through # -# kubectl -n openshell port-forward svc/openshell-dashboard 4180:4180 +# kubectl -n openshell port-forward svc/console 4180:4180 # # The callback below has to be among the client's valid redirect URIs. Without # an explicit redirect URL oauth2-proxy builds an https:// callback, because diff --git a/deploy/helm/openshell-dashboard/ci/values-route-edge.yaml b/deploy/helm/console/ci/values-route-edge.yaml similarity index 100% rename from deploy/helm/openshell-dashboard/ci/values-route-edge.yaml rename to deploy/helm/console/ci/values-route-edge.yaml diff --git a/deploy/helm/openshell-dashboard/ci/values-route-reencrypt.yaml b/deploy/helm/console/ci/values-route-reencrypt.yaml similarity index 91% rename from deploy/helm/openshell-dashboard/ci/values-route-reencrypt.yaml rename to deploy/helm/console/ci/values-route-reencrypt.yaml index ca3888a2..84fadf04 100644 --- a/deploy/helm/openshell-dashboard/ci/values-route-reencrypt.yaml +++ b/deploy/helm/console/ci/values-route-reencrypt.yaml @@ -4,7 +4,7 @@ # Replace destinationCACertificate with the signing CA (not a server cert). authProxy: tls: - secretName: openshell-dashboard-proxy-tls + secretName: console-proxy-tls openshiftRoute: enabled: true host: dashboard.apps.example.com diff --git a/deploy/helm/openshell-dashboard/ci/values-tls-disabled.yaml b/deploy/helm/console/ci/values-tls-disabled.yaml similarity index 100% rename from deploy/helm/openshell-dashboard/ci/values-tls-disabled.yaml rename to deploy/helm/console/ci/values-tls-disabled.yaml diff --git a/deploy/helm/openshell-dashboard/templates/NOTES.txt b/deploy/helm/console/templates/NOTES.txt similarity index 76% rename from deploy/helm/openshell-dashboard/templates/NOTES.txt rename to deploy/helm/console/templates/NOTES.txt index 82381dff..bf237cc8 100644 --- a/deploy/helm/openshell-dashboard/templates/NOTES.txt +++ b/deploy/helm/console/templates/NOTES.txt @@ -1,8 +1,8 @@ {{/* SPDX-FileCopyrightText: Copyright (c) 2026 OpenShell Dashboard contributors SPDX-License-Identifier: Apache-2.0 */}} -{{- $callback := include "openshell-dashboard.redirectURL" . -}} +{{- $callback := include "console.redirectURL" . -}} {{- if .Values.openshiftRoute.enabled }} -Dashboard: https://{{ .Values.openshiftRoute.host | default (printf "" (include "openshell-dashboard.fullname" .)) }} +Dashboard: https://{{ .Values.openshiftRoute.host | default (printf "" (include "console.fullname" .)) }} {{- else if .Values.httpRoute.enabled }} Dashboard: https://{{ first .Values.httpRoute.hostnames | default "" }} {{- else }} @@ -11,12 +11,12 @@ Dashboard: configure openshiftRoute or httpRoute to expose the proxy Service. Register this URL on the OIDC client: Valid redirect URIs (login): {{ $callback | default "" }} -Gateway: {{ include "openshell-dashboard.gatewayURL" . }} +Gateway: {{ include "console.gatewayURL" . }} Verify the IdP access token includes audience {{ .Values.oidc.audience | quote }} (gateway server.oidc.audience). {{- if .Values.gateway.preflight.enabled }} Gateway Service existence was checked in the release namespace. {{- end }} -{{- if not (or (include "openshell-dashboard.backendLogoutURL" .) (contains "rd=http" (.Values.dashboard.logoutURL | default ""))) }} +{{- if not (or (include "console.backendLogoutURL" .) (contains "rd=http" (.Values.dashboard.logoutURL | default ""))) }} Sign-out ends only the dashboard session. The identity provider's session stays, so the next visit signs the same user in again without a password. Set diff --git a/deploy/helm/openshell-dashboard/templates/_helpers.tpl b/deploy/helm/console/templates/_helpers.tpl similarity index 91% rename from deploy/helm/openshell-dashboard/templates/_helpers.tpl rename to deploy/helm/console/templates/_helpers.tpl index 0a56078f..4f1c7622 100644 --- a/deploy/helm/openshell-dashboard/templates/_helpers.tpl +++ b/deploy/helm/console/templates/_helpers.tpl @@ -4,14 +4,14 @@ SPDX-License-Identifier: Apache-2.0 */}} {{/* Expand the name of the chart */}} -{{- define "openshell-dashboard.name" -}} +{{- define "console.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Create default fully qualified app name */}} -{{- define "openshell-dashboard.fullname" -}} +{{- define "console.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,20 +27,20 @@ Create default fully qualified app name {{/* Create chart name and version as used by the chart label */}} -{{- define "openshell-dashboard.chart" -}} +{{- define "console.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Labels */}} -{{- define "openshell-dashboard.selectorLabels" -}} -app.kubernetes.io/name: openshell-dashboard +{{- define "console.selectorLabels" -}} +app.kubernetes.io/name: console app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} -{{- define "openshell-dashboard.labels" -}} -helm.sh/chart: {{ include "openshell-dashboard.chart" . }} -{{ include "openshell-dashboard.selectorLabels" . }} +{{- define "console.labels" -}} +helm.sh/chart: {{ include "console.chart" . }} +{{ include "console.selectorLabels" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} @@ -48,9 +48,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Service account creation */}} -{{- define "openshell-dashboard.serviceAccountName" -}} +{{- define "console.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} -{{- default (include "openshell-dashboard.fullname" .) .Values.serviceAccount.name -}} +{{- default (include "console.fullname" .) .Values.serviceAccount.name -}} {{- else -}} {{- default "default" .Values.serviceAccount.name -}} {{- end -}} @@ -59,7 +59,7 @@ Service account creation {{/* Image definition */}} -{{- define "openshell-dashboard.image" -}} +{{- define "console.image" -}} {{- $image := .image -}} {{- $global := .root.Values.global.image -}} {{- $registry := $image.registry | default $global.registry -}} @@ -74,14 +74,14 @@ Image definition {{/* Sets the gateway URL */}} -{{- define "openshell-dashboard.gatewayURL" -}} +{{- define "console.gatewayURL" -}} {{- .Values.gateway.url | default (printf "%s://%s.%s.svc.cluster.local:8080" (ternary "grpcs" "grpc" .Values.gateway.tls.enabled) .Values.gateway.serviceName .Release.Namespace) -}} {{- end -}} {{/* Sets the dashboard OIDC redirect URL */}} -{{- define "openshell-dashboard.redirectURL" -}} +{{- define "console.redirectURL" -}} {{- if .Values.oidc.redirectURL -}} {{- .Values.oidc.redirectURL -}} {{- else if .Values.openshiftRoute.enabled -}} @@ -95,7 +95,7 @@ Sets the dashboard OIDC redirect URL The IdP logout URL oauth2-proxy calls on sign-out. "auto" derives Keycloak's from the issuer and sets none for other providers; empty sets none. */}} -{{- define "openshell-dashboard.backendLogoutURL" -}} +{{- define "console.backendLogoutURL" -}} {{- $url := .Values.oidc.backendLogoutURL | default "" | toString -}} {{- if eq $url "auto" -}} {{- if and (eq .Values.oidc.provider "keycloak-oidc") .Values.oidc.issuer -}} @@ -109,8 +109,8 @@ the issuer and sets none for other providers; empty sets none. {{/* Value validation */}} -{{- define "openshell-dashboard.validateValues" -}} -{{- $url := include "openshell-dashboard.gatewayURL" . -}} +{{- define "console.validateValues" -}} +{{- $url := include "console.gatewayURL" . -}} {{- if not (or (hasPrefix "grpcs://" $url) (hasPrefix "https://" $url) (hasPrefix "grpc://" $url) (hasPrefix "http://" $url)) -}} {{- fail "gateway.url must start with grpcs://, https://, grpc://, or http://" -}} {{- end -}} diff --git a/deploy/helm/openshell-dashboard/templates/deployment.yaml b/deploy/helm/console/templates/deployment.yaml similarity index 93% rename from deploy/helm/openshell-dashboard/templates/deployment.yaml rename to deploy/helm/console/templates/deployment.yaml index 2bc50d31..b8b525e6 100644 --- a/deploy/helm/openshell-dashboard/templates/deployment.yaml +++ b/deploy/helm/console/templates/deployment.yaml @@ -1,19 +1,19 @@ {{/* SPDX-FileCopyrightText: Copyright (c) 2026 OpenShell Dashboard contributors SPDX-License-Identifier: Apache-2.0 */}} -{{- include "openshell-dashboard.validateValues" . -}} +{{- include "console.validateValues" . -}} apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: - {{- include "openshell-dashboard.selectorLabels" . | nindent 6 }} + {{- include "console.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} @@ -21,12 +21,12 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "openshell-dashboard.labels" . | nindent 8 }} + {{- include "console.labels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "openshell-dashboard.serviceAccountName" . }} + serviceAccountName: {{ include "console.serviceAccountName" . }} automountServiceAccountToken: false terminationGracePeriodSeconds: {{ .Values.podLifecycle.terminationGracePeriodSeconds }} {{- with .Values.imagePullSecrets }} @@ -39,7 +39,7 @@ spec: {{- end }} containers: - name: dashboard - image: {{ include "openshell-dashboard.image" (dict "root" . "image" .Values.dashboard.image) | quote }} + image: {{ include "console.image" (dict "root" . "image" .Values.dashboard.image) | quote }} imagePullPolicy: {{ .Values.dashboard.image.pullPolicy | default .Values.global.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} @@ -65,7 +65,7 @@ spec: - name: LOGOUT_URL value: {{ .Values.dashboard.logoutURL | quote }} - name: OPENSHELL_GATEWAY_URL - value: {{ include "openshell-dashboard.gatewayURL" . | quote }} + value: {{ include "console.gatewayURL" . | quote }} {{- if .Values.gateway.caSecretName }} - name: GATEWAY_CA_CERT value: /etc/openshell/gateway/ca.crt @@ -112,7 +112,7 @@ spec: {{- end }} {{- end }} - name: oauth2-proxy - image: {{ include "openshell-dashboard.image" (dict "root" . "image" .Values.authProxy.image) | quote }} + image: {{ include "console.image" (dict "root" . "image" .Values.authProxy.image) | quote }} imagePullPolicy: {{ .Values.authProxy.image.pullPolicy | default .Values.global.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} @@ -131,10 +131,10 @@ spec: {{- else }} - "--http-address=0.0.0.0:{{ .Values.authProxy.port }}" {{- end }} - {{- with (include "openshell-dashboard.redirectURL" .) }} + {{- with (include "console.redirectURL" .) }} - --redirect-url={{ . }} {{- end }} - {{- with (include "openshell-dashboard.backendLogoutURL" .) }} + {{- with (include "console.backendLogoutURL" .) }} - {{ printf "--backend-logout-url=%s" . | quote }} {{- end }} {{- with .Values.oidc.scope }} diff --git a/deploy/helm/openshell-dashboard/templates/gateway-preflight.yaml b/deploy/helm/console/templates/gateway-preflight.yaml similarity index 100% rename from deploy/helm/openshell-dashboard/templates/gateway-preflight.yaml rename to deploy/helm/console/templates/gateway-preflight.yaml diff --git a/deploy/helm/openshell-dashboard/templates/gateway.yaml b/deploy/helm/console/templates/gateway.yaml similarity index 85% rename from deploy/helm/openshell-dashboard/templates/gateway.yaml rename to deploy/helm/console/templates/gateway.yaml index 31ef1e40..c3944619 100644 --- a/deploy/helm/openshell-dashboard/templates/gateway.yaml +++ b/deploy/helm/console/templates/gateway.yaml @@ -4,9 +4,9 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: - name: {{ .Values.httpRoute.gateway.name | default (include "openshell-dashboard.fullname" .) }} + name: {{ .Values.httpRoute.gateway.name | default (include "console.fullname" .) }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} spec: gatewayClassName: {{ .Values.httpRoute.gateway.className }} listeners: diff --git a/deploy/helm/openshell-dashboard/templates/hpa.yaml b/deploy/helm/console/templates/hpa.yaml similarity index 84% rename from deploy/helm/openshell-dashboard/templates/hpa.yaml rename to deploy/helm/console/templates/hpa.yaml index a8827b72..85b93c3d 100644 --- a/deploy/helm/openshell-dashboard/templates/hpa.yaml +++ b/deploy/helm/console/templates/hpa.yaml @@ -4,14 +4,14 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: diff --git a/deploy/helm/openshell-dashboard/templates/httproute.yaml b/deploy/helm/console/templates/httproute.yaml similarity index 82% rename from deploy/helm/openshell-dashboard/templates/httproute.yaml rename to deploy/helm/console/templates/httproute.yaml index 6109f58e..0cad7578 100644 --- a/deploy/helm/openshell-dashboard/templates/httproute.yaml +++ b/deploy/helm/console/templates/httproute.yaml @@ -4,16 +4,16 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: parentRefs: - - name: {{ .Values.httpRoute.gateway.name | default (include "openshell-dashboard.fullname" .) }} + - name: {{ .Values.httpRoute.gateway.name | default (include "console.fullname" .) }} namespace: {{ .Values.httpRoute.gateway.namespace | default .Release.Namespace }} {{- if or .Values.httpRoute.gateway.create .Values.httpRoute.gateway.sectionName }} sectionName: {{ .Values.httpRoute.gateway.sectionName | default (ternary "https" "http" (eq .Values.httpRoute.gateway.listener.protocol "HTTPS")) }} @@ -28,6 +28,6 @@ spec: type: PathPrefix value: / backendRefs: - - name: {{ include "openshell-dashboard.fullname" . }} + - name: {{ include "console.fullname" . }} port: {{ .Values.service.port }} {{- end }} diff --git a/deploy/helm/openshell-dashboard/templates/networkpolicy.yaml b/deploy/helm/console/templates/networkpolicy.yaml similarity index 79% rename from deploy/helm/openshell-dashboard/templates/networkpolicy.yaml rename to deploy/helm/console/templates/networkpolicy.yaml index 1783c567..5c00fb63 100644 --- a/deploy/helm/openshell-dashboard/templates/networkpolicy.yaml +++ b/deploy/helm/console/templates/networkpolicy.yaml @@ -4,13 +4,13 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} spec: podSelector: matchLabels: - {{- include "openshell-dashboard.selectorLabels" . | nindent 6 }} + {{- include "console.selectorLabels" . | nindent 6 }} policyTypes: [Ingress] ingress: - from: diff --git a/deploy/helm/openshell-dashboard/templates/route.yaml b/deploy/helm/console/templates/route.yaml similarity index 82% rename from deploy/helm/openshell-dashboard/templates/route.yaml rename to deploy/helm/console/templates/route.yaml index bb44cef3..2a912b17 100644 --- a/deploy/helm/openshell-dashboard/templates/route.yaml +++ b/deploy/helm/console/templates/route.yaml @@ -4,9 +4,9 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: route.openshift.io/v1 kind: Route metadata: - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} {{- with .Values.openshiftRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -17,7 +17,7 @@ spec: {{- end }} to: kind: Service - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} port: targetPort: proxy tls: diff --git a/deploy/helm/openshell-dashboard/templates/service.yaml b/deploy/helm/console/templates/service.yaml similarity index 64% rename from deploy/helm/openshell-dashboard/templates/service.yaml rename to deploy/helm/console/templates/service.yaml index c040122f..9f4b4583 100644 --- a/deploy/helm/openshell-dashboard/templates/service.yaml +++ b/deploy/helm/console/templates/service.yaml @@ -3,9 +3,9 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: v1 kind: Service metadata: - name: {{ include "openshell-dashboard.fullname" . }} + name: {{ include "console.fullname" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -14,4 +14,4 @@ spec: targetPort: proxy protocol: TCP selector: - {{- include "openshell-dashboard.selectorLabels" . | nindent 4 }} + {{- include "console.selectorLabels" . | nindent 4 }} diff --git a/deploy/helm/openshell-dashboard/templates/serviceaccount.yaml b/deploy/helm/console/templates/serviceaccount.yaml similarity index 74% rename from deploy/helm/openshell-dashboard/templates/serviceaccount.yaml rename to deploy/helm/console/templates/serviceaccount.yaml index 65f52810..75dce2cc 100644 --- a/deploy/helm/openshell-dashboard/templates/serviceaccount.yaml +++ b/deploy/helm/console/templates/serviceaccount.yaml @@ -4,9 +4,9 @@ SPDX-License-Identifier: Apache-2.0 */}} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "openshell-dashboard.serviceAccountName" . }} + name: {{ include "console.serviceAccountName" . }} labels: - {{- include "openshell-dashboard.labels" . | nindent 4 }} + {{- include "console.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/deploy/helm/openshell-dashboard/tests/images_test.yaml b/deploy/helm/console/tests/images_test.yaml similarity index 94% rename from deploy/helm/openshell-dashboard/tests/images_test.yaml rename to deploy/helm/console/tests/images_test.yaml index 651b14ea..2e547aa9 100644 --- a/deploy/helm/openshell-dashboard/tests/images_test.yaml +++ b/deploy/helm/console/tests/images_test.yaml @@ -5,7 +5,7 @@ templates: - templates/deployment.yaml - templates/hpa.yaml release: - name: openshell-dashboard + name: console namespace: my-namespace set: oidc.issuer: https://idp.example.com/realms/openshell @@ -14,7 +14,7 @@ tests: template: templates/deployment.yaml set: dashboard.image.registry: registry.example.com - dashboard.image.repository: mirror/openshell-dashboard + dashboard.image.repository: mirror/console dashboard.image.tag: ignored dashboard.image.digest: sha256:abcdef authProxy.image.registry: registry.example.com @@ -23,7 +23,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: registry.example.com/mirror/openshell-dashboard@sha256:abcdef + value: registry.example.com/mirror/console@sha256:abcdef - equal: path: spec.template.spec.containers[1].image value: registry.example.com/mirror/oauth2-proxy@sha256:123456 diff --git a/deploy/helm/openshell-dashboard/tests/keycloak_test.yaml b/deploy/helm/console/tests/keycloak_test.yaml similarity index 99% rename from deploy/helm/openshell-dashboard/tests/keycloak_test.yaml rename to deploy/helm/console/tests/keycloak_test.yaml index 4e0c2c94..620d94b4 100644 --- a/deploy/helm/openshell-dashboard/tests/keycloak_test.yaml +++ b/deploy/helm/console/tests/keycloak_test.yaml @@ -6,7 +6,7 @@ templates: values: - ../ci/values-keycloak.yaml release: - name: openshell-dashboard + name: console namespace: my-namespace tests: - it: gates users on API client roles and matches the gateway admin role diff --git a/deploy/helm/openshell-dashboard/tests/notes_test.yaml b/deploy/helm/console/tests/notes_test.yaml similarity index 97% rename from deploy/helm/openshell-dashboard/tests/notes_test.yaml rename to deploy/helm/console/tests/notes_test.yaml index ef120cb8..23483ce8 100644 --- a/deploy/helm/openshell-dashboard/tests/notes_test.yaml +++ b/deploy/helm/console/tests/notes_test.yaml @@ -6,7 +6,7 @@ templates: values: - ../ci/values-keycloak.yaml release: - name: openshell-dashboard + name: console namespace: my-namespace tests: - it: says nothing about sign-out when it ends the Keycloak session diff --git a/deploy/helm/openshell-dashboard/tests/resources_test.yaml b/deploy/helm/console/tests/resources_test.yaml similarity index 97% rename from deploy/helm/openshell-dashboard/tests/resources_test.yaml rename to deploy/helm/console/tests/resources_test.yaml index fcffef8f..ed7105b5 100644 --- a/deploy/helm/openshell-dashboard/tests/resources_test.yaml +++ b/deploy/helm/console/tests/resources_test.yaml @@ -19,7 +19,7 @@ tests: of: ServiceAccount - equal: path: metadata.name - value: team-a-openshell-dashboard + value: team-a-console - equal: path: automountServiceAccountToken value: false @@ -28,7 +28,7 @@ tests: asserts: - equal: path: spec.template.spec.serviceAccountName - value: team-a-openshell-dashboard + value: team-a-console - equal: path: spec.template.spec.automountServiceAccountToken value: false @@ -93,18 +93,18 @@ tests: value: proxy - equal: path: spec.selector["app.kubernetes.io/name"] - value: openshell-dashboard + value: console - equal: path: spec.selector["app.kubernetes.io/instance"] value: team-a - it: does not append chart name when release already contains it template: templates/service.yaml release: - name: openshell-dashboard + name: console asserts: - equal: path: metadata.name - value: openshell-dashboard + value: console - it: adds safe pod labels and annotations without changing selectors template: templates/deployment.yaml set: diff --git a/deploy/helm/openshell-dashboard/tests/routing_test.yaml b/deploy/helm/console/tests/routing_test.yaml similarity index 99% rename from deploy/helm/openshell-dashboard/tests/routing_test.yaml rename to deploy/helm/console/tests/routing_test.yaml index 519e633a..282d2ced 100644 --- a/deploy/helm/openshell-dashboard/tests/routing_test.yaml +++ b/deploy/helm/console/tests/routing_test.yaml @@ -8,7 +8,7 @@ templates: - templates/deployment.yaml - templates/networkpolicy.yaml release: - name: openshell-dashboard + name: console namespace: tenant-a set: oidc.issuer: https://idp.example.com/realms/openshell @@ -51,7 +51,7 @@ tests: value: dashboard.example.com - equal: path: spec.to.name - value: openshell-dashboard + value: console - equal: path: spec.tls.insecureEdgeTerminationPolicy value: Redirect diff --git a/deploy/helm/openshell-dashboard/tests/security_test.yaml b/deploy/helm/console/tests/security_test.yaml similarity index 96% rename from deploy/helm/openshell-dashboard/tests/security_test.yaml rename to deploy/helm/console/tests/security_test.yaml index bd7f61ac..e8034062 100644 --- a/deploy/helm/openshell-dashboard/tests/security_test.yaml +++ b/deploy/helm/console/tests/security_test.yaml @@ -16,16 +16,16 @@ tests: asserts: - equal: path: spec.selector.matchLabels["app.kubernetes.io/name"] - value: openshell-dashboard + value: console - equal: path: spec.template.metadata.labels["app.kubernetes.io/name"] - value: openshell-dashboard + value: console - it: exposes only proxy port via Service template: templates/service.yaml asserts: - equal: path: spec.selector["app.kubernetes.io/name"] - value: openshell-dashboard + value: console - equal: path: spec.ports[0].targetPort value: proxy @@ -92,13 +92,13 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].startupProbe.exec.command - value: [/usr/local/bin/openshell-dashboard, --healthcheck] + value: [/usr/local/bin/console, --healthcheck] - equal: path: spec.template.spec.containers[0].livenessProbe.exec.command - value: [/usr/local/bin/openshell-dashboard, --healthcheck] + value: [/usr/local/bin/console, --healthcheck] - equal: path: spec.template.spec.containers[0].readinessProbe.exec.command - value: [/usr/local/bin/openshell-dashboard, --healthcheck] + value: [/usr/local/bin/console, --healthcheck] - equal: path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds value: 3 @@ -226,7 +226,7 @@ tests: content: --cookie-name=_openshell_a - notContains: path: spec.template.spec.containers[1].args - content: --client-id=openshell-dashboard + content: --client-id=console - contains: path: spec.template.spec.containers[1].env content: @@ -247,7 +247,7 @@ tests: asserts: - equal: path: spec.podSelector.matchLabels["app.kubernetes.io/name"] - value: openshell-dashboard + value: console - equal: path: spec.ingress[0].ports[0].port value: 4180 diff --git a/deploy/helm/openshell-dashboard/tests/transport_test.yaml b/deploy/helm/console/tests/transport_test.yaml similarity index 99% rename from deploy/helm/openshell-dashboard/tests/transport_test.yaml rename to deploy/helm/console/tests/transport_test.yaml index b9a70825..54175807 100644 --- a/deploy/helm/openshell-dashboard/tests/transport_test.yaml +++ b/deploy/helm/console/tests/transport_test.yaml @@ -8,7 +8,7 @@ templates: - templates/gateway.yaml - templates/networkpolicy.yaml release: - name: openshell-dashboard + name: console namespace: my-namespace set: oidc.issuer: https://idp.example.com/realms/openshell diff --git a/deploy/helm/openshell-dashboard/tests/validation_test.yaml b/deploy/helm/console/tests/validation_test.yaml similarity index 99% rename from deploy/helm/openshell-dashboard/tests/validation_test.yaml rename to deploy/helm/console/tests/validation_test.yaml index 4b696ca3..c7bfd9df 100644 --- a/deploy/helm/openshell-dashboard/tests/validation_test.yaml +++ b/deploy/helm/console/tests/validation_test.yaml @@ -6,7 +6,7 @@ templates: - templates/hpa.yaml - templates/gateway-preflight.yaml release: - name: openshell-dashboard + name: console namespace: tenant-a set: oidc.issuer: https://idp.example.com/realms/openshell @@ -32,7 +32,7 @@ tests: asserts: - equal: path: spec.scaleTargetRef.name - value: openshell-dashboard + value: console - equal: path: spec.minReplicas value: 2 diff --git a/deploy/helm/openshell-dashboard/values.yaml b/deploy/helm/console/values.yaml similarity index 96% rename from deploy/helm/openshell-dashboard/values.yaml rename to deploy/helm/console/values.yaml index adabb1c6..b044610b 100644 --- a/deploy/helm/openshell-dashboard/values.yaml +++ b/deploy/helm/console/values.yaml @@ -69,8 +69,8 @@ authProxy: # -- Image pull secrets for the dashboard pod. imagePullSecrets: [] -# -- Resource name override; pod identity label remains openshell-dashboard. -nameOverride: "openshell-dashboard" +# -- Resource name override; the pod's app.kubernetes.io/name label stays console. +nameOverride: "console" # -- Full resource name override. fullnameOverride: "" @@ -144,11 +144,11 @@ oidc: # -- ConfigMap with ca.crt to trust private issuer TLS (also set on gateway). caConfigMapName: "" # -- OAuth2-proxy OIDC client ID. - clientId: openshell-dashboard + clientId: console # -- Optional key in oidc.existingSecret holding client ID; when set, takes precedence over oidc.clientId. clientIdSecretKey: "" # -- Existing Secret containing keys client-secret and cookie-secret. - existingSecret: openshell-dashboard-oidc + existingSecret: console-oidc # -- Full public callback URL; required when host is dynamically allocated. Empty derives from Route/HTTPRoute host. redirectURL: "" # -- IdP logout URL oauth2-proxy calls from the pod when a user signs out (HTTP GET), so the IdP session ends too; {id_token} is replaced with the session ID token. `auto` derives it from the issuer for provider keycloak-oidc (`/protocol/openid-connect/logout?id_token_hint={id_token}`) and sets none for other providers. Empty disables backend logout. Separate from dashboard.logoutURL. @@ -165,21 +165,21 @@ oidc: probes: startup: # -- Dashboard exec command; the default calls the BFF's loopback self-check. - dashboardCommand: [/usr/local/bin/openshell-dashboard, --healthcheck] + dashboardCommand: [/usr/local/bin/console, --healthcheck] # -- Startup probe failure threshold (dashboard and proxy). failureThreshold: 30 # -- Startup probe period in seconds. periodSeconds: 2 liveness: # -- Dashboard exec command for liveness. - dashboardCommand: [/usr/local/bin/openshell-dashboard, --healthcheck] + dashboardCommand: [/usr/local/bin/console, --healthcheck] # -- Liveness probe period in seconds. periodSeconds: 10 # -- Liveness probe failure threshold. failureThreshold: 3 readiness: # -- Dashboard exec command for readiness. - dashboardCommand: [/usr/local/bin/openshell-dashboard, --healthcheck] + dashboardCommand: [/usr/local/bin/console, --healthcheck] # -- Readiness probe period in seconds. periodSeconds: 5 # -- Readiness probe failure threshold. diff --git a/deploy/keycloak/README.md b/deploy/keycloak/README.md index ec5198ec..87fdb807 100644 --- a/deploy/keycloak/README.md +++ b/deploy/keycloak/README.md @@ -5,7 +5,7 @@ | Object | Settings that matter | Why | |---|---|---| | Client `openshell-api` | Client authentication on, no flow enabled. Client roles `openshell-admin` and `openshell-user` | The audience of access tokens and the client that holds the gateway's admin role and user role. Nothing signs in through it | -| Client `openshell-dashboard` | Client authentication on (confidential), Standard Flow, PKCE `S256`, the built-in `roles` client scope kept, Full Scope Allowed off with the two `openshell-api` roles in scope | The dashboard's auth proxy (oauth2-proxy) signs users in with it and needs a client secret. The `roles` scope carries the client-role mapper and Audience Resolve, which puts `openshell-api` into `aud` when the token holds one of its roles | +| Client `console` | Client authentication on (confidential), Standard Flow, PKCE `S256`, the built-in `roles` client scope kept, Full Scope Allowed off with the two `openshell-api` roles in scope | The dashboard's auth proxy (oauth2-proxy) signs users in with it and needs a client secret. The `roles` scope carries the client-role mapper and Audience Resolve, which puts `openshell-api` into `aud` when the token holds one of its roles | | Client `openshell-cli` | Public, Standard Flow, Device Authorization Grant, PKCE `S256`, redirect `http://127.0.0.1/*`, the same scope | For the `openshell` CLI; the dashboard does not use it | | Groups `openshell-admins` and `openshell-users` | Mapped to the client roles `openshell-admin` and `openshell-user` | A user gets a role by joining a group. Roles can also be assigned to users directly | @@ -14,7 +14,7 @@ No custom audience mapper or client scope is needed. ## What it leaves out - **Users.** Create them in the realm, each with an email address and *Email verified* on. -- **Secrets.** `openshell-dashboard` has no secret in the file, so Keycloak generates one at import. +- **Secrets.** `console` has no secret in the file, so Keycloak generates one at import. - **Client scopes.** The file defines none, so Keycloak creates its built-in ones. ## Import @@ -24,4 +24,4 @@ The file has been imported into Keycloak 26.8. Either of: - In the admin console: *Create realm*, then *Resource file*, and choose the file. - At start: put the file in `/opt/keycloak/data/import/` and start Keycloak with `--import-realm`. -Afterwards, set the redirect URIs of client `openshell-dashboard` for your host and copy its client secret: [step 1 of the install guide](../../docs/install.md#1-set-up-keycloak). +Afterwards, set the redirect URIs of client `console` for your host and copy its client secret: [step 1 of the install guide](../../docs/install.md#1-set-up-keycloak). diff --git a/deploy/keycloak/dev/README.md b/deploy/keycloak/dev/README.md index 75c168b7..f5e37ed4 100644 --- a/deploy/keycloak/dev/README.md +++ b/deploy/keycloak/dev/README.md @@ -40,7 +40,7 @@ kubectl -n keycloak exec deploy/keycloak -- sh -c '/opt/keycloak/bin/kcadm.sh co --user "$KC_BOOTSTRAP_ADMIN_USERNAME" --password "$KC_BOOTSTRAP_ADMIN_PASSWORD"' # the client secret, for the Secret of the install guide -ID=$(kc get clients -r openshell -q clientId=openshell-dashboard --fields id --format csv --noquotes) +ID=$(kc get clients -r openshell -q clientId=console --fields id --format csv --noquotes) kc get "clients/$ID/client-secret" -r openshell --fields value --format csv --noquotes # a user with an email address, Email verified on, and a group @@ -64,4 +64,4 @@ The commands above cover step 1 of the [install guide](../../../docs/install.md) Keycloak: run `kubectl -n keycloak port-forward svc/keycloak 8443:8443` and add the line `127.0.0.1 keycloak.keycloak.svc.cluster.local` to `/etc/hosts`, so that the workstation uses the URL the pods use. Its certificate is signed by `ca.crt`. -The dashboard: through your Gateway, as in the guide, or without one. Without one, use [`values-port-forward.yaml`](../../helm/openshell-dashboard/ci/values-port-forward.yaml) in place of the `httpRoute` and `networkPolicy` blocks, leave the sign-out lines out, add `http://localhost:4180/oauth2/callback` to the *Valid redirect URIs* of client `openshell-dashboard`, and run `kubectl -n openshell port-forward svc/openshell-dashboard 4180:4180`. +The dashboard: through your Gateway, as in the guide, or without one. Without one, use [`values-port-forward.yaml`](../../helm/console/ci/values-port-forward.yaml) in place of the `httpRoute` and `networkPolicy` blocks, leave the sign-out lines out, add `http://localhost:4180/oauth2/callback` to the *Valid redirect URIs* of client `console`, and run `kubectl -n openshell port-forward svc/console 4180:4180`. diff --git a/deploy/keycloak/openshell-realm.json b/deploy/keycloak/openshell-realm.json index 1b322c46..f24d81c4 100644 --- a/deploy/keycloak/openshell-realm.json +++ b/deploy/keycloak/openshell-realm.json @@ -42,7 +42,7 @@ "serviceAccountsEnabled": false }, { - "clientId": "openshell-dashboard", + "clientId": "console", "description": "OpenShell Dashboard: the confidential client its auth proxy (oauth2-proxy) signs users in with.", "enabled": true, "protocol": "openid-connect", @@ -79,7 +79,7 @@ "clientScopeMappings": { "openshell-api": [ { - "client": "openshell-dashboard", + "client": "console", "roles": ["openshell-admin", "openshell-user"] }, { diff --git a/docs/adrs/0001-standalone-application.md b/docs/adrs/0001-standalone-application.md index 92ea02b5..fc3a6276 100644 --- a/docs/adrs/0001-standalone-application.md +++ b/docs/adrs/0001-standalone-application.md @@ -11,7 +11,7 @@ OpenShell Dashboard is a web UI for one OpenShell gateway. The BFF is given one 1. **Standalone is the only mode.** The dashboard is an application of its own, with its own address, navigation and sign-in. It is not embedded in another application's UI, not loaded as a remote module and not published as a library. 2. **One container image holds the whole application.** The Go BFF serves the REST API under `/api/v1` and the built React UI from the same process. The image is `quay.io/ai-openshell/console`. -3. **It is installed with the Helm chart in `deploy/helm/openshell-dashboard`,** published as an OCI chart at `oci://quay.io/ai-openshell/console/helm-chart/openshell-dashboard`. The chart runs the BFF with oauth2-proxy beside it in one pod ([ADR 0002](0002-auth-relay-only-bff.md)) and exposes the proxy through a Gateway API HTTPRoute or an OpenShift Route. +3. **It is installed with the Helm chart in `deploy/helm/console`,** published as an OCI chart at `oci://quay.io/ai-openshell/charts/console`. The chart runs the BFF with oauth2-proxy beside it in one pod ([ADR 0002](0002-auth-relay-only-bff.md)) and exposes the proxy through a Gateway API HTTPRoute or an OpenShift Route. 4. **The BFF never does the following.** It does not terminate authentication, validate tokens or authorize (ADR 0002). It does not call the Kubernetes API. It does not fetch, store or inject provider credentials: they pass through to the gateway and only their names come back. It does not rate-limit. It holds no state: no session store, no database, nothing that ties a request to a replica. 5. **Nothing is published to npm.** `frontend/package.json` is `private`, and the UI is built only as part of the image. diff --git a/docs/configuration.md b/docs/configuration.md index 7f9f0f95..147e02ba 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -24,7 +24,7 @@ The dashboard is one process, the BFF, which also serves the built UI. Configure | `-gateway-release-line` | `GATEWAY_RELEASE_LINE` | compiled in | Overrides the gateway release line the build is for, as `major.minor`. For tests and local development ([the compatibility notice](compatibility.md#the-compatibility-notice)) | | `-healthcheck` | | | Starts no server: requests `/api/v1/healthz` on `127.0.0.1:$PORT` and exits 0 on a `200`. The chart's probes use it | -The Helm chart sets `LISTEN_ADDRESS=127.0.0.1`, `AUTH_DISABLED=false`, `AUTH_TOKEN_HEADER=x-forwarded-access-token` and `AUTH_USER_HEADER=x-forwarded-user`, and fills the port, the gateway address and certificates, `ADMIN_ROLE`, `USER_ROLE` and `LOGOUT_URL` from its values. It cannot set any other variable; the [chart README](../deploy/helm/openshell-dashboard/README.md) lists its values. +The Helm chart sets `LISTEN_ADDRESS=127.0.0.1`, `AUTH_DISABLED=false`, `AUTH_TOKEN_HEADER=x-forwarded-access-token` and `AUTH_USER_HEADER=x-forwarded-user`, and fills the port, the gateway address and certificates, `ADMIN_ROLE`, `USER_ROLE` and `LOGOUT_URL` from its values. It cannot set any other variable; the [chart README](../deploy/helm/console/README.md) lists its values. ## Feature flags diff --git a/docs/development.md b/docs/development.md index 9732461d..f5168b6c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -72,7 +72,7 @@ make build docker run --rm -p 8080:8080 \ -e OPENSHELL_GATEWAY_URL=https://gateway.example.com:17670 \ -e AUTH_DISABLED=true \ - openshell-dashboard:latest + console:latest ``` A gateway with a private CA or a client certificate also needs the files mounted and the [TLS](configuration.md#tls) variables set. This build passes no build arguments, so the image's `gateway.line` and `sdk` labels are empty and **Help → About** shows no commit. The compatibility notice still works: the release line is compiled into the BFF. diff --git a/docs/install.md b/docs/install.md index 1d9ff353..3b7977a4 100644 --- a/docs/install.md +++ b/docs/install.md @@ -18,15 +18,15 @@ Two things here are called a gateway. "The gateway" is the OpenShell gateway, wh Import [`deploy/keycloak/openshell-realm.json`](../deploy/keycloak/openshell-realm.json) ([about the file](../deploy/keycloak/README.md)): in the admin console, *Create realm*, then *Resource file*; or start Keycloak with `--import-realm`. Then, in realm `openshell`: -1. Client `openshell-dashboard`, *Settings*: set *Valid redirect URIs* to `https://dashboard.example.com/oauth2/callback`. -2. Client `openshell-dashboard`, *Credentials*: copy the client secret. +1. Client `console`, *Settings*: set *Valid redirect URIs* to `https://dashboard.example.com/oauth2/callback`. +2. Client `console`, *Credentials*: copy the client secret. 3. Create the users: each with an email address, *Email verified* on, and membership of `openshell-admins` or `openshell-users`. A new user has *Email verified* off, and oauth2-proxy refuses the sign-in of a user whose email is not verified. To create the objects by hand instead, use the table in the [realm file's README](../deploy/keycloak/README.md). No custom audience mapper or client scope is needed. ## 2. Check a token -In the admin console: client `openshell-dashboard`, *Client scopes*, *Evaluate*, pick a user, *Generated access token*. It must show: +In the admin console: client `console`, *Client scopes*, *Evaluate*, pick a user, *Generated access token*. It must show: ```json { "aud": "openshell-api", @@ -73,8 +73,8 @@ A `0.1.3` chart still reads these names, as deprecated aliases. OpenShell docume ## 4. Create the Secret ```sh -kubectl -n openshell create secret generic openshell-dashboard-oidc \ - --from-literal=client-secret='' \ +kubectl -n openshell create secret generic console-oidc \ + --from-literal=client-secret='' \ --from-literal=cookie-secret="$(openssl rand -hex 16)" ``` @@ -114,17 +114,17 @@ networkPolicy: ## 6. Install ```sh -helm upgrade --install openshell-dashboard \ - oci://quay.io/ai-openshell/console/helm-chart/openshell-dashboard \ +helm upgrade --install console \ + oci://quay.io/ai-openshell/charts/console \ --version --namespace openshell -f values.yaml ``` `` is the newest dashboard release whose first two numbers match your gateway's: a `0.1.N` for a gateway `0.1.x` ([Compatibility](../README.md#compatibility), [releases](https://github.com/ai-openshell/console/releases)). Releases up to `0.1.2` were also published at `oci://ghcr.io/gkrumbach07/openshell-dashboard/helm-chart/openshell-dashboard`, the chart's home before the repository moved; that path receives no newer release. Then check: ```sh -kubectl -n openshell rollout status deploy/openshell-dashboard -kubectl -n openshell get httproute openshell-dashboard -o jsonpath='{.status.parents[*].conditions}' -helm -n openshell get notes openshell-dashboard +kubectl -n openshell rollout status deploy/console +kubectl -n openshell get httproute console -o jsonpath='{.status.parents[*].conditions}' +helm -n openshell get notes console ``` The second command has to show the condition `Accepted` with status `True`; otherwise the Gateway does not admit the namespace (reason `NotAllowedByListeners`), or `sectionName` is not one of its listeners (`NoMatchingParent`). The notes print the dashboard's URL, the callback to register and the gateway's address. @@ -164,21 +164,31 @@ securityContext: - Set `host`. The callback is `https:///oauth2/callback`, and the chart cannot derive it from a host the router assigns. Use the same host in the client's redirect URIs. - The two `null` values let the `restricted-v2` SCC assign the user and group. - The NetworkPolicy admits namespace `openshift-ingress` by default. A router on the host network needs `networkPolicy.ingressFrom`. -- For reencrypt, see [`values-route-reencrypt.yaml`](../deploy/helm/openshell-dashboard/ci/values-route-reencrypt.yaml). +- For reencrypt, see [`values-route-reencrypt.yaml`](../deploy/helm/console/ci/values-route-reencrypt.yaml). ## Other ways to expose it - Let the chart create the Gateway (`httpRoute.gateway.create: true`, `className`, `listener.tls.certificateRefs`). It then names the listener and sets `sectionName` itself. -- Bring your own Ingress or load balancer to Service `openshell-dashboard`, port 4180. Leave both routes off, and set `oidc.redirectURL` to `https:///oauth2/callback` and `networkPolicy.ingressNamespace` to the controller's namespace. -- Try it through a port-forward, with [`values-port-forward.yaml`](../deploy/helm/openshell-dashboard/ci/values-port-forward.yaml). Add `http://localhost:4180/oauth2/callback` to the client's *Valid redirect URIs*. The browser has to keep Secure cookies on `http://localhost`. +- Bring your own Ingress or load balancer to Service `console`, port 4180. Leave both routes off, and set `oidc.redirectURL` to `https:///oauth2/callback` and `networkPolicy.ingressNamespace` to the controller's namespace. +- Try it through a port-forward, with [`values-port-forward.yaml`](../deploy/helm/console/ci/values-port-forward.yaml). Add `http://localhost:4180/oauth2/callback` to the client's *Valid redirect URIs*. The browser has to keep Secure cookies on `http://localhost`. ## Upgrade and uninstall -To upgrade, run the command of step 6 with a newer `` of the same release line. `dashboard.image.digest` pins the image by digest. Do not upgrade with `--reuse-values`: it keeps the defaults of the chart version you upgrade from, so a new default, such as the Keycloak sign-out, does not apply. Pass your values file again, or use `--reset-then-reuse-values`. To uninstall: +To upgrade, run the command of step 6 with a newer `` of the same release line. `dashboard.image.digest` pins the image by digest. Do not upgrade with `--reuse-values`: it keeps the defaults of the chart version you upgrade from, so a new default, such as the Keycloak sign-out, does not apply. Pass your values file again, or use `--reset-then-reuse-values`. + +The chart used to be named `openshell-dashboard`. An install of that chart does not upgrade in place: the new chart names its resources and its `app.kubernetes.io/name` label `console`, and a Deployment's selector cannot change. Uninstall the old release, which leaves its Secret in place, and install this chart: ```sh helm -n openshell uninstall openshell-dashboard -kubectl -n openshell delete secret openshell-dashboard-oidc +``` + +To keep the Secret and the Keycloak client the old install used, set `oidc.existingSecret: openshell-dashboard-oidc` and `oidc.clientId: openshell-dashboard`, or create `console-oidc` and a client `console` as in steps 1 and 4. Use the old release's name in the command if you installed it under another one (`helm -n openshell list`). + +To uninstall this chart: + +```sh +helm -n openshell uninstall console +kubectl -n openshell delete secret console-oidc ``` ## Troubleshooting diff --git a/docs/releasing.md b/docs/releasing.md index e2078df0..bb5c38dd 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -10,9 +10,9 @@ A release `vX.Y.Z` is three things, all made by `publish.yml`: |---|---|---| | GitHub release `vX.Y.Z`, and the git tag with it | this repository | `scripts/release/cut-release.mjs` | | Container image tags `X.Y.Z` and `X.Y` | `quay.io/ai-openshell/console` | retagging the image CI already built | -| Helm chart `openshell-dashboard`, version `X.Y.Z` | `oci://quay.io/ai-openshell/console/helm-chart` | packaging the chart at the released commit | +| Helm chart `console`, version `X.Y.Z` | `oci://quay.io/ai-openshell/charts` | packaging the chart at the released commit | -The chart's registry path follows the repository's name (`publish.yml` pushes to `oci://quay.io///helm-chart`), so the chart lands in the Quay repository `console/helm-chart/openshell-dashboard`, next to the image's `console`. It is a repository of its own, with its own visibility and permissions: a chart cannot share the image's repository, because chart version `X.Y.Z` and image tag `X.Y.Z` would be the same tag. Renaming or transferring this repository moves the chart path with it. +Charts go to `oci://quay.io/ai-openshell/charts`, and Helm adds the chart's name, so this chart lands in the Quay repository `charts/console`, beside the image's `console`. It is a repository of its own, with its own visibility and permissions: a chart cannot share the image's repository, because chart version `X.Y.Z` and image tag `X.Y.Z` would be the same tag. Another repository's chart goes to `charts/`. Earlier homes, which receive no new release: images up to `0.1.3` are at `quay.io/gkrumbach07/openshell-dashboard`, and charts up to `0.1.2` at `oci://ghcr.io/gkrumbach07/openshell-dashboard/helm-chart`. Between the move to `ai-openshell/console` and the move to Quay, CI pushed development images to `ghcr.io/ai-openshell/console`, which was never made public. @@ -22,17 +22,19 @@ No registry secret is stored anywhere, and the workflow's own token cannot write | Environment | Who may use it | Robot, and the subject it trusts | It can write | Used by | |---|---|---|---|---| -| `release` | `main` and `release/**` only | `ai-openshell+console_release`, `repo:ai-openshell/console:environment:release` | `console` and `console/helm-chart/openshell-dashboard` | `ci.yml` on a push (`build`, `push-manifest`, `promote-latest`, `publish-dev-chart`) and `publish.yml` (`tag-image`, `publish-chart`) | +| `release` | `main` and `release/**` only | `ai-openshell+console_release`, `repo:ai-openshell@311201172/console@1316331667:environment:release` | `console` and `charts/console` | `ci.yml` on a push (`build`, `push-manifest`, `promote-latest`, `publish-dev-chart`) and `publish.yml` (`tag-image`, `publish-chart`) | + +The repository uses GitHub's immutable subject claims, so the subject starts with the owner and the repository each followed by its numeric ID, not with `repo:ai-openshell/console`. A robot set up with the name-only subject refuses every exchange with `Token does not match robot`. The IDs keep the subject from matching a repository that takes the name later, after a rename or a deletion. To read the prefix GitHub uses: `gh api repos/ai-openshell/console/actions/oidc/customization/sub` (`sub_claim_prefix`). The environment is what makes the subject mean something: GitHub puts `environment:release` in the token only for a job the environment admitted, so its deployment branches must stay `main` and `release/**`. A variable `QUAY_ROBOT` on an environment overrides the robot's name. -A pull request never publishes to `console`, even one that edits a workflow: it runs with no environment, so its token's subject is `repo:ai-openshell/console:pull_request`, which no robot trusts. It does not write the build cache that `main`'s build, and so a release, reads. `image-range` reads the pushed image anonymously, so the Quay repositories must be public. +A pull request never publishes to `console`, even one that edits a workflow: it runs with no environment, so its token's subject is `repo:ai-openshell@311201172/console@1316331667:pull_request`, which no robot trusts. It does not write the build cache that `main`'s build, and so a release, reads. `image-range` reads the pushed image anonymously, so the Quay repositories must be public. **A pull request gets no image.** It is built on both platforms, to prove that it builds, and then discarded. To try a change on a cluster, build the image locally (`make build`) and push it to a registry of your own. **Setting it up on quay.io** (an owner of the `ai-openshell` organization): -1. Create the public repositories `console` and `console/helm-chart/openshell-dashboard`. +1. Create the public repositories `console` and `charts/console`. 2. Create the robot `console_release` with write on `console` and the chart and nothing else, and leave the organization's default permissions empty. 3. On the robot, *Set robot federation* with the issuer `https://token.actions.githubusercontent.com`, the subject in the table above and the audience `quay`, which is what the quay-login action asks GitHub for by default (its `audience` input overrides it). Quay refuses a token whose audience the robot does not list. 4. Optionally, an immutability policy on `console` for the tags `^[0-9]+\.[0-9]+\.[0-9]+$` and `^sha-`, so a release or a build cannot be overwritten. `latest` and `X.Y` are meant to move. diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 25751d16..65a588a2 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -8,7 +8,7 @@ declare global { Cypress.Commands.add('login', () => { cy.window().then((win) => { - win.sessionStorage.setItem('openshell-dashboard.devMode', 'true'); + win.sessionStorage.setItem('console.devMode', 'true'); }); }); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 84a84466..d5486edc 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "openshell-dashboard", + "name": "console", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "openshell-dashboard", + "name": "console", "version": "0.0.0", "license": "Apache-2.0", "dependencies": { diff --git a/frontend/package.json b/frontend/package.json index 7eba2cad..363f0a2d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "openshell-dashboard", + "name": "console", "version": "0.0.0", "private": true, "description": "OpenShell Dashboard frontend — React + PatternFly 6 admin UI for the OpenShell gateway", diff --git a/frontend/src/app/__tests__/AppRoutes.spec.tsx b/frontend/src/app/__tests__/AppRoutes.spec.tsx index 77cedc3d..9a67a5cd 100644 --- a/frontend/src/app/__tests__/AppRoutes.spec.tsx +++ b/frontend/src/app/__tests__/AppRoutes.spec.tsx @@ -295,7 +295,7 @@ describe('AppRoutes', () => { fireEvent.change(screen.getByRole('textbox', { name: 'Unsaved draft' }), { target: { value: 'keep this' }, }); - sessionStorage.setItem('openshell-dashboard.proxyReauthReload', '1'); + sessionStorage.setItem('console.proxyReauthReload', '1'); mockUseCurrentUser.mockReturnValue({ ...idleWhoami, data: user, @@ -320,9 +320,7 @@ describe('AppRoutes', () => { : 'Temporary whoami failure', ), ).toBeInTheDocument(); - expect( - sessionStorage.getItem('openshell-dashboard.proxyReauthReload'), - ).toBe('1'); + expect(sessionStorage.getItem('console.proxyReauthReload')).toBe('1'); sessionExpiredError('unauthorized'); expect(mockAutoReload).toHaveBeenCalledTimes(1); fireEvent.click( @@ -343,9 +341,7 @@ describe('AppRoutes', () => { screen.queryByText('Temporary whoami failure'), ).not.toBeInTheDocument(); expect(mockShellUnmount).not.toHaveBeenCalled(); - expect( - sessionStorage.getItem('openshell-dashboard.proxyReauthReload'), - ).toBeNull(); + expect(sessionStorage.getItem('console.proxyReauthReload')).toBeNull(); }, ); diff --git a/frontend/src/app/__tests__/authSession.spec.ts b/frontend/src/app/__tests__/authSession.spec.ts index 4bdef6cf..d34ffc2f 100644 --- a/frontend/src/app/__tests__/authSession.spec.ts +++ b/frontend/src/app/__tests__/authSession.spec.ts @@ -4,7 +4,7 @@ import { tryMarkProxyReauthReload, } from '../authSession'; -const KEY = 'openshell-dashboard.proxyReauthReload'; +const KEY = 'console.proxyReauthReload'; describe('authSession', () => { beforeEach(() => { diff --git a/frontend/src/app/__tests__/logout.spec.ts b/frontend/src/app/__tests__/logout.spec.ts index 4971fd68..7b34692f 100644 --- a/frontend/src/app/__tests__/logout.spec.ts +++ b/frontend/src/app/__tests__/logout.spec.ts @@ -35,7 +35,7 @@ describe('logout', () => { await logout(); expect(assign).toHaveBeenCalledWith('/oauth2/sign_out?rd=/oauth2/sign_in'); - expect(removeItem).toHaveBeenCalledWith('openshell-dashboard.devMode'); + expect(removeItem).toHaveBeenCalledWith('console.devMode'); }); it('uses the proxy sign-in redirect when config omits the URL', async () => { diff --git a/frontend/src/app/__tests__/theme.spec.tsx b/frontend/src/app/__tests__/theme.spec.tsx index ac83bdec..7ff85ac7 100644 --- a/frontend/src/app/__tests__/theme.spec.tsx +++ b/frontend/src/app/__tests__/theme.spec.tsx @@ -2,7 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { ThemeProvider, useTheme } from '../theme'; -const THEME_STORAGE_KEY = 'openshell-dashboard-theme'; +const THEME_STORAGE_KEY = 'console-theme'; const DARK_THEME_CLASS = 'pf-v6-theme-dark'; // Two surfaces of the kind the provider exists for: the masthead toggle and diff --git a/frontend/src/app/authSession.ts b/frontend/src/app/authSession.ts index 067d0195..2ceb546f 100644 --- a/frontend/src/app/authSession.ts +++ b/frontend/src/app/authSession.ts @@ -1,4 +1,4 @@ -const PROXY_REAUTH_RELOAD_KEY = 'openshell-dashboard.proxyReauthReload'; +const PROXY_REAUTH_RELOAD_KEY = 'console.proxyReauthReload'; /** Clear the one-shot reload flag after a successful whoami / re-auth. */ export const clearProxyReauthReloadFlag = (): void => { diff --git a/frontend/src/app/authStore.ts b/frontend/src/app/authStore.ts index 01fef37e..a18af2b7 100644 --- a/frontend/src/app/authStore.ts +++ b/frontend/src/app/authStore.ts @@ -2,7 +2,7 @@ // the BFF, which keeps it in its own HttpOnly cookie: JavaScript never sees a // token. The only state kept here is the dev-mode flag ("Continue as // developer" when AUTH_DISABLED=true), which is not a credential. -const DEV_MODE_KEY = 'openshell-dashboard.devMode'; +const DEV_MODE_KEY = 'console.devMode'; export const isDevSession = (): boolean => window.sessionStorage.getItem(DEV_MODE_KEY) === 'true'; diff --git a/frontend/src/app/theme.tsx b/frontend/src/app/theme.tsx index caf0075c..a3f6d4b5 100644 --- a/frontend/src/app/theme.tsx +++ b/frontend/src/app/theme.tsx @@ -2,7 +2,7 @@ import { createContext, useContext, useState } from 'react'; export type Theme = 'light' | 'dark'; -const THEME_STORAGE_KEY = 'openshell-dashboard-theme'; +const THEME_STORAGE_KEY = 'console-theme'; const DARK_THEME_CLASS = 'pf-v6-theme-dark'; // Storage can throw — blocked site data, some private windows — and the theme diff --git a/scripts/check-image-range.test.mjs b/scripts/check-image-range.test.mjs index 45107825..0f01c818 100644 --- a/scripts/check-image-range.test.mjs +++ b/scripts/check-image-range.test.mjs @@ -124,7 +124,7 @@ test('the build job passes exactly the args the Dockerfile reads, from the deriv }); test('check-image-range.mjs passes a correct image and fails one that claims nothing', (t) => { - const dir = mkdtempSync(join(tmpdir(), 'openshell-dashboard-image-')); + const dir = mkdtempSync(join(tmpdir(), 'console-image-')); t.after(() => rmSync(dir, { recursive: true, force: true })); // The stand-in docker answers `buildx imagetools inspect` with whatever the // test hands it. No registry, no daemon. diff --git a/scripts/dev-env.sh b/scripts/dev-env.sh index 3150d3d5..6c7974b6 100755 --- a/scripts/dev-env.sh +++ b/scripts/dev-env.sh @@ -40,7 +40,7 @@ STATE="$DEV_STATE_DIR" # that is in use, and does not replace this one's containers. The name comes # from the checkout's path: `reset` before the checkout is deleted or moved, # or the gateway's data and its sandboxes stay in Docker under this name. -PROJECT="openshell-dashboard-dev-$(printf '%s' "$ROOT" | cksum | cut -d' ' -f1)" +PROJECT="console-dev-$(printf '%s' "$ROOT" | cksum | cut -d' ' -f1)" # The gateway marks the containers and volumes of its sandboxes with this # label, and treats everything that carries it as its own: when it starts, it @@ -61,7 +61,7 @@ BFF_PORT="${PORT:-8080}" # the BFF reads PORT itself # What deploy/keycloak/openshell-realm.json calls its realm and the # dashboard's client. prepare_sign_in stops when the file says otherwise. REALM_NAME=openshell -CLIENT_ID=openshell-dashboard +CLIENT_ID=console export DEV_GATEWAY_PORT="$GATEWAY_PORT" DEV_HEALTH_PORT="$HEALTH_PORT" \ DEV_KEYCLOAK_PORT="$KEYCLOAK_PORT" DEV_REALM="$REALM_NAME" @@ -404,7 +404,7 @@ proxy_binary() { need go local version bin version="$(awk '$1 == "repository:" { ours = ($2 == "oauth2-proxy/oauth2-proxy") } ours && $1 == "tag:" { print $2; exit }' \ - "$ROOT/deploy/helm/openshell-dashboard/values.yaml")" + "$ROOT/deploy/helm/console/values.yaml")" case "$version" in v[0-9]*) ;; *) die "cannot read the oauth2-proxy version from the chart's values.yaml" ;; diff --git a/scripts/gateway-range.test.mjs b/scripts/gateway-range.test.mjs index 42a13336..81e02dad 100644 --- a/scripts/gateway-range.test.mjs +++ b/scripts/gateway-range.test.mjs @@ -28,7 +28,7 @@ const pinned = (release) => ({ release, sdk: SDK }); const run = (script, ...args) => spawnSync(process.execPath, [join(scripts, script), ...args], { encoding: 'utf8' }); function tempDir(t) { - const dir = mkdtempSync(join(tmpdir(), 'openshell-dashboard-range-')); + const dir = mkdtempSync(join(tmpdir(), 'console-range-')); t.after(() => rmSync(dir, { recursive: true, force: true })); return dir; } diff --git a/scripts/release/cut-release.mjs b/scripts/release/cut-release.mjs index 4253a9f8..4fdbab3b 100755 --- a/scripts/release/cut-release.mjs +++ b/scripts/release/cut-release.mjs @@ -360,7 +360,7 @@ function report(plan, { dryRun }) { * request, so there is no state in which the tag exists without its release. */ function createRelease(cwd, plan) { - const dir = mkdtempSync(join(tmpdir(), 'openshell-dashboard-release-')); + const dir = mkdtempSync(join(tmpdir(), 'console-release-')); try { const notesFile = join(dir, 'notes.md'); writeFileSync(notesFile, plan.notes); diff --git a/scripts/release/cut-release.test.mjs b/scripts/release/cut-release.test.mjs index d0ac8367..03e07d06 100644 --- a/scripts/release/cut-release.test.mjs +++ b/scripts/release/cut-release.test.mjs @@ -35,7 +35,7 @@ const gitIdentity = ['-c', 'user.name=t', '-c', 'user.email=t@example.com', '-c' * pins to that OpenShell release, which is what decides the line. */ function repository(t, { pinned = '0.1.3' } = {}) { - const dir = mkdtempSync(join(tmpdir(), 'openshell-dashboard-cut-')); + const dir = mkdtempSync(join(tmpdir(), 'console-cut-')); t.after(() => rmSync(dir, { recursive: true, force: true })); const origin = join(dir, 'origin.git'); const work = join(dir, 'work'); diff --git a/scripts/release/publish-workflow.test.mjs b/scripts/release/publish-workflow.test.mjs index e23f359f..91a467ab 100644 --- a/scripts/release/publish-workflow.test.mjs +++ b/scripts/release/publish-workflow.test.mjs @@ -48,7 +48,7 @@ function stepScript(name) { } function tempDir(t) { - const dir = mkdtempSync(join(tmpdir(), 'openshell-dashboard-publish-')); + const dir = mkdtempSync(join(tmpdir(), 'console-publish-')); t.after(() => rmSync(dir, { recursive: true, force: true })); return dir; } diff --git a/scripts/release/release.test.mjs b/scripts/release/release.test.mjs index 9087df0f..036bc44b 100644 --- a/scripts/release/release.test.mjs +++ b/scripts/release/release.test.mjs @@ -26,7 +26,7 @@ const declared = { line: '0.1', release: '0.1.2', sdk: SDK }; const previous = { line: '0.1' }; function tempDir(t) { - const dir = mkdtempSync(join(tmpdir(), 'openshell-dashboard-release-')); + const dir = mkdtempSync(join(tmpdir(), 'console-release-')); t.after(() => rmSync(dir, { recursive: true, force: true })); return dir; } diff --git a/tasks/helm.toml b/tasks/helm.toml index 47b24b68..d71c2d63 100644 --- a/tasks/helm.toml +++ b/tasks/helm.toml @@ -1,5 +1,5 @@ ["helm:docs"] description = "Generate the OpenShell Dashboard Helm chart README" run = """ - helm-docs --chart-search-root deploy/helm/openshell-dashboard + helm-docs --chart-search-root deploy/helm/console """