-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ Bump controller-runtime to v0.6.0 #2961
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: detiber 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 |
Still working through test failures, but at least a subset of them are related to kubernetes-sigs/controller-runtime#926 |
if err != nil { | ||
return errors.Wrap(err, "unable to create jsonpatch for CoreDNS config map with backup Corefile") | ||
} | ||
if err := w.Client.Patch(ctx, cm, ctrlclient.RawPatch(types.JSONPatchType, patchData)); err != nil { |
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.
Switched this up, since we were hitting an issue with the fake client not accepting Update without ResourceVersion being set for ConfigMaps (kubernetes-sigs/controller-runtime#926). This should result in the same net effect that we want.
fakeClient := fake.NewFakeClientWithScheme(scheme.Scheme) | ||
g.Expect(fakeClient.Create(context.TODO(), depl)).To(Succeed()) | ||
g.Expect(fakeClient.Create(context.TODO(), cm)).To(Succeed()) |
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.
This might not be needed, this was introduced when I was testing to make sure the resourceVersioning behavior wasn't what was causing issues
@@ -1,2 +0,0 @@ | |||
The code in this directory has been copied from: | |||
github.com/kubernetes/kubectl/pkg/drain@a17d91f9f5b34c73bed0bfc75b70bd762b725231 |
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 bye third_party/kubernetes-drain, you served us well 👋
@@ -51,8 +51,7 @@ func TestHelperUnstructuredPatch(t *testing.T) { | |||
}, | |||
}, | |||
} | |||
fakeClient := fake.NewFakeClientWithScheme(scheme.Scheme) | |||
g.Expect(fakeClient.Create(ctx, obj)).To(Succeed()) | |||
fakeClient := fake.NewFakeClientWithScheme(scheme.Scheme, obj) |
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.
With controller-runtime v0.6.0 ResourceVersion behavior is different if resources are populated with NewFakeClientWithScheme
(will not set a ResourceVersion if empty) compared to with Create
(will set a ResourceVersion)
defer func() { | ||
g.Expect(r.Client.Delete(context.Background(), otherNamespace)) | ||
}() | ||
otherNamespaceName := otherNamespace.Name |
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.
This is needed because previously envtest was only allowing this due to disabling of admission plugins (namespace not existing already).
description: Required. The taint value corresponding | ||
to the taint key. | ||
description: The taint value corresponding to the taint | ||
key. |
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.
This and other CRD yaml updates are related to the referenced api type description updates in k8s v1.18
@@ -356,7 +357,7 @@ func (r *MachineReconciler) drainNode(ctx context.Context, cluster *clusterv1.Cl | |||
return errors.Errorf("unable to get node %q: %v", nodeName, err) | |||
} | |||
|
|||
drainer := &kubedrain.Helper{ | |||
drainer := &drain.Helper{ |
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.
Now that kubectl
is out of tree we no longer need to maintain a copied version of the drain Helper.
The failing capd e2e tests seems like it's a bit racy anyway: cluster-api/test/infrastructure/docker/e2e/docker_test.go Lines 212 to 231 in fff092e
It's trying to catch the period where the MachineList count is replicas-2 after manually deleting a Machine outside of the control of KCP, but is polling every 5s, so if the replacement is created before the next polling cycle the test will fail. |
@detiber: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@vincepri this should be ready for review again. |
Following yesterday's feedback in Slack, seems we should cut a new v0.4.0 release to include these breaking changes. /milestone v0.4.0 |
@detiber: PR needs rebase. 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. |
@detiber Should we close this for now? |
/close |
@detiber: Closed this PR. In 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. |
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2954