Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
feat: add proxyPort UI option
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Mar 8, 2024
1 parent 5b4a9d7 commit b1099af
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1/ytsaurus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ type UISpec struct {
Description *string `json:"description,omitempty"`
Group *string `json:"group,omitempty"`

// This is a temporary solution to allow UI to connect to proxies directly when resolving heavy proxies.
//+optional
ProxyPort *int `json:"proxyPort,omitempty"`

Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/cluster.ytsaurus.tech_ytsaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34635,6 +34635,10 @@ spec:
type: object
odinBaseUrl:
type: string
proxyPort:
description: This is a temporary solution to allow UI to connect
to proxies directly when res
type: integer
resources:
description: ResourceRequirements describes the compute resource
requirements.
Expand Down
4 changes: 4 additions & 0 deletions pkg/ytconfig/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@ func (g *Generator) GetUIClustersConfig() ([]byte, error) {
c.Proxy = g.GetHTTPProxiesAddress(consts.DefaultHTTPProxyRole)
c.PrimaryMaster.CellTag = g.ytsaurus.Spec.PrimaryMasters.CellTag

if port := g.ytsaurus.Spec.UI.ProxyPort; port != nil {
c.ProxyPort = *port
}

c.Theme = g.ytsaurus.Spec.UI.Theme
c.Environment = g.ytsaurus.Spec.UI.Environment
if g.ytsaurus.Spec.UI.Group != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/ytconfig/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type UICluster struct {
ID string `yson:"id"`
Name string `yson:"name"`
Proxy string `yson:"proxy"`
ProxyPort int `yson:"proxyPort,omitempty"`
Secure bool `yson:"secure"`
Authentication UIAuthenticationType `yson:"authentication"`
Group string `yson:"group"`
Expand Down
4 changes: 4 additions & 0 deletions ytop-chart/files/cluster.ytsaurus.tech_ytsaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34635,6 +34635,10 @@ spec:
type: object
odinBaseUrl:
type: string
proxyPort:
description: This is a temporary solution to allow UI to connect
to proxies directly when res
type: integer
resources:
description: ResourceRequirements describes the compute resource
requirements.
Expand Down

0 comments on commit b1099af

Please sign in to comment.