From a84e40899e318b616aa369f1252b0287f300499c Mon Sep 17 00:00:00 2001 From: Alon Braymok <138359965+alonkeyval@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:45:38 +0200 Subject: [PATCH] feat: helm legacy UI flag (#2009) This pull request includes changes to update the naming convention for the UI ports from "beta-ui" to "legacy-ui" across multiple files. The most important changes are: UI Port Naming Updates: * [`cli/cmd/resources/ui.go`](diffhunk://#diff-c286e10d34710a80a59127b2b7951e8a33d9b9554e47d2f2b827fd690f2e53abL317-R317): Changed the port name from "beta-ui" to "legacy-ui" in the `NewUIService` function. * [`cli/cmd/ui.go`](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L166-R166): Updated the flag description from "beta" to "legacy" in the `init` function to reflect the new naming convention. * [`helm/odigos/templates/ui/service.yaml`](diffhunk://#diff-042cac3e8292ac2b7d917f5012c9d17350361c1f23c6d08252c4438580367776L12-R12): Renamed the port from "beta-ui" to "legacy-ui" in the `spec` section. --------- Co-authored-by: alonkeyval --- cli/cmd/resources/ui.go | 2 +- cli/cmd/ui.go | 5 +++-- helm/odigos/templates/ui/service.yaml | 2 +- tests/common/assert/odigos-installed.yaml | 2 +- tests/e2e/ui/chainsaw-test.yaml | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cli/cmd/resources/ui.go b/cli/cmd/resources/ui.go index 23e34ee09..5e416d0c6 100644 --- a/cli/cmd/resources/ui.go +++ b/cli/cmd/resources/ui.go @@ -314,7 +314,7 @@ func NewUIService(ns string) *corev1.Service { Port: 3000, }, { - Name: "beta-ui", + Name: "legacy-ui", Port: 3001, }, { diff --git a/cli/cmd/ui.go b/cli/cmd/ui.go index dad316a83..33a48ea37 100644 --- a/cli/cmd/ui.go +++ b/cli/cmd/ui.go @@ -57,7 +57,8 @@ var uiCmd = &cobra.Command{ if legacyFlag { clusterPort = legacyDefaultPort } - + fmt.Printf("Is legacy: %v\n", legacyFlag) + fmt.Printf("Cluster port: %d\n", clusterPort) localAddress := cmd.Flag("address").Value.String() uiPod, err := findOdigosUIPod(client, ctx, ns) if err != nil { @@ -163,5 +164,5 @@ func init() { rootCmd.AddCommand(uiCmd) uiCmd.Flags().Int("port", defaultPort, "Port to listen on") uiCmd.Flags().String("address", "localhost", "Address to listen on") - uiCmd.Flags().Bool("beta", false, "use new experimental UI") + uiCmd.Flags().Bool("legacy", false, "Use the legacy UI port") } diff --git a/helm/odigos/templates/ui/service.yaml b/helm/odigos/templates/ui/service.yaml index c3eb92989..c381c2c3b 100644 --- a/helm/odigos/templates/ui/service.yaml +++ b/helm/odigos/templates/ui/service.yaml @@ -9,7 +9,7 @@ spec: ports: - name: ui port: 3000 - - name: 'beta-ui' + - name: 'legacy-ui' port: 3001 - name: otlp port: 4317 diff --git a/tests/common/assert/odigos-installed.yaml b/tests/common/assert/odigos-installed.yaml index 15ccf986c..0eed841e5 100644 --- a/tests/common/assert/odigos-installed.yaml +++ b/tests/common/assert/odigos-installed.yaml @@ -92,7 +92,7 @@ spec: port: 3000 protocol: TCP targetPort: 3000 - - name: beta-ui + - name: legacy-ui port: 3001 protocol: TCP targetPort: 3001 diff --git a/tests/e2e/ui/chainsaw-test.yaml b/tests/e2e/ui/chainsaw-test.yaml index 87ca791e0..f4f293dab 100644 --- a/tests/e2e/ui/chainsaw-test.yaml +++ b/tests/e2e/ui/chainsaw-test.yaml @@ -41,7 +41,7 @@ spec: - script: timeout: 10s content: | - nohup ../../../cli/odigos ui --beta > odigos-ui.log 2>&1 & + nohup ../../../cli/odigos ui > odigos-ui.log 2>&1 & sleep 5 - name: Wait for UI