Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - func NodeNameIndexer() cache.Indexers
 - type PodClientAPIWrapper
 - type PodConverter
 - func (c *PodConverter) ConvertList(originalList interface{}) (convertedList interface{}, err error)
 - func (c *PodConverter) ConvertObject(originalObj interface{}) (convertedObj interface{}, err error)
 - func (c *PodConverter) Indexer(obj interface{}) (string, error)
 - func (c *PodConverter) Resource() string
 - func (c *PodConverter) ResourceType() runtime.Object
 - func (c *PodConverter) StripDownPod(pod *v1.Pod) *v1.Pod
 
Constants ¶
      View Source
      
  
const (
	NodeNameSpec = "nodeName"
)
    Variables ¶
This section is empty.
Functions ¶
func NodeNameIndexer ¶
NodeNameIndexer returns indexer to index in the data store using node name
Types ¶
type PodClientAPIWrapper ¶ added in v1.1.0
type PodClientAPIWrapper interface {
	GetPod(namespace string, name string) (*v1.Pod, error)
	ListPods(nodeName string) (*v1.PodList, error)
	AnnotatePod(podNamespace string, podName string, uid types.UID, key string, val string) error
	GetPodFromAPIServer(ctx context.Context, namespace string, name string) (*v1.Pod, error)
	GetRunningPodsOnNode(nodeName string) ([]v1.Pod, error)
}
    func NewPodAPIWrapper ¶ added in v1.1.0
func NewPodAPIWrapper(dataStore cache.Indexer, client client.Client, coreV1 corev1.CoreV1Interface) PodClientAPIWrapper
type PodConverter ¶
PodConverter implements the interface to convert k8s pod object to a stripped down version of pod to save on memory utilized
func (*PodConverter) ConvertList ¶
func (c *PodConverter) ConvertList(originalList interface{}) (convertedList interface{}, err error)
ConcertList converts the original pod list to stripped down list of pod objects
func (*PodConverter) ConvertObject ¶
func (c *PodConverter) ConvertObject(originalObj interface{}) (convertedObj interface{}, err error)
ConcertObject converts original pod object to stripped down pod object
func (*PodConverter) Indexer ¶ added in v1.1.0
func (c *PodConverter) Indexer(obj interface{}) (string, error)
NSKeyIndexer is the key function to index the pod object using namespace/name
func (*PodConverter) ResourceType ¶
func (c *PodConverter) ResourceType() runtime.Object
ResourceType to watch and list
func (*PodConverter) StripDownPod ¶
func (c *PodConverter) StripDownPod(pod *v1.Pod) *v1.Pod
StripDownPod removes all the extra details from pod that are not required by the controller.
 Click to show internal directories. 
   Click to hide internal directories.