-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add self-defined template configure file for embedded flannel #1531
Labels
kind/enhancement
An improvement to existing functionality
Milestone
Comments
Encore222
changed the title
Add self-defined template configure file of flannel
Add self-defined template configure file for embedded flannel
Mar 13, 2020
davidnuzik
added
[zube]: To Triage
kind/enhancement
An improvement to existing functionality
labels
Mar 13, 2020
@davidnuzik Do I need to commit my code? |
Encore222
added a commit
to Encore222/k3s
that referenced
this issue
Mar 17, 2020
-Add an additional parameter to k3s agent like '--flannel-conf-tpl' to set a template of flannel conf. -Use that to render a real conf for embedded flannel. Issue k3s-io#1531
Encore222
added a commit
to Encore222/k3s
that referenced
this issue
Mar 17, 2020
-Add an additional parameter to k3s agent like '--flannel-conf-tpl' to set a template of flannel conf. -Use that to render a real conf for embedded flannel. Issue k3s-io#1531
Do we still need it? It feels like another flannel flag. |
Closing due to age, and potential redundancy - can reopen if it becomes more important. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I wanna set flannel to vxlan backend and directrouting. And I also wanna the "network" field in flannel conf is auto-generated by k3s according to its cluster cidr. But in fact if I go to set vxlan backend and directrouting, the only way is to set --flannel-conf in k3s to a self-defined conf, and then the "network" field is also sel-defined, too. Since on a productive env, to define every agent's ip range is an unfriendly and uneasy work, it's more reasonable to make a self-defined template of flannel conf to instantiate a real conf by args of k3s agent.
I got this by reading the source code in pkg/agent/flannel/setup.go
`
func createFlannelConf(nodeConfig *config.Node) error {
if nodeConfig.FlannelConf == "" {
return nil
}
if nodeConfig.FlannelConfOverride {
logrus.Infof("Using custom flannel conf defined at %s", nodeConfig.FlannelConf)
return nil
}
confJSON := strings.Replace(flannelConf, "%CIDR%", nodeConfig.AgentConfig.ClusterCIDR.String(), -1)
}
`
Describe the solution you'd like
We can add an additional parameter to k3s agent like '--flannel-conf-tpl' to set a template of flannel conf. And render a real conf for embedded flannel.
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: