-
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
Create variables for ipvs kernel modules #10580
Conversation
Hi @borgiacis. 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. |
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.
@floryut please review this PR instead of #9630 . Thank you!
@borgiacis Thank you for the PR 👍
/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.
Some suggestions to avoid duplication and shell module usage (one list + converting to file contents is better in my opinion than defining the two variables)
roles/kubernetes/node/tasks/main.yml
Outdated
{% if modprobe_nf_conntrack_ipv4 is success -%} | ||
nf_conntrack_ipv4 | ||
{%- endif -%} | ||
content: "{{ kube_proxy_ipvs_modules_list }}" |
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.
content: "{{ kube_proxy_ipvs_modules_list }}" | |
content: "{{ kube_proxy_ipvs_modules | join('\n') }}" |
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.
Added to new commit
roles/kubernetes/node/tasks/main.yml
Outdated
when: kube_proxy_mode == 'ipvs' | ||
tags: | ||
- kube-proxy | ||
|
||
- name: Add nf_conntrack_ipv4 to file if module is mounted | ||
shell: "echo 'nf_conntrack_ipv4' >> /etc/modules-load.d/kube_proxy-ipvs.conf" |
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.
shell: "echo 'nf_conntrack_ipv4' >> /etc/modules-load.d/kube_proxy-ipvs.conf" | |
set_fact: | |
kube_proxy_ipvs_modules: "{{ kube_proxy_ipvs_modules + ['nf_conntrack_ipv4'] }}" |
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.
+ moving that before the persist tasks.
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.
Added to new commit
roles/kubernetes/node/tasks/main.yml
Outdated
when: kube_proxy_mode == 'ipvs' | ||
tags: | ||
- kube-proxy | ||
|
||
- name: Add nf_conntrack_ipv4 to file if module is mounted |
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.
- name: Add nf_conntrack_ipv4 to file if module is mounted | |
- name: Add nf_conntrack_ipv4 kube-proxy ipvs module list |
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.
Added to new commit
roles/kubernetes/node/tasks/main.yml
Outdated
@@ -113,10 +113,7 @@ | |||
name: "{{ item }}" | |||
state: present | |||
with_items: |
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_items: | |
loop: "{{ kube_proxy_ipvs_modules }}" |
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.
Added to new commit
roles/kubernetes/node/tasks/main.yml
Outdated
- ip_vs_rr | ||
- ip_vs_wrr | ||
- ip_vs_sh | ||
- "{{ kube_proxy_ipvs_modules }}" |
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.
- "{{ kube_proxy_ipvs_modules }}" |
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.
Added to new commit
|
||
kube_proxy_ipvs_modules_list: | | ||
ip_vs | ||
ip_vs_rr | ||
ip_vs_wrr | ||
ip_vs_sh | ||
ip_vs_wlc | ||
ip_vs_lc |
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.
kube_proxy_ipvs_modules_list: | | |
ip_vs | |
ip_vs_rr | |
ip_vs_wrr | |
ip_vs_sh | |
ip_vs_wlc | |
ip_vs_lc |
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.
Added to new commit
@VannTen I have created a new commit. With suggestions |
Looks good to me. Can't comment on the module list itself as I don't know much about IPVS, but the code is IMO clearer that way 👍 |
Thanks! for reviewing |
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.
Thanks for your contribution, looks good 👍
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: borgiacis, floryut, MrFreezeex 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 |
* Create variables for ipvs kernel modules * Corrected kubernetes role node task missing name * Added changes as suggested during review by VannTen
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #9628
Special notes for your reviewer:
Does this PR introduce a user-facing change?: