Documentation ¶
Index ¶
- Constants
- func CheckDNSResolver() error
- func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error)
- func NewMultiTenantPlugin() osdnPolicy
- func NewNetworkPolicyPlugin() osdnPolicy
- func NewOVSController(ovsif ovs.Interface, pluginId int) *ovsController
- func NewSingleTenantPlugin() osdnPolicy
- func RegisterSharedInformerEventHandlers(kubeInformers kinternalinformers.SharedInformerFactory, ...)
- func RunEventQueue(client kcache.Getter, resourceName ResourceName, process ProcessEventFunc)
- func StartMaster(networkConfig osconfigapi.MasterNetworkConfig, osClient *osclient.Client, ...) error
- type DNS
- type EgressDNS
- func (e *EgressDNS) Add(policy osapi.EgressNetworkPolicy)
- func (e *EgressDNS) Delete(policy osapi.EgressNetworkPolicy)
- func (e *EgressDNS) GetIPs(policy osapi.EgressNetworkPolicy, dnsName string) []net.IP
- func (e *EgressDNS) GetMinQueryTime() (time.Time, ktypes.UID, string, bool)
- func (e *EgressDNS) GetNetCIDRs(policy osapi.EgressNetworkPolicy, dnsName string) []net.IPNet
- func (e *EgressDNS) Sync()
- func (e *EgressDNS) Update(policyUID ktypes.UID) (error, bool)
- type EgressDNSUpdate
- type EventQueue
- type FirewallRule
- type IngressIsolationPolicy
- type NamespaceIngressPolicy
- type NamespaceNetworkPolicy
- type NetworkInfo
- type NodeIPTables
- type OsdnMaster
- type OsdnNode
- func (plugin *OsdnNode) AddHostSubnetRules(subnet *osapi.HostSubnet)
- func (plugin *OsdnNode) AddServiceRules(service *kapi.Service, netID uint32)
- func (node *OsdnNode) Capabilities() utilsets.Int
- func (plugin *OsdnNode) DeleteHostSubnetRules(subnet *osapi.HostSubnet)
- func (plugin *OsdnNode) DeleteServiceRules(service *kapi.Service)
- func (node *OsdnNode) Event(name string, details map[string]interface{})
- func (node *OsdnNode) GetLocalPods(namespace string) ([]kapi.Pod, error)
- func (node *OsdnNode) GetPodNetworkStatus(namespace string, name string, id kubeletTypes.ContainerID) (*knetwork.PodNetworkStatus, error)
- func (node *OsdnNode) Init(host knetwork.Host, hairpinMode componentconfig.HairpinMode, ...) error
- func (node *OsdnNode) IsPodNetworkReady() error
- func (node *OsdnNode) Name() string
- func (node *OsdnNode) SetUpPod(namespace string, name string, id kubeletTypes.ContainerID, ...) error
- func (plugin *OsdnNode) SetupEgressNetworkPolicy() error
- func (plugin *OsdnNode) SetupSDN() (bool, error)
- func (node *OsdnNode) Start() error
- func (node *OsdnNode) Status() error
- func (node *OsdnNode) SubnetStartNode() error
- func (node *OsdnNode) TearDownPod(namespace string, name string, id kubeletTypes.ContainerID) error
- func (plugin *OsdnNode) UpdateEgressNetworkPolicyVNID(namespace string, oldVnid, newVnid uint32)
- func (node *OsdnNode) UpdatePod(pod kapi.Pod) error
- type OsdnProxy
- type ProcessEventFunc
- type ResourceName
Constants ¶
const ( BR = "br0" TUN = "tun0" VXLAN = "vxlan0" // rule versioning; increment each time flow rules change VERSION = 3 VERSION_TABLE = 253 )
const (
DIG = "dig"
)
const (
NetworkPolicyAnnotation = "net.beta.kubernetes.io/network-policy"
)
const (
OutputFilteringChain iptables.Chain = "OPENSHIFT-ADMIN-OUTPUT-RULES"
)
const VXLAN_PORT = "4789"
Variables ¶
This section is empty.
Functions ¶
func CheckDNSResolver ¶
func CheckDNSResolver() error
func DeletionHandlingMetaNamespaceKeyFunc ¶ added in v1.4.0
func NewMultiTenantPlugin ¶
func NewMultiTenantPlugin() osdnPolicy
func NewNetworkPolicyPlugin ¶
func NewNetworkPolicyPlugin() osdnPolicy
func NewOVSController ¶
func NewSingleTenantPlugin ¶
func NewSingleTenantPlugin() osdnPolicy
func RegisterSharedInformerEventHandlers ¶
func RegisterSharedInformerEventHandlers(kubeInformers kinternalinformers.SharedInformerFactory, addOrUpdateFunc func(interface{}, interface{}, watch.EventType), delFunc func(interface{}), resourceName ResourceName)
RegisterSharedInformerEventHandlers registers addOrUpdateFunc and delFunc event handlers with kubernetes shared informers for the given resource name.
func RunEventQueue ¶ added in v1.4.0
func RunEventQueue(client kcache.Getter, resourceName ResourceName, process ProcessEventFunc)
Run event queue for the given resource. The 'process' function is called repeatedly with each available cache.Delta that describes state changes to an object. If the process function returns an error queued changes for that object are dropped but processing continues with the next available object's cache.Deltas. The error is logged with call stack information.
NOTE: this function will handle DeletedFinalStateUnknown delta objects automatically, which may not always be what you want since the now-deleted object may be stale.
func StartMaster ¶
func StartMaster(networkConfig osconfigapi.MasterNetworkConfig, osClient *osclient.Client, kClient kclientset.Interface, informers shared.InformerFactory) error
Types ¶
type EgressDNS ¶
type EgressDNS struct {
// contains filtered or unexported fields
}
func NewEgressDNS ¶
func NewEgressDNS() *EgressDNS
func (*EgressDNS) Add ¶
func (e *EgressDNS) Add(policy osapi.EgressNetworkPolicy)
func (*EgressDNS) Delete ¶
func (e *EgressDNS) Delete(policy osapi.EgressNetworkPolicy)
func (*EgressDNS) GetMinQueryTime ¶
func (*EgressDNS) GetNetCIDRs ¶
type EgressDNSUpdate ¶
type EventQueue ¶ added in v1.4.0
EventQueue is an enhanced DeltaFIFO that provides reliable Deleted deltas even if no knownObjects store is given, and compresses multiple deltas to reduce duplicate events.
Without a store, DeltaFIFO will drop Deleted deltas when its queue is empty because the deleted object is not present in the queue and DeltaFIFO tries to protect against duplicate Deleted deltas resulting from Replace().
To get reliable deletion, a store must be provided, and EventQueue provides one if the caller does not.
func NewEventQueue ¶ added in v1.4.0
func NewEventQueue(keyFunc cache.KeyFunc) *EventQueue
func NewEventQueueForStore ¶ added in v1.4.0
func NewEventQueueForStore(keyFunc cache.KeyFunc, knownObjects cache.KeyListerGetter) *EventQueue
func (*EventQueue) Pop ¶ added in v1.4.0
func (queue *EventQueue) Pop(process ProcessEventFunc, expectedType interface{}) (interface{}, error)
Process queued changes for an object. The 'process' function is called repeatedly with each available cache.Delta that describes state changes for that object. If the process function returns an error queued changes for that object are dropped but processing continues with the next available object's cache.Deltas. The error is logged with call stack information.
type FirewallRule ¶
type FirewallRule struct {
// contains filtered or unexported fields
}
type IngressIsolationPolicy ¶
type IngressIsolationPolicy string
const (
DefaultDeny IngressIsolationPolicy = "DefaultDeny"
)
type NamespaceIngressPolicy ¶
type NamespaceIngressPolicy struct {
Isolation *IngressIsolationPolicy `json:"isolation,omitempty"`
}
type NamespaceNetworkPolicy ¶
type NamespaceNetworkPolicy struct {
Ingress *NamespaceIngressPolicy `json:"ingress,omitempty"`
}
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 NewNodePlugin ¶
func NewNodePlugin(pluginName string, osClient *osclient.Client, kClient kclientset.Interface, hostname string, selfIP string, iptablesSyncPeriod time.Duration, mtu uint32, kubeInformers kinternalinformers.SharedInformerFactory) (*OsdnNode, error)
Called by higher layers to create the plugin SDN node instance
func (*OsdnNode) AddHostSubnetRules ¶
func (plugin *OsdnNode) AddHostSubnetRules(subnet *osapi.HostSubnet)
func (*OsdnNode) AddServiceRules ¶
func (*OsdnNode) Capabilities ¶
func (*OsdnNode) DeleteHostSubnetRules ¶
func (plugin *OsdnNode) DeleteHostSubnetRules(subnet *osapi.HostSubnet)
func (*OsdnNode) DeleteServiceRules ¶
func (*OsdnNode) GetLocalPods ¶
func (*OsdnNode) GetPodNetworkStatus ¶
func (node *OsdnNode) GetPodNetworkStatus(namespace string, name string, id kubeletTypes.ContainerID) (*knetwork.PodNetworkStatus, error)
func (*OsdnNode) Init ¶
func (node *OsdnNode) Init(host knetwork.Host, hairpinMode componentconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error
This kubelet network plugin shim only exists to grab the knetwork.Host Everything else is simply proxied directly to the kubenet CNI driver.
func (*OsdnNode) IsPodNetworkReady ¶ added in v1.4.0
func (*OsdnNode) SetUpPod ¶
func (node *OsdnNode) SetUpPod(namespace string, name string, id kubeletTypes.ContainerID, annotations map[string]string) error
func (*OsdnNode) SetupEgressNetworkPolicy ¶
func (*OsdnNode) SubnetStartNode ¶
func (*OsdnNode) TearDownPod ¶
func (node *OsdnNode) TearDownPod(namespace string, name string, id kubeletTypes.ContainerID) error
func (*OsdnNode) UpdateEgressNetworkPolicyVNID ¶
type OsdnProxy ¶ added in v1.4.0
type OsdnProxy struct {
// contains filtered or unexported fields
}
func NewProxyPlugin ¶
func NewProxyPlugin(pluginName string, osClient *osclient.Client, kClient kclientset.Interface) (*OsdnProxy, error)
Called by higher layers to create the proxy plugin instance; only used by nodes
func (*OsdnProxy) OnEndpointsUpdate ¶ added in v1.4.0
type ProcessEventFunc ¶ added in v1.4.0
Function should process one object delta, which represents a change notification for a single object. Function is passed the delta, which contains the changed object or the deleted final object state. The deleted final object state is extracted from the DeletedFinalStateUnknown passed by DeltaFIFO.
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" NetworkPolicies ResourceName = "NetworkPolicies" )