@@ -63,6 +63,14 @@ export type LauncherBackendDeployResult = {
|
||||
logs: string;
|
||||
};
|
||||
|
||||
export type DeploymentResourceLimits = {
|
||||
replicas?: number;
|
||||
cpuRequest?: string;
|
||||
cpuLimit?: string;
|
||||
memoryRequest?: string;
|
||||
memoryLimit?: string;
|
||||
};
|
||||
|
||||
export type LauncherBuildEnvVariable = {
|
||||
key: string;
|
||||
value: string;
|
||||
@@ -281,10 +289,10 @@ export function getLauncherBackendDeployment() {
|
||||
return apiRequest<LauncherBackendDeployment>('/launcher/backend-deployment');
|
||||
}
|
||||
|
||||
export function deployLauncherBackend(image: string) {
|
||||
export function deployLauncherBackend(image: string, resources?: DeploymentResourceLimits) {
|
||||
return apiRequest<LauncherBackendDeployResult>('/launcher/backend-deployment', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ image })
|
||||
body: JSON.stringify({ image, resources: resources && Object.keys(resources).length ? resources : undefined })
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user