Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support user external domain #5021

Merged
merged 2 commits into from
Sep 2, 2024
Merged
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
1 change: 1 addition & 0 deletions frontend/providers/template/deploy/Kubefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ COPY manifests manifests

ENV cloudDomain="127.0.0.1.nip.io"
ENV cloudPort=""
ENV userDomain=""
ENV certSecretName="wildcard-cert"
ENV templateRepoUrl="https://github.com/labring-actions/templates"
ENV templateRepoBranch="main"
Expand Down
2 changes: 2 additions & 0 deletions frontend/providers/template/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ spec:
value: {{ .cloudDomain }}
- name: SEALOS_CLOUD_PORT
value: "{{ .cloudPort }}"
- name: SEALOS_USER_DOMAIN
value: {{ .userDomain }}
- name: SEALOS_CERT_SECRET_NAME
value: {{ .certSecretName }}
- name: TEMPLATE_REPO_URL
Expand Down
5 changes: 3 additions & 2 deletions frontend/providers/template/src/utils/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ export function compareFirstLanguages(acceptLanguageHeader: string) {

export function getTemplateEnvs(namespace?: string): EnvResponse {
const TemplateEnvs: EnvResponse = {
SEALOS_CLOUD_DOMAIN: process.env.SEALOS_CLOUD_DOMAIN || 'cloud.sealos.io',
SEALOS_CLOUD_DOMAIN:
process.env.SEALOS_USER_DOMAIN || process.env.SEALOS_CLOUD_DOMAIN || 'cloud.sealos.io',
SEALOS_CERT_SECRET_NAME: process.env.SEALOS_CERT_SECRET_NAME || 'wildcard-cert',
TEMPLATE_REPO_URL:
process.env.TEMPLATE_REPO_URL || 'https://github.com/labring-actions/templates',
Expand All @@ -276,4 +277,4 @@ export function getTemplateEnvs(namespace?: string): EnvResponse {
SHOW_AUTHOR: process.env.SHOW_AUTHOR || 'false'
};
return TemplateEnvs;
}
}
Loading