Bug 2105167 - BuildConfig throws error when using a label with a / in it
Summary: BuildConfig throws error when using a label with a / in it
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: jawed
QA Contact: Jitendar Singh
Rolfe Dlugy-Hegwer
URL:
Whiteboard:
Depends On: 2089402
Blocks: 2107432
TreeView+ depends on / blocked
 
Reported: 2022-07-08 07:41 UTC by OpenShift BugZilla Robot
Modified: 2022-08-10 11:21 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2022-08-10 11:20:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-apiserver pull 296 0 None open [release-4.11] Bug 2105167: Validate Image labels correctly 2022-07-08 07:41:59 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:21:15 UTC

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


Note You need to log in before you can comment on or make changes to this bug.