Skip to content

Support UTF-8 for label names and rules #7362

@simonpasquier

Description

@simonpasquier

Component(s)

Prometheus, ThanosRuler

What is missing? Please describe.

One of the biggest changes in Prometheus v3 is that label and metric names support any UTF-8 character. Right now the operator enforces the legacy validation (e.g. no UTF-8) to avoid breaking Prometheus v2 users.

We want to support UTF-8 label names in the operator and admission webhook but it's unclear how it can be implemented while supporting both pre-v3 and v3 setups.

Impacted areas:

  • Relabeling configurations
  • Prometheus rule validations (including PromQL)
  • External labels (Prometheus)

Note: the operator code base relies on github.com/prometheus/prometheus for rule validation (e.g. github.com/prometheus-operator/prometheus-operator/model/rulefmt) but the validation logic is governed by a global variable (NameValidationScheme). It works fine for Prometheus which sets the value on startup but it's harder to use in the operator if we want to support both schemes concurrently.

Describe alternatives you've considered.

No response

Environment Information.

Environment

Kubernetes Version:
Prometheus-Operator Version:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions