Skip to content

Commit

Permalink
feat: add ui configmap
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
zzzhangqi committed May 21, 2024
1 parent 4d80222 commit ecb7f95
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
15 changes: 15 additions & 0 deletions templates/appstore-admin-ui-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.Component.rbd_app_ui.enable }}
apiVersion: v1
kind: ConfigMap
metadata:
name: appstore-admin-ui
namespace: {{ .Release.Namespace }}
data:
config.js: |
window.BASE_URL_INFO={
REACT_BASE_URL: '{{ .Values.IAM.admin_base_url }}',
YANXIANG_OPEN_API_URL: '{{ .Values.IAM.yanxiang_open_api_url }}',
YANXIANG_INST_URL: '{{ .Values.IAM.yanxiang_inst_url }}',
REACT_ENV: 'admin'
}
{{- end }}
9 changes: 9 additions & 0 deletions templates/appstore-admin-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@ spec:
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /app/www/static/config.js
subPath: config.js
name: config
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 0644
name: appstore-admin-ui
name: config
{{- end }}
15 changes: 15 additions & 0 deletions templates/appstore-user-ui-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.Component.rbd_app_ui.enable }}
apiVersion: v1
kind: ConfigMap
metadata:
name: appstore-user-ui
namespace: {{ .Release.Namespace }}
data:
config.js: |
window.BASE_URL_INFO={
REACT_BASE_URL: '{{ .Values.IAM.user_base_url }}',
YANXIANG_OPEN_API_URL: '{{ .Values.IAM.yanxiang_open_api_url }}',
YANXIANG_INST_URL: '{{ .Values.IAM.yanxiang_inst_url }}',
REACT_ENV: 'user'
}
{{- end }}
9 changes: 9 additions & 0 deletions templates/appstore-user-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@ spec:
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /app/www/static/config.js
subPath: config.js
name: config
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 0644
name: appstore-user-ui
name: config
{{- end }}
13 changes: 13 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ operator:
pullPolicy: IfNotPresent
logLevel: 4

#############################################
# IAM Configuration
#############################################
IAM:
# 管理端鉴权网关
admin_base_url: https://91iam-mgmt-gateway.9n1m.com/appstore-gys-admin
# 用户端鉴权网关
user_base_url: https://91iam-gateway.9n1m.com/appstore-gys-user
# 管理端 OPEN API
yanxiang_open_api_url: https://91iam-mgmt.9n1m.com
# 用户端 OPEN API
yanxiang_inst_url: https://91iam-inst.9n1m.com

#############################################
# Rainbondcluster install Configuration
#############################################
Expand Down

0 comments on commit ecb7f95

Please sign in to comment.