Bug 2105167

Summary: BuildConfig throws error when using a label with a / in it
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: BuildAssignee: jawed <jkhelil>
Status: CLOSED ERRATA QA Contact: Jitendar Singh <jitsingh>
Severity: medium Docs Contact: Rolfe Dlugy-Hegwer <rdlugyhe>
Priority: medium    
Version: 4.8CC: alosingh, cdaley, pbhattac, pkumari, spandura
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Before this update, if you used a forward slash character, `/`, in the `ImageLabel` name of a `BuildConfig` instance, the validation test threw an error because it used the `kvalidation.IsConfigMapKey` utility. This update resolves the issue. It uses the `kvalidation.IsQualifiedName` utility in the validation test so that the `ImageLabel` name of a `BuildConfig` instance can contain a forward slash. Red Hat does not plan to back port this update to previous versions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:20:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2089402    
Bug Blocks: 2107432    

Comment 2 Priti Kumari 2022-07-16 09:20:57 UTC
verified
=======================

buildconfig.yaml

apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  name: buildcheck
  namespace: testing
spec:
  source:
    git:
      ref: master
      uri: 'https://github.com/openshift/ruby-ex.git'
    type: Git
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: ImageStreamTag
        name: 'ruby:2.7'
        namespace: openshift
      env: []
  triggers:
    - type: ImageChange
      imageChange: {}
    - type: ConfigChange
  output:
    imageLabels:
    - name: app.kubernetes.io/part-of
      value: customized-app


pkumari$ kubectl apply -f cover.yaml
buildconfig.build.openshift.io/buildcheck created

$ oc get build
NAME        TYPE     FROM          STATUS    STARTED          DURATION
buildcheck-1   Source   Git@01effef   Running   40 seconds ago

Comment 6 errata-xmlrpc 2022-08-10 11:20:51 UTC
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 (Important: OpenShift Container Platform 4.11.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:5069