Unable to add a label that contains a '/' in a BuildConfig in Red Hat OpenShift Container Platform

Solution Verified - Updated -

Issue

  • Getting below error when adding a tag that has a / in it in a BuildConfigin Red Hat OpenShift Container Platform.
The BuildConfig "<bc-name>" is invalid: spec.output.imageLabels[0].name: Invalid value: "app.kubernetes.io/myapp": a valid config key must consist of alphanumeric 
characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')

Environment

  • Red Hat OpenShift Container Platform
    • 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content