Skip to content

ENV key validation rules to strict #724

@Flusinerd

Description

@Flusinerd

Which component(s) is affected?

Kubero UI

Describe the bug

Hi, the validation rules for environment variable keys are to strict.
They don't allow hypens: -

From the UI:

Only letters, numbers and underscores allowed. Must start with letter or underscore

But hyphens are often used in environment variables.
For example from the Docker Registry image:

REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin='[http://registry-ui.example.com]'

To set various headers.

It would be great to allow this.

Steps to reproduce

  1. Go to the UI and create a new app
  2. Set a environment variable, who's key contains a -
  3. Validation error and unable to create app
  4. Uploading a .env also does not work

Expected behavior

Allow environment variable keys to contain -

Screenshots

No response

Additional information

No response

Debug information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions