Skip to content

Commit

Permalink
Allow disabling the BOM label
Browse files Browse the repository at this point in the history
We are currently supporting the old-style BOM label and the new-style SBOM layer. By default, we output both.

In some situations, if the BOM label grows large enough the resulting will not run on Kubernetes. It fails because the label is too large. You may now set the `BP_BOM_LABEL_DISABLED` env variable to `true` and on the next build, the BOM label will not be included with the image.

The label is included by default, despite this known issue, to for backward compatibility.

Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
  • Loading branch information
Daniel Mikusa committed Feb 8, 2022
1 parent 16b3969 commit b6c6002
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/buildpacks/libcnb"

"github.com/paketo-buildpacks/libpak/internal"
"github.com/paketo-buildpacks/libpak/sherpa"
)

// Main is called by the main function of a buildpack, encapsulating both detection and build in the same binary.
Expand All @@ -29,6 +30,7 @@ func Main(detector libcnb.Detector, builder libcnb.Builder, options ...libcnb.Op
libcnb.WithEnvironmentWriter(internal.NewEnvironmentWriter()),
libcnb.WithExitHandler(internal.NewExitHandler()),
libcnb.WithTOMLWriter(internal.NewTOMLWriter()),
libcnb.WithBOMLabel(!sherpa.ResolveBool("BP_BOM_LABEL_DISABLED")),
}, options...)...,
)
}

0 comments on commit b6c6002

Please sign in to comment.