-
Notifications
You must be signed in to change notification settings - Fork 65
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
Upgrade k8s depencencies in host for Openshift 4.16 #1125
base: master
Are you sure you want to change the base?
Upgrade k8s depencencies in host for Openshift 4.16 #1125
Conversation
main.go
Outdated
Metrics: metricsserver.Options{ | ||
BindAddress: metricsAddr, | ||
}, | ||
WebhookServer: webhookServer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same question as in the member-operator PR - do we need the webhookServer configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its because port is deprecated and webhookServer replaces it.
from the documentation:
// Port is the port that the webhook server serves at.
// It is used to set webhook.Server.Port if WebhookServer is not set.
//
// Deprecated: Use WebhookServer instead. A WebhookServer can be created via webhook.NewServer.
Port int
HealthProbeBindAddress: probeAddr, | ||
LeaderElection: enableLeaderElection, | ||
LeaderElectionID: "dc07038f.toolchain.host.operator", | ||
Namespace: namespace, | ||
Cache: cache.Options{DefaultNamespaces: map[string]cache.Config{namespace: {}}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we discussed it and you explained how this new Cache configuration works but I already forgot :)
This configuration looks confusing (why there is default namespace as a map with a key but no value) so maybe you can try to add some comments explaining how it works? Or maybe a link to docs where it's explained. But feel free to leave it as is if it's not trivial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough, added the design doc link above in the comments in here - b70c114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also removed webhook server, see comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🚀 Just on question:
…tor into openshift_4_16_host
…ions, remove webhook srv
@@ -51,7 +51,7 @@ func TestNotificationSuccess(t *testing.T) { | |||
notification, err := notify.NewNotificationBuilder(cl, test.HostOperatorNs).Create(context.TODO(), "[email protected]") | |||
require.NoError(t, err) | |||
notification.Status.Conditions = []toolchainv1alpha1.Condition{sentCond()} | |||
require.NoError(t, cl.Update(context.TODO(), notification)) | |||
require.NoError(t, cl.Status().Update(context.TODO(), notification)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my understanding, this change is related to dependency update ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question. These changes are from the previous update of controller-runtime to v0.15 (see here) but missed it last time. This test didn't fail before so this change slipped by, but unit tests were failing now.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeykazakov, MatousJobanek, ranakan19, rsoaresd The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to also update CONTROLLER_GEN_VERSION
here: https://github.com/codeready-toolchain/host-operator/blob/master/make/get-tool.mk#L2
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1125 +/- ##
=======================================
Coverage 79.64% 79.64%
=======================================
Files 79 79
Lines 8046 8047 +1
=======================================
+ Hits 6408 6409 +1
Misses 1453 1453
Partials 185 185
|
Upgrades:
Changes in code wrt to controller-runtime upgrade (introduced in controller-runtime v0.16.0:
wrt: https://issues.redhat.com/browse/SANDBOX-686