mirror of https://github.com/k3s-io/k3s
support hostgw
parent
d14faf95ba
commit
6736e24673
|
@ -44,6 +44,9 @@ const (
|
|||
"Backend": %backend%
|
||||
}
|
||||
`
|
||||
hostGwBackend = `{
|
||||
"Type": "host-gw"
|
||||
}`
|
||||
|
||||
vxlanBackend = `{
|
||||
"Type": "vxlan"
|
||||
|
@ -127,6 +130,8 @@ func createFlannelConf(nodeConfig *config.Node) error {
|
|||
}
|
||||
case config.FlannelBackendWireguard:
|
||||
backendConf = wireguardBackend
|
||||
case config.FlannelBackendHOSTGW:
|
||||
backendConf = hostGwBackend
|
||||
default:
|
||||
return fmt.Errorf("Cannot configure unknown flannel backend '%s'", nodeConfig.FlannelBackend)
|
||||
}
|
||||
|
@ -161,4 +166,4 @@ func setupStrongSwan(nodeConfig *config.Node) error {
|
|||
|
||||
// make new strongswan link
|
||||
return os.Symlink(dataDir, nodeConfig.AgentConfig.StrongSwanDir)
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ const (
|
|||
FlannelBackendVXLAN = "vxlan"
|
||||
FlannelBackendIPSEC = "ipsec"
|
||||
FlannelBackendWireguard = "wireguard"
|
||||
FlannelBackendHOSTGW = "hostgw"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
|
Loading…
Reference in New Issue