Skip to content

Commit

Permalink
update deploy yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Apr 30, 2024
1 parent 5bda6dd commit 59f8dd0
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 18 deletions.
6 changes: 3 additions & 3 deletions frontend/providers/applaunchpad/data/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ cloud:
domain: 127.0.0.1.nip.io
port: ''
common:
guideEnabled: 'false'
apiEnabled: 'false'
guideEnabled: false
apiEnabled: false
launchpad:
ingressTlsSecretName: wildcard-cert
eventAnalyze:
enabled: 'false'
enabled: false
fastGPTKey: ''
components:
monitor:
Expand Down
2 changes: 1 addition & 1 deletion frontend/providers/applaunchpad/deploy/Kubefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ENV cloudPort=""

ENV certSecretName="wildcard-cert"
ENV ingressSecret="wildcard-cert"
ENv monitorUrl="http://launchpad-monitor.sealos.svc.cluster.local:8428"
ENV monitorUrl="http://launchpad-monitor.sealos.svc.cluster.local:8428"

CMD ["kubectl apply -f manifests"]
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ data:
domain: {{ .cloudDomain }}
port: {{ if .cloudPort }}:{{ .cloudPort }}{{ end }}
common:
guideEnabled: "{{ .guideEnabled }}"
apiEnabled: "{{ .apiEnabled }}"
guideEnabled: {{ .guideEnabled }}
apiEnabled: {{ .apiEnabled }}
launchpad:
ingressTlsSecretName: {{ .ingressTlsSecretName }}
eventAnalyze:
enabled: "false"
enabled: false
fastGPTKey: ""
components:
monitor:
Expand All @@ -30,6 +30,9 @@ data:
default:
cpu: [100, 200, 500, 1000, 2000, 3000, 4000, 8000]
memory: [64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]
fileManger:
uploadLimit: 50 # MB
downloadLimit: 100 # MB
---
apiVersion: apps/v1
kind: Deployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { NextApiRequest, NextApiResponse } from 'next';

export default async function handler(req: NextApiRequest, res: NextApiResponse<ApiResp>) {
try {
if (global.AppConfig.common.guideEnabled !== 'true') return jsonRes(res, { data: null });
if (global.AppConfig.common.guideEnabled) return jsonRes(res, { data: null });
const kubeconfig = await authSession(req.headers);
const domain = global.AppConfig.cloud.domain;
console.log(`https://${domain}/api/v1alpha/account/getAccount`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
jsonRes<EnvResponse>(res, {
data: {
domain: global.AppConfig.cloud.domain || 'cloud.sealos.io',
guideEnabled: global.AppConfig.common.guideEnabled === 'true'
guideEnabled: global.AppConfig.common.guideEnabled
}
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export const defaultAppConfig: AppConfigType = {
port: ''
},
common: {
guideEnabled: 'false',
apiEnabled: 'false'
guideEnabled: false,
apiEnabled: false
},
launchpad: {
ingressTlsSecretName: 'wildcard-cert',
eventAnalyze: {
enabled: 'false',
enabled: false,
fastGPTKey: ''
},
components: {
Expand Down Expand Up @@ -64,9 +64,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
SEALOS_DOMAIN: global.AppConfig.cloud.domain,
DOMAIN_PORT: global.AppConfig.cloud.port?.toString() || '',
INGRESS_SECRET: global.AppConfig.launchpad.ingressTlsSecretName,
SHOW_EVENT_ANALYZE: global.AppConfig.launchpad.eventAnalyze.enabled === 'true',
SHOW_EVENT_ANALYZE: global.AppConfig.launchpad.eventAnalyze.enabled,
FORM_SLIDER_LIST_CONFIG: global.AppConfig.launchpad.appResourceFormSliderConfig,
guideEnabled: global.AppConfig.common.guideEnabled === 'true',
guideEnabled: global.AppConfig.common.guideEnabled,
fileMangerConfig: global.AppConfig.launchpad.fileManger,
CURRENCY: Coin.shellCoin
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/providers/applaunchpad/src/store/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export const serverLoadInitData = () => {
SEALOS_DOMAIN = global.AppConfig.cloud.domain || 'cloud.sealos.io';
DOMAIN_PORT = global.AppConfig.cloud.port || '';
INGRESS_SECRET = global.AppConfig.cloud.domain || 'wildcard-cert';
SHOW_EVENT_ANALYZE = global.AppConfig.launchpad.eventAnalyze.enabled === 'true';
SHOW_EVENT_ANALYZE = global.AppConfig.launchpad.eventAnalyze.enabled;
} catch (error) {}
};
6 changes: 3 additions & 3 deletions frontend/providers/applaunchpad/src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export type AppConfigType = {
port?: string;
};
common: {
guideEnabled: string;
apiEnabled: string;
guideEnabled: boolean;
apiEnabled: boolean;
};
launchpad: {
ingressTlsSecretName: string;
eventAnalyze: {
enabled: string;
enabled: boolean;
fastGPTKey?: string;
};
components: {
Expand Down

0 comments on commit 59f8dd0

Please sign in to comment.