mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
support hostgw
This commit is contained in:
parent
d14faf95ba
commit
6736e24673
@ -44,6 +44,9 @@ const (
|
|||||||
"Backend": %backend%
|
"Backend": %backend%
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
hostGwBackend = `{
|
||||||
|
"Type": "host-gw"
|
||||||
|
}`
|
||||||
|
|
||||||
vxlanBackend = `{
|
vxlanBackend = `{
|
||||||
"Type": "vxlan"
|
"Type": "vxlan"
|
||||||
@ -127,6 +130,8 @@ func createFlannelConf(nodeConfig *config.Node) error {
|
|||||||
}
|
}
|
||||||
case config.FlannelBackendWireguard:
|
case config.FlannelBackendWireguard:
|
||||||
backendConf = wireguardBackend
|
backendConf = wireguardBackend
|
||||||
|
case config.FlannelBackendHOSTGW:
|
||||||
|
backendConf = hostGwBackend
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("Cannot configure unknown flannel backend '%s'", nodeConfig.FlannelBackend)
|
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
|
// make new strongswan link
|
||||||
return os.Symlink(dataDir, nodeConfig.AgentConfig.StrongSwanDir)
|
return os.Symlink(dataDir, nodeConfig.AgentConfig.StrongSwanDir)
|
||||||
}
|
}
|
@ -18,6 +18,7 @@ const (
|
|||||||
FlannelBackendVXLAN = "vxlan"
|
FlannelBackendVXLAN = "vxlan"
|
||||||
FlannelBackendIPSEC = "ipsec"
|
FlannelBackendIPSEC = "ipsec"
|
||||||
FlannelBackendWireguard = "wireguard"
|
FlannelBackendWireguard = "wireguard"
|
||||||
|
FlannelBackendHOSTGW = "hostgw"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Node struct {
|
type Node struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user