Origin: Support mapping configMaps and secrets in BuildConfigs

Created on 17 May 2018  路  5Comments  路  Source: openshift/origin

OpenShift BuildConfigs should support buildArgs being sourced from secrets (or config maps for that matter).

Here is an example of what using this feature would look like:

apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  name: foo-build
spec:
  runPolicy: Serial
  source:
    type: Binary
  strategy:
    type: Docker
    dockerStrategy:
      dockerfilePath: Dockerfile
      buildArgs:
        - name: http_proxy
          valueFrom:
            configMapKeyRef:
              name: proxy-config
              key: proxy-url
        - name: no_proxy
          value: foo.dev.local
        - name: USERNAME
          valueFrom:
            secretKeyRef:
              name: auth-basic
              key: username

Note that the example above is showing a mixture of a buildArg literal, a buildArg mapped from a configMap and a buildArg mapped from a secret. Also note that this particular example is for mapping buildArgs in a dockerStrategy, but the ability to map configMaps and secrets should be available in all BuildConfig strategies for other similar items like environment variable (env) blocks.

Version

OpenShift Master:
v3.7.44
Kubernetes Master:
v1.7.6+a08f5eeb62

componenbuild kinfeature sideveloper-experience

Most helpful comment

Sorry yes, the jira boad is currently internal but that will hopefully be changed soon.

The ticket in question is still in the backload, there's no immediate plan to implement it but it is still considered a viable enhancement to be implemented when time/resources permit.

All 5 comments

moved to trello backlog: https://trello.com/c/WGscHeax

Is there any update? We can't see the migrated Jira board as it seems to be internal

Sorry yes, the jira boad is currently internal but that will hopefully be changed soon.

The ticket in question is still in the backload, there's no immediate plan to implement it but it is still considered a viable enhancement to be implemented when time/resources permit.

Any update on this? Still can't see the migrated Jira board. Thanks

It's status remains what it was in my previous comment. We do expect the jira board to be public soon, however.

Was this page helpful?
0 / 5 - 0 ratings