Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add --operation=mutation-controller flag #2542

Merged

Conversation

davis-haba
Copy link
Contributor

@davis-haba davis-haba commented Jan 26, 2023

Signed-off-by: davis-haba davishaba@google.com

What this PR does / why we need it:

If one is using mutations with workload resource expansion, the deployment running the validating webhook will also need to run the mutation controller. The existing operations that run the mutation controller, mutation-webhook and mutation-status, come with additional overhead that may not desirable.

The PR adds a new operation for mutation-controller, that allows for enabling just the mutation controller without the mutation status or mutation webhook functionality.

operations.md doc page has been updated.

Signed-off-by: davis-haba <davishaba@google.com>
@davis-haba davis-haba changed the title Add --operation=mutation-controller flag fix: add --operation=mutation-controller flag Jan 26, 2023
Signed-off-by: davis-haba <davishaba@google.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2023

Codecov Report

Base: 53.41% // Head: 53.44% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (a6d08c4) compared to base (5888706).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2542      +/-   ##
==========================================
+ Coverage   53.41%   53.44%   +0.02%     
==========================================
  Files         120      120              
  Lines       10643    10634       -9     
==========================================
- Hits         5685     5683       -2     
+ Misses       4521     4514       -7     
  Partials      437      437              
Flag Coverage Δ
unittests 53.44% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/mutation/mutation.go 60.00% <0.00%> (ø)
pkg/operations/operations.go 44.06% <ø> (+5.83%) ⬆️
...onstrainttemplate/constrainttemplate_controller.go 55.74% <0.00%> (-1.20%) ⬇️
pkg/readiness/object_tracker.go 83.98% <0.00%> (+1.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

website/docs/operations.md Outdated Show resolved Hide resolved
Copy link
Contributor

@acpana acpana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this LGTM overall minus the question for AssignedOperations?

rest are some nits and a UX improvement which can be punted/ non blocking

pkg/operations/operations.go Show resolved Hide resolved
website/docs/operations.md Show resolved Hide resolved
Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@davis-haba davis-haba merged commit 5ab923e into open-policy-agent:master Jan 31, 2023
@davis-haba davis-haba deleted the expansion-operations-fix branch January 31, 2023 02:39
davis-haba added a commit to davis-haba/gatekeeper that referenced this pull request Mar 7, 2023
* Add --operation=mutation-controller flag
Signed-off-by: davis-haba <davishaba@google.com>

* operations in sorted order
Signed-off-by: davis-haba <davishaba@google.com>

* update mutation-controller op docs to indicate audit may also need the
flag
Signed-off-by: davis-haba <davishaba@google.com>

---------

Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
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.

None yet

6 participants