k8s

package
v5.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDockerSecrets

func CreateDockerSecrets(client kubernetes.Interface, namespace string, auths config.DockerAuths) (*v1.Secret, error)

Types

type CopyFileSpec

type CopyFileSpec struct {
	PodName      string
	PodNamespace string
	// ContainerName optional
	ContainerName string
	File          PathSpec
}

type CopyOptions

type CopyOptions struct {
	Namespace string
	Container string
	MaxTries  int

	ClientConfig *restclient.Config
	Clientset    kubernetes.Interface
	// contains filtered or unexported fields
}

CopyOptions have the data required to perform the copy operation

func NewCopyOptions

func NewCopyOptions(
	logger mlog.Logger,
	clientConfig *restclient.Config,
	clientset kubernetes.Interface,
	maxTries int,
	errOut io.Writer,
) *CopyOptions

NewCopyOptions creates the options for copy

func (*CopyOptions) CopyFromPod

func (o *CopyOptions) CopyFromPod(ctx context.Context, src CopyFileSpec, destFile uploader.File) error

type DockerConfig

type DockerConfig map[string]DockerConfigEntry

type DockerConfigEntry

type DockerConfigEntry struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Email    string `json:"email,omitempty"`
	Auth     string `json:"auth,omitempty"`
}

type DockerConfigJSON

type DockerConfigJSON struct {
	Auths       DockerConfig      `json:"auths"`
	HttpHeaders map[string]string `json:"HttpHeaders,omitempty"`
}

func DecodeDockerConfigJSON

func DecodeDockerConfigJSON(data []byte) (res DockerConfigJSON, err error)

type FileCopy

type FileCopy interface {
	CopyFromPod(ctx context.Context, src CopyFileSpec, file uploader.File) error
}

type PathSpec

type PathSpec interface {
	String() string
}

type RemotePath

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

RemotePath represents always UNIX path, its methods will use path package which is always using `/`

func NewRemotePath

func NewRemotePath(fileName string) RemotePath

func (RemotePath) String

func (p RemotePath) String() string

type TarPipe

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

func (*TarPipe) Read

func (t *TarPipe) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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