Skip to content

Commit

Permalink
feat: helm legacy UI flag (#2009)
Browse files Browse the repository at this point in the history
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 <alonbraymok007@gmail.com>
  • Loading branch information
alonkeyval and alonbraymok authored Dec 16, 2024
1 parent 90922b9 commit a84e408
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/resources/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func NewUIService(ns string) *corev1.Service {
Port: 3000,
},
{
Name: "beta-ui",
Name: "legacy-ui",
Port: 3001,
},
{
Expand Down
5 changes: 3 additions & 2 deletions cli/cmd/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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")
}
2 changes: 1 addition & 1 deletion helm/odigos/templates/ui/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
ports:
- name: ui
port: 3000
- name: 'beta-ui'
- name: 'legacy-ui'
port: 3001
- name: otlp
port: 4317
Expand Down
2 changes: 1 addition & 1 deletion tests/common/assert/odigos-installed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
port: 3000
protocol: TCP
targetPort: 3000
- name: beta-ui
- name: legacy-ui
port: 3001
protocol: TCP
targetPort: 3001
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/ui/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a84e408

Please sign in to comment.