mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 15:56:40 +00:00
Merge pull request #759 from resin-io/fix-healthcheck
fix: overlay compose fields on image for healthcheck
This commit is contained in:
commit
cdd0ea9fc3
@ -190,8 +190,13 @@ function getNanoseconds(timeStr: string): number {
|
||||
|
||||
export function composeHealthcheckToServiceHealthcheck(
|
||||
healthcheck: ComposeHealthcheck | null | undefined,
|
||||
): ServiceHealthcheck {
|
||||
if (healthcheck == null || healthcheck.disable) {
|
||||
): ServiceHealthcheck | { } {
|
||||
|
||||
if (healthcheck == null) {
|
||||
return { };
|
||||
}
|
||||
|
||||
if (healthcheck.disable) {
|
||||
return { test: [ 'NONE' ] };
|
||||
}
|
||||
|
||||
@ -230,7 +235,8 @@ export function getHealthcheck(
|
||||
composeHealthcheck,
|
||||
);
|
||||
|
||||
return _.defaults(composeServiceHealthcheck, imageServiceHealthcheck);
|
||||
// Overlay any compose healthcheck fields on the image healthchecks
|
||||
return _.assign({ test: [ 'NONE' ] }, imageServiceHealthcheck, composeServiceHealthcheck);
|
||||
}
|
||||
|
||||
export function serviceHealthcheckToDockerHealthcheck(
|
||||
|
Loading…
Reference in New Issue
Block a user