k8s

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteInPod

func ExecuteInPod(namespace string, name string, container string, command []string, terminal bool) error

func GetNotebookPod

func GetNotebookPod(namespace string, notebookName string) (*v1.Pod, error)

func GetPodLogs

func GetPodLogs(pod v1.Pod, container string, follow bool) error

func GetWorkspacePod

func GetWorkspacePod(namespace string, workspacName string) (*v1.Pod, error)

func GetWorkspaceVolumes

func GetWorkspaceVolumes(namespace string, notebookName string) ([]v1.PersistentVolumeClaim, error)

func ReadSecret

func ReadSecret(name string, namespace string) (*v1.Secret, error)

func WaitForDeployment

func WaitForDeployment(name, namespace string, waitTimeout uint) error

func WaitUntilPodIsReady

func WaitUntilPodIsReady(name, namespace string) error

Types

type Client

type Client struct {
	CoreV1    *kubernetes.Clientset
	Config    *rest.Config
	Namespace string
}

func GetClient

func GetClient() *Client

func InitClient

func InitClient(kubeConfigPath string) (*Client, error)

func (*Client) CreateDialer

func (o *Client) CreateDialer(name string, namespace string) (*httpstream.Dialer, error)

func (*Client) ForwardPorts

func (o *Client) ForwardPorts(name string, namespace string, ports []string) (PortForward, error)

type ConfigMapper

type ConfigMapper struct {
	// contains filtered or unexported fields
}

func NewConfigMapper

func NewConfigMapper(files []FileMap) ConfigMapper

func (*ConfigMapper) BuildConfigMap

func (o *ConfigMapper) BuildConfigMap(namespace, name string) error

type FileMap

type FileMap struct {
	LocalFilename string
	Id            string
	MountPath     string
}

type PortForward

type PortForward struct {
	ReadyChannel   chan struct{}
	StopChannel    chan struct{}
	Name           string
	Namespace      string
	ForwardedPorts []portforward.ForwardedPort
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL