-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Feat: revert calico default pool in CM calico-config #12443
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
base: master
Are you sure you want to change the base?
Feat: revert calico default pool in CM calico-config #12443
Conversation
Signed-off-by: Houssem Ben Mabrouk <[email protected]>
Welcome @orange-hbenmabrouk! |
Hi @orange-hbenmabrouk. 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 |
Which PR are you reverting? |
Sorry for not being very clear in my PR description. This PR reverts this PR #12369 and adds the feature in the config map template: https://github.com/kubernetes-sigs/kubespray/blob/master/roles/network_plugin/calico/templates/calico-config.yml.j2 Since the versions prior to v2.23 (<= v2.22) relies on the generated cni-calico.conflist file and mounts/uses that file. The missing implementation is only found here instead (release v2.22): https://github.com/kubernetes-sigs/kubespray/blob/release-2.22/roles/network_plugin/calico/templates/cni-calico.conflist.j2 |
Would you please help to review it ? |
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.
Yes, we previously removed the rendering of the calico-config file and now generate the CNI configuration through ConfigMap. Your changes make perfect sense.
/lgtm
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cyclinder, orange-hbenmabrouk The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
"type": "calico-ipam", | ||
{% if ipv4_stack %} | ||
{% if calico_cni_pool %} | ||
"ipv4_pools": ["{{ calico_pool_cidr | default(kube_pods_subnet) }}"], |
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.
If there is not specific reason, suggest calico_pool_cidr: "{{ kube_pods_subnet }}"
and change this:
"ipv4_pools": ["{{ calico_pool_cidr | default(kube_pods_subnet) }}"], | |
"ipv4_pools": ["{{ calico_pool_cidr }}"], |
WDYT?
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 variable calico_pool_cidr
is in a simple yaml files (not jinja), so your suggestion won't be interpreted correctly (it won't take the value of kube_pods_subnet
, but it will process it as a string).
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've answered with the wrong account 😆 I am still here though
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.
Variable located in defaults
and vars
are in fact interpreted by Ansible as jinja, so that should work.
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.
This still needs to be addressed 🆙
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.
@VannTen @tico88612
Sorry for the delay, the suggested improvements has been pushed.
{% endif %} | ||
{% if ipv6_stack %} | ||
{% if calico_cni_pool_ipv6 %} | ||
"ipv6_pools": ["{{ calico_pool_cidr_ipv6 | default(kube_pods_subnet_ipv6) }}"], |
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.
Same suggestion
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.
Same answer :)
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.
Changes made in this commit: c835918
Please write the release-note. |
New changes are detected. LGTM label has been removed. |
Signed-off-by: Houssem Ben Mabrouk <[email protected]>
461e9c9
to
c835918
Compare
One more about this, could you edit the release note in one line? Since release notes are bulleted, you don't need to use bullet points in the content. |
done |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR reverts the functionality of calico's default pool and make it configurable in the config map of calico.
Special notes for your reviewer:
This feature was removed on the version v2.23.0 with the removal of the config file and the usage of the config map instead. While this configuration of the default pool existed in the file it was absent in the config map.
Is there a proper way to defined the default IP pool that calico uses, instead of defining it in the config-map
calico-config.yml
?Does this PR introduce a user-facing change?: