Skip to content

Auto-provisioned Subscriptions do not support upper-case characters in channel names #1559

Open
@cdjohnson

Description

@cdjohnson

Bug Report

What did you do?

  1. Create an operator with default channel: V1.0
  2. Create a second operator that depends on the first operator's API in the CSV
  3. Install the second operator via a subscription.

What did you expect to see?
Both the first and second operator should be installed successfully, where the first operator is installed using the default channel.

What did you see instead? Under which circumstances?
When OLM attempts to create the second subscription in the installplan, it auto-generates a subscription name in the format: <operatorname>-<channel>-<catalogname>-<catalognamespace>

The problem is that the Channel name is NOT lower-cased, resulting in an error in the status section:
error creating subscription: myoperator-V1.0-mycatalog-openshift-marketplace: Subscription.operators.coreos.com "myoperator-V1.0-mycatalog-openshift-marketplace" is invalid: metadata.namee: Invalid value: "myoperator-V1.0-mycatalog-openshift-marketplace" a DNS-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])?)*')

Environment

  • operator-lifecycle-manager version:
    0.14.2 (OpenShift 4.4.3)

  • Kubernetes version information:
    Server Version: 4.4.3
    Kubernetes Version: v1.17.1

  • Kubernetes cluster kind:

Possible Solution
use lower-case channels

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.triage/unresolvedIndicates an issue that can not or will not be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions