Update inherit-labels setting for remotes

The inherit-labels setting is a conditional boolean flag, so if it isn't
specified either way by the caller, don't send a value from a client to
the server, so that the server will be able to apply its own default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai
2025-07-21 15:09:11 -04:00
committed by tomsweeneyredhat
parent bfe6cbe319
commit bf79a9b71e

View File

@ -243,9 +243,10 @@ func Build(ctx context.Context, containerFiles []string, options types.BuildOpti
case imageTypes.OptionalBoolTrue:
params.Set("createdannotation", "1")
}
if options.InheritLabels == imageTypes.OptionalBoolFalse {
switch options.InheritLabels {
case imageTypes.OptionalBoolFalse:
params.Set("inheritlabels", "0")
} else {
case imageTypes.OptionalBoolTrue:
params.Set("inheritlabels", "1")
}