mirror of
https://github.com/labring/sealos.git
synced 2026-08-28 17:22:42 +08:00
fix(account-service): add ingress resource adoption and create instal… (#6832)
* fix(account-service): add ingress resource adoption and create install script Signed-off-by: cuisongliu <cuisongliu@qq.com> * fix(config): add support for allowedAllOrigins in configmap and values Signed-off-by: cuisongliu <cuisongliu@qq.com> --------- Signed-off-by: cuisongliu <cuisongliu@qq.com>
This commit is contained in:
@@ -10,6 +10,7 @@ kubectl delete rolebinding license-leader-election-rolebinding -n account-system
|
||||
kubectl delete clusterrole license-manager-role --ignore-not-found
|
||||
kubectl delete clusterrole license-metrics-reader --ignore-not-found
|
||||
kubectl delete clusterrole license-proxy-role --ignore-not-found
|
||||
kubectl delete clusterrole license-controller-clusterrole --ignore-not-found
|
||||
kubectl delete role license-leader-election-role -n account-system --ignore-not-found
|
||||
kubectl delete serviceaccount license-controller-manager -n account-system --ignore-not-found
|
||||
helm upgrade -i license -n license-system --create-namespace ./charts/license-controller ${HELM_OPTS}
|
||||
|
||||
@@ -13,11 +13,16 @@ data:
|
||||
regionUID: "{{ .Values.desktopConfig.regionUID }}"
|
||||
certSecretName: "{{ .Values.desktopConfig.certSecretName }}"
|
||||
proxyDomain: "{{ .Values.desktopConfig.cloudDomain }}"
|
||||
allowedAllOrigins: {{ .Values.desktopConfig.allowedAllOrigins | default false }}
|
||||
allowedOrigins:
|
||||
{{- if .Values.desktopConfig.allowedAllOrigins }}
|
||||
- "*"
|
||||
{{- else }}
|
||||
{{- $defaultAllowedOrigins := list "costcenter" "license" -}}
|
||||
{{- $allowedOrigins := .Values.desktopConfig.allowedOrigins | default $defaultAllowedOrigins -}}
|
||||
{{- range $origin := $allowedOrigins }}
|
||||
- "https://{{ $origin }}.{{ $.Values.desktopConfig.cloudDomain }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
common:
|
||||
|
||||
@@ -58,6 +58,7 @@ desktopConfig:
|
||||
billingUrl: "http://account-service.account-system.svc:2333"
|
||||
billingToken: ""
|
||||
|
||||
allowedAllOrigins: false
|
||||
allowedOrigins:
|
||||
- "costcenter"
|
||||
- "license"
|
||||
|
||||
@@ -5,6 +5,8 @@ USER 65532:65532
|
||||
COPY registry registry
|
||||
COPY manifests manifests
|
||||
|
||||
COPY install.sh install.sh
|
||||
|
||||
ENV certSecretName="wildcard-cert"
|
||||
ENV cloudDomain="127.0.0.1.nip.io"
|
||||
ENV cloudPort=""
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
kubectl delete clusterrolebinding license-frontend-role-binding --ignore-not-found
|
||||
kubectl apply -f manifests
|
||||
@@ -33,6 +33,7 @@ if ! helm status "${RELEASE_NAME}" -n "${RELEASE_NAMESPACE}" >/dev/null 2>&1; th
|
||||
adopt_namespaced_resource configmap region-info
|
||||
adopt_namespaced_resource service account-service
|
||||
adopt_namespaced_resource deployment account-service
|
||||
adopt_namespaced_resource ingress account-service
|
||||
fi
|
||||
|
||||
# Build helm set args from ConfigMap
|
||||
|
||||
Reference in New Issue
Block a user