Skip to content

feat: ship the Testkube sign-in pages in the image - #1

Open
dejanzele wants to merge 1 commit into
release/v2.45.1from
testkube/v2.45.1
Open

feat: ship the Testkube sign-in pages in the image#1
dejanzele wants to merge 1 commit into
release/v2.45.1from
testkube/v2.45.1

Conversation

@dejanzele

Copy link
Copy Markdown

Summary

Dex renders its own sign-in, error, and device pages. Until now the kubeshop/dex image showed the default Dex theme, so a failed Testkube login showed a "dex" logo. This PR makes the Testkube look part of the image, the same way this fork already builds upstream Dex: upstream v2.45.1 plus one commit.

  • testkube/web/templates/: nine templates that replace the upstream templates.
  • testkube/web/static/testkube/: CSS, wordmark, favicon, Roboto fonts, background images, served at /static/testkube/.
  • Dockerfile: three lines after the upstream web/ copy, plus ENV DEX_FRONTEND_DIR=/srv/dex/web, so a deployment needs no frontend configuration.

The values in styles.css copy the Testkube dashboard build 1:1 (Colors.ts, the AuthPage*/Banner/AuthForm* styled-components, the antd theme tokens, MediaQueries.ts in testkube-cloud-api/js/packages/web). The header comment in styles.css lists the sources. See testkube/README.md.

The base branch release/v2.45.1 is upstream v2.45.1, so the diff is this commit only.

Pages

State Result
Connector chooser "Login via GitHub / GitLab / Google" with the app.testkube.io colors and icons; other connector types use the "Login via SSO" style
Password page email + password fields as on app.testkube.io, antd Input.Password show/hide toggle
Wrong password banner under the card, error border on both fields, email kept
Every Dex error (invalid client, bad redirect URI, expired state, connector failure, device code) the same card with a banner under it

Verification

  • A bare docker run of an overlay build with a nine-line Dex config and no frontend block renders the branded pages; all static assets return 200.
  • 24 error-producing requests: every page-level error renders the branded page. Unknown URLs still return Go's plain-text 404 (r.NotFoundHandler = http.NotFoundHandler() in server.go); a later commit can render error.html there.
  • The templates use only the data Dex 2.42–2.45 passes (.Connectors, .PostURL, .Invalid, .Username, .UsernamePrompt, .BackLink, .ErrType, .ErrMsg, .Scopes, .Client, .AuthReqID, .UserCode, .ClientName, .Code) and the url/extra/lower funcs.

Release

Tag the merge result v2.45.2 (fork convention, like v2.42.2) and dispatch the image workflow on it to publish kubeshop/dex:2.45.2. The enterprise chart pins that tag in kubeshop/testkube-cloud-api#5360.

The only per-environment value is frontend.extra.dashboardURL; the error page uses it for the "Back to Testkube" button. Without it the button returns to the previous page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UrZjx4CiwP6eWyC6FM2tn1

Dex renders its own sign-in, error, and device pages. This commit makes the
Testkube look part of the kubeshop/dex image: testkube/web/ holds nine
templates that replace the upstream templates and the static assets (CSS,
wordmark, favicon, Roboto fonts, background images) served at
/static/testkube/. The Dockerfile copies them into /srv/dex/web and sets
DEX_FRONTEND_DIR, so a deployment needs no frontend configuration.

The values in styles.css copy the Testkube dashboard build 1:1; the header
comment lists the sources. The only per-environment value is
frontend.extra.dashboardURL, used by the error page's "Back to Testkube"
button.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UrZjx4CiwP6eWyC6FM2tn1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant