Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // ListLocalPods list local pod from api server ListLocalPods(ctx context.Context) ([]*corev1.Pod, error) // GetPod get pod from api server GetPod(ctx context.Context, namespace, name string) (*corev1.Pod, error) // ListCachedPods list local pod from local cached(informer) ListCachedPods() ([]*corev1.Pod, error) // ListCachedPodsWithLabelSelector list local pod with selector from local cached(informer) ListCachedPodsWithLabelSelector(selector labels.Selector) ([]*corev1.Pod, error) // GetCachedPod get local pod from local cached(informer) GetCachedPod(namespace, name string) (*corev1.Pod, error) // GetLocalNode get the node itself from api server GetLocalNode(ctx context.Context) (*corev1.Node, error) // GetConfigMap get configmap from api server GetConfigMap(ctx context.Context, namespace, name string) (*corev1.ConfigMap, error) // GetNodeDynamicConfigName get namespace and name of dynamic configmap that separated by '.' GetNodeDynamicConfigName() string // RecordNodeEvent record events of node RecordNodeEvent(eventType, reason, message string) // RecordPodEvent record events of pod RecordPodEvent(podName, podNamespace, eventType, reason, message string) error // EvictPod evict the specific pod EvictPod(ctx context.Context, podName, namespace string) error // AddConfigMapEventHandler add handler which called while configmap cello-config changed AddConfigMapEventHandler(handler cache.ResourceEventHandlerFuncs) // PatchTrunkInfo patch trunk info to node annotation PatchTrunkInfo(info *types.TrunkInfo) error // PatchPodAnnotation patch annotation to pod PatchPodAnnotation(ctx context.Context, namespace, name string, anno map[string]string) error }
func NewK8sService ¶
func NewK8sService(nodeName string, clientSet kubernetes.Interface) (Service, error)
Click to show internal directories.
Click to hide internal directories.