Add --additional-space flag to preload

Change-type: minor
This commit is contained in:
Alexis Svinartchouk 2020-12-28 17:08:20 +01:00
parent 0e7f953f72
commit 9fff9266d4
2 changed files with 12 additions and 0 deletions

View File

@ -2404,6 +2404,10 @@ disables check for matching architecture in image and application
pin the preloaded device to the preloaded release on provision
#### --additional-space ADDITIONAL-SPACE
expand the image by this amount of bytes instead of automatically estimating the required amount
#### --add-certificate ADD-CERTIFICATE
Add the given certificate (in PEM format) to /etc/ssl/certs in the preloading container.

View File

@ -45,6 +45,7 @@ interface FlagsDef extends DockerConnectionCliFlags {
'splash-image'?: string;
'dont-check-arch': boolean;
'pin-device-to-release': boolean;
'additional-space'?: number;
'add-certificate'?: string[];
help: void;
}
@ -113,6 +114,11 @@ manually pinned using https://github.com/balena-io-projects/staged-releases .\
'pin the preloaded device to the preloaded release on provision',
char: 'p',
}),
'additional-space': flags.integer({
description:
'expand the image by this amount of bytes instead of automatically estimating the required amount',
parse: (x) => parseAsInteger(x, 'additional-space'),
}),
'add-certificate': flags.string({
description: `\
Add the given certificate (in PEM format) to /etc/ssl/certs in the preloading container.
@ -209,6 +215,7 @@ Can be repeated to add multiple certificates.\
const appId = options.app;
const splashImage = options['splash-image'];
const additionalSpace = options['additional-space'];
const dontCheckArch = options['dont-check-arch'] || false;
const pinDevice = options['pin-device-to-release'] || false;
@ -240,6 +247,7 @@ Can be repeated to add multiple certificates.\
dontCheckArch,
pinDevice,
certificates,
additionalSpace,
);
let gotSignal = false;