Skip to content

Commit 1239d1f

Browse files
committed
build: add origin ConfigMap build source types
RFE/bug 1540978
1 parent edd3813 commit 1239d1f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pkg/build/apis/build/types.go

+22
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,10 @@ type BuildSource struct {
604604
// Secrets represents a list of secrets and their destinations that will
605605
// be used only for the build.
606606
Secrets []SecretBuildSource
607+
608+
// ConfigMaps represents a list of configMaps and their destinations that will
609+
// be used only for the build.
610+
ConfigMaps []ConfigMapBuildSource
607611
}
608612

609613
// ImageSource is used to describe build source that will be extracted from an image or used during a
@@ -669,6 +673,24 @@ type SecretBuildSource struct {
669673
DestinationDir string
670674
}
671675

676+
// ConfigMapBuildSource describes a configMap and its destination directory that will be
677+
// used only at the build time. The content of the configMap referenced here will
678+
// be copied into the destination directory instead of mounting.
679+
type ConfigMapBuildSource struct {
680+
// ConfigMap is a reference to an existing configMap that you want to use in your
681+
// build.
682+
ConfigMap kapi.LocalObjectReference
683+
684+
// DestinationDir is the directory where the files from the configMap should be
685+
// available for the build time.
686+
// For the Source build strategy, these will be injected into a container
687+
// where the assemble script runs.
688+
// For the Docker build strategy, these will be copied into the build
689+
// directory, where the Dockerfile is located, so users can ADD or COPY them
690+
// during docker build.
691+
DestinationDir string
692+
}
693+
672694
type BinaryBuildSource struct {
673695
// AsFile indicates that the provided binary input should be considered a single file
674696
// within the build input. For example, specifying "webapp.war" would place the provided

0 commit comments

Comments
 (0)