code_sync

package
v0.0.0-...-e91ad15 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodeRootPath = "/code"
)

Variables

This section is empty.

Functions

func InjectCodeSyncInitContainers

func InjectCodeSyncInitContainers(metaObj metav1.Object, specTemplate *v1.PodTemplateSpec) error

Types

type CodeSyncHandler

type CodeSyncHandler interface {
	InitContainer(optsConfig []byte, mountVolume *v1.Volume) (c *v1.Container, codePath string, repoName string, err error)
}

type GitSyncOptions

type GitSyncOptions struct {
	SyncOptions `json:",inline"`

	// Git repository settings for user to specify.
	Branch   string `json:"branch,omitempty"`
	Revision string `json:"revision,omitempty"`
	Depth    string `json:"depth,omitempty"`
	// Max consecutive failures allowed.
	MaxFailures int `json:"maxFailures,omitempty"`
	// SSH settings for users to use git in ssh pattern.
	SSH     bool   `json:"ssh,omitempty"`
	SSHFile string `json:"sshFile,omitempty"`
	// User-customized account settings.
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
}

type SyncOptions

type SyncOptions struct {
	// Code source address.(required)
	Source string `json:"source"`
	// Image contains toolkits to execute syncing code.
	Image string `json:"image,omitempty"`
	// Code root/destination directory path.
	// Root: the path to save downloaded files.
	// Dest: the name of (a symlink to) a directory in which to check-out files
	RootPath string `json:"rootPath,omitempty"`
	DestPath string `json:"destPath,omitempty"`

	// Relative Code path of workingDir that will be mounted to main containers.
	RelativeCodePath string `json:"relativeCodePath,omitempty"`

	// User-customized environment variables.
	Envs []v1.EnvVar `json:"envs,omitempty"`
}

Jump to

Keyboard shortcuts

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