Skip to content

Commit

Permalink
Add login URL (#663)
Browse files Browse the repository at this point in the history
Signed-off-by: Rokibul Hasan <[email protected]>
  • Loading branch information
RokibulHasan7 authored Jan 6, 2025
1 parent 5dc3cb4 commit 6d9cb6f
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apis/installer/v1alpha1/ace_ace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down
2 changes: 2 additions & 0 deletions apis/installer/v1alpha1/ace_cluster_ui_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions apis/installer/v1alpha1/ace_kubedb_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions apis/installer/v1alpha1/ace_options_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ type AceOptionsSettings struct {
// +optional
DomainWhiteList []string `json:"domainWhiteList"`
// +optional
LoginURL string `json:"loginURL"`
// +optional
LogoutURL string `json:"logoutURL"`
}

Expand Down
2 changes: 2 additions & 0 deletions apis/installer/v1alpha1/ace_platform_ui_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions charts/ace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | <code>false</code> |
| settings.platform.cookieUsername | logged in username | <code>ace_awesome</code> |
| settings.platform.cookieRememberName | to auto sign in | <code>ace_incredible</code> |
| settings.platform.loginURL | This URL will be used to forward users to a third-party login page | <code>https://appscode.ninja</code> |
| settings.platform.logoutURL | redirect url after logout | <code>https://appscode.ninja</code> |
| settings.grafana.appMode | possible values : production, development | <code>production</code> |
| settings.grafana.secretKey | | <code>4nHrUDNw00AjlhAq8hCGYPxBt6I1UCbmdC5ReY19IPWdy8qFDzTZzXkdCr5d6qwP</code> |
Expand Down
1 change: 1 addition & 0 deletions charts/ace/templates/platform/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions charts/ace/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
nameOverride:
type: string
nodeSelector:
Expand Down Expand Up @@ -4356,6 +4358,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
nameOverride:
type: string
nodeSelector:
Expand Down Expand Up @@ -17375,6 +17379,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
nameOverride:
type: string
nodeSelector:
Expand Down Expand Up @@ -18870,6 +18876,8 @@ properties:
type: string
logMode:
type: string
loginURL:
type: string
logoutURL:
type: string
otherShowFooterBranding:
Expand Down
3 changes: 3 additions & 0 deletions charts/ace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions charts/cluster-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the `cluster-ui` chart
| nodeSelector | | <code>{}</code> |
| tolerations | | <code>[]</code> |
| affinity | | <code>{}</code> |
| loginURL | | <code>""</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
Expand Down
5 changes: 5 additions & 0 deletions charts/cluster-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/cluster-ui/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
nameOverride:
type: string
nodeSelector:
Expand Down
2 changes: 2 additions & 0 deletions charts/cluster-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ nodeSelector: {}
tolerations: []

affinity: {}

loginURL: ""
1 change: 1 addition & 0 deletions charts/kubedb-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the `kubedb-ui` chart a
| nodeSelector | | <code>{}</code> |
| tolerations | | <code>[]</code> |
| affinity | | <code>{}</code> |
| loginURL | | <code>""</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
Expand Down
5 changes: 5 additions & 0 deletions charts/kubedb-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/kubedb-ui/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
nameOverride:
type: string
nodeSelector:
Expand Down
2 changes: 2 additions & 0 deletions charts/kubedb-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ nodeSelector: {}
tolerations: []

affinity: {}

loginURL: ""
1 change: 1 addition & 0 deletions charts/platform-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The following table lists the configurable parameters of the `platform-ui` chart
| settings.secretName.grafanaConfig | | <code>""</code> |
| settings.secretName.objstore | | <code>""</code> |
| settings.secretName.nats | | <code>""</code> |
| loginURL | | <code>""</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
Expand Down
4 changes: 4 additions & 0 deletions charts/platform-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/platform-ui/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
nameOverride:
type: string
nodeSelector:
Expand Down
2 changes: 2 additions & 0 deletions charts/platform-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ settings:
grafanaConfig: ""
objstore: ""
nats: ""

loginURL: ""
2 changes: 2 additions & 0 deletions schema/ace-options/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,8 @@ properties:
items:
type: string
type: array
loginURL:
type: string
logoutURL:
type: string
smtp:
Expand Down

0 comments on commit 6d9cb6f

Please sign in to comment.