A BuildConfig defines how OpenShift builds an application image and where the resulting image is published. With a source-to-image build, a locally built JAR is pushed to OpenShift, which builds and runs the application image. section 11.3.4
A BuildConfig connects the build pipeline to OpenShift deployment resources:
- Uses a sourceStrategy based on the openjdk-21:1.20 ImageStreamTag. section 11.3.4
- Publishes output to the inventory-service:1.0.0-SNAPSHOT ImageStreamTag. section 11.3.4
- Triggers automatic redeployment when the output ImageStreamTag changes. section 11.3.4
Inventory service build
The generated OpenShift configuration defines a binary BuildConfig named inventory-service. Its source is binary, its source strategy uses the openjdk-21:1.20 ImageStreamTag, and its output is inventory-service:1.0.0-SNAPSHOT. section 11.3.4
Listing 11.15 Continuation of the simplified generated openshift.yml
---
apiVersion: build.openshift.io/v1
kind: BuildConfig
...
name: inventory-service
namespace: default
spec:
output:
to:
kind: ImageStreamTag
name: inventory-service:1.0.0-SNAPSHOT
source:
binary: {}
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: openjdk-21:1.20
---
apiVersion: apps/v1
kind: Deployment
...
name: inventory-service
namespace: default
spec:
...
spec:
containers:
...
- name: JAVA_APP_JAR
value: /deployments/quarkus-run.jar
image: quay.io/quarkus-in-action/inventory-service:1.0.0
imagePullPolicy: Always
Inspect the BuildConfig and Deployment definitions together to see how build output feeds application rollout. section 11.3.4
