Documentation ¶
Index ¶
- Constants
- Variables
- func GetBranchName() (string, error)
- func GetCommitID() (string, error)
- func GetKubeClient(log logger.Logger, contextName string, cfg *rest.Config, ...) (*kube.KubeHTTP, error)
- func GetKubeClientOptions() *runclient.Options
- func GetKubeConfigArgs() *genericclioptions.ConfigFlags
- func GetPodFromResourceDescription(ctx context.Context, namespacedName types.NamespacedName, kind string, ...) (*corev1.Pod, error)
- func GetRelativePathToRootDir(rootDir string, path string) (string, error)
- func GetUnusedPorts(count int) (ports []int32, retErr error)
- func IsDirty() (bool, error)
- func IsLocalCluster(kubeClient *kube.KubeHTTP) bool
- func RequestReconciliation(ctx context.Context, kubeClient client.Client, ...) (string, error)
- type Paths
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 GetCommitID ¶ added in v0.10.0
func GetKubeClient ¶
func GetKubeClientOptions ¶
func GetKubeConfigArgs ¶
func GetKubeConfigArgs() *genericclioptions.ConfigFlags
func GetPodFromResourceDescription ¶ added in v0.9.4
func GetUnusedPorts ¶ added in v0.10.1
GetUnusedPorts returns a slice of unused ports.
func IsLocalCluster ¶
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 (*Paths) GetAbsoluteTargetDir ¶ added in v0.10.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.