-
Notifications
You must be signed in to change notification settings - Fork 192
Validate workload cluster service CIDR size #2342
Validate workload cluster service CIDR size #2342
Conversation
Cluster Generation A/B Results: |
5cb09df
to
36e0950
Compare
Cluster Generation A/B Results: |
36e0950
to
073a3b0
Compare
Cluster Generation A/B Results: |
This validation already exists for managment clusters, this cluster CIDR size validation on workload clusters. Kube-apiserver validates the provided service CIDR is not too large. When provided an invalide service cidr, the kube-apiserver fails to come up and causes the cluster to hang. This PR duplicates the service CIDR validation so that cluster creation with an invalid CIDR fails fast. The kube-apiserver validation can be seen here: https://github.com/kubernetes/kubernetes/blob/3c87c43ceff6122637c8d8070601f7271026360e/cmd/kube-apiserver/app/options/validation.go#L52 Signed-off-by: Edwin Xie <exie@vmware.com> Co-authored-by: Tyler Schultz <tschultz@vmware.com>
073a3b0
to
19a52be
Compare
Cluster Generation A/B Results: |
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, thanks.
@tylerschultz Since this PR introduces some user-facing changes, can you add a short note under release notes about them?
Thanks @vuil. I've added a release note. |
This validation already exists for managment clusters, this cluster CIDR size validation on workload clusters. Kube-apiserver validates the provided service CIDR is not too large. When provided an invalide service cidr, the kube-apiserver fails to come up and causes the cluster to hang. This PR duplicates the service CIDR validation so that cluster creation with an invalid CIDR fails fast. The kube-apiserver validation can be seen here: https://github.com/kubernetes/kubernetes/blob/3c87c43ceff6122637c8d8070601f7271026360e/cmd/kube-apiserver/app/options/validation.go#L52 Signed-off-by: Edwin Xie <exie@vmware.com> Co-authored-by: Tyler Schultz <tschultz@vmware.com> Co-authored-by: Edwin Xie <exie@vmware.com>
What this PR does / why we need it
Kube-apiserver validates the provided service CIDR is not too large.
When provided an invalide service cidr, the kube-apiserver fails
to come up and causes the cluster to hang.
This PR duplicates the service CIDR validation so that cluster creation
with an invalid CIDR fails fast.
The kube-apiserver validation can be seen here:
https://github.com/kubernetes/kubernetes/blob/3c87c43ceff6122637c8d8070601f7271026360e/cmd/kube-apiserver/app/options/validation.go#L52
This validation already exists for management clusters, this cluster CIDR
size validation on workload clusters.
This PR is a follow on to this PR:
#986
Describe testing done for PR
Unit tests
The cli was built and used to attempt to create a workload cluster with a cluster CIDR that is too large, where it was seen the CLI failed fast.
Release note
PR Checklist
Additional information