Repository navigation
fix: reconcile explicit and admitted privilege escalation settings - #593
Conversation
Signed-off-by: haorenfsa <shaoyue.chen@zilliz.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
==========================================
+ Coverage 86.06% 86.26% +0.20%
==========================================
Files 76 77 +1
Lines 7663 7754 +91
==========================================
+ Hits 6595 6689 +94
+ Misses 1066 1063 -3
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… changes Signed-off-by: haorenfsa <shaoyue.chen@zilliz.com>
|
This pull request is merged. |
|
/lgtm |
|
@huanghaoyuanhhy: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haorenfsa, huanghaoyuanhhy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Follow-up to #591.
Removing an explicit
allowPrivilegeEscalation: falsefrom the Milvus CR can leave it on the running workload indefinitely. Rebuilding a CR-defined sidecar or init container can also discard a value supplied by admission and trigger another rollout.This change records the names of containers whose false value the CR explicitly requests in a Deployment or StatefulSet annotation. Each blue/green Deployment records that information with its own template. On a healthy workload, recording an existing setting updates only workload metadata. For a pre-upgrade false of unknown origin, the operator preserves it until it observes an explicit setting in the CR.
When the CR removes the field from a container it still declares, the operator releases the previous value. If admission supplies false again, subsequent reconciles preserve it. If the CR removes an entire custom container and the renderer retains it in the workload, the container keeps its restriction. Releasing a setting still respects Milvus image upgrade dependencies. A named
configinit container can override escalation and its related privilege settings during a full render.Regression tests cover removal with and without simulated admission, retained sidecars, named config overrides, blue/green rollout selection and metadata-only adoption in automatic and manual modes. Three new regression cases fail on the previous PR commit and pass with the fix.
Validated in AWS UAT with the full controller test package and an operator build. The focused escalation, StatefulSet and config-container tests also passed three times with shuffled order.