-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Feat: add Cilium LB IP Pool configuration to support ranges #12140
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
Conversation
The committers listed above are authorized under a signed CLA. |
Welcome @Kimcheolhui! |
Hi @Kimcheolhui. 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-sigs/prow repository. |
/ok-to-test |
/retitle Feat: add Cilium LB IP Pool configuration to support ranges |
/retest-failed |
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!
/lgtm
{% for rblock in cilium_loadbalancer_ip_pool.ranges | default([]) %} | ||
- start: "{{ rblock.start }}" | ||
stop: "{{ rblock.stop | default(rblock.start) }}" | ||
{% endfor %} | ||
{% endfor %} |
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.
Could this be simplified to a | to_yaml
filter ? Or is there something I'm missing ?
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 the review! @VannTen
Using | to_yaml
is possible, but then k8s-net-cilium.yml
must be slightly modified.
The current k8s-net-cilium.yml
looks like this:
# k8s-net-cilium.yml
...
cilium_loadbalancer_ip_pools:
- name: "blue-pool"
cidrs:
- "10.0.10.0/24"
ranges:
- start: "20.0.20.100"
stop: "20.0.20.200"
- start: "1.2.3.4"
...
If we choose to use | to_yaml
, it's need to be modified like this:
# k8s-net-cilium.yml
...
cilium_loadbalancer_ip_pools:
- name: "blue-pool"
cidrs:
- cidr: "10.0.10.0/24" # changed
ranges:
- start: "20.0.20.100"
stop: "20.0.20.200"
- start: "1.2.3.4"
...
Then the Jinja template(cilium-loadbalancer-ip-pool.yml.j2
) can be simplified to:
# cilium-loadbalancer-ip-pool.yml.j2
...
blocks:
{{ cilium_loadbalancer_ip_pool.cidrs | to_yaml | indent(2) }}
{{ cilium_loadbalancer_ip_pool.ranges | to_yaml | indent(2) }}
...
Both the current approach and this alternative work.
Let me know which one you think is better.
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.
Nah, let's not break compat. This is fine as is.
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.
/approve
/lgtm
{% for rblock in cilium_loadbalancer_ip_pool.ranges | default([]) %} | ||
- start: "{{ rblock.start }}" | ||
stop: "{{ rblock.stop | default(rblock.start) }}" | ||
{% endfor %} | ||
{% endfor %} |
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.
Nah, let's not break compat. This is fine as is.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Kimcheolhui, tico88612, VannTen 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 |
What type of PR is this?
/kind documentation
/kind feature
What this PR does / why we need it:
This PR will support Cilium LB IP Pool configuration for
ranges
which isstart-stop
andstart
.Details on #12036
Which issue(s) this PR fixes:
Fixes #12036
Special notes for your reviewer:
Reference: Cilium Docs - LB IPAM Pools
Does this PR introduce a user-facing change?: