run

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotInGitRepoError = "not in a git repo, last checked directory: %s"
	StatError         = "unexpected error while checking for .git directory: %v"
	AbsError          = "unexpected error while getting the absolute filepath: %v"
	PermissionError   = "permission denied while checking for parent directory of: %s"
)

Variables

View Source
var (
	ErrNoPodsForService           = errors.New("no pods found for service")
	ErrNoPodsForDeployment        = errors.New("no pods found for deployment")
	ErrNoRunningPodsForService    = errors.New("no running pods found for service")
	ErrNoRunningPodsForDeployment = errors.New("no running pods found for deployment")
	ErrDashboardPodNotFound       = errors.New("dashboard pod not found")
)

Functions

func GetBranchName added in v0.10.0

func GetBranchName() (string, error)

func GetCommitID added in v0.10.0

func GetCommitID() (string, error)

func GetKubeClient

func GetKubeClient(log logger.Logger, contextName string, cfg *rest.Config, kubeClientOpts *runclient.Options) (*kube.KubeHTTP, error)

func GetKubeClientOptions

func GetKubeClientOptions() *runclient.Options

func GetKubeConfigArgs

func GetKubeConfigArgs() *genericclioptions.ConfigFlags

func GetPodFromResourceDescription added in v0.9.4

func GetPodFromResourceDescription(ctx context.Context, kubeClient client.Client, namespacedName types.NamespacedName, kind string, podLabels map[string]string) (*corev1.Pod, error)

func GetRelativePathToRootDir

func GetRelativePathToRootDir(rootDir, path string) (string, error)

func GetUnusedPorts added in v0.10.1

func GetUnusedPorts(count int) (ports []int32, retErr error)

GetUnusedPorts returns a slice of unused ports.

func IsDirty added in v0.10.0

func IsDirty() (bool, error)

func IsLocalCluster

func IsLocalCluster(kubeClient *kube.KubeHTTP) bool

IsLocalCluster checks if it's a local cluster. See https://skaffold.dev/docs/environment/local-cluster/

func RequestReconciliation

func RequestReconciliation(ctx context.Context, kubeClient client.Client, namespacedName types.NamespacedName, gvk schema.GroupVersionKind) (string, error)

Types

type Paths added in v0.10.0

type Paths struct {
	RootDir    string // Absolute path to the git repository
	CurrentDir string // Path to the current working directory, relative to rootDir
	ClusterDir string // Path to the cluster dir, relative to rootDir - currentDir / "clusters" / "my-cluster"
	TargetDir  string // Path to the target workload dir, relative to rootDir. Must not contain clusterDir, may or may not be inside currentDir
}

func NewPaths added in v0.10.0

func NewPaths(specifiedTargetDir, specifiedRootDir string) (*Paths, error)

func (*Paths) GetAbsoluteTargetDir added in v0.10.0

func (p *Paths) GetAbsoluteTargetDir() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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