Documentation ¶
Overview ¶
Package k8sapi contains logic to retrieve pods running on local node
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInformerNotSynced = errors.New("discovery: informer not synced")
ErrInformerNotSynced indicates that it has not synced with API server yet
Functions ¶
func CreateKubeClient ¶
CreateKubeClient creates a k8s client
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller defines global context for discovery controller
func NewController ¶
func NewController(clientset kubernetes.Interface) *Controller
NewController creates a new DiscoveryController
func (*Controller) DiscoverK8SPods ¶
func (d *Controller) DiscoverK8SPods()
DiscoverK8SPods discovers Pods running in the cluster
func (*Controller) GetCNIPods ¶ added in v1.5.0
func (d *Controller) GetCNIPods() []string
GetCNIPods return the list of CNI pod names
func (*Controller) K8SGetLocalPodIPs ¶
func (d *Controller) K8SGetLocalPodIPs() ([]*K8SPodInfo, error)
K8SGetLocalPodIPs return the list of pods running on the local nodes
type K8SAPIs ¶
type K8SAPIs interface {
K8SGetLocalPodIPs() ([]*K8SPodInfo, error)
}
K8SAPIs defines interface to use kubelet introspection API
Click to show internal directories.
Click to hide internal directories.