Skip to content

Conversation

@Carles-Figuerola
Copy link

Enhancement proposal: #25069

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@Carles-Figuerola Carles-Figuerola requested a review from a team as a code owner October 24, 2025 19:35
@bunnyshell
Copy link

bunnyshell bot commented Oct 24, 2025

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@Carles-Figuerola Carles-Figuerola marked this pull request as draft October 24, 2025 19:36
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 38.46154% with 8 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@ad96cb8). Learn more about missing BASE report.
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
applicationset/generators/cluster.go 38.46% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #25070   +/-   ##
=========================================
  Coverage          ?   62.23%           
=========================================
  Files             ?      351           
  Lines             ?    49223           
  Branches          ?        0           
=========================================
  Hits              ?    30633           
  Misses            ?    15653           
  Partials          ?     2937           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blakepettersson
Copy link
Member

Slack thread

...could you not use post-selectors to do the negative filtering after collecting all of the ones you do want?
Something like

spec:
  generators:
    - clusters:
        selector:
          matchExpressions:
            - key: labelA
              operator: Exists
            - key: labelI
              operator: Exists
            - key: labelX
              operator: Exists
      selector:
        matchExpressions:
          - key: labelA
            operator: NotIn
            values:
              - "c"
          - key: labelI
            operator: NotIn
            values:
              - "j"
          - key: labelX
            operator: NotIn
            values:
              - "y"

@Carles-Figuerola Carles-Figuerola force-pushed the appset-clusters-excludeSelector branch from 394d192 to 5bf429d Compare October 28, 2025 14:39
@Carles-Figuerola
Copy link
Author

The post-selector seems to operate with a different set of labels than the cluster generator. I have been able to use the post-selector to filter based on name, server, etc, but not on any of the cluster secret labels.

…enerators to exclude clusters

Signed-off-by: Carles Figuerola <[email protected]>
@Carles-Figuerola Carles-Figuerola force-pushed the appset-clusters-excludeSelector branch from 70b9dc4 to 1265aa0 Compare October 29, 2025 02:26
@blakepettersson
Copy link
Member

The post-selector seems to operate with a different set of labels than the cluster generator. I have been able to use the post-selector to filter based on name, server, etc, but not on any of the cluster secret labels

Yeah you're right, I missed that part 🙈

I wonder if we couldn't extend the cluster generator to set the labels in a more intuitive way, so that post-selectors could make use of the same selector logic?

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.

3 participants