watch

package
v0.25.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MPL-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DevBucketContainerImage string
)
View Source
var PortForwardShortcutRunes = []rune{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}

Functions

func CleanupBucketSourceAndHelm added in v0.12.0

func CleanupBucketSourceAndHelm(ctx context.Context, log logger.Logger, kubeClient client.Client, namespace string) error

CleanupBucketSourceAndHelm removes the bucket source and ks

func CleanupBucketSourceAndKS

func CleanupBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeClient client.Client, namespace string) error

CleanupBucketSourceAndKS removes the bucket source and ks

func CreateIgnorer

func CreateIgnorer(gitRootDir string) *ignore.GitIgnore

func EnablePortForwardingForDashboard

func EnablePortForwardingForDashboard(ctx context.Context, log logger.Logger, kubeClient client.Client, config *rest.Config, namespace, podName, dashboardPort string) (func(), error)

EnablePortForwardingForDashboard enables port forwarding for the GitOps Dashboard.

func ForwardPort

func ForwardPort(log logr.Logger, pod *corev1.Pod, cfg *rest.Config, specMap *PortForwardSpec, waitFwd, readyChannel chan struct{}) error

func GetNextPortForwardKey added in v0.13.0

func GetNextPortForwardKey(portForwards map[rune]PortForwardShortcut) (rune, error)

func InitializeRootDir added in v0.22.0

func InitializeRootDir(log logger.Logger, rootPath string) error

InitializeRootDir initializes the root directory (creates the .sourceignore file in it).

func InitializeTargetDir

func InitializeTargetDir(targetPath string) error

InitializeTargetDir initializes the target directory (creates the entrypoint Kustomization in it).

func InstallDevBucketServer

func InstallDevBucketServer(
	ctx context.Context,
	log logger.Logger,
	kubeClient client.Client,
	config *rest.Config,
	httpPort,
	httpsPort int32,
	accessKey,
	secretKey []byte) (func(), []byte, error)

InstallDevBucketServer installs the dev bucket server, open port forwarding, and returns a function that can be used to the port forwarding.

func ReconcileDevBucketSourceAndHelm added in v0.12.0

func ReconcileDevBucketSourceAndHelm(ctx context.Context, log logger.Logger, kubeClient client.Client, namespace string, timeout time.Duration) error

ReconcileDevBucketSourceAndHelm reconciles the dev-bucket and dev-helm asynchronously.

func ReconcileDevBucketSourceAndKS

func ReconcileDevBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeClient client.Client, namespace string, timeout time.Duration) error

ReconcileDevBucketSourceAndKS reconciles the dev-bucket and dev-ks asynchronously.

func SetupBucketSourceAndHelm added in v0.12.0

func SetupBucketSourceAndHelm(ctx context.Context, log logger.Logger, kubeClient client.Client, params SetupRunObjectParams) error

func SetupBucketSourceAndKS

func SetupBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeClient client.Client, params SetupRunObjectParams) error

func ShowPortForwards added in v0.13.0

func ShowPortForwards(ctx context.Context, log clilogger.Logger, portForwards map[rune]PortForwardShortcut)

func SyncDir

func SyncDir(ctx context.Context, log logger.Logger, dir, bucket string, client *minio.Client, ignorer *ignore.GitIgnore) error

SyncDir recursively uploads all files in a directory to an S3 bucket with minio library

func UninstallDevBucketServer

func UninstallDevBucketServer(ctx context.Context, log logger.Logger, kubeClient client.Client) error

UninstallDevBucketServer deletes the dev-bucket namespace.

func WatchDirsForFileWalker

func WatchDirsForFileWalker(watcher *fsnotify.Watcher, ignorer *ignore.GitIgnore) func(path string, info os.FileInfo, err error) error

Types

type PortForwardShortcut added in v0.13.0

type PortForwardShortcut struct {
	Name     string
	HostPort string
}

type PortForwardSpec

type PortForwardSpec struct {
	Namespace     string
	Name          string
	Kind          string
	HostPort      string
	ContainerPort string
	Map           map[string]string
}

func ParsePortForwardSpec

func ParsePortForwardSpec(spec string) (*PortForwardSpec, error)

parse port forward specin the key-value format of "port=8000:8080,resource=svc/app,namespace=default"

type SetupRunObjectParams added in v0.12.0

type SetupRunObjectParams struct {
	Namespace         string
	Path              string
	Timeout           time.Duration
	DevBucketPort     int32
	SessionName       string
	Username          string
	AccessKey         []byte
	SecretKey         []byte
	DecryptionKeyFile string
}

Jump to

Keyboard shortcuts

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