kubernetes

package
v0.0.0-...-7de36fb Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sAPI

type K8sAPI interface {
	CreateAndWaitForRessources(context.Context, *config.KubeRessourceIdentifier) error
	ExecuteCommandInPod(context.Context, *config.KubeExecConfig) error
	CreatePodPortForward(context.Context, *config.KubeForwardConfig) error
}

K8sAPI is the interface used to access kubernetes helpers.

type K8sAPIUser

type K8sAPIUser interface {
	GetUserInformation() *config.KubeRessourceIdentifier
	GetNamespace() string
	GetAuthenticatedUserID() string
	GetNodeName() string
	K8sAPI
}

K8sAPIUser is the interface used to access kubernetes helpers and user data.

type K8sAPIUserWrapper

type K8sAPIUserWrapper struct {
	UserInformation *config.KubeRessourceIdentifier
	K8sAPI
}

K8sAPIUserWrapper is the struct used to access kubernetes helpers and user data.

func NewK8sAPIUserWrapper

func NewK8sAPIUserWrapper(api K8sAPI, userInfo *config.KubeRessourceIdentifier) *K8sAPIUserWrapper

NewK8sAPIUserWrapper returns a new kuberenetes client-go wrapper.

func (*K8sAPIUserWrapper) GetAuthenticatedUserID

func (k *K8sAPIUserWrapper) GetAuthenticatedUserID() string

GetAuthenticatedUserID returns the authenticated user id.

func (*K8sAPIUserWrapper) GetNamespace

func (k *K8sAPIUserWrapper) GetNamespace() string

GetNamespace returns the namespace.

func (*K8sAPIUserWrapper) GetNodeName

func (k *K8sAPIUserWrapper) GetNodeName() string

GetNodeName returns the node this application is currently running on.

func (*K8sAPIUserWrapper) GetUserInformation

func (k *K8sAPIUserWrapper) GetUserInformation() *config.KubeRessourceIdentifier

GetUserInformation returns the user information.

type K8sAPIWrapper

type K8sAPIWrapper struct {
	Client *k8sapi.Client
	API    *vmapi.API
	// contains filtered or unexported fields
}

K8sAPIWrapper is the struct used to access kubernetes helpers.

func NewK8sAPIWrapper

func NewK8sAPIWrapper(logger *zap.Logger) (*K8sAPIWrapper, error)

NewK8sAPIWrapper returns a new kuberenetes client-go wrapper. if no kubeconfig path is given we use the service account token.

func (*K8sAPIWrapper) CreateAndWaitForRessources

func (k *K8sAPIWrapper) CreateAndWaitForRessources(ctx context.Context, conf *config.KubeRessourceIdentifier) error

CreateAndWaitForRessources creates the ressources for a user in a namespace.

func (*K8sAPIWrapper) CreatePodPortForward

func (k *K8sAPIWrapper) CreatePodPortForward(ctx context.Context, conf *config.KubeForwardConfig) error

CreatePodPortForward creates a port forward on the specified pod.

func (*K8sAPIWrapper) ExecuteCommandInPod

func (k *K8sAPIWrapper) ExecuteCommandInPod(ctx context.Context, conf *config.KubeExecConfig) error

ExecuteCommandInPod executes a command in the specified pod.

func (*K8sAPIWrapper) GetStore

func (k *K8sAPIWrapper) GetStore() (store.Store, error)

GetStore returns a store backed by kube etcd.

Jump to

Keyboard shortcuts

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