istio: istio.io/istio/istioctl/pkg/kubernetes Index | Files

package kubernetes

import "istio.io/istio/istioctl/pkg/kubernetes"

Index

Package Files

client.go sds_client.go

func RunPortForwarder Uses

func RunPortForwarder(fw *PortForward, readyFunc func(fw *PortForward) error) error

type Client Uses

type Client struct {
    Config *rest.Config
    *rest.RESTClient
}

Client is a helper wrapper around the Kube RESTClient for istioctl -> Pilot/Envoy/Mesh related things

func NewClient Uses

func NewClient(kubeconfig, configContext string) (*Client, error)

NewClient is the constructor for the client wrapper

func (*Client) AllPilotsDiscoveryDo Uses

func (client *Client) AllPilotsDiscoveryDo(pilotNamespace, method, path string, body []byte) (map[string][]byte, error)

AllPilotsDiscoveryDo makes an http request to each Pilot discovery instance

func (*Client) BuildPortForwarder Uses

func (client *Client) BuildPortForwarder(podName string, ns string, localPort int, podPort int) (*PortForward, error)

BuildPortForwarder sets up port forwarding.

nolint: lll

func (*Client) EnvoyDo Uses

func (client *Client) EnvoyDo(podName, podNamespace, method, path string, body []byte) ([]byte, error)

EnvoyDo makes an http request to the Envoy in the specified pod

func (*Client) ExtractExecResult Uses

func (client *Client) ExtractExecResult(podName, podNamespace, container string, cmd []string) ([]byte, error)

ExtractExecResult wraps PodExec and return the execution result and error if has any.

func (*Client) GetIstioPods Uses

func (client *Client) GetIstioPods(namespace string, params map[string]string) ([]v1.Pod, error)

GetIstioPods retrieves the pod objects for Istio deployments

func (*Client) GetIstioVersions Uses

func (client *Client) GetIstioVersions(namespace string) (*version.MeshInfo, error)

GetIstioVersions gets the version for each Istio component

func (*Client) GetPilotAgentContainer Uses

func (client *Client) GetPilotAgentContainer(podName, podNamespace string) (string, error)

GetPilotAgentContainer retrieves the pilot-agent container name for the specified pod

func (*Client) GetPodNodeAgentSecrets Uses

func (client *Client) GetPodNodeAgentSecrets(podName, ns, istioNamespace string) (map[string]sds.Debug, error)

GetPodNodeAgentSecrets, given a pod name, finds each of a pod's corresponding node agents, hits the debug endpoint, and then returns a map with key => node agent pod name, value => sds.Debug from that node

func (*Client) NodeAgentDebugEndpointOutput Uses

func (client *Client) NodeAgentDebugEndpointOutput(podName, ns, secretType, container string) (sds.Debug, error)

NodeAgentDebugEndpointOutput makes a request to the target nodeagent's debug endpoint and returns the raw response

func (*Client) PilotDiscoveryDo Uses

func (client *Client) PilotDiscoveryDo(pilotNamespace, method, path string, body []byte) ([]byte, error)

PilotDiscoveryDo makes an http request to a single Pilot discovery instance

func (*Client) PodExec Uses

func (client *Client) PodExec(podName, podNamespace, container string, command []string) (*bytes.Buffer, *bytes.Buffer, error)

PodExec takes a command and the pod data to run the command in the specified pod

func (*Client) PodsForSelector Uses

func (client *Client) PodsForSelector(namespace, labelSelector string) (*v1.PodList, error)

type ExecClient Uses

type ExecClient interface {
    EnvoyDo(podName, podNamespace, method, path string, body []byte) ([]byte, error)
    AllPilotsDiscoveryDo(pilotNamespace, method, path string, body []byte) (map[string][]byte, error)
    GetIstioVersions(namespace string) (*version.MeshInfo, error)
    PilotDiscoveryDo(pilotNamespace, method, path string, body []byte) ([]byte, error)
    PodsForSelector(namespace, labelSelector string) (*v1.PodList, error)
    BuildPortForwarder(podName string, ns string, localPort int, podPort int) (*PortForward, error)
}

ExecClient is an interface for remote execution

type ExecClientSDS Uses

type ExecClientSDS interface {
    GetPodNodeAgentSecrets(string, string, string) (map[string]sds.Debug, error)
    NodeAgentDebugEndpointOutput(string, string, string, string) (sds.Debug, error)
    ExecClient
}

ExecClientSDS wraps the kubernetes API and provides needed access for sds-status command

type PortForward Uses

type PortForward struct {
    Forwarder    *portforward.PortForwarder
    LocalPort    int
    StopChannel  chan struct{}
    ReadyChannel <-chan struct{}
}

PortForward gathers port forwarding results

Package kubernetes imports 22 packages (graph) and is imported by 3 packages. Updated 2019-11-05. Refresh now. Tools for package owners.