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

chore: Upgrade to k8s v0.26.1 and controller-runtime fork #2530

Conversation

maxsmythe
Copy link
Contributor

Signed-off-by: Max Smythe smythe@google.com

What this PR does / why we need it:

Upgrade K8s and controller-runtime libraries... let's see if tests pass (WIP)

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:

@maxsmythe maxsmythe marked this pull request as draft January 21, 2023 06:26
@maxsmythe maxsmythe changed the title [WIP] Upgrade to k8s v0.26.1 and controller-runtime fork chore: [WIP] Upgrade to k8s v0.26.1 and controller-runtime fork Jan 24, 2023
@maxsmythe maxsmythe marked this pull request as ready for review January 24, 2023 01:54
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
@maxsmythe maxsmythe force-pushed the upgrade-controller-runtime-and-k8s branch from 2813bf3 to 17b7e9b Compare January 24, 2023 02:00
@maxsmythe maxsmythe marked this pull request as draft January 24, 2023 02:01
Signed-off-by: Max Smythe <smythe@google.com>
@maxsmythe maxsmythe force-pushed the upgrade-controller-runtime-and-k8s branch 2 times, most recently from af03bb5 to 36b1fe8 Compare January 24, 2023 04:07
Signed-off-by: Max Smythe <smythe@google.com>
@maxsmythe maxsmythe force-pushed the upgrade-controller-runtime-and-k8s branch from 36b1fe8 to 2ecccf2 Compare January 24, 2023 04:14
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2023

Codecov Report

Base: 53.93% // Head: 53.75% // Decreases project coverage by -0.18% ⚠️

Coverage data is based on head (2ecccf2) compared to base (c3489f0).
Patch coverage: 44.44% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2530      +/-   ##
==========================================
- Coverage   53.93%   53.75%   -0.18%     
==========================================
  Files         116      116              
  Lines       10287    10295       +8     
==========================================
- Hits         5548     5534      -14     
- Misses       4313     4329      +16     
- Partials      426      432       +6     
Flag Coverage Δ
unittests 53.75% <44.44%> (-0.18%) ⬇️

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

Impacted Files Coverage Δ
pkg/gator/verify/runner.go 86.03% <0.00%> (ø)
pkg/watch/manager.go 68.14% <0.00%> (-1.06%) ⬇️
pkg/readiness/setup.go 52.63% <33.33%> (-1.22%) ⬇️
pkg/mutation/system_external_data.go 87.58% <100.00%> (ø)
pkg/target/target.go 78.16% <100.00%> (ø)
...onstrainttemplate/constrainttemplate_controller.go 54.78% <0.00%> (-3.83%) ⬇️

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.

@maxsmythe maxsmythe changed the title chore: [WIP] Upgrade to k8s v0.26.1 and controller-runtime fork chore: Upgrade to k8s v0.26.1 and controller-runtime fork Jan 24, 2023
@maxsmythe maxsmythe marked this pull request as ready for review January 24, 2023 04:32
@@ -2,16 +2,6 @@ module github.com/open-policy-agent/gatekeeper

go 1.18

// Prevent otel dependencies from getting out of sync.
replace (
Copy link
Member

Choose a reason for hiding this comment

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

we'll need to make this change in frameworks too, adding as a reminder.

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.

Thanks for updating this! LGTM

return tracker, nil
}

// SetupTracker sets up a readiness tracker and registers it to run under control of the
Copy link
Member

Choose a reason for hiding this comment

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

Is the comment for SetupTrackerNoReadyz?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, yep

@@ -1,6 +1,6 @@
# sigs.k8s.io/controller-runtime

Forked from sigs.k8s.io/controller-runtime@a8c19c49e49cfba2aa486ff322cbe5222d6da533 (v0.8.2).
Forked from sigs.k8s.io/controller-runtime@6d2d247cb6f3a26e6b5597c2aa4a943a90c988bb (v0.14.1).
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to push these changes to CR upstream now that it's alot more up to date?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can certainly try, but I wouldn't block this PR on it.

@ritazh
Copy link
Member

ritazh commented Jan 24, 2023

Thanks for the PR @maxsmythe! The third_party stuff is becoming really hard to update/review with each update.

Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
@maxsmythe
Copy link
Contributor Author

maxsmythe commented Jan 25, 2023

Yeah, found this issue, which makes me hopeful that CR will eventually have something so we can remove the fork:

kubernetes-sigs/controller-runtime#1884

@maxsmythe maxsmythe merged commit 8b426fb into open-policy-agent:master Jan 25, 2023
@maxsmythe
Copy link
Contributor Author

davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 7, 2023
…y-agent#2530)

* Upgrade to k8s v0.26.1 and controller-runtime fork

Signed-off-by: Max Smythe <smythe@google.com>

* Re-add stop channel to informer map entry

Signed-off-by: Max Smythe <smythe@google.com>

* Update linter version

Signed-off-by: Max Smythe <smythe@google.com>

* Fix lint errors

Signed-off-by: Max Smythe <smythe@google.com>

* Fix broken tests

Signed-off-by: Max Smythe <smythe@google.com>

* Fix function docstring

Signed-off-by: Max Smythe <smythe@google.com>

* Fix gofumpt violation

Signed-off-by: Max Smythe <smythe@google.com>

Signed-off-by: Max Smythe <smythe@google.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

4 participants