Skip to content

ci: remove kubebuilder dependency#2524

Merged
sozercan merged 8 commits into
open-policy-agent:masterfrom
sozercan:ci-remove-kubebuilder
Jan 21, 2023
Merged

ci: remove kubebuilder dependency#2524
sozercan merged 8 commits into
open-policy-agent:masterfrom
sozercan:ci-remove-kubebuilder

Conversation

@sozercan
Copy link
Copy Markdown
Member

Signed-off-by: Sertac Ozercan sozercan@gmail.com

What this PR does / why we need it:
migrate to envtest and remove kubebuilder dependency

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@sozercan sozercan force-pushed the ci-remove-kubebuilder branch from f6a84c0 to a76c692 Compare January 19, 2023 02:11
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 19, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.01%. Comparing base (73611cc) to head (2daf4de).
⚠️ Report is 947 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2524      +/-   ##
==========================================
+ Coverage   53.92%   54.01%   +0.09%     
==========================================
  Files         116      116              
  Lines       10287    10287              
==========================================
+ Hits         5547     5557      +10     
+ Misses       4314     4307       -7     
+ Partials      426      423       -3     
Flag Coverage Δ
unittests 54.01% <ø> (+0.09%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sozercan sozercan requested a review from maxsmythe January 19, 2023 02:19
@sozercan
Copy link
Copy Markdown
Member Author

/benchmark

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

This PR compares its performance to the latest released version. If it performs significantly lower, consider optimizing your changes to improve the performance.

name                                            old time/op  new time/op  delta
pkg:github.com/open-policy-agent/gatekeeper/pkg/mutation goos:linux goarch:amd64
System_Mutate                                   1.33µs ± 0%  1.35µs ± 1%   +1.24%  (p=0.000 n=9+9)
pkg:github.com/open-policy-agent/gatekeeper/pkg/mutation/mutators/assign goos:linux goarch:amd64
AssignMutator_Mutate/always_mutate_1-depth       207ns ±10%   200ns ± 2%     ~     (p=0.470 n=10+10)
AssignMutator_Mutate/always_mutate_2-depth       230ns ± 1%   238ns ± 1%   +3.60%  (p=0.000 n=9+10)
AssignMutator_Mutate/always_mutate_5-depth       338ns ± 2%   343ns ± 0%   +1.27%  (p=0.000 n=9+8)
AssignMutator_Mutate/always_mutate_10-depth      496ns ± 1%   499ns ± 1%   +0.67%  (p=0.009 n=10+10)
AssignMutator_Mutate/always_mutate_20-depth      824ns ± 1%   827ns ± 1%     ~     (p=0.072 n=10+10)
AssignMutator_Mutate/never_mutate_1-depth        162ns ± 1%   169ns ± 0%   +4.69%  (p=0.000 n=10+9)
AssignMutator_Mutate/never_mutate_2-depth        184ns ± 1%   193ns ± 1%   +4.95%  (p=0.000 n=10+10)
AssignMutator_Mutate/never_mutate_5-depth        240ns ± 2%   245ns ± 0%   +2.32%  (p=0.000 n=10+8)
AssignMutator_Mutate/never_mutate_10-depth       336ns ± 1%   344ns ± 1%   +2.22%  (p=0.000 n=10+10)
AssignMutator_Mutate/never_mutate_20-depth       618ns ± 1%   624ns ± 0%   +1.03%  (p=0.000 n=9+9)
pkg:github.com/open-policy-agent/gatekeeper/pkg/mutation/mutators/assignmeta goos:linux goarch:amd64
AssignMetadataMutator_Always                    1.25µs ± 5%  1.30µs ± 1%   +3.79%  (p=0.001 n=10+9)
AssignMetadataMutator_Never                      228ns ± 0%   229ns ± 0%   +0.30%  (p=0.046 n=8+10)
pkg:github.com/open-policy-agent/gatekeeper/pkg/mutation/mutators/modifyset goos:linux goarch:amd64
ModifySetMutator_Mutate/always_mutate_1-depth   1.19µs ± 2%  1.20µs ± 1%   +1.00%  (p=0.014 n=10+9)
ModifySetMutator_Mutate/always_mutate_2-depth   1.23µs ± 1%  1.23µs ± 1%     ~     (p=0.590 n=10+10)
ModifySetMutator_Mutate/always_mutate_5-depth   1.35µs ± 0%  1.35µs ± 0%   +0.48%  (p=0.000 n=10+8)
ModifySetMutator_Mutate/always_mutate_10-depth  1.62µs ± 2%  1.66µs ± 0%   +2.38%  (p=0.000 n=10+10)
ModifySetMutator_Mutate/always_mutate_20-depth  2.09µs ± 1%  2.11µs ± 2%   +0.87%  (p=0.009 n=10+10)
ModifySetMutator_Mutate/never_mutate_1-depth     336ns ± 1%   351ns ± 2%   +4.53%  (p=0.000 n=9+10)
ModifySetMutator_Mutate/never_mutate_2-depth     374ns ± 1%   371ns ± 1%   -0.78%  (p=0.008 n=10+10)
ModifySetMutator_Mutate/never_mutate_5-depth     432ns ± 1%   437ns ± 0%   +1.16%  (p=0.000 n=9+10)
ModifySetMutator_Mutate/never_mutate_10-depth    521ns ± 0%   525ns ± 0%   +0.91%  (p=0.000 n=10+10)
ModifySetMutator_Mutate/never_mutate_20-depth    832ns ± 1%   832ns ± 1%     ~     (p=0.684 n=10+10)
pkg:github.com/open-policy-agent/gatekeeper/pkg/webhook goos:linux goarch:amd64
ValidationHandler/psp:_100%_violations          1.71ms ± 0%  1.67ms ± 1%   -2.82%  (p=0.000 n=9+9)
ValidationHandler/psp:_100%_violations#01       2.23ms ± 1%  2.15ms ± 1%   -3.70%  (p=0.000 n=10+10)
ValidationHandler/psp:_100%_violations#02       5.68ms ± 2%  5.48ms ± 1%   -3.53%  (p=0.000 n=10+10)
ValidationHandler/psp:_100%_violations#03       10.1ms ± 3%   9.7ms ± 1%   -3.40%  (p=0.000 n=10+9)
ValidationHandler/psp:_100%_violations#04       19.1ms ± 3%  17.9ms ± 1%   -6.48%  (p=0.000 n=10+10)
ValidationHandler/psp:_100%_violations#05       92.6ms ± 1%  83.4ms ± 2%   -9.92%  (p=0.000 n=8+10)
ValidationHandler/psp:_100%_violations#06        199ms ± 1%   172ms ± 1%  -13.31%  (p=0.000 n=9+10)

Copy link
Copy Markdown
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread Makefile
--build-arg KUBEBUILDER_VERSION=$(KUBEBUILDER_VERSION)
--build-arg KUSTOMIZE_VERSION=$(KUSTOMIZE_VERSION)

## Location to install dependencies to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fyi, I can see make test work locally on this fork now 🥇 ; thanks for fixing this !!

Comment thread Makefile Outdated
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copy link
Copy Markdown
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, same comments about "bin"

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
@sozercan
Copy link
Copy Markdown
Member Author

@maxsmythe bin is the default for kubebuilder v3 and it's in gitignore. looks like we are using .tmp already (for linter) so i changed to .tmp/bin

@sozercan sozercan merged commit f33c367 into open-policy-agent:master Jan 21, 2023
@sozercan sozercan deleted the ci-remove-kubebuilder branch January 21, 2023 04:17
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 7, 2023
* remove kubebuilder dependency

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>

* remove unused package

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>

* pin setup-envtest

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>

* use .tmp/bin

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>

Signed-off-by: Sertac Ozercan <sozercan@gmail.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.

5 participants