-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Assert that IP range is enough for the nodes #8720
Assert that IP range is enough for the nodes #8720
Conversation
Co-authored-by: Necatican Yıldırım <[email protected]>
|
Welcome @eakyildirim! |
Hi @eakyildirim. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
- name: "Check that IP range is enough for the nodes" | ||
assert: | ||
that: | ||
- 2 ** ( kube_network_node_prefix - kube_pods_subnet | ipaddr('prefix' ) >= groups['k8s_cluster'] | length |
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'm guessing you are missing a parentheses.
- 2 ** ( kube_network_node_prefix - kube_pods_subnet | ipaddr('prefix' ) >= groups['k8s_cluster'] | length | |
- 2 ** ( kube_network_node_prefix - kube_pods_subnet | ipaddr('prefix' ) >= groups['k8s_cluster'] | length ) |
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.
Hello, thank you for your review! Basic mistakes for the first start🥲
@eakyildirim since the following commits are fixes please squash them into a single commit. |
/ok-to-test |
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.
Please check @cristicalin comment to make this pull request simple.
/approve
- name: "Check that IP range is enough for the nodes" | ||
assert: | ||
that: | ||
- 2 ** (kube_network_node_prefix - kube_pods_subnet | ipaddr('prefix')) >= groups['k8s_cluster'] | length |
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 additional check follows the samples of
kubespray/roles/kubespray-defaults/defaults/main.yaml
Lines 192 to 202 in 937e64d
# Example: | |
# Up to 64 nodes and up to 254 or kubelet_max_pods (the lowest of the two) pods per node: | |
# - kube_pods_subnet: 10.233.64.0/18 | |
# - kube_network_node_prefix: 24 | |
# - kubelet_max_pods: 110 | |
# | |
# Example: | |
# Up to 128 nodes and up to 126 or kubelet_max_pods (the lowest of the two) pods per node: | |
# - kube_pods_subnet: 10.233.64.0/18 | |
# - kube_network_node_prefix: 25 | |
# - kubelet_max_pods: 110 |
That seems good for me.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eakyildirim, oomichi 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 |
Since this is a first time contribution we can dispense with the squash commits requirement. |
* Assert that IP range is enough for the nodes Co-authored-by: Necatican Yıldırım <[email protected]> * Fixed whitespace * Fixed errors * Fixed errors Co-authored-by: Necatican Yıldırım <[email protected]>
* Assert that IP range is enough for the nodes Co-authored-by: Necatican Yıldırım <[email protected]> * Fixed whitespace * Fixed errors * Fixed errors Co-authored-by: Necatican Yıldırım <[email protected]>
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: