Documentation ¶
Index ¶
- func CheckEphemeralContainerSupport(v VersionGetter) error
- func CheckPodsContext(pods []v1.Pod) error
- func GetKubeForwarder(r *rest.Config, path string, rch, sch chan struct{}, proxyport int32) (*portforward.PortForwarder, int, error)
- func PortForward(forwarder Forwarder, readych chan struct{}, timeout time.Duration) error
- func SelectPods(pods []string, all bool, h PodLister) ([]v1.Pod, error)
- func SetupEphemeralContainers(pods []v1.Pod, h KubeEphemeralHandler, opts AgentOpts) error
- func SetupProxy(h KubeProxyHandler, opts ProxyOpts) (string, error)
- func TearDownProxy(id string, h KubeProxyHandler) error
- type AgentOpt
- type AgentOpts
- type Forwarder
- type KubeClient
- type KubeEphemeralHandler
- type KubeProxyHandler
- type PodLister
- type ProxyOpt
- type ProxyOpts
- type VersionGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEphemeralContainerSupport ¶ added in v0.0.4
func CheckEphemeralContainerSupport(v VersionGetter) error
func CheckPodsContext ¶ added in v0.0.4
func GetKubeForwarder ¶
func GetKubeForwarder( r *rest.Config, path string, rch, sch chan struct{}, proxyport int32, ) (*portforward.PortForwarder, int, error)
func PortForward ¶
func SetupEphemeralContainers ¶
func SetupEphemeralContainers(pods []v1.Pod, h KubeEphemeralHandler, opts AgentOpts) error
func SetupProxy ¶
func SetupProxy(h KubeProxyHandler, opts ProxyOpts) (string, error)
func TearDownProxy ¶
func TearDownProxy(id string, h KubeProxyHandler) error
Types ¶
type AgentOpt ¶
func WithAgentCaptureTimeOut ¶
func WithAgentDevice ¶
func WithAgentPromiscuous ¶
func WithAgentSetupTimeOut ¶
func WithAgentSnapLen ¶
func WithAgentUUID ¶
type AgentOpts ¶
type AgentOpts struct { SnapshotLen int32 // https://www.tcpdump.org/manpages/pcap_set_snaplen.3pcap.html Promiscuous bool // https://www.tcpdump.org/manpages/pcap_set_promisc.3pcap.html Device string // https://www.tcpdump.org/manpages/pcap_create.3pcap.html Timeout time.Duration // https://www.tcpdump.org/manpages/pcap_set_timeout.3pcap.html TargetIP string // proxy endpoint address to send packet via gRPC TargetPort int // proxy endpoint port to send packet via gRPC UUID string // kpture uuid used in ephemeral container name SetupTimeout time.Duration // timeout for ephemeral container injection }
func LoadAgentOpts ¶
func (AgentOpts) WithTargetIP ¶
func (AgentOpts) WithTargetPort ¶
type KubeClient ¶
type KubeClient struct { Clientset *kubernetes.Clientset RestConf *rest.Config Namespace string }
func GetClient ¶
func GetClient(namespace string) (*KubeClient, error)
type KubeEphemeralHandler ¶
type KubeEphemeralHandler interface { Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Pod, error) UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) }
type KubeProxyHandler ¶
type ProxyOpts ¶
type ProxyOpts struct { ServerPort int32 UUID string SetupTimeout time.Duration // timeout for pod creation }
func LoadProxyOpts ¶
type VersionGetter ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.