-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC] Support Bazel platform mappings
This is a proof of concept/RFC to support Bazel platforms in skaffold. Skaffold uses github.com/opencontainers/image-spec/specs-go/v1 and containerd strings like "linux/amd64" or "linux/arm64/v7" to represent platforms. Bazel's platform system uses bazel targets to define platforms (https://bazel.build/extending/platforms). While there are common cpu and os definitions available, each Bazel project defines its own target platforms (!) Currently, when skaffold invokes bazel, skaffold's platform information is not passed to Bazel. Bazel defaults to the host platform, unless the target skaffold is building explicitly specifies a platform. This change allows a build-level setting for configuring Bazel and defines a platform mapping from Skaffold platforms to Bazel platforms. The Bazel artifact builder then passes the --platforms flag to Bazel if applicable. This allows a Bazel + Skaffold project to flexibly target multiple platforms. This PR is intended to start a discussion w/ the Skaffold team on whether this should be supported and if so, how it should be implemented. If there's interest we can discuss pushing forward from there. This doesn't include any tests or documentation, and is not intended to be merged as-is.
- Loading branch information
Showing
5 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters