I have a simple S2I build running on an Openshift 3.11 project that outputs to an Image Stream.
The build is working fine, the resulting images are tagged correctly and available in the stream. My issue is, each build spins up a transient pod to handle doing the actual build. I would like to label these pods. This project is shared between multiple teams and we have several scripts that differentiate pods based on a label.
Right now each one automatically gets labelled like so:
openshift.io/build.name: <buildname>-<buildnum>
Which is fine, I don't want to get rid of that label. I just want to add an additional custom label (something like owner: <teamname>
). How can I do that?
You can add your custom label using
imageLabels
section in thebuildConfig
as follows. Further information is here, Output Image Labels.