-
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
🏃 Loosen webhook validation on control plane to allow etcd changes #2553
🏃 Loosen webhook validation on control plane to allow etcd changes #2553
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha 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 |
74486ef
to
83b1e7a
Compare
controlplane/kubeadm/api/v1alpha3/kubeadm_control_plane_webhook.go
Outdated
Show resolved
Hide resolved
83b1e7a
to
8fc979b
Compare
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.
@vincepri I'm gonna clean this up tomorrow but wanted to show you the direction this ended up going in
controlplane/kubeadm/api/v1alpha3/kubeadm_control_plane_webhook.go
Outdated
Show resolved
Hide resolved
controlplane/kubeadm/api/v1alpha3/kubeadm_control_plane_webhook.go
Outdated
Show resolved
Hide resolved
7b22536
to
67c4676
Compare
/milestone v0.3.0 |
/test pull-cluster-api-test |
e4cfa6c
to
0af767d
Compare
/test pull-cluster-api-capd-e2e |
/assign @vincepri This is ready to go if you're good with it |
controlplane/kubeadm/api/v1alpha3/kubeadm_control_plane_webhook.go
Outdated
Show resolved
Hide resolved
kcp: scheduler, | ||
}, | ||
{ | ||
name: "should fail when making a change to the cluster config's dns", |
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'll need this to be allowed as part of #2574, either here or as part of @wfernandes's PR, just FYI
controlplane/kubeadm/api/v1alpha3/kubeadm_control_plane_webhook.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Chuck Ha <[email protected]>
0af767d
to
81719e3
Compare
@vincepri addressed the feedback. I'm not completely sure on the types of errors I chose to return (apierrors.InternalError) but they seemed to fit the best |
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.
/lgtm
InternalError does seems the most appropriate, I'd expect users to file a bug if any of that happens |
@chuckha: 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. |
Signed-off-by: Chuck Ha [email protected]
What this PR does / why we need it:
This PR loosens the web hook restriction allowing for changes to the etcd field but disallowing any other ClusterConfiguation field change.
Allows setting the etcd local image metadata after creation
Allows unsetting the etcd local image metadata after having set it
Denies changing any non-etcd local image metadata (either setting or unsetting)
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Related to #2543