Documentation
¶
Index ¶
- Variables
- func BinVer(ctx context.Context) (semver.Version, error)
- func ChartSource(r latest.HelmRelease) string
- func ConstructOverrideArgs(r *latest.HelmRelease, builds []graph.Artifact, args []string, ...) ([]string, error)
- func CreateNamespaceErr(version string) error
- func Exec(ctx context.Context, h Client, out io.Writer, useSecrets bool, env []string, ...) error
- func ExecWithStdoutAndStderr(ctx context.Context, h Client, stdout io.Writer, stderr io.Writer, ...) error
- func GetArgs(releaseName string, namespace string) []string
- func MinVersionErr(minVer string) error
- func PrepareSkaffoldFilter(h Client, builds []graph.Artifact) (skaffoldBinary string, env []string, cleanup func(), err error)
- func ReleaseNamespace(namespace string, release latest.HelmRelease) (string, error)
- func SanitizeFilePath(s string, isWindowsOS bool) string
- func UserErr(prefix string, err error) error
- func VersionGetErr(err error) error
- type Client
Constants ¶
This section is empty.
Variables ¶
var ( // VersionRegex extracts version from "helm version --client", for instance: "2.14.0-rc.2" VersionRegex = regexp.MustCompile(`v?(\d[\w.\-]+)`) // OSExecutable allows for replacing the skaffold binary for testing purposes OSExecutable = os.Executable // WriteBuildArtifacts is meant to be reassigned for testing WriteBuildArtifacts = writeBuildArtifacts )
Functions ¶
func ChartSource ¶
func ChartSource(r latest.HelmRelease) string
func ConstructOverrideArgs ¶
func ConstructOverrideArgs(r *latest.HelmRelease, builds []graph.Artifact, args []string, manifestOverrides map[string]string) ([]string, error)
ConstructOverrideArgs creates the command line arguments for overrides
func CreateNamespaceErr ¶
func Exec ¶
func Exec(ctx context.Context, h Client, out io.Writer, useSecrets bool, env []string, args ...string) error
Exec executes the helm command, writing combined stdout/stderr to the provided writer
func ExecWithStdoutAndStderr ¶
func ExecWithStdoutAndStderr(ctx context.Context, h Client, stdout io.Writer, stderr io.Writer, useSecrets bool, env []string, args ...string) error
ExecWithStdoutAndStderr executes the helm command, writing combined stdout and stderr to the provided writers
func MinVersionErr ¶
func PrepareSkaffoldFilter ¶
func ReleaseNamespace ¶
func ReleaseNamespace(namespace string, release latest.HelmRelease) (string, error)
func SanitizeFilePath ¶
SanitizeFilePath is used to sanitize filepaths that are provided to the `setFiles` flag helm `setFiles` doesn't work with the unescaped filepath separator (\) for Windows or if there are unescaped tabs and spaces in the directory names. So we escape all odd count occurrences of `\` for Windows, and wrap the entire string in quotes if it has spaces. This is very specific to the way helm handles its flags. See https://github.com/helm/helm/blob/d55c53df4e394fb62b0514a09c57bce235dd7877/pkg/cli/values/options. Otherwise the windows `syscall` package implements its own sanitizing for command args that's used by `exec.Cmd`. See https://github.com/golang/go/blob/6951da56b0ae2cd4250fc1b0350d090aed633ac1/src/syscall/exec_windows.go#L27