Skip to content

Commit

Permalink
Native multi-arch ClusterBuildStrategy
Browse files Browse the repository at this point in the history
This commits adds a sample multi-arch native ClusterBuildStrategy.
The ClusterBuildStrategy runs as a main orchestrator pod. It creates one slave job for each architecture requested by the Build. The slave jobs are responsible for building the container image and coordinate with the orchestrator pod via messages in FIFO pipes sent through the kubectl client.

The slave jobs run through the following coordination barriers:
1. Wait for the assets to be uploaded (source code, pull secrets, etc...)
2. Waiting for the image download to start
3. Waiting for the image download to finish

The orchestrator pod:
1. Create the slave jobs
2. Upload the assets and signal the completion of the assets upload through a write to the FIFO pipe in each slave job
3. Start the download of the oci archive
4. Inform the slave jobs the download is completed
5. Creates a manifest-list and push it to the final registry.

The service account that runs the strategy must be able to create, list, get and watch Jobs and Pods. It also needs to be allowed the exec verb for pods.
  • Loading branch information
aleskandro committed Jun 26, 2024
1 parent d35710a commit ac2ea3e
Show file tree
Hide file tree
Showing 2 changed files with 566 additions and 0 deletions.
Loading

0 comments on commit ac2ea3e

Please sign in to comment.