Documentation ¶
Index ¶
- Variables
- func NewFlannelMigrationController(ctx context.Context, k8sClientset *kubernetes.Clientset, ...) controller.Controller
- func NewIPAMMigrator(ctx context.Context, k8sClientset *kubernetes.Clientset, ...) ipamMigrator
- func NewNetworkMigrator(ctx context.Context, k8sClientset *kubernetes.Clientset, ...) *networkMigrator
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FlannelEnvFile = "/host/run/flannel/subnet.env"
)
View Source
var ( // NodeNetworkCalico is a map value indicates a node is becoming part of Calico vxlan network. // This is used both as a nodeSelector for Calico daemonset and a label for a node. NodeNetworkCalico = map[string]string{/* contains filtered or unexported fields */} )
Functions ¶
func NewFlannelMigrationController ¶
func NewFlannelMigrationController(ctx context.Context, k8sClientset *kubernetes.Clientset, calicoClient client.Interface, cfg *Config) controller.Controller
NewFlannelMigrationController Constructor for Flannel migration controller
func NewIPAMMigrator ¶
func NewNetworkMigrator ¶
Types ¶
type Config ¶
type Config struct { // FlannelNetwork should has same value as Flannel "network" config. // This is the IPv4 network in CIDR format used for the entire flannel network. // This config item is auto detected from /run/flannel/subnet.env. FlannelNetwork string `default:"" split_words:"true"` // FlannelIpv6Network should has same value as Flannel "IPv6Network" config. // This is the IPv6 network in CIDR format used for the entire flannel network. // This config item is auto detected from /run/flannel/subnet.env. FlannelIpv6Network string `default:"" split_words:"true"` // Name of Flannel daemonset in kube-system namespace. // This could be a Canal daemonset where the controller will autodetect. // Default is kube-flannel-ds FlannelDaemonsetName string `default:"kube-flannel-ds" split_words:"true"` // FlannelMTU is the mtu used by flannel vxlan tunnel interface. // This config item is auto detected from /run/flannel/subnet.env. FlannelMTU int `default:"0" split_words:"true"` // This option indicates if IP masquerade is enabled for traffic destined for outside the flannel network. // This config item is auto detected from /run/flannel/subnet.env. FlannelIPMasq bool `default:"true" split_words:"true"` // FlannelSubnetLen should has same value as Flannel "SubnetLen" configuration option. // It is the size of the subnet allocated to each host. Default value is 24. FlannelSubnetLen int `default:"24" split_words:"true"` // FlannelIpv6SubnetLen should has same value as Flannel "IPv6SubnetLen" configuration option. // It is the size of the subnet allocated to each host. Default value is 64. FlannelIpv6SubnetLen int `default:"64" split_words:"true"` // FlannelAnnotationPrefix should has same value as Flannel "kube-annotation-prefix" commandline option. FlannelAnnotationPrefix string `default:"flannel.alpha.coreos.com" split_words:"true"` // FlannelVNI is the VNI id used by Flannel vxlan network. FlannelVNI int `default:"1" split_words:"true"` // FlannelPort is the port number used by Flannel vxlan network. FlannelPort int `default:"8472" split_words:"true"` // Name of Calico daemonset in kube-system namespace. Default is "calico-node". CalicoDaemonsetName string `default:"calico-node" split_words:"true"` // CNI config directory. The full path of the directory in which to search for CNI config files. Default: /etc/cni/net.d CniConfigDir string `default:"/etc/cni/net.d" split_words:"true"` // Node name which migration controller is running. This ENV is passed via Kubernetes downwards API. PodNodeName string `default:"" split_words:"true"` // FlannelSubnetEnv holds flannel-subnet-env value from migration ConfigMap. // This ENV is passed via ConfigMap. FlannelSubnetEnv string `default:"" split_words:"true"` // Total seconds to wait before migration controller exits. // This is used for debug/test purpose. DebugWaitBeforeExit int `default:"0" split_words:"true"` // Total seconds to wait before migration controller main thread starts. // This is used for debug/test purpose. DebugWaitBeforeStart int `default:"0" split_words:"true"` // Calico IPv4 ippool blockSize default value. DefaultIppoolSize int `default:"26" split_words:"true"` // Calico IPv6 ippool blockSize default value. DefaultIppoolSizeV6 int `default:"122" split_words:"true"` }
Flannel migration controller configurations
func (*Config) IsRunningCanal ¶
func (*Config) ReadFlannelConfig ¶
Read Flannel config from content of /run/flannel/subnet.env.
func (*Config) ValidateFlannelConfig ¶
Validate Flannel migration controller configurations.
Click to show internal directories.
Click to hide internal directories.