Repository navigation
Conversation
…portLayer The leader-election Lease rules in the Role were only rendered when transportLayer was http, and the lock name was only required for http. The collector's HTTP transport needs both, so a collector that ends up on HTTP while transportLayer still says nats would run without permission to take the lease. - Always render the Lease rules (a collector using NATS doesn't use them). - Always require leaderElection.lockName (it has a default). - Mark transportLayer, natsUrl, natsMaxReconnect and natsMaxReconnectFailures as deprecated: the NATS transport is being removed and the collector will use HTTP only. The values are still accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What this PR does / why we need it:
Draft, opened early for RBAC review by the chart owners. It's the kspm-collector counterpart of #2787 (shield chart).
The leader-election Lease rules in the collector
Role(templates/role.yaml) are rendered only whentransportLayerishttp, and the lock name is only required forhttp(templates/_helpers.tpl). The collector's HTTP transport needs both. The NATS transport is being removed from the collector, so a collector that ends up on HTTP whiletransportLayerstill saysnatswould run without permission to take its lease.Changes:
transportLayer.leaderElection.lockName. It already defaults tokspm-collector-leader-electionand was already passed to the collector for every transport; only therequiredcheck washttp-only. An explicitly empty lock name now fails at render time instead of at collector startup.transportLayer,natsUrl,natsMaxReconnectandnatsMaxReconnectFailuresas deprecated, invalues.yamlcomments and in the README table where the value is documented, following the convention used by other charts in this repo. The values are still accepted, so nothing breaks.leaderElection.lockNamerow, which said it applied only tohttp.RBAC impact: with
transportLayer: nats, theRolenow also contains the Lease rules. These are the same rules every default (http) installation already gets. Nothing changes for installations withtransportLayerunset orhttp.Tests:
helm unittest charts/kspm-collector→ 77/77 passed. I replaced "Should not create rules if transportLayer is not http" with two tests asserting the Lease rules undernats, and added a test that the lock name is required undernats.helm lintpasses.Checklist
feat(agent,node-analyzer,sysdig-deploy):)🤖 Generated with Claude Code