Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateHardwareAddr4(ip net.IP, prefix []byte) (net.HardwareAddr, error)
- func HostprotRemoteIpContainerLogger(log *logrus.Logger, hpp *hppv1.HostprotRemoteIpContainer) *logrus.Entry
- func HppLogger(log *logrus.Logger, hpp *hppv1.HostprotPol) *logrus.Entry
- func SetHWAddrByIP(ifName string, ip4, ip6 net.IP) error
- func SnatGlobalInfoLogger(log *logrus.Logger, snat *snatglobal.SnatGlobalInfo) *logrus.Entry
- func StartPlugin(log *logrus.Logger)
- func StringFromInfo(ver *VersionInfo) string
- func VersionString() string
- type ClearVethArgs
- type ClearVfArgs
- type ClientInfo
- type ClientRPC
- func (c *ClientRPC) ClearVeth(args *ClearVethArgs, ack *bool) error
- func (c *ClientRPC) ClearVf(args *ClearVfArgs, ack *bool) error
- func (*ClientRPC) SetupNetwork(args *SetupNetworkArgs, ack *bool) error
- func (*ClientRPC) SetupVeth(args *SetupVethArgs, result *SetupVethResult) error
- func (*ClientRPC) SetupVf(args *SetupVfArgs, result *SetupVfResult) error
- type Cloner
- type Config
- type DeviceInfo
- type Environment
- type EpRPC
- type EventPoster
- type ExplicitKey
- type FabricAttachmentData
- type FabricDiscoveryAgent
- type FabricDiscoveryAgentLLDPNMState
- func (agent *FabricDiscoveryAgentLLDPNMState) CollectDiscoveryData(stopCh <-chan struct{})
- func (agent *FabricDiscoveryAgentLLDPNMState) GetNeighborData(iface string) ([]*FabricAttachmentData, error)
- func (agent *FabricDiscoveryAgentLLDPNMState) Init(ha *HostAgent) error
- func (agent *FabricDiscoveryAgentLLDPNMState) PopulateAdjacencies(adjs map[string][]FabricAttachmentData)
- func (agent *FabricDiscoveryAgentLLDPNMState) RunCommand(cmd string, cmdArgs ...string) ([]byte, error)
- func (agent *FabricDiscoveryAgentLLDPNMState) TriggerCollectionDiscoveryData()
- type FabricDiscoveryAgentLLDPRawSocket
- func (agent *FabricDiscoveryAgentLLDPRawSocket) CollectDiscoveryData(stopChain <-chan struct{})
- func (agent *FabricDiscoveryAgentLLDPRawSocket) GetNeighborData(iface string) ([]*FabricAttachmentData, error)
- func (agent *FabricDiscoveryAgentLLDPRawSocket) Init(ha *HostAgent) error
- func (agent *FabricDiscoveryAgentLLDPRawSocket) PopulateAdjacencies(adjs map[string][]FabricAttachmentData)
- func (agent *FabricDiscoveryAgentLLDPRawSocket) TriggerCollectionDiscoveryData()
- type GBPAction
- type GBPConfig
- type GBPContract
- type GBPL24Classifier
- type GBPObject
- type GBPSubnet
- type GBPSubnetSet
- type GroupDefaults
- type HostAgent
- func (agent *HostAgent) DeleteMatchingSnatPolicyLabel(policy string)
- func (agent *HostAgent) DeleteNetworkMetadata(netAttData *NetworkAttachmentData)
- func (agent *HostAgent) DeleteSnatPolicyLabel(key string)
- func (agent *HostAgent) DeleteSnatPolicyLabelEntry(key, policy string)
- func (agent *HostAgent) EPRegAdd(ep *opflexEndpoint) bool
- func (agent *HostAgent) EPRegDelEP(name string)
- func (agent *HostAgent) EnableSync() (changed bool)
- func (ha *HostAgent) FabricDiscoveryCollectDiscoveryData(stopCh <-chan struct{})
- func (ha *HostAgent) FabricDiscoveryPopulateAdjacencies(method int, adjs map[string][]FabricAttachmentData)
- func (ha *HostAgent) FabricDiscoveryRegistryInit() (err error)
- func (ha *HostAgent) FabricDiscoveryTriggerCollectionDiscoveryData()
- func (agent *HostAgent) FormEPFilePath(uuid string) string
- func (agent *HostAgent) FormRdFilePath() string
- func (agent *HostAgent) FormSnatFilePath(uuid string) string
- func (ha *HostAgent) GetFabricDiscoveryNeighborDataLocked(iface string) ([]*FabricAttachmentData, error)
- func (agent *HostAgent) InformNodeInfo(nodeInfoClient *nodeInfoclientset.Clientset, snatpolicies map[string]bool, ...) bool
- func (agent *HostAgent) Init()
- func (agent *HostAgent) LoadAdditionalNetworkMetadata() error
- func (agent *HostAgent) LoadCniNetworks() error
- func (agent *HostAgent) MetaNamespaceUIDFunc(obj interface{}) (string, error)
- func (agent *HostAgent) NodeEPRegAdd(nodePodIfEPs map[string]*opflexEndpoint) bool
- func (agent *HostAgent) NotifyFabricAdjacency(iface string, fabAttData []*FabricAttachmentData)
- func (agent *HostAgent) ReadSnatPolicyLabel(key string) (map[string]ResourceType, bool)
- func (agent *HostAgent) RecordNetworkMetadata(netAttData *NetworkAttachmentData) error
- func (agent *HostAgent) Run(stopCh <-chan struct{})
- func (agent *HostAgent) RunPacketEventListener(stopCh <-chan struct{})
- func (agent *HostAgent) RunStatus()
- func (agent *HostAgent) ScheduleSync(syncType string)
- func (agent *HostAgent) UpdateLocalInfoCr() bool
- func (agent *HostAgent) WriteNewSnatPolicyLabel(key string)
- func (agent *HostAgent) WriteSnatPolicyLabel(key, policy string, res ResourceType)
- type HostAgentConfig
- type HostAgentNodeConfig
- type HpSubj
- type HpSubjChild
- type HpSubjGrandchild
- type Hpp
- type IPAM
- type IntRange
- type K8sEnvironment
- func (env *K8sEnvironment) CheckNetAttDefExists(netAttDefKey string) (bool, error)
- func (env *K8sEnvironment) CheckPodExists(metadataKey *string) (bool, error)
- func (env *K8sEnvironment) CniDeviceChanged(metadataKey *string, id *md.ContainerId)
- func (env *K8sEnvironment) CniDeviceDeleted(metadataKey *string, id *md.ContainerId)
- func (env *K8sEnvironment) Init(agent *HostAgent) error
- func (env *K8sEnvironment) PrepareRun(stopCh <-chan struct{}) (bool, error)
- type LLDPInterfaceState
- type NetworkAttachmentData
- type NetworkPolicy
- type OpflexPortRange
- type OpflexServerConfig
- type OpflexSnatIp
- type OpflexSnatIpRemoteInfo
- type PacketEvent
- type Plugins
- type PrimaryCNIType
- type Property
- type Property_IntVal
- type Property_RefVal
- type Property_StrVal
- type Reference
- type ResourceType
- type ResyncArgs
- type ServiceEndPointType
- type SetupNetworkArgs
- type SetupVethArgs
- type SetupVethResult
- type SetupVfArgs
- type SetupVfResult
- type SnatLocalInfo
- type TrunkConfig
- type VersionInfo
- type WLRule
Constants ¶
const ( FabricDiscoveryMethodLLDPNMState = iota FabricDiscoveryMethodLLDPRawSocket FabricDiscoveryMethodStatic )
const ( PrimaryCNISRIOV = "sriov" PrimaryCNIMACVLAN = "macvlan" PrimaryCNIBridge = "bridge" PrimaryCNIOpenShiftBridge = "cnv-bridge" PrimaryCNIIPVLAN = "ipvlan" PrimaryCNIOVS = "ovs" PrimaryCNIUnk = "nothandled" )
const ( DHCLIENT_CONF = "/usr/local/etc/dhclient.conf" MCAST_ROUTE_DEST = "224.0.0.0/4" )
const ( DefaultSessionAffinityTimer = 10800 TempSessionAffinityTimer = 1 )
Default Session value is 10800(for 3 hours)
const (
ACIContainersTaintName string = "aci-containers-host/unavailable"
)
Name of the taint set by Controller
const NullMac = "null-mac"
const (
OpenShiftIngressNs string = "openshift-ingress"
)
Namespace of Openshift Service
const (
PrivateMACPrefixString = "0a:58"
)
const (
RouterInternalDefault string = "router-internal-default"
)
Name of the Openshift Service
const SnatService = "snat-external"
Filename used to create external service file on host example snat-external.service
Variables ¶
var ( ErrLLDPAdjacency = errors.New("LLDP adjacency with ACI fabric not found") ErrNoAllocatableVlan = errors.New("No encap specified/derivable for network-attachment-definition") ErrNoAllocatableVlanUntagged = errors.New("Invalid Encap for untagged network-attachment-definition") ErrMultipleEncapUntagged = errors.New("Multiple encap specified/derivable for untagged network-attachment-definition") )
var ( // private mac prefix safe to use PrivateMACPrefix = []byte{0x0a, 0x58} )
var Version = map[string]bool{ "openshift-4.6-baremetal": true, "openshift-4.7-baremetal": true, "openshift-4.8-baremetal": true, "openshift-4.9-baremetal": true, "openshift-4.10-baremetal": true, "openshift-4.11-baremetal": true, "openshift-4.12-baremetal": true, "openshift-4.13-baremetal": true, "openshift-4.14-baremetal": true, "openshift-4.15-baremetal": true, "openshift-4.16-baremetal": true, "openshift-4.17-baremetal": true, "openshift-4.14-agent-based-baremetal": true, "openshift-4.15-agent-based-baremetal": true, "openshift-4.16-agent-based-baremetal": true, "openshift-4.17-agent-based-baremetal": true, "openshift-4.4-esx": true, "openshift-4.5-esx": true, "openshift-4.6-esx": true, "openshift-4.7-esx": true, "openshift-4.8-esx": true, "openshift-4.9-esx": true, "openshift-4.10-esx": true, "openshift-4.11-esx": true, "openshift-4.12-esx": true, "openshift-4.13-esx": true, "openshift-4.14-esx": true, "openshift-4.15-esx": true, "openshift-4.16-esx": true, "openshift-4.17-esx": true, "openshift-4.14-agent-based-esx": true, "openshift-4.15-agent-based-esx": true, "openshift-4.16-agent-based-esx": true, "openshift-4.17-agent-based-esx": true, }
Functions ¶
func GenerateHardwareAddr4 ¶
https://github.com/containernetworking/plugins/blob/v0.9.1/pkg/utils/hwaddr/hwaddr.go#L45 Reusing code as the fn is removed in v1.0.0 GenerateHardwareAddr4 generates 48 bit virtual mac addresses based on the IP4 input.
func SetHWAddrByIP ¶
https://github.com/containernetworking/plugins/blob/v0.9.1/pkg/ip/link_linux.go#L228 Reusing code as the fn is removed in v1.0.0
func SnatGlobalInfoLogger ¶
func SnatGlobalInfoLogger(log *logrus.Logger, snat *snatglobal.SnatGlobalInfo) *logrus.Entry
func StartPlugin ¶
func StringFromInfo ¶
func StringFromInfo(ver *VersionInfo) string
StringFromInfo prints the versioning details
Types ¶
type ClearVethArgs ¶
type ClearVfArgs ¶
type ClientInfo ¶
type ClientInfo struct {
NetClient netattclient.K8sCniCncfIoV1Interface
}
type ClientRPC ¶
type ClientRPC struct{}
func (*ClientRPC) SetupNetwork ¶
func (*ClientRPC) SetupNetwork(args *SetupNetworkArgs, ack *bool) error
func (*ClientRPC) SetupVeth ¶
func (*ClientRPC) SetupVeth(args *SetupVethArgs, result *SetupVethResult) error
func (*ClientRPC) SetupVf ¶
func (*ClientRPC) SetupVf(args *SetupVfArgs, result *SetupVfResult) error
type Cloner ¶
type Cloner struct {
Stub bool
}
Cloner encapsulate a binary cloner for executing in a different process context
var PluginCloner Cloner
type DeviceInfo ¶
type Environment ¶
type Environment interface { Init(agent *HostAgent) error PrepareRun(stopCh <-chan struct{}) (bool, error) CniDeviceChanged(metadataKey *string, id *md.ContainerId) CniDeviceDeleted(metadataKey *string, id *md.ContainerId) CheckPodExists(metadataKey *string) (bool, error) CheckNetAttDefExists(netAttDefKey string) (bool, error) }
type EpRPC ¶
type EpRPC struct {
// contains filtered or unexported fields
}
func (*EpRPC) Unregister ¶
func (r *EpRPC) Unregister(metadata *md.ContainerMetadata, ack *bool) error
type EventPoster ¶
type EventPoster struct {
// contains filtered or unexported fields
}
type ExplicitKey ¶
type ExplicitKey string
type FabricAttachmentData ¶
type FabricDiscoveryAgent ¶
type FabricDiscoveryAgent interface { Init(agent *HostAgent) error CollectDiscoveryData(stopCh <-chan struct{}) TriggerCollectionDiscoveryData() GetNeighborData(iface string) ([]*FabricAttachmentData, error) PopulateAdjacencies(adjs map[string][]FabricAttachmentData) }
func NewFabricDiscoveryAgentLLDPNMState ¶
func NewFabricDiscoveryAgentLLDPNMState() FabricDiscoveryAgent
func NewFabricDiscoveryAgentLLDPRawSocket ¶
func NewFabricDiscoveryAgentLLDPRawSocket() FabricDiscoveryAgent
type FabricDiscoveryAgentLLDPNMState ¶
type FabricDiscoveryAgentLLDPNMState struct { LLDPIntfMap map[string]*LLDPInterfaceState LLDPNeighborMap map[string]map[string][]FabricAttachmentData // contains filtered or unexported fields }
func (*FabricDiscoveryAgentLLDPNMState) CollectDiscoveryData ¶
func (agent *FabricDiscoveryAgentLLDPNMState) CollectDiscoveryData(stopCh <-chan struct{})
func (*FabricDiscoveryAgentLLDPNMState) GetNeighborData ¶
func (agent *FabricDiscoveryAgentLLDPNMState) GetNeighborData(iface string) ([]*FabricAttachmentData, error)
func (*FabricDiscoveryAgentLLDPNMState) Init ¶
func (agent *FabricDiscoveryAgentLLDPNMState) Init(ha *HostAgent) error
func (*FabricDiscoveryAgentLLDPNMState) PopulateAdjacencies ¶
func (agent *FabricDiscoveryAgentLLDPNMState) PopulateAdjacencies(adjs map[string][]FabricAttachmentData)
func (*FabricDiscoveryAgentLLDPNMState) RunCommand ¶
func (agent *FabricDiscoveryAgentLLDPNMState) RunCommand(cmd string, cmdArgs ...string) ([]byte, error)
func (*FabricDiscoveryAgentLLDPNMState) TriggerCollectionDiscoveryData ¶
func (agent *FabricDiscoveryAgentLLDPNMState) TriggerCollectionDiscoveryData()
type FabricDiscoveryAgentLLDPRawSocket ¶
type FabricDiscoveryAgentLLDPRawSocket struct{}
func (*FabricDiscoveryAgentLLDPRawSocket) CollectDiscoveryData ¶
func (agent *FabricDiscoveryAgentLLDPRawSocket) CollectDiscoveryData(stopChain <-chan struct{})
func (*FabricDiscoveryAgentLLDPRawSocket) GetNeighborData ¶
func (agent *FabricDiscoveryAgentLLDPRawSocket) GetNeighborData(iface string) ([]*FabricAttachmentData, error)
func (*FabricDiscoveryAgentLLDPRawSocket) Init ¶
func (agent *FabricDiscoveryAgentLLDPRawSocket) Init(ha *HostAgent) error
func (*FabricDiscoveryAgentLLDPRawSocket) PopulateAdjacencies ¶
func (agent *FabricDiscoveryAgentLLDPRawSocket) PopulateAdjacencies(adjs map[string][]FabricAttachmentData)
func (*FabricDiscoveryAgentLLDPRawSocket) TriggerCollectionDiscoveryData ¶
func (agent *FabricDiscoveryAgentLLDPRawSocket) TriggerCollectionDiscoveryData()
type GBPConfig ¶
type GBPConfig struct {
// contains filtered or unexported fields
}
var GbpConfig *GBPConfig
type GBPContract ¶
type GBPContract struct {
// contains filtered or unexported fields
}
type GBPL24Classifier ¶
type GBPL24Classifier struct {
// contains filtered or unexported fields
}
func (*GBPL24Classifier) Make ¶
func (c *GBPL24Classifier) Make(name, uri string) error
func (*GBPL24Classifier) Validate ¶
func (c *GBPL24Classifier) Validate() error
type GBPObject ¶
type GBPObject struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` Properties []*Property `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"` Children []string `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` ParentSubject string `protobuf:"bytes,5,opt,name=parent_subject,json=parentSubject,proto3" json:"parent_subject,omitempty"` ParentUri string `protobuf:"bytes,6,opt,name=parent_uri,json=parentUri,proto3" json:"parent_uri,omitempty"` ParentRelation string `protobuf:"bytes,7,opt,name=parent_relation,json=parentRelation,proto3" json:"parent_relation,omitempty"` }
type GBPSubnetSet ¶
type GBPSubnetSet struct {
// contains filtered or unexported fields
}
func (*GBPSubnetSet) Make ¶
func (ss *GBPSubnetSet) Make(name, uri string) error
func (*GBPSubnetSet) Validate ¶
func (ss *GBPSubnetSet) Validate() error
type GroupDefaults ¶
type GroupDefaults struct { // Default endpoint group annotation value DefaultEg metadata.OpflexGroup `json:"default-endpoint-group,omitempty"` // Default security group annotation value DefaultSg []metadata.OpflexGroup `json:"default-security-group,omitempty"` // Default qospolicy group annotation value DefaultQp metadata.OpflexGroup `json:"default-qospolicy-group,omitempty"` // Override default endpoint group assignments for a namespace // map ns name -> group NamespaceDefaultEg map[string]metadata.OpflexGroup `json:"namespace-default-endpoint-group,omitempty"` // Override default security group assignments for namespaces // map ns name -> slice of groups NamespaceDefaultSg map[string][]metadata.OpflexGroup `json:"namespace-default-security-group,omitempty"` // Override default qospolicy group assignments for a namespace // map ns name -> group NamespaceDefaultQp map[string]metadata.OpflexGroup `json:"namespace-default-qospolicy-group,omitempty"` }
type HostAgent ¶
type HostAgent struct {
// contains filtered or unexported fields
}
func NewHostAgent ¶
func NewHostAgent(config *HostAgentConfig, env Environment, log *logrus.Logger) *HostAgent
func (*HostAgent) DeleteMatchingSnatPolicyLabel ¶
func (*HostAgent) DeleteNetworkMetadata ¶
func (agent *HostAgent) DeleteNetworkMetadata(netAttData *NetworkAttachmentData)
func (*HostAgent) DeleteSnatPolicyLabel ¶
func (*HostAgent) DeleteSnatPolicyLabelEntry ¶
func (*HostAgent) EPRegDelEP ¶
func (*HostAgent) EnableSync ¶
func (*HostAgent) FabricDiscoveryCollectDiscoveryData ¶
func (ha *HostAgent) FabricDiscoveryCollectDiscoveryData(stopCh <-chan struct{})
func (*HostAgent) FabricDiscoveryPopulateAdjacencies ¶
func (ha *HostAgent) FabricDiscoveryPopulateAdjacencies(method int, adjs map[string][]FabricAttachmentData)
func (*HostAgent) FabricDiscoveryRegistryInit ¶
TBD: Consider passing a profile to make sure only the required methods are run
func (*HostAgent) FabricDiscoveryTriggerCollectionDiscoveryData ¶
func (ha *HostAgent) FabricDiscoveryTriggerCollectionDiscoveryData()
func (*HostAgent) FormEPFilePath ¶
func (*HostAgent) FormRdFilePath ¶
func (*HostAgent) FormSnatFilePath ¶
func (*HostAgent) GetFabricDiscoveryNeighborDataLocked ¶
func (ha *HostAgent) GetFabricDiscoveryNeighborDataLocked(iface string) ([]*FabricAttachmentData, error)
func (*HostAgent) InformNodeInfo ¶
func (*HostAgent) LoadAdditionalNetworkMetadata ¶
func (*HostAgent) LoadCniNetworks ¶
func (*HostAgent) MetaNamespaceUIDFunc ¶
func (*HostAgent) NodeEPRegAdd ¶
func (*HostAgent) NotifyFabricAdjacency ¶
func (agent *HostAgent) NotifyFabricAdjacency(iface string, fabAttData []*FabricAttachmentData)
func (*HostAgent) ReadSnatPolicyLabel ¶
func (agent *HostAgent) ReadSnatPolicyLabel(key string) (map[string]ResourceType, bool)
func (*HostAgent) RecordNetworkMetadata ¶
func (agent *HostAgent) RecordNetworkMetadata(netAttData *NetworkAttachmentData) error
func (*HostAgent) RunPacketEventListener ¶
func (agent *HostAgent) RunPacketEventListener(stopCh <-chan struct{})
func (*HostAgent) ScheduleSync ¶
func (*HostAgent) UpdateLocalInfoCr ¶
func (*HostAgent) WriteNewSnatPolicyLabel ¶
func (*HostAgent) WriteSnatPolicyLabel ¶
func (agent *HostAgent) WriteSnatPolicyLabel(key, policy string, res ResourceType)
type HostAgentConfig ¶
type HostAgentConfig struct { HostAgentNodeConfig GroupDefaults // Run as child mode for executing network namespace commands in a // separate process. ChildMode bool `json:"child-mode,omitempty"` // Log level LogLevel string `json:"log-level,omitempty"` // Absolute path to a kubeconfig file KubeConfig string `json:"kubeconfig,omitempty"` // Name of Kubernetes node on which this agent is running NodeName string `json:"node-name,omitempty"` // TCP port to run status server on (or 0 to disable) StatusPort int `json:"status-port,omitempty"` // TCP port for opflex server to connect GRPCPort int `json:"grpc-port,omitempty"` // Directory containing OpFlex CNI metadata CniMetadataDir string `json:"cni-metadata-dir,omitempty"` // Name of the CNI network CniNetwork string `json:"cni-network,omitempty"` // Directory for writing CNI network metadata CniNetworksDir string `json:"cni-networks-dir,omitempty"` // Directory for writing Opflex configuration OpFlexConfigPath string `json:"opflex-config-path,omitempty"` // Directory for writing OpFlex endpoint metadata OpFlexEndpointDir string `json:"opflex-endpoint-dir,omitempty"` // Directory for writing OpFlex service metadata OpFlexServiceDir string `json:"opflex-service-dir,omitempty"` // Directory for writing OpFlex snat metadata OpFlexSnatDir string `json:"opflex-snat-dir,omitempty"` // Directory for writing Opflex netpol metadata OpFlexNetPolDir string `json:"opflex-netpol-dir,omitempty"` // Directory for writing OpFlex fault metadata OpFlexFaultDir string `json:"opflex-fault-dir,omitempty"` // OpFlex agent's flow-ID cache directory OpFlexFlowIdCacheDir string `json:"opflex-flowid-cache-dir,omitempty"` // Multicast groups file used by OpFlex agent OpFlexMcastFile string `json:"opflex-mcast-file,omitempty"` // File for writing Opflex server configuration OpFlexServerConfigFile string `json:"opflex-server-config-file,omitempty"` // Location of the packet event notification socket which listens to opflex-agent packet events PacketEventNotificationSock string `json:"packet-event-notification-socket,omitempty"` // Directory for drop log config OpFlexDropLogConfigDir string `json:"opflex-drop-log-config-dir,omitempty"` // RemoteIp for opflex drop logger OpFlexDropLogRemoteIp string `json:"opflex-drop-log-remote-ip,omitempty"` // Location of the OVS DB socket OvsDbSock string `json:"ovs-db-sock,omitempty"` // Location of the endpoint RPC socket used for communicating with // the CNI plugin EpRpcSock string `json:"ep-rpc-sock,omitempty"` // Permissions to set for endpoint RPC socket file. Octal string. EpRpcSockPerms string `json:"ep-rpc-sock-perms,omitempty"` // AciPrefix is used for generating aci names AciPrefix string `json:"aci-prefix,omitempty"` // Vlan used for ACI infrastructure traffic AciInfraVlan uint `json:"aci-infra-vlan,omitempty"` // VLAN for service traffic ServiceVlan uint `json:"service-vlan,omitempty"` // Type of encapsulation to use for uplink; either vlan or vxlan EncapType string `json:"encap-type,omitempty"` // Name of the OVS integration bridge IntBridgeName string `json:"int-bridge-name,omitempty"` // Name of the OVS access bridge AccessBridgeName string `json:"access-bridge-name,omitempty"` // Interface MTU to use when configuring container interfaces InterfaceMtu int `json:"interface-mtu,omitempty"` // Interface MTU headroom for VXLAN InterfaceMtuHeadroom int `json:"interface-mtu-headroom,omitempty"` // Configuration for CNI networks NetConfig []cniNetConfig `json:"cni-netconfig,omitempty"` // The type of the ACI VMM domain: either "Kubernetes" // or "OpenShift" AciVmmDomainType string `json:"aci-vmm-type,omitempty"` // The name of the ACI VMM domain AciVmmDomain string `json:"aci-vmm-domain,omitempty"` // The name of the ACI VMM domain controller instance AciVmmController string `json:"aci-vmm-controller,omitempty"` // ACI VRF for this kubernetes instance AciVrf string `json:"aci-vrf,omitempty"` // ACI Tenant containing the ACI VRF for this kubernetes instance AciVrfTenant string `json:"aci-vrf-tenant,omitempty"` // EP Registry specifies where to send ep updates EPRegistry string `json:"ep-registry,omitempty"` // EnableNodePodIF enabled EnableNodePodIF bool `json:"enable-nodepodif,omitempty"` // OpflexMode selects overlay vs physical fabric. Default is physical OpflexMode string `json:"opflex-mode,omitempty"` //ZoneId for Snat flows Zone uint `json:"zone,omitempty"` //Namespace for SNAT CRDs AciSnatNamespace string `json:"aci-snat-namespace,omitempty"` //Namespace for HPP CRDs AciHppObjsNamespace string `json:"aci-hpp-objs-namespace,omitempty"` //DropLogging enabled EnableDropLogging bool `json:"enable-drop-log,omitempty"` // DropLog Interface connecting to access bridge DropLogAccessInterface string `json:"drop-log-access-iface,omitempty"` // DropLog Interface connecting to integration bridge DropLogIntInterface string `json:"drop-log-int-iface,omitempty"` // Droplogs older than the expiry-time will be discarded if not published DropLogExpiryTime uint `json:"drop-log-expiry,omitempty"` // More than one droplog within the repeat interval for the same event is suppressed DropLogRepeatIntervalTime uint `json:"drop-log-repeat-intvl,omitempty"` //default is false HppOptimization bool `json:"hpp-optimization,omitempty"` // If true, enable opflex agent reconnect after vm migration // Default is false EnableOpflexAgentReconnect bool `json:"enable-opflex-agent-reconnect,omitempty"` // Default is false AciMultipod bool `json:"aci-multipod,omitempty"` // Max number of time dhcp renew will be executed after multi pod vm migration DhcpRenewMaxRetryCount int `json:"dhcp-renew-max-retry-count,omitempty"` // Delay between dhcp release and renew in seconds DhcpDelay int `json:"dhcp-delay,omitempty"` // enable EndpointSlice EnabledEndpointSlice bool `json:"enable_endpointslice,omitempty"` // Cluster Flavour Flavor string `json:"flavor,omitempty"` // Installer lb Ip provisioned for Openshift on Esx InstallerProvlbIp string `json:"installer-provisioned-lb-ip,omitempty"` // Sriov and Ovs Hardward Offload enabled OvsHardwareOffload bool `json:"enable-ovs-hw-offload,omitempty"` // DpuOvsDBSocket when OpflexMode is dpu selects ovsdb sock on dpu DpuOvsDBSocket string `json:"dpu-ovsdb-socket,omitempty"` // chained mode enabled ChainedMode bool `json:"chained-mode,omitempty"` // enable chained operation on primary cni chain EnableChainedPrimary bool `json:"enable-chained-primary,omitempty"` // enable chained operation on secondary cni chain EnableChainedSecondary bool `json:"enable-chained-secondary,omitempty"` // Primary cni path PrimaryCniPath string `json:"primary-cni-path,omitempty"` //In chained mode, global l2 port policy has been configured, so enable shared vlan pool AciUseGlobalScopeVlan bool `json:"aci-use-global-scope-vlan,omitempty"` // Metrics EnableMetrics bool `json:"enable-metrics,omitempty"` MetricsPort int `json:"metrics-port,omitempty"` // Disable hpp rendering if set to true DisableHppRendering bool `json:"disable-hpp-rendering,omitempty"` // Enable/disable making node unschedulable when it's not ready TaintNotReadyNode bool `json:"taint-not-ready-node,omitempty"` // Enable/disable local hpp distribution EnableHppDirect bool `json:"enable-hpp-direct,omitempty"` // Enable/disable proactive conf ProactiveConf bool `json:"proactive-conf,omitempty"` // Directory for writing oob policy data OOBPolicyDir string `json:"oob-policy-dir,omitempty"` }
Configuration for the host agent
func (*HostAgentConfig) InitFlags ¶
func (config *HostAgentConfig) InitFlags()
type HostAgentNodeConfig ¶
type HostAgentNodeConfig struct { // Uplink interface for this host UplinkIface string `json:"uplink-iface,omitempty"` // Subinterface of uplink interface on AciInfraVlan VxlanIface string `json:"vxlan-iface,omitempty"` // Anycast IP used for unicast VXLAN packets VxlanAnycastIp string `json:"vxlan-anycast-ip,omitempty"` // Anycast IP used for OpFlex communication OpflexPeerIp string `json:"opflex-peer-ip,omitempty"` // Uplink Mac adress UplinkMacAdress string `json:"uplink mac_adress,omitempty"` // Registry Server URL -- for updating remote EP information RegistryURL string `json:"registry-url,omitempty"` }
type HpSubj ¶
type HpSubj struct { Attributes map[string]string `json:"attributes,omitempty"` Children []map[string]HpSubjChild `json:"children,omitempty"` // contains filtered or unexported fields }
type HpSubjChild ¶
type HpSubjChild struct { Attributes map[string]string `json:"attributes,omitempty"` Children []map[string]HpSubjGrandchild `json:"children,omitempty"` // contains filtered or unexported fields }
func (*HpSubjChild) Make ¶
func (hsc *HpSubjChild) Make(ruleMo *gbpCommonMo, subjName, npName string) error
type HpSubjGrandchild ¶
type K8sEnvironment ¶
type K8sEnvironment struct {
// contains filtered or unexported fields
}
func NewK8sEnvironment ¶
func NewK8sEnvironment(config *HostAgentConfig, log *logrus.Logger) (*K8sEnvironment, error)
func (*K8sEnvironment) CheckNetAttDefExists ¶
func (env *K8sEnvironment) CheckNetAttDefExists(netAttDefKey string) (bool, error)
func (*K8sEnvironment) CheckPodExists ¶
func (env *K8sEnvironment) CheckPodExists(metadataKey *string) (bool, error)
func (*K8sEnvironment) CniDeviceChanged ¶
func (env *K8sEnvironment) CniDeviceChanged(metadataKey *string, id *md.ContainerId)
func (*K8sEnvironment) CniDeviceDeleted ¶
func (env *K8sEnvironment) CniDeviceDeleted(metadataKey *string, id *md.ContainerId)
func (*K8sEnvironment) Init ¶
func (env *K8sEnvironment) Init(agent *HostAgent) error
func (*K8sEnvironment) PrepareRun ¶
func (env *K8sEnvironment) PrepareRun(stopCh <-chan struct{}) (bool, error)
type LLDPInterfaceState ¶
type NetworkAttachmentData ¶
type NetworkAttachmentData struct { Name string Namespace string IsPrimaryNetwork bool Config string Annot string PrimaryCNI PrimaryCNIType ResourcePlugin string ResourceName string Ifaces []string EncapVlan string FabricAttachmentData map[string][]*FabricAttachmentData Pods map[string]map[string]fabattv1.PodAttachment KnownAnnots map[string]string EncapKey string PluginVlan string EncapMode util.EncapMode PluginTrunk []TrunkConfig Programmed bool PluginAllowUntagged bool Status string }
type NetworkPolicy ¶
type NetworkPolicy struct {
HostprotPol Hpp `json:"hostprotPol,omitempty"`
}
func (*NetworkPolicy) Make ¶
func (np *NetworkPolicy) Make() error
type OpflexPortRange ¶
type OpflexServerConfig ¶
type OpflexSnatIp ¶
type OpflexSnatIp struct { Uuid string `json:"uuid"` InterfaceName string `json:"interface-name,omitempty"` SnatIp string `json:"snat-ip,omitempty"` InterfaceMac string `json:"interface-mac,omitempty"` Local bool `json:"local,omitempty"` DestIpAddress []string `json:"dest,omitempty"` PortRange []OpflexPortRange `json:"port-range,omitempty"` InterfaceVlan uint `json:"interface-vlan,omitempty"` Zone uint `json:"zone,omitempty"` Remote []OpflexSnatIpRemoteInfo `json:"remote,omitempty"` }
This structure is to write the SnatFile
type OpflexSnatIpRemoteInfo ¶
type OpflexSnatIpRemoteInfo struct { NodeIp string `json:"snat_ip,omitempty"` MacAddress string `json:"mac,omitempty"` PortRange []OpflexPortRange `json:"port-range,omitempty"` Refcount int `json:"ref,omitempty"` }
This Structure is to calculate remote Info
type PacketEvent ¶
type Plugins ¶
type Plugins struct { Type string `json:"type,omitempty"` IPAM IPAM `json:"ipam,omitempty"` Vlan int `json:"vlan,omitempty"` IsDefaultGateway bool `json:"isDefaultGateway,omitempty"` Trunk []TrunkConfig `json:"vlanTrunk,omitempty"` Master string `json:"master,omitempty"` Bridge string `json:"bridge,omitempty"` }
type PrimaryCNIType ¶
type PrimaryCNIType string
type Property ¶
type Property struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value interface{} `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
type Property_IntVal ¶
type Property_IntVal struct {
IntVal int32 `protobuf:"varint,3,opt,name=intVal,proto3,oneof"`
}
type Property_RefVal ¶
type Property_RefVal struct {
RefVal *Reference `protobuf:"bytes,4,opt,name=refVal,proto3,oneof"`
}
type Property_StrVal ¶
type Property_StrVal struct {
StrVal string `protobuf:"bytes,2,opt,name=strVal,proto3,oneof"`
}
type ResourceType ¶
type ResourceType int
const ( POD ResourceType = 1 << iota SERVICE DEPLOYMENT NAMESPACE CLUSTER INVALID )
type ResyncArgs ¶
type ResyncArgs struct{}
type ServiceEndPointType ¶
type ServiceEndPointType interface { InitClientInformer(kubeClient *kubernetes.Clientset) Run(stopCh <-chan struct{}) SetOpflexService(ofas *opflexService, as *v1.Service, external bool, key string, sp *v1.ServicePort) bool }
type SetupNetworkArgs ¶
type SetupVethResult ¶
type SetupVfArgs ¶
type SetupVfResult ¶
type SnatLocalInfo ¶
type SnatLocalInfo struct {
// contains filtered or unexported fields
}
type TrunkConfig ¶
type VersionInfo ¶
Info enlists version and build information
Source Files ¶
- agent.go
- config.go
- environment.go
- eprpc.go
- event_poster.go
- fabricdiscovery.go
- fabricdiscovery_lldpnmstate.go
- fabricdiscovery_stubs.go
- fabricvlanpools.go
- group_assign.go
- hpp.go
- hpp_lib.go
- ipam.go
- nadvlanmap.go
- netattachdef.go
- nodeinfo.go
- nodes.go
- opflex.go
- ovs.go
- packet_event.go
- pod_relatives.go
- pods.go
- proactiveconf.go
- rdconfig.go
- services.go
- setup.go
- snatlocalinfo.go
- snats.go
- status.go
- version.go