gravitational/planet

How to get podCIDR to show up in the node spec?

eddiewang opened this issue · 1 comments

Hi there,

One of my kubernetes applications (squat/kilo#62) requires the podCIDR field to be added to the node spec. The Pod CIDR allocation is turned on in the controller-manager by default on most kubernetes distributions. This is enabled via --allocate-node-cidrs https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/#options

I was wondering if it was possible to expose that via my Gravity install?

Thanks

Hi Eddie!

We try to keep the github issue tracker focused on actionable features/bugs. I'd recommend using our community forums (https://community.gravitational.com/) or community slack (https://grv8.slack.com) for questions similar to this, and file a issue once it is clear exactly what needs to be done. If you'd like to continue the discussion, try one of those channels.

It looks like the way to turn --allocate-node-cidrs on currently is with the "PLANET_DISABLE_FLANNEL" env variable.

planet/tool/planet/start.go

Lines 830 to 838 in da6d238

config.Env.Upsert("KUBE_ENABLE_IPAM", "false")
if config.DisableFlannel {
// Historically we use etcd for IPAM when running flannel
// In this case, we don't want to run the kubernetes IPAM, as the NodeSpec.PodCIDR may not match the flannel IPAM
// Other plugins may want the kubernetes IPAM enabled, but unless we pass configuration we won't know.
// For now, if flannel is disabled, assume the kubernetes IPAM should be enabled.
config.Env.Upsert("KUBE_ENABLE_IPAM", "true")
return nil
}

Interestingly, we declare --allocate-node-cidrs twice:

--allocate-node-cidrs=${KUBE_ENABLE_IPAM} \

This definitely seems like a mistake and I'm not sure what the expected behavior is when the flag is declared twice.