watch

package
v0.11.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunDevBucketName   = "run-dev-bucket"
	RunDevKsName       = "run-dev-ks"
	GitOpsRunNamespace = "gitops-run"
)

Variables

View Source
var (
	DevBucketContainerImage = "ghcr.io/weaveworks/gitops-bucket-server@sha256:8fbb7534e772e14ea598d287a4b54a3f556416cac6621095ce45f78346fda78a"
)

Functions

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 string, podName string, 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 chan struct{}, readyChannel chan struct{}) error

func InitializeTargetDir

func InitializeTargetDir(targetPath string) error

func InstallDevBucketServer

func InstallDevBucketServer(ctx context.Context, log logger.Logger, kubeClient client.Client, config *rest.Config, devBucketPort int32) (func(), error)

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

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 SetupBucketSourceAndKS

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

func SyncDir

func SyncDir(ctx context.Context, log logger.Logger, dir string, 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 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 SetupBucketSourceAndKSParams added in v0.11.0

type SetupBucketSourceAndKSParams struct {
	Namespace     string
	Path          string
	Timeout       time.Duration
	DevBucketPort int32
	SessionName   string
	Username      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳