Documentation ¶
Index ¶
- Constants
- func GetK8sArgs(args *skel.CmdArgs) (*types.K8sArgs, error)
- func GetK8sNetwork(k8sclient KubeClient, k8sArgs *types.K8sArgs, confdir string) ([]*types.DelegateNetConf, error)
- func SetNetworkStatus(k *clientInfo, netStatus []*types.NetworkStatus) error
- func TryLoadK8sDelegates(k8sArgs *types.K8sArgs, conf *types.NetConf, kubeClient KubeClient) (int, *clientInfo, error)
- type KubeClient
- type NoK8sNetworkError
Constants ¶
View Source
const ( GroupName = "tke.cloud.tencent.com" CNINetworksAnnotation = "tke.cloud.tencent.com/networks" CNINetworksStatusAnnotation = "tke.cloud.tencent.com/networks-status" )
Variables ¶
This section is empty.
Functions ¶
func GetK8sNetwork ¶
func GetK8sNetwork(k8sclient KubeClient, k8sArgs *types.K8sArgs, confdir string) ([]*types.DelegateNetConf, error)
func SetNetworkStatus ¶
func SetNetworkStatus(k *clientInfo, netStatus []*types.NetworkStatus) error
func TryLoadK8sDelegates ¶
func TryLoadK8sDelegates(k8sArgs *types.K8sArgs, conf *types.NetConf, kubeClient KubeClient) (int, *clientInfo, error)
Attempts to load Kubernetes-defined delegates and add them to the Multus config. Returns the number of Kubernetes-defined delegates added or an error.
Types ¶
type KubeClient ¶
type KubeClient interface { GetPod(namespace, name string) (*v1.Pod, error) UpdatePodStatus(pod *v1.Pod) (*v1.Pod, error) }
func GetK8sClient ¶
func GetK8sClient(kubeconfig string, kubeClient KubeClient) (KubeClient, error)
type NoK8sNetworkError ¶
type NoK8sNetworkError struct {
// contains filtered or unexported fields
}
NoK8sNetworkError indicates error, no network in kubernetes
func (*NoK8sNetworkError) Error ¶
func (e *NoK8sNetworkError) Error() string
Click to show internal directories.
Click to hide internal directories.