Description of problem: oc new-app with an imagestream results in bad labels being created on all generated objects. Version-Release number of selected component (if applicable): 4.3.0 How reproducible: Always Steps to Reproduce: oc new-app https://github.com/ricardozanini/spring-todo --image-stream=java:8 Actual results: All objects fail with invalid label messages: error: ImageStream.image.openshift.io "spring-todo" is invalid: metadata.labels: Invalid value: "java:8": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?') error: BuildConfig.build.openshift.io "spring-todo" is invalid: metadata.labels: Invalid value: "java:8": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?') error: DeploymentConfig.apps.openshift.io "spring-todo" is invalid: metadata.labels: Invalid value: "java:8": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?') error: Service "spring-todo" is invalid: metadata.labels: Invalid value: "java:8": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?') Expected results: Imagestream, builds, and template components deploy with valid labels. Additional info: This is a regression from 4.2 - works in that version of oc.
Marking this as a blocker for 4.3.0. DevEx would normally own this, but we didn't make any changes here.
https://github.com/openshift/oc/pull/138 merged
Can't reproduce the issue with latest version now: [root@dhcp-140-138 ~]# oc version Client Version: v4.3.0 Server Version: 4.3.0-0.nightly-2019-11-07-172437 Kubernetes Version: v1.16.2 [root@dhcp-140-138 ~]# oc new-app https://github.com/ricardozanini/spring-todo --image-stream=java:8 --> Found image bfb995c (3 weeks old) in image stream "openshift/java" under tag "8" for "java:8" Java Applications ----------------- Platform for building and running plain Java applications (fat-jar and flat classpath) Tags: builder, java * The source repository appears to match: jee * A source build using source code from https://github.com/ricardozanini/spring-todo will be created * The resulting image will be pushed to image stream tag "spring-todo:latest" * Use 'oc start-build' to trigger a new build * This image will be deployed in deployment config "spring-todo" * Ports 8080/tcp, 8443/tcp, 8778/tcp will be load balanced by service "spring-todo" * Other containers can access this service through the hostname "spring-todo" --> Creating resources ... imagestream.image.openshift.io "spring-todo" created buildconfig.build.openshift.io "spring-todo" created deploymentconfig.apps.openshift.io "spring-todo" created service "spring-todo" created --> Success Build scheduled, use 'oc logs -f bc/spring-todo' to track its progress. Application is not exposed. You can expose services to the outside world by executing one or more of the commands below: 'oc expose svc/spring-todo' Run 'oc status' to view your app.
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, 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/RHBA-2020:0062