-
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
using configmap to configure calico cni config #10177
using configmap to configure calico cni config #10177
Conversation
10200cc
to
96bf569
Compare
|
25d401d
to
997648f
Compare
@@ -223,6 +226,8 @@ spec: | |||
# # Configure the IP Pool from which Pod IPs will be chosen. | |||
# - name: CALICO_IPV4POOL_CIDR | |||
# value: "{{ calico_pool_cidr | default(kube_pods_subnet) }}" | |||
- name: NO_DEFAULT_POOLS |
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.
Is this one a side change or is it normal ?
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.
Calico extracts the pod_subnet from the configmap: kubeadm-config
and creates a default IP pool (provided the variable CALICO_IPV4POOL_CIDR is not empty, it is empty in kubespray). see https://github.com/projectcalico/calico/blob/aff70be8ba03e1d8b2ea3b35372afa3910717ea4/node/pkg/lifecycle/startup/startup.go#L745
But kubespray does not create a default IP pool in this way, by creating it manually. see
- name: Calico | Configure calico network pool |
I'm not sure, unless I'm missing something.
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.
In addition, the names of the default calico's IPPools created by kubespray are default-pool
and default-pool-v6
. It would be nice if we are aligned with the calico community.
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, I checked with upstream yaml seems very close to what they have indeed 👍.
/lgtm
997648f
to
1003521
Compare
thanks @MrFreezeex I removed |
/lgtm |
Signed-off-by: cyclinder qifeng.guo@daocloud.io
1003521
to
62f30a3
Compare
Thanks for the rebase :p 🙏 |
/cc @floryut Could you please take a look? |
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.
@cyclinder Looks good indeed! Thank you
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cyclinder, 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 |
Signed-off-by: cyclinder qifeng.guo@daocloud.io Signed-off-by: cyclinder qifeng.guo@daocloud.io
Signed-off-by: cyclinder qifeng.guo@daocloud.io
What type of PR is this?
/kind feature
What this PR does / why we need it:
using configmap to configure calico cni config
Which issue(s) this PR fixes:
Fixes #10093
Special notes for your reviewer:
https://github.com/projectcalico/calico/blob/aff70be8ba03e1d8b2ea3b35372afa3910717ea4/manifests/calico.yaml#L59
Does this PR introduce a user-facing change?: