Documentation ¶
Overview ¶
This is a sample chained plugin that supports multiple CNI versions. It parses prevResult according to the cniVersion
This is a sample chained plugin that supports multiple CNI versions. It parses prevResult according to the cniVersion
This is a sample chained plugin that supports multiple CNI versions. It parses prevResult according to the cniVersion
Defines the redirect object and operations.
Index ¶
- Constants
- func CmdAdd(args *skel.CmdArgs) (err error)
- func CmdCheck(args *skel.CmdArgs) (err error)
- func CmdDelete(args *skel.CmdArgs) (err error)
- func GetLoggingOptions(cfg *Config) *log.Options
- func PushCNIEvent(cniClient CNIEventClient, event *skel.CmdArgs, prevResIps []*cniv1.IPConfig, ...) error
- func TestLoadArgs(t *testing.T)
- type CNIEventClient
- type Config
- type InterceptRuleMgr
- type K8sArgs
- type PodInfo
- type Redirect
Constants ¶
const ( ISTIOINIT = "istio-init" ISTIOPROXY = "istio-proxy" )
Variables ¶
This section is empty.
Functions ¶
func GetLoggingOptions ¶
func PushCNIEvent ¶
func TestLoadArgs ¶
Validate k8sArgs struct works for unmarshalling kubelet args This is important for CNI plugin conformance
Types ¶
type CNIEventClient ¶
type CNIEventClient struct {
// contains filtered or unexported fields
}
An udsCore write entries to an UDS server with HTTP Post. Log messages will be encoded into a JSON array.
type Config ¶
type Config struct { types.NetConf // Add plugin-specific flags here PluginLogLevel string `json:"plugin_log_level"` CNIAgentRunDir string `json:"cni_agent_run_dir"` AmbientEnabled bool `json:"ambient_enabled"` ExcludeNamespaces []string `json:"exclude_namespaces"` }
Config is whatever you expect your configuration json to be. This is whatever is passed in on stdin. Your plugin may wish to expose its functionality via runtime args, see CONVENTIONS.md in the CNI spec.
type InterceptRuleMgr ¶
InterceptRuleMgr configures networking tables (e.g. iptables or nftables) for redirecting traffic to an Istio proxy.
func IptablesInterceptRuleMgr ¶
func IptablesInterceptRuleMgr() InterceptRuleMgr
Constructor for iptables InterceptRuleMgr
type K8sArgs ¶
type K8sArgs struct { types.CommonArgs K8S_POD_NAME types.UnmarshallableString // nolint: revive, stylecheck K8S_POD_NAMESPACE types.UnmarshallableString // nolint: revive, stylecheck K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString // nolint: revive, stylecheck K8S_POD_UID types.UnmarshallableString // nolint: revive, stylecheck }
K8sArgs is the valid CNI_ARGS used for Kubernetes The field names need to match exact keys in containerd args for unmarshalling https://github.com/containerd/containerd/blob/ced9b18c231a28990617bc0a4b8ce2e81ee2ffa1/pkg/cri/server/sandbox_run.go#L526-L532