feat: Add default affinity to OPA server Pods - #1031
Closed
marc-merino wants to merge 2 commits into
Closed
marc-merino wants to merge 2 commits into
marc-merino wants to merge 2 commits into
Conversation
Knit-Group: kg_20260928_53b541 Knit-Bundle: opa-client-pod-affinity
7 of 9 tasks
Knit-Group: kg_20260928_ef2936 Knit-Bundle: opa-client-pod-affinity
Member
|
Hi @marc-merino, any reason why you closed this? |
Author
|
Hi @NickLarsenNZ, an agent of mine malfunctioned and opened this PR and the companion HBase PR. I was attempting a cross-repo change using knit, but this was my first time trying the workflow on an OSS project, and fork support didn't exist yet, so the agent went rogue. I've also found a couple of other issues that seem better suited to the cross-repo workflow: one that's close to an ideal use case and another that also looks like a good fit. I haven't opened PRs for neither yet because I want to review them properly before adding any additional noise, currently reviewing the first one. Sorry for this. |
Member
|
No worries. Thanks for answering (we were just rather curious) |
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.
Description
Prefer scheduling Kafka broker Pods on nodes that run the configured OPA cluster's server Pods. When OPA authorization is configured, the broker's default affinity gains a preferred Pod affinity term with weight 50, hostname topology, and the OPA server role labels. The existing broker anti affinity and role/role group override merge order remain unchanged. KRaft controllers do not use the OPA authorizer, so their placement remains unchanged.
The OPA discovery ConfigMap is named after the OpaCluster and is read in the KafkaCluster's namespace. The preference affects scheduling only; it does not guarantee co-location or change service routing.
This follows the approach in trino-operator#924 and addresses the consuming-operator request in opa-operator#525. Companion change: hbase-operator#814.
Verification
cargo build— passed.cargo test -p stackable-kafka-operator crd::affinity::tests -- --nocapture— passed (3 tests).cargo test -p stackable-kafka-operator— 121 passed, 1 failed:quorum_manager_defers_while_an_existing_voter_is_stale. It fails identically on unmodifiedmainin the same macOS environment (run with a localtimeoutsubstitute), so it is unrelated to this change.cargo +nightly-2026-08-23 fmt --all -- --check— passed.cargo clippy --all-targets -- -D warnings— passed.Definition of Done Checklist
Author
Reviewer