feat(operator)!: switch default for OpenShift stream labels - #21001
Merged
Conversation
xperimental
requested review from
a team,
JoaoBraveCoding and
periklis
as code owners
February 27, 2026 15:28
xperimental
force-pushed
the
otlp-default-labels
branch
from
February 27, 2026 15:31
24eadaa to
f38edb1
Compare
periklis
approved these changes
Mar 3, 2026
btaani
reviewed
Mar 4, 2026
| @@ -32,13 +32,13 @@ var ( | |||
| ) | |||
|
|
|||
| // DefaultOTLPAttributes provides the required/recommended set of OTLP attributes for OpenShift Logging. | |||
Contributor
There was a problem hiding this comment.
Suggested change
| // DefaultOTLPAttributes provides the required/recommended set of OTLP attributes for OpenShift Logging. | |
| // DefaultOTLPAttributes provides the required set of OTLP attributes for OpenShift Logging, and optionally includes console labels when enabled |
btaani
reviewed
Mar 4, 2026
| for _, label := range otlp.DefaultOTLPAttributes(enableConsoleLabels) { | ||
| requiredAttributes[label] = true | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Should we add a validation test on dropping a console label when enabled?
Collaborator
Author
There was a problem hiding this comment.
There is a test for trying to remove one of the requiredAttributes in otlp_test.go. The console labels are part of that list (even though "required" is not the wording we use in the other parts of the code), so I don't think we need to explicitly test for this.
btaani
reviewed
Mar 4, 2026
btaani
left a comment
Contributor
There was a problem hiding this comment.
Just a nit and a small question but looks good overall 👍
This was referenced Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This changes the stream labels configured by default for the OpenShift Logging tenancy mode to not include all the labels needed for the OpenShift Logging Console. The console labels can still be enabled by setting a configuration parameter on the LokiStack resource.
We found that having all these stream labels may lead to an excessive number of streams, especially if customers only have a few namespaces but a lot of containers (or a lot of container churn).
As of now the stream labels are required by the console, so some filters stop working when the labels are not available. This might be mitigated in future versions of the console though. Because the OTLP feature will become a GA feature for Red Hat customers soon it might be hard or impossible to change the defaults again soon.
Which issue(s) this PR fixes:
LOG-8319
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)