VM template with dynamic SSH secret name throws error: Invalid value: "${NAME}" in the OpenShift Virtualization

Solution Verified - Updated -

Issue

  • When using the OpenShift Virtualization Web Console to Quick create VirtualMachine from a template that defines an SSH Secret with a dynamic secret name using a template parameter (e.g., secretName: '${NAME}-ssh-secret'), the Web Console displays an "Invalid value" error:
Quick create error Error "Invalid value: "${NAME}-ssh-secret": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')" for field "metadata.name". 

Despite this error message, the VirtualMachine and its associated Secret are successfully created on the backend.

Environment

  • Red Hat OpenShift Virtualization
    • 4
  • Red Hat OpenShift Container Platform (RHOCP)
    • 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