Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wildcard namespace selector for clusterLogForwarding.namespace_groups #137

Closed
haasad opened this issue Jun 27, 2024 · 3 comments · Fixed by #149
Closed

Add wildcard namespace selector for clusterLogForwarding.namespace_groups #137

haasad opened this issue Jun 27, 2024 · 3 comments · Fixed by #149
Labels
enhancement New feature or request

Comments

@haasad
Copy link
Member

haasad commented Jun 27, 2024

Context

clusterLogForwarding.namespace_groups currently requires a list of namespaces. It would be convenient if namespaces could be selected based on naming pattern, e.g. *-dev. This would reduce the effort of manually keeping the namespace list up to date in the config if projects are added/removed.

Implementation idea

  • expose label selector since wildcards are not possible
@haasad haasad added the enhancement New feature or request label Jun 27, 2024
@DebakelOrakel
Copy link
Contributor

That is not possible with the ClusterLogForwarding CR.
We should instead figure out, how LogForwarding in a namespace works.

@DebakelOrakel
Copy link
Contributor

DebakelOrakel commented Jul 8, 2024

However, there is another interessting hook:

❯ k explain clusterlogforwarder.spec.inputs.application.selector
GROUP:      logging.openshift.io
KIND:       ClusterLogForwarder
VERSION:    v1

FIELD: selector <Object>

DESCRIPTION:
    Selector for logs from pods with matching labels. Only messages from pods
    with these labels are collected. If absent or empty, logs are collected
    regardless of labels.

FIELDS:
  matchLabels   <map[string]string>
    matchLabels is a map of {key,value} pairs. A single {key,value} in the
    matchLabels map is equivalent to an element of matchExpressions, whose key
    field is "key", the operator is "In", and the values array contains only
    "value". The requirements are ANDed.

@DebakelOrakel DebakelOrakel linked a pull request Aug 10, 2024 that will close this issue
5 tasks
@DebakelOrakel
Copy link
Contributor

Above PR allows for configuration of features like matchLabels on inputs.
Does that solve your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants