diff --git a/apis/installer/v1alpha1/ace_ace_types.go b/apis/installer/v1alpha1/ace_ace_types.go index a5ea3bd67..7a0e0d72e 100644 --- a/apis/installer/v1alpha1/ace_ace_types.go +++ b/apis/installer/v1alpha1/ace_ace_types.go @@ -370,6 +370,8 @@ type PlatformSettings struct { OtherShowFooterTemplateLoadTime bool `json:"otherShowFooterTemplateLoadTime"` EnableCSRFCookieHttpOnly bool `json:"enableCSRFCookieHttpOnly"` // +optional + LoginURL string `json:"loginURL"` + // +optional LogoutURL string `json:"logoutURL"` } diff --git a/apis/installer/v1alpha1/ace_cluster_ui_types.go b/apis/installer/v1alpha1/ace_cluster_ui_types.go index 930b38d0f..2cd82132c 100644 --- a/apis/installer/v1alpha1/ace_cluster_ui_types.go +++ b/apis/installer/v1alpha1/ace_cluster_ui_types.go @@ -73,6 +73,8 @@ type ClusterUiSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *core.Affinity `json:"affinity"` + // +optional + LoginURL string `json:"loginURL"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/apis/installer/v1alpha1/ace_kubedb_ui.go b/apis/installer/v1alpha1/ace_kubedb_ui.go index 9de1be696..c393b4a57 100644 --- a/apis/installer/v1alpha1/ace_kubedb_ui.go +++ b/apis/installer/v1alpha1/ace_kubedb_ui.go @@ -73,6 +73,8 @@ type KubedbUiSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *core.Affinity `json:"affinity"` + // +optional + LoginURL string `json:"loginURL"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/apis/installer/v1alpha1/ace_options_types.go b/apis/installer/v1alpha1/ace_options_types.go index 7c690a4ee..d6dc8e5af 100644 --- a/apis/installer/v1alpha1/ace_options_types.go +++ b/apis/installer/v1alpha1/ace_options_types.go @@ -304,6 +304,8 @@ type AceOptionsSettings struct { // +optional DomainWhiteList []string `json:"domainWhiteList"` // +optional + LoginURL string `json:"loginURL"` + // +optional LogoutURL string `json:"logoutURL"` } diff --git a/apis/installer/v1alpha1/ace_platform_ui_types.go b/apis/installer/v1alpha1/ace_platform_ui_types.go index aaca584b4..4d94ba4c3 100644 --- a/apis/installer/v1alpha1/ace_platform_ui_types.go +++ b/apis/installer/v1alpha1/ace_platform_ui_types.go @@ -75,6 +75,8 @@ type PlatformUiSpec struct { // +optional Affinity *core.Affinity `json:"affinity"` Settings AceSettings `json:"settings"` + // +optional + LoginURL string `json:"loginURL"` } type AcePlatformUISettings struct { diff --git a/charts/ace/README.md b/charts/ace/README.md index 8312f1192..687be6512 100644 --- a/charts/ace/README.md +++ b/charts/ace/README.md @@ -173,6 +173,7 @@ The following table lists the configurable parameters of the `ace` chart and the | settings.platform.enableCSRFCookieHttpOnly | csrf cookie http only enable | false | | settings.platform.cookieUsername | logged in username | ace_awesome | | settings.platform.cookieRememberName | to auto sign in | ace_incredible | +| settings.platform.loginURL | This URL will be used to forward users to a third-party login page | https://appscode.ninja | | settings.platform.logoutURL | redirect url after logout | https://appscode.ninja | | settings.grafana.appMode | possible values : production, development | production | | settings.grafana.secretKey | | 4nHrUDNw00AjlhAq8hCGYPxBt6I1UCbmdC5ReY19IPWdy8qFDzTZzXkdCr5d6qwP | diff --git a/charts/ace/templates/platform/config.yaml b/charts/ace/templates/platform/config.yaml index fbec545d2..259b42a78 100644 --- a/charts/ace/templates/platform/config.yaml +++ b/charts/ace/templates/platform/config.yaml @@ -15,6 +15,7 @@ stringData: PROTOCOL = http DOMAIN = {{ .Values.global.platform.host }} BASE_URL = https://{{ .Values.global.platform.host }}/ + LOGIN_URL = {{ .Values.settings.platform.loginURL }} LOGOUT_URL = {{ .Values.settings.platform.logoutURL }} LANDING_PAGE = {{ .Values.settings.platform.serverLandingPage }} APP_DATA_PATH = /data diff --git a/charts/ace/values.openapiv3_schema.yaml b/charts/ace/values.openapiv3_schema.yaml index 7dcd3ae33..428449602 100644 --- a/charts/ace/values.openapiv3_schema.yaml +++ b/charts/ace/values.openapiv3_schema.yaml @@ -929,6 +929,8 @@ properties: items: type: string type: array + loginURL: + type: string nameOverride: type: string nodeSelector: @@ -4356,6 +4358,8 @@ properties: items: type: string type: array + loginURL: + type: string nameOverride: type: string nodeSelector: @@ -17375,6 +17379,8 @@ properties: items: type: string type: array + loginURL: + type: string nameOverride: type: string nodeSelector: @@ -18870,6 +18876,8 @@ properties: type: string logMode: type: string + loginURL: + type: string logoutURL: type: string otherShowFooterBranding: diff --git a/charts/ace/values.yaml b/charts/ace/values.yaml index 19865efbb..dc6d0e4eb 100644 --- a/charts/ace/values.yaml +++ b/charts/ace/values.yaml @@ -388,6 +388,9 @@ settings: # to auto sign in cookieRememberName: ace_incredible + # This URL will be used to forward users to a third-party login page + loginURL: https://appscode.ninja + # redirect url after logout logoutURL: https://appscode.ninja diff --git a/charts/cluster-ui/README.md b/charts/cluster-ui/README.md index 0fda7ac85..8f45fe67f 100644 --- a/charts/cluster-ui/README.md +++ b/charts/cluster-ui/README.md @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the `cluster-ui` chart | nodeSelector | | {} | | tolerations | | [] | | affinity | | {} | +| loginURL | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: diff --git a/charts/cluster-ui/templates/deployment.yaml b/charts/cluster-ui/templates/deployment.yaml index 3cb3bca57..d2bf84c57 100644 --- a/charts/cluster-ui/templates/deployment.yaml +++ b/charts/cluster-ui/templates/deployment.yaml @@ -31,6 +31,11 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ include "image.registry" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{- if .Values.loginURL }} + - name: LOGIN_URL + value: {{ .Values.loginURL | quote }} + {{- end }} ports: - name: http containerPort: 8080 diff --git a/charts/cluster-ui/values.openapiv3_schema.yaml b/charts/cluster-ui/values.openapiv3_schema.yaml index c2ca1d9e5..2448517fe 100644 --- a/charts/cluster-ui/values.openapiv3_schema.yaml +++ b/charts/cluster-ui/values.openapiv3_schema.yaml @@ -477,6 +477,8 @@ properties: items: type: string type: array + loginURL: + type: string nameOverride: type: string nodeSelector: diff --git a/charts/cluster-ui/values.yaml b/charts/cluster-ui/values.yaml index 5cf3298f4..800046986 100644 --- a/charts/cluster-ui/values.yaml +++ b/charts/cluster-ui/values.yaml @@ -69,3 +69,5 @@ nodeSelector: {} tolerations: [] affinity: {} + +loginURL: "" diff --git a/charts/kubedb-ui/README.md b/charts/kubedb-ui/README.md index 8d7477c05..07f70947f 100644 --- a/charts/kubedb-ui/README.md +++ b/charts/kubedb-ui/README.md @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the `kubedb-ui` chart a | nodeSelector | | {} | | tolerations | | [] | | affinity | | {} | +| loginURL | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: diff --git a/charts/kubedb-ui/templates/deployment.yaml b/charts/kubedb-ui/templates/deployment.yaml index 6358a7373..b577a4e36 100644 --- a/charts/kubedb-ui/templates/deployment.yaml +++ b/charts/kubedb-ui/templates/deployment.yaml @@ -31,6 +31,11 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ include "image.registry" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{- if .Values.loginURL }} + - name: LOGIN_URL + value: {{ .Values.loginURL | quote }} + {{- end }} ports: - name: http containerPort: 8080 diff --git a/charts/kubedb-ui/values.openapiv3_schema.yaml b/charts/kubedb-ui/values.openapiv3_schema.yaml index c2ca1d9e5..2448517fe 100644 --- a/charts/kubedb-ui/values.openapiv3_schema.yaml +++ b/charts/kubedb-ui/values.openapiv3_schema.yaml @@ -477,6 +477,8 @@ properties: items: type: string type: array + loginURL: + type: string nameOverride: type: string nodeSelector: diff --git a/charts/kubedb-ui/values.yaml b/charts/kubedb-ui/values.yaml index b3eeb3791..95a214e53 100644 --- a/charts/kubedb-ui/values.yaml +++ b/charts/kubedb-ui/values.yaml @@ -69,3 +69,5 @@ nodeSelector: {} tolerations: [] affinity: {} + +loginURL: "" diff --git a/charts/platform-ui/README.md b/charts/platform-ui/README.md index 12bbe6ea0..0c223fc8a 100644 --- a/charts/platform-ui/README.md +++ b/charts/platform-ui/README.md @@ -78,6 +78,7 @@ The following table lists the configurable parameters of the `platform-ui` chart | settings.secretName.grafanaConfig | | "" | | settings.secretName.objstore | | "" | | settings.secretName.nats | | "" | +| loginURL | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: diff --git a/charts/platform-ui/templates/deployment.yaml b/charts/platform-ui/templates/deployment.yaml index dd555cfce..feac4226c 100644 --- a/charts/platform-ui/templates/deployment.yaml +++ b/charts/platform-ui/templates/deployment.yaml @@ -49,6 +49,10 @@ spec: - name: NODE_TLS_REJECT_UNAUTHORIZED value: "0" {{- end }} + {{- if .Values.loginURL }} + - name: LOGIN_URL + value: {{ .Values.loginURL | quote }} + {{- end }} ports: - name: http containerPort: 8080 diff --git a/charts/platform-ui/values.openapiv3_schema.yaml b/charts/platform-ui/values.openapiv3_schema.yaml index 2e3d78e57..7c50faa4c 100644 --- a/charts/platform-ui/values.openapiv3_schema.yaml +++ b/charts/platform-ui/values.openapiv3_schema.yaml @@ -477,6 +477,8 @@ properties: items: type: string type: array + loginURL: + type: string nameOverride: type: string nodeSelector: diff --git a/charts/platform-ui/values.yaml b/charts/platform-ui/values.yaml index 3948d8c04..023ea9a9e 100644 --- a/charts/platform-ui/values.yaml +++ b/charts/platform-ui/values.yaml @@ -82,3 +82,5 @@ settings: grafanaConfig: "" objstore: "" nats: "" + +loginURL: "" diff --git a/schema/ace-options/values.openapiv3_schema.yaml b/schema/ace-options/values.openapiv3_schema.yaml index 39d871401..fc5861ecb 100644 --- a/schema/ace-options/values.openapiv3_schema.yaml +++ b/schema/ace-options/values.openapiv3_schema.yaml @@ -1742,6 +1742,8 @@ properties: items: type: string type: array + loginURL: + type: string logoutURL: type: string smtp: