Documentation ¶
Index ¶
- func NewExecConfig(cfg *config.Config, clusterName, role string) *api.ExecConfig
- type Client
- type Cluster
- type ClusterFinder
- type ContainerPort
- type ExecInput
- type Kubeclient
- func (k *Kubeclient) Exec(input *ExecInput) error
- func (k *Kubeclient) GetPod(namespace, podName string) (*v1.Pod, error)
- func (k *Kubeclient) ListPods(namespace, labelSelector string) (*v1.PodList, error)
- func (k *Kubeclient) PodLogs(ctx context.Context, input *PodLogsInput) error
- func (k *Kubeclient) RunPortForward(input *PortForwardInput) error
- type Kubeconfig
- type Pod
- type PodFinder
- type PodLogsInput
- type PortForwardInput
- type Token
- type TokenGen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecConfig ¶
func NewExecConfig(cfg *config.Config, clusterName, role string) *api.ExecConfig
Types ¶
type Client ¶
type Client interface { aws_eks.ListClustersAPIClient aws_eks.DescribeClusterAPIClient }
type Cluster ¶
type Cluster struct { // The Amazon Resource Name (ARN) of the cluster. ARN string // The name of the cluster. Name string // The Kubernetes server version for the cluster. Version string // The endpoint for your Kubernetes API server. Endpoint string // CAData contains PEM-encoded certificate authority certificates CAData []byte }
An object representing an Amazon EKS cluster.
type ClusterFinder ¶
func NewClusterFinder ¶
func NewClusterFinder(cfg *config.Config) ClusterFinder
type ContainerPort ¶ added in v0.20.0
type ContainerPort struct { // Number of port to expose on the pod's IP address Port int32 // Protocol for port. Must be UDP, TCP, or SCTP. Protocol string }
ContainerPort represents a network port in a single container.
type Kubeclient ¶
type Kubeclient struct {
// contains filtered or unexported fields
}
func NewKubeclient ¶
func (*Kubeclient) Exec ¶
func (k *Kubeclient) Exec(input *ExecInput) error
func (*Kubeclient) ListPods ¶
func (k *Kubeclient) ListPods(namespace, labelSelector string) (*v1.PodList, error)
func (*Kubeclient) PodLogs ¶ added in v0.21.0
func (k *Kubeclient) PodLogs(ctx context.Context, input *PodLogsInput) error
func (*Kubeclient) RunPortForward ¶ added in v0.20.0
func (k *Kubeclient) RunPortForward(input *PortForwardInput) error
type Kubeconfig ¶
type Kubeconfig struct {
// contains filtered or unexported fields
}
func NewKubeconfig ¶
func NewKubeconfig(filename string) (*Kubeconfig, error)
func (*Kubeconfig) Filename ¶
func (k *Kubeconfig) Filename() string
func (*Kubeconfig) Update ¶
func (k *Kubeconfig) Update(alias string, cluster *Cluster, exec *clientcmdapi.ExecConfig)
func (*Kubeconfig) WriteToDisk ¶
func (k *Kubeconfig) WriteToDisk() error
WriteToDisk writes a KubeConfig object down to disk with mode 0600
type Pod ¶
type Pod struct { // The name of the pod. Name string // The namespace of the pod. Namespace string // The name of the container Container string // List of ports to expose from the container ContainerPorts []ContainerPort }
An object representing a pod.
type PodFinder ¶
type PodLogsInput ¶ added in v0.21.0
type PortForwardInput ¶ added in v0.20.0
type PortForwardInput struct { // Namespace of the pod Namespace string // Name of the pod PodName string // LocalPort is the local port that will be selected to expose the PodPort LocalPort int32 // ContainerPort is the target port for the pod ContainerPort int32 // StopCh is the channel used to manage the port forward lifecycle StopCh <-chan struct{} // ReadyCh communicates when the tunnel is ready to receive traffic ReadyCh chan struct{} }
type Token ¶
Token is generated and used by Kubernetes client-go to authenticate with a Kubernetes cluster.
type TokenGen ¶
type TokenGen interface { // Get a token using credentials in the default credentials chain. Get(clusterName string) (*Token, error) // GetWithRole creates a token by assuming the provided role, using the credentials in the default chain. GetWithRole(clusterName, role string) (*Token, error) // FormatJSON returns the client auth formatted json for the ExecCredential auth. FormatJSON(Token) string }
func NewTokenGen ¶
NewTokenGen creates a TokenGen and returns it.
Click to show internal directories.
Click to hide internal directories.