Documentation ¶
Overview ¶
Defines the redirect object and operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var InterceptRuleMgrTypes = map[string]InterceptRuleMgrCtor{ "iptables": IptablesInterceptRuleMgrCtor, }
Functions ¶
Types ¶
type InterceptRuleMgr ¶
InterceptRuleMgr configures networking tables (e.g. iptables or nftables) for redirecting traffic to an MSM proxy.
func IptablesInterceptRuleMgrCtor ¶
func IptablesInterceptRuleMgrCtor() InterceptRuleMgr
Constructor for iptables InterceptRuleMgr
type InterceptRuleMgrCtor ¶
type InterceptRuleMgrCtor func() InterceptRuleMgr
func GetInterceptRuleMgrCtor ¶
func GetInterceptRuleMgrCtor(interceptType string) InterceptRuleMgrCtor
Constructor factory for known types of InterceptRuleMgr's
type Kubernetes ¶
type Kubernetes struct { K8sAPIRoot string `json:"kubernetesAPIRoot"` KubeConfig string `json:"kubeConfig"` InterceptRuleMgrType string `json:"interceptName"` NodeName string `json:"nodeName"` ExcludeNamespaces []string `json:"excludeNamespaces"` CNIBinDir string `json:"cniBinDir"` }
Kubernetes a K8s specific struct to hold config
type KubernetesArgs ¶
type KubernetesArgs struct { types.CommonArgs IP net.IP K8S_POD_NAME types.UnmarshallableString K8S_POD_NAMESPACE types.UnmarshallableString K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString }
KubernetesArgs is the valid CNI_ARGS used for Kubernetes The field names need to match exact keys in kubelet args for unmarshalling
type PluginConf ¶
type PluginConf struct { types.NetConf // You may wish to not nest this type RuntimeConfig *struct{} `json:"runtimeConfig"` // Previous result, when called in the context of a chained plugin. RawPrevResult *map[string]interface{} `json:"prevResult"` PrevResult *current.Result `json:"-"` // Plugin-specific flags LogLevel string `json:"logLevel"` Kubernetes Kubernetes `json:"kubernetes"` }
PluginConf is the expected json configuration passed in on stdin.
type PodInfo ¶
type PodInfo struct { Containers []string InitContainers map[string]struct{} Labels map[string]string Annotations map[string]string ProxyEnvironments map[string]string }
PodInfo holds the information of a Kubernetes pod
type Redirect ¶
type Redirect struct {
// contains filtered or unexported fields
}
Redirect is the msm-cni redirect object
func NewRedirect ¶
NewRedirect returns a new Redirect Object constructed from a list of ports and annotations For now we are using some default values but that can change in the future to support passing values through annotations