Skip to content

Conversation

@P0lskay
Copy link
Contributor

@P0lskay P0lskay commented Nov 23, 2025

Fixes #201

  • Added a check for matching pipeline labels to the vector selector.
  • Added tests for functions in internal/utils/k8s/labels.go.
  • Moved the matchLabels function to the k8s package.

@aa1ex
Copy link
Contributor

aa1ex commented Nov 24, 2025

The code panics when Selector is nil:

// Current (crashes when Selector is nil)
if !k8s.MatchLabels(vector.Spec.Selector.MatchLabels, pipelineCR.GetLabels()) {

Fix (same pattern as internal/pipeline/pipeline.go:66-67):

var selectorLabels map[string]string
if vector.Spec.Selector != nil {
    selectorLabels = vector.Spec.Selector.MatchLabels
}
if !k8s.MatchLabels(selectorLabels, pipelineCR.GetLabels()) {
    continue
}

Apply at lines 147, 189, and 238.

…ClusterVectorAggregator instances instead of only matching ones"
Copy link
Contributor

@aa1ex aa1ex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aa1ex aa1ex merged commit af14c67 into kaasops:main Nov 24, 2025
5 checks passed
aa1ex added a commit to aa1ex/vector-operator that referenced this pull request Nov 25, 2025
Regression tests for issue kaasops#201 / PR kaasops#208 - verify CVP is validated
only against CVA with matching selector.
aa1ex added a commit to aa1ex/vector-operator that referenced this pull request Nov 25, 2025
Regression tests for issue kaasops#201 / PR kaasops#208 - verify CVP is validated
only against CVA with matching selector.
aa1ex added a commit that referenced this pull request Nov 25, 2025
Regression tests for issue #201 / PR #208 - verify CVP is validated
only against CVA with matching selector.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configcheck validates ClusterVectorPipeline (CVP) against all ClusterVectorAggregator instances instead of only matching ones

2 participants