Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,4 +1011,10 @@ var (
enhancementPR("https://github.com/openshift/enhancements/pull/1933").
enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()).
mustRegister()
)

FeatureGateConsoleCustomLoginServerURL = newFeatureGate("ConsoleCustomLoginServerURL").
reportProblemsToJiraComponent("Management Console").
contactPerson("console-dev").
productScope(ocpSpecific).
enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()
14 changes: 14 additions & 0 deletions operator/v1/types_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,20 @@ type ConsoleCustomization struct {
// +listMapKey=id
// +optional
Perspectives []Perspective `json:"perspectives"`
// customLoginServerURL is an optional field that, when set, overrides the server
// address displayed in the 'oc login' command shown in the console. Use this
// to advertise an alternative API endpoint (for example, a Proxy
// or any other front-end that accepts oc login traffic) without changing
// how the console itself communicates with the Kubernetes API server.
// When omitted, the console falls back to the standard cluster API server URL.
// The value must be either empty or an absolute HTTPS URL (i.e. starting with
// 'https://') and must not exceed 1024 characters.
// +openshift:enable:FeatureGate=ConsoleCustomLoginServerURL
// +optional
// +kubebuilder:validation:XValidation:rule="size(self) == 0 || isURL(self)",message="custom login server url must be a valid absolute URL"
// +kubebuilder:validation:XValidation:rule="size(self) == 0 || url(self).getScheme() == 'https'",message="custom login server url scheme must be https"
// +kubebuilder:validation:MaxLength=1024
CustomLoginServerURL string `json:"customLoginServerURL,omitempty"`
}

// ProjectAccess contains options for project access roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ spec:
customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog
instead of the normal OpenShift product name.
type: string
customLoginServerURL:
description: |-
customLoginServerURL is an optional field that, when set, overrides the server
address displayed in the 'oc login' command shown in the console. Use this
to advertise an alternative API endpoint (for example, a Proxy
or any other front-end that accepts oc login traffic) without changing
how the console itself communicates with the Kubernetes API server.
When omitted, the console falls back to the standard cluster API server URL.
Must be a valid HTTPS URL.
maxLength: 1024
type: string
x-kubernetes-validations:
- message: custom login server url must be a valid absolute URL
rule: size(self) == 0 || isURL(self)
- message: custom login server url scheme must be https
rule: size(self) == 0 || url(self).getScheme() == 'https'
developerCatalog:
description: developerCatalog allows to configure the shown developer
catalog categories (filters) and types (sub-catalogs).
Expand Down
Loading