Hide Forgot
Description of problem: When using a label with a / in it in buildconfig, it throws an error like below: "The BuildConfig "cpd-cli" is invalid: spec.output.imageLabels[0].name: Invalid value: "app.kubernetes.io/part-of": 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]+')" Version-Release number of selected component (if applicable): 4.8 How reproducible: Always Steps to Reproduce: 1. Create a buildconfig manifest having 'imageLabels:' option and the label name having a / in it like below: imageLabels: - name: app.kubernetes.io/part-of value: customized-app 2. Try to create the buildconfig using 'oc create -f <file-name>' 3. It throws the mentioned error and does't allow a label with / in it Actual results: Getting the mentioned error when trying to use a label with / in it Expected results: The buildconfig should get created without any error. It should accept a label with /. Additional info:
hi @alosingh I am proposing a fix in the this PR https://github.com/openshift/openshift-apiserver/pull/292
verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.12.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7399