feat(discovery): DaemonSet discovery with scheduling predicates - #10
Merged
Merged
Conversation
…ates Add Phase 2 of the node readiness controller: DaemonSet discovery that determines which DaemonSets should run on a given node in steady state. Uses upstream k8s.io/component-helpers scheduling predicates to evaluate nodeSelector, nodeAffinity, and toleration matching. Startup taints are stripped before evaluation so discovery answers "will this DS run after initialization completes?" Includes configurable exclusions by namespace/name and by label selector for self-service opt-out. Closes #6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…heck) - Fix import ordering in discovery.go (gofmt) - Rename shadowed 'client' param to 'cl' in New() - Rename shadowed 'labels' params to 'nodeLabels'/'dsLabels' in tests - Use ds.Labels instead of ds.ObjectMeta.Labels (staticcheck QF1008) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…param) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
k8s.io/component-helpersscheduling predicates to evaluate nodeSelector, nodeAffinity, and tolerations against each nodeChanges
internal/discovery/discovery.go— Core discovery algorithm withExpectedDaemonSets(), startup taint stripping, synthetic pod construction, and exclusion logicinternal/discovery/discovery_test.go— 16 unit tests covering scheduling predicates, taint stripping, exclusions, and edge casespkg/config/config.go— AddedByLabelexclusion support withLabelSelectorandLabelSelectorRequirementtypesinternal/controller/node_readiness_controller.go— Wired in discovery, logs discovered DaemonSets, emits per-node gauge metricinternal/controller/node_readiness_controller_test.go— Updated tests for newDiscoveryfieldcmd/main.go— Creates discovery instance and passes to reconcilerTest plan
go vetcleanCloses #6
🤖 Generated with Claude Code