Codenamed build-v2
An API to build container-images on Kubernetes using popular strategies and tools like source-to-image
, buildpack-v3
, kaniko
, jib
and buildah
, in an extensible way.
Dependency | Supported versions |
---|---|
Kubernetes | v1.15.*, v1.16.*, v1.17.* |
Tekton | v0.11.* |
The following are the build strategies supported by this operator, out-of-the-box:
Users have the option to define their own BuildStrategy
or ClusterBuildStrategy
resources and make them available for consumption via the Build
resource.
This operator ships four CRDs :
- The
BuildStragegy
CRD and theClusterBuildStrategy
CRD is used to register a strategy. - The
Build
CRD is used to define a build configuration. - The
BuildRun
CRD is used to start the actually image build using a registered strategy.
Version | Docs | Examples |
---|---|---|
HEAD | Docs @ HEAD | Examples @ HEAD |
Examples of Build
resource using the example strategies shipped with this operator.
- Get a Kubernetes cluster and
kubectl
set up to connect to your cluster. - Install Tekton by running install-tekton.sh, it installs v0.11.3.
- Install operator-sdk by running install-operator-sdk.sh, it installs v0.17.0.
- Create a namespace called build-examples by running
kubectl create namespace build-examples
. - Execute
make local
to register well-known build strategies including Kaniko and start the operator locally. - Create a Kaniko build.
apiVersion: build.dev/v1alpha1
kind: Build
metadata:
name: kaniko-golang-build
namespace: build-examples
spec:
source:
url: https://github.com/sbose78/taxi
contextDir: .
strategy:
name: kaniko
kind: ClusterBuildStrategy
dockerfile: Dockerfile
output:
image: image-registry.openshift-image-registry.svc:5000/build-examples/taxi-app
- Start a Kaniko buildrun
apiVersion: build.dev/v1alpha1
kind: BuildRun
metadata:
name: kaniko-golang-buildrun
namespace: build-examples
spec:
buildRef:
name: kaniko-golang-build
serviceAccount:
generate: true
- Build, test & run using HACK.md.
Build Strategy | Alpha | Beta | GA |
---|---|---|---|
Source-to-Image | ☑ | ||
Buildpacks-v3-heroku | ☑️ | ||
Buildpacks-v3 | ☑️ | ||
Kaniko | ☑️ | ||
Buildah | ☑️ |
Feature | Alpha | Beta | GA |
---|---|---|---|
Private Git Repos | ☑️ | ||
Private Output Image Registry | ☑️ | ||
Private Builder Image Registry | ☑️ | ||
Cluster scope BuildStrategy | ☑️ | ||
Runtime Base Image | ⚪️ | ||
Binary builds | |||
Image Caching | |||
ImageStreams support | |||
Entitlements |