Skip to content

ConfigMapWriter use keys having forbidden characters #1741

@zimnx

Description

@zimnx

Issue Description:

The ConfigMapWrite used to populate a ConfigMap from an OLM bundle, translates filenames into ConfigMap keys by replacing forbidden characters. Specifically, it replaces invalid characters with tildes (~), which is also invalid in ConfigMap keys.

This results in an error like the following:

binaryData[scylladb~controller~aggregate-to-operator_rbac.authorization.k8s.io_v1_clusterrole.yaml]: Invalid value: "scylladb~controller~aggregate-to-operator_rbac.authorization.k8s.io_v1_clusterrole.yaml": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')]

In this case, the file named scylladb:controller:aggregate-to-operator_rbac.authorization.k8s.io_v1_clusterrole.yaml was converted to scylladb~controller~aggregate-to-operator_rbac.authorization.k8s.io_v1_clusterrole.yaml, causing the validation to fail due to the use of ~.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions