Skip to content

Commit

Permalink
feat: launchpad api createApp with extra parameters
Browse files Browse the repository at this point in the history
Signed-off-by: jingyang <3161362058@qq.com>
  • Loading branch information
zjy365 committed Mar 15, 2024
1 parent 424fcc7 commit e8d1c37
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions frontend/providers/applaunchpad/src/types/app.d.ts
Expand Up @@ -96,6 +96,7 @@ export interface AppEditType {
configMapList: {
mountPath: string;
value: string;
subPath?: string;
}[];
storeList: {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions frontend/providers/applaunchpad/src/utils/deployYaml2Json.ts
Expand Up @@ -99,7 +99,7 @@ export const json2DeployCr = (data: AppEditType, type: 'deployment' | 'statefuls
const configMapVolumeMounts = data.configMapList.map((item) => ({
name: pathToNameFormat(item.mountPath),
mountPath: item.mountPath,
subPath: pathFormat(item.mountPath)
subPath: item?.subPath ? item.subPath : pathFormat(item.mountPath)
}));
const configMapVolumes = data.configMapList.map((item) => ({
name: pathToNameFormat(item.mountPath), // name === [development.***.volumeMounts[*].name]
Expand All @@ -108,7 +108,7 @@ export const json2DeployCr = (data: AppEditType, type: 'deployment' | 'statefuls
items: [
{
key: pathToNameFormat(item.mountPath),
path: pathFormat(item.mountPath) // path ===[development.***.volumeMounts[*].subPath]
path: item?.subPath ? item.subPath : pathFormat(item.mountPath) // path ===[development.***.volumeMounts[*].subPath]
}
]
}
Expand Down
3 changes: 0 additions & 3 deletions frontend/providers/cronjob/.env.template
@@ -1,6 +1,3 @@
NEXT_PUBLIC_MOCK_USER=
SEALOS_DOMAIN="cloud.sealos.io"
FASTGPT_KEY=
STORAGE_CLASSNAME=choosable
MONITOR_URL=""
APPLAUNCHPAD_URL=""
1 change: 0 additions & 1 deletion frontend/providers/dbprovider/deploy/Kubefile
Expand Up @@ -15,6 +15,5 @@ ENV minioSecretKey=""
ENV minioPort=""
ENV migrateFileImage=""
ENV minioBucketName=""
ENV BACKUP_ENABLED="false"

CMD ["kubectl apply -f manifests"]
Expand Up @@ -44,16 +44,20 @@ spec:
value: "{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}"
- name: MONITOR_URL
value: {{ .monitorUrl }}
- name: MINIO_URL
value: {{ .minioUrl }}
- name: MINIO_ACCESS_KEY
value: {{ .minioAccessKey }}
- name: MINIO_SECRET_KEY
value: {{ .minioSecretKey }}
- name: MIGRATE_FILE_IMAGE
value: {{ .migrateFileImage }}
- name: MINIO_PORT
value: {{ .minioPort }}
value: '{{ .minioPort }}'
- name: MINIO_BUCKET_NAME
value: {{ .minioBucketName }}
- name: BACKUP_ENABLED
value: "false"
securityContext:
runAsNonRoot: true
runAsUser: 1001
Expand Down
4 changes: 2 additions & 2 deletions frontend/providers/dbprovider/src/utils/json2Yaml.ts
Expand Up @@ -111,9 +111,9 @@ export const json2CreateCluster = (data: DBEditType, backupInfo?: BackupItemType
spec: {
affinity: {
nodeLabels: {},
podAntiAffinity: 'Required',
podAntiAffinity: 'Preferred',
tenancy: 'SharedNode',
topologyKeys: ['kubernetes.io/hostname']
topologyKeys: []
},
clusterDefinitionRef: 'apecloud-mysql',
clusterVersionRef: data.dbVersion,
Expand Down

0 comments on commit e8d1c37

Please sign in to comment.