Skip to content

Commit c97099b

Browse files
authored
Merge pull request crossplane#6222 from web-seven/bugfix/build-labels
xpkg build command use base image labels if present
2 parents 06846a4 + abd8377 commit c97099b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/xpkg/build.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ func (b *Builder) Build(ctx context.Context, opts ...BuildOpt) (v1.Image, runtim
184184
}
185185

186186
cfg := cfgFile.Config
187-
cfg.Labels = make(map[string]string)
187+
if cfg.Labels == nil {
188+
cfg.Labels = make(map[string]string)
189+
}
188190

189191
pkgBytes, err := encode(pkg)
190192
if err != nil {

0 commit comments

Comments
 (0)