Documentation ¶
Index ¶
- Constants
- type Options
- type Server
- func (s *Server) AllExceptPodsSynced() bool
- func (s *Server) AllSynced() bool
- func (s *Server) OnNamespaceAdd(ns *v1.Namespace)
- func (s *Server) OnNamespaceDelete(ns *v1.Namespace)
- func (s *Server) OnNamespaceSynced()
- func (s *Server) OnNamespaceUpdate(oldNamespace, ns *v1.Namespace)
- func (s *Server) OnNetDefAdd(net *netdefv1.NetworkAttachmentDefinition)
- func (s *Server) OnNetDefDelete(net *netdefv1.NetworkAttachmentDefinition)
- func (s *Server) OnNetDefSynced()
- func (s *Server) OnNetDefUpdate(oldNet, net *netdefv1.NetworkAttachmentDefinition)
- func (s *Server) OnPodAdd(pod *v1.Pod)
- func (s *Server) OnPodDelete(pod *v1.Pod)
- func (s *Server) OnPodSynced()
- func (s *Server) OnPodUpdate(oldPod, pod *v1.Pod)
- func (s *Server) OnPolicyAdd(policy *multiv1beta1.MultiNetworkPolicy)
- func (s *Server) OnPolicyDelete(policy *multiv1beta1.MultiNetworkPolicy)
- func (s *Server) OnPolicySynced()
- func (s *Server) OnPolicyUpdate(oldPolicy, policy *multiv1beta1.MultiNetworkPolicy)
- func (s *Server) Run(ctx context.Context)
- func (s *Server) RunPodConfig(ctx context.Context)
- func (s *Server) Sync()
- func (s *Server) SyncLoop(ctx context.Context)
Constants ¶
const ( // PolicyNetworkAnnotation is annotation for multiNetworkPolicy, // to specify which networks(i.e. net-attach-def) are the targets // of the policy PolicyNetworkAnnotation = "k8s.v1.cni.cncf.io/policy-for" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // kubeconfig is the path to a KubeConfig file. Kubeconfig string // KConfig points to a k8s API config, takes precedence over Kubeconfig KConfig *rest.Config // contains filtered or unexported fields }
Options stores option for the command
type Server ¶
type Server struct { // clients to access k8s API Client clientset.Interface NetworkPolicyClient multiclient.Interface NetDefClient netdefclient.Interface // other fields Hostname string Broadcaster record.EventBroadcaster Recorder record.EventRecorder Options *Options ConfigSyncPeriod time.Duration NodeRef *v1.ObjectReference // contains filtered or unexported fields }
Server structure defines data for server
func (*Server) AllExceptPodsSynced ¶
AllExceptPodsSynced return true if all informers except Pod have synced caches
func (*Server) OnNamespaceAdd ¶
OnNamespaceAdd Event handler for Namespace
func (*Server) OnNamespaceDelete ¶
OnNamespaceDelete Event handler for Namespace
func (*Server) OnNamespaceSynced ¶
func (s *Server) OnNamespaceSynced()
OnNamespaceSynced Event handler for Namespace
func (*Server) OnNamespaceUpdate ¶
OnNamespaceUpdate Event handler for Namespace
func (*Server) OnNetDefAdd ¶
func (s *Server) OnNetDefAdd(net *netdefv1.NetworkAttachmentDefinition)
OnNetDefAdd Event handler for NetworkAttachmentDefinition
func (*Server) OnNetDefDelete ¶
func (s *Server) OnNetDefDelete(net *netdefv1.NetworkAttachmentDefinition)
OnNetDefDelete Event handler for NetworkAttachmentDefinition
func (*Server) OnNetDefSynced ¶
func (s *Server) OnNetDefSynced()
OnNetDefSynced Event handler for NetworkAttachmentDefinition
func (*Server) OnNetDefUpdate ¶
func (s *Server) OnNetDefUpdate(oldNet, net *netdefv1.NetworkAttachmentDefinition)
OnNetDefUpdate Event handler for NetworkAttachmentDefinition
func (*Server) OnPodDelete ¶
OnPodDelete Event handler for Pod
func (*Server) OnPodUpdate ¶
OnPodUpdate Event handler for Pod
func (*Server) OnPolicyAdd ¶
func (s *Server) OnPolicyAdd(policy *multiv1beta1.MultiNetworkPolicy)
OnPolicyAdd Event handler for Policy
func (*Server) OnPolicyDelete ¶
func (s *Server) OnPolicyDelete(policy *multiv1beta1.MultiNetworkPolicy)
OnPolicyDelete Event handler for Policy
func (*Server) OnPolicySynced ¶
func (s *Server) OnPolicySynced()
OnPolicySynced Event handler for Policy
func (*Server) OnPolicyUpdate ¶
func (s *Server) OnPolicyUpdate(oldPolicy, policy *multiv1beta1.MultiNetworkPolicy)
OnPolicyUpdate Event handler for Policy