argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.12k stars 3.21k forks source link

build: support TLS for UI and Server with `make start` #13674

Closed MasonM closed 1 month ago

MasonM commented 2 months ago

Motivation

This was split off from https://github.com/argoproj/argo-workflows/pull/13609 to make it easier to review. This adds a new make start UI_SECURE=true flag that can be used to test Argo with a TLS termination proxy in front, which is needed for testing bugs like https://github.com/argoproj/argo-workflows/issues/13031. Also, make start SECURE=true UI=true was broken, so I fixed that too.

Modifications

Verification

Tested the following combinations and ensured the workflow list rendered properly each time:

  1. make start UI=true
  2. make start UI_SECURE=true
  3. make start UI_SECURE=true SECURE=true
  4. make start UI=true SECURE=true

Screenshot with make start UI_SECURE=true: Screenshot 2024-09-28 at 11 27 03 AM

MasonM commented 1 month ago

@isubasinghe Okay, I pushed d507aa638dd351c8b802b175defe85502c306c52 to add a hack/update-sso-redirect-url.sh script that rewrites the redirectUrl automatically. It's messy, but I can't think of a better solution.

MasonM commented 1 month ago

@agilgur5 Thanks for the review!

Makes sense though I don't think I've seen a deprecation warning on this? Are we on an older version?

Yes, we're on webpack-dev-server v4.15.1: https://github.com/argoproj/argo-workflows/blob/bf7760a46e29bf2571bd3e9d852220b44339bb60/ui/yarn.lock#L10063-L10064

and https://github.com/webpack/webpack-dev-server/commit/d7643251db183a00f277e76a640bad3ef77c2a8e was released in webpack-dev-server v5.0.0