Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUnixSock ¶
func GetUnixSock() string
func SetLogFile ¶
func SetLogFile(file string)
Types ¶
type K8sArgs ¶
type K8sArgs struct { types.CommonArgs IP net.IP 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 }
K8sArgs is the valid CNI_ARGS used for Kubernetes The field names need to match exact keys in kubelet args for unmarshalling
type Kubernetes ¶
type Kubernetes struct { K8sAPIRoot string `json:"k8s_api_root"` Kubeconfig string `json:"kubeconfig"` InterceptRuleMgrType string `json:"intercept_type"` NodeName string `json:"node_name"` ExcludeNamespaces []string `json:"exclude_namespaces"` CNIBinDir string `json:"cni_bin_dir"` }
Kubernetes a K8s specific struct to hold config
type PodNetConf ¶
type PodNetConf struct { types.NetConf // You may wish to not nest this type RuntimeConfig *struct { } `json:"runtimeConfig"` // This is the previous result, when called in the context of a chained // plugin. Because this plugin supports multiple versions, we'll have to // parse this in two passes. If your plugin is not chained, this can be // removed (though you may wish to error if a non-chainable plugin is // chained. // If you need to modify the result before returning it, you will need // to actually convert it to a concrete versioned struct. RawPrevResult *map[string]any `json:"prevResult"` PrevResult *cniv1.Result `json:"-"` // Add plugin-specific flags here LogLevel string `json:"log_level"` LogUDSAddress string `json:"log_uds_address"` Kubernetes Kubernetes `json:"kubernetes"` HostNSEnterExec bool `json:"hostNSEnterExec"` }
PodNetConf 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.
Click to show internal directories.
Click to hide internal directories.