Documentation ¶
Index ¶
- Constants
- func IsOpenShiftMultitenantNetworkPlugin(pluginName string) bool
- func IsOpenShiftNetworkPlugin(pluginName string) bool
- func NewNodePlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client, ...) (api.OsdnNodePlugin, error)
- func NewProxyPlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client) (api.FilteringEndpointsConfigHandler, error)
- func StartMaster(networkConfig osconfigapi.MasterNetworkConfig, osClient *osclient.Client, ...) error
- type FirewallRule
- type NetworkInfo
- type NodeIPTables
- type OsdnMaster
- type OsdnNode
- func (plugin *OsdnNode) AddHostSubnetRules(subnet *osapi.HostSubnet) error
- func (plugin *OsdnNode) AddServiceRules(service *kapi.Service, netID uint32) error
- func (plugin *OsdnNode) Capabilities() utilsets.Int
- func (plugin *OsdnNode) DeleteHostSubnetRules(subnet *osapi.HostSubnet) error
- func (plugin *OsdnNode) DeleteServiceRules(service *kapi.Service) error
- func (plugin *OsdnNode) Event(name string, details map[string]interface{})
- func (node *OsdnNode) GetLocalPods(namespace string) ([]kapi.Pod, error)
- func (plugin *OsdnNode) GetPodNetworkStatus(namespace string, name string, podInfraContainerID kubeletTypes.ContainerID) (*knetwork.PodNetworkStatus, error)
- func (plugin *OsdnNode) Init(host knetwork.Host, _ componentconfig.HairpinMode, _ string) error
- func (plugin *OsdnNode) Name() string
- func (plugin *OsdnNode) SetUpPod(namespace string, name string, id kubeletTypes.ContainerID) error
- func (plugin *OsdnNode) SetupEgressNetworkPolicy() error
- func (plugin *OsdnNode) SetupSDN(localSubnetCIDR, clusterNetworkCIDR, servicesNetworkCIDR string, mtu uint32) (bool, error)
- func (node *OsdnNode) Start() error
- func (plugin *OsdnNode) Status() error
- func (node *OsdnNode) SubnetStartNode(mtu uint32) (bool, error)
- func (plugin *OsdnNode) TearDownPod(namespace string, name string, id kubeletTypes.ContainerID) error
- func (plugin *OsdnNode) UpdateEgressNetworkPolicyVNID(namespace string, oldVnid, newVnid uint32) error
- func (plugin *OsdnNode) UpdatePod(namespace string, name string, id kubeletTypes.DockerID) error
- func (node *OsdnNode) VnidStartNode() error
- func (node *OsdnNode) WaitForPodNetworkReady() error
- type Registry
- func (registry *Registry) CreateClusterNetwork(ni *NetworkInfo) error
- func (registry *Registry) CreateNetNamespace(name string, id uint32) error
- func (registry *Registry) CreateSubnet(nodeName, nodeIP, subnetCIDR string) (*osapi.HostSubnet, error)
- func (registry *Registry) DeleteNetNamespace(name string) error
- func (registry *Registry) DeleteSubnet(nodeName string) error
- func (registry *Registry) GetEgressNetworkPolicies() ([]osapi.EgressNetworkPolicy, error)
- func (registry *Registry) GetNetNamespace(name string) (*osapi.NetNamespace, error)
- func (registry *Registry) GetNetNamespaces() ([]osapi.NetNamespace, error)
- func (registry *Registry) GetNetworkInfo() (*NetworkInfo, error)
- func (registry *Registry) GetPod(nodeName, namespace, podName string) (*kapi.Pod, error)
- func (registry *Registry) GetRunningPods(nodeName, namespace string) ([]kapi.Pod, error)
- func (registry *Registry) GetServices() ([]kapi.Service, error)
- func (registry *Registry) GetServicesForNamespace(namespace string) ([]kapi.Service, error)
- func (registry *Registry) GetSubnet(nodeName string) (*osapi.HostSubnet, error)
- func (registry *Registry) GetSubnets() ([]osapi.HostSubnet, error)
- func (registry *Registry) RunEventQueue(resourceName ResourceName) *oscache.EventQueue
- func (registry *Registry) UpdateClusterNetwork(ni *NetworkInfo) error
- func (registry *Registry) UpdateNetNamespace(netns *osapi.NetNamespace) (*osapi.NetNamespace, error)
- func (registry *Registry) UpdateSubnet(hs *osapi.HostSubnet) (*osapi.HostSubnet, error)
- func (registry *Registry) ValidateNodeIP(nodeIP string) error
- type ResourceName
Constants ¶
View Source
const ( // rule versioning; increment each time flow rules change VERSION = 1 VERSION_TABLE = "table=253" VERSION_ACTION = "actions=note:" BR = "br0" LBR = "lbr0" TUN = "tun0" VLINUXBR = "vlinuxbr" VOVSBR = "vovsbr" VXLAN = "vxlan0" VXLAN_PORT = "4789" EgressNetworkPolicyFailureLabel = "network.openshift.io/not-enforcing-egress-network-policy" )
View Source
const ( SingleTenantPluginName string = "redhat/openshift-ovs-subnet" MultiTenantPluginName string = "redhat/openshift-ovs-multitenant" IngressBandwidthAnnotation string = "kubernetes.io/ingress-bandwidth" EgressBandwidthAnnotation string = "kubernetes.io/egress-bandwidth" AssignMacVlanAnnotation string = "pod.network.openshift.io/assign-macvlan" )
Variables ¶
This section is empty.
Functions ¶
func NewNodePlugin ¶
func NewNodePlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client, hostname string, selfIP string, iptablesSyncPeriod time.Duration, mtu uint32) (api.OsdnNodePlugin, error)
Called by higher layers to create the plugin SDN node instance
func NewProxyPlugin ¶
func NewProxyPlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client) (api.FilteringEndpointsConfigHandler, error)
Called by higher layers to create the proxy plugin instance; only used by nodes
func StartMaster ¶
func StartMaster(networkConfig osconfigapi.MasterNetworkConfig, osClient *osclient.Client, kClient *kclient.Client) error
Types ¶
type FirewallRule ¶
type FirewallRule struct {
// contains filtered or unexported fields
}
type NetworkInfo ¶
type NodeIPTables ¶
type NodeIPTables struct {
// contains filtered or unexported fields
}
func (*NodeIPTables) Setup ¶
func (n *NodeIPTables) Setup() error
type OsdnMaster ¶
type OsdnMaster struct {
// contains filtered or unexported fields
}
func (*OsdnMaster) SubnetStartMaster ¶
func (master *OsdnMaster) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint32) error
func (*OsdnMaster) VnidStartMaster ¶
func (master *OsdnMaster) VnidStartMaster() error
type OsdnNode ¶
type OsdnNode struct {
// contains filtered or unexported fields
}
func (*OsdnNode) AddHostSubnetRules ¶
func (plugin *OsdnNode) AddHostSubnetRules(subnet *osapi.HostSubnet) error
func (*OsdnNode) AddServiceRules ¶
func (*OsdnNode) Capabilities ¶
func (*OsdnNode) DeleteHostSubnetRules ¶
func (plugin *OsdnNode) DeleteHostSubnetRules(subnet *osapi.HostSubnet) error
func (*OsdnNode) DeleteServiceRules ¶
func (*OsdnNode) GetLocalPods ¶
func (*OsdnNode) GetPodNetworkStatus ¶
func (plugin *OsdnNode) GetPodNetworkStatus(namespace string, name string, podInfraContainerID kubeletTypes.ContainerID) (*knetwork.PodNetworkStatus, error)
func (*OsdnNode) Init ¶
func (plugin *OsdnNode) Init(host knetwork.Host, _ componentconfig.HairpinMode, _ string) error
func (*OsdnNode) SetUpPod ¶
func (plugin *OsdnNode) SetUpPod(namespace string, name string, id kubeletTypes.ContainerID) error
func (*OsdnNode) SetupEgressNetworkPolicy ¶
func (*OsdnNode) TearDownPod ¶
func (plugin *OsdnNode) TearDownPod(namespace string, name string, id kubeletTypes.ContainerID) error
func (*OsdnNode) UpdateEgressNetworkPolicyVNID ¶
func (*OsdnNode) VnidStartNode ¶
func (*OsdnNode) WaitForPodNetworkReady ¶
type Registry ¶
type Registry struct { // Cache cluster network information NetworkInfo *NetworkInfo // contains filtered or unexported fields }
func (*Registry) CreateClusterNetwork ¶
func (registry *Registry) CreateClusterNetwork(ni *NetworkInfo) error
func (*Registry) CreateNetNamespace ¶
func (*Registry) CreateSubnet ¶
func (registry *Registry) CreateSubnet(nodeName, nodeIP, subnetCIDR string) (*osapi.HostSubnet, error)
func (*Registry) DeleteNetNamespace ¶
func (*Registry) DeleteSubnet ¶
func (*Registry) GetEgressNetworkPolicies ¶
func (registry *Registry) GetEgressNetworkPolicies() ([]osapi.EgressNetworkPolicy, error)
func (*Registry) GetNetNamespace ¶
func (registry *Registry) GetNetNamespace(name string) (*osapi.NetNamespace, error)
func (*Registry) GetNetNamespaces ¶
func (registry *Registry) GetNetNamespaces() ([]osapi.NetNamespace, error)
func (*Registry) GetNetworkInfo ¶
func (registry *Registry) GetNetworkInfo() (*NetworkInfo, error)
func (*Registry) GetRunningPods ¶
func (*Registry) GetServicesForNamespace ¶
func (*Registry) GetSubnet ¶
func (registry *Registry) GetSubnet(nodeName string) (*osapi.HostSubnet, error)
func (*Registry) GetSubnets ¶
func (registry *Registry) GetSubnets() ([]osapi.HostSubnet, error)
func (*Registry) RunEventQueue ¶
func (registry *Registry) RunEventQueue(resourceName ResourceName) *oscache.EventQueue
Run event queue for the given resource
func (*Registry) UpdateClusterNetwork ¶
func (registry *Registry) UpdateClusterNetwork(ni *NetworkInfo) error
func (*Registry) UpdateNetNamespace ¶
func (registry *Registry) UpdateNetNamespace(netns *osapi.NetNamespace) (*osapi.NetNamespace, error)
func (*Registry) UpdateSubnet ¶
func (registry *Registry) UpdateSubnet(hs *osapi.HostSubnet) (*osapi.HostSubnet, error)
func (*Registry) ValidateNodeIP ¶
type ResourceName ¶
type ResourceName string
const ( Nodes ResourceName = "Nodes" Namespaces ResourceName = "Namespaces" NetNamespaces ResourceName = "NetNamespaces" Services ResourceName = "Services" HostSubnets ResourceName = "HostSubnets" Pods ResourceName = "Pods" EgressNetworkPolicies ResourceName = "EgressNetworkPolicies" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.