helm_utils

package
v0.0.0-...-b56bb7f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgvWithFile

func ArgvWithFile(filepath string) ([]string, error)

ArgvWithFile reads a file and returns its content as a slice of command-line arguments. Each line in the file is treated as an individual argument, allowing for the construction of argument arrays from configuration files or scripts.

Parameters:

  • filepath: The path to the file containing arguments, with each argument on a separate line.

Returns:

  • []string: A slice of strings where each entry corresponds to a line in the file (an argument).
  • error: An error if the file cannot be read or processed.

func BuildHelmCommand

func BuildHelmCommand(helmPath string, args []string, pluginsDir string) (exec.Cmd, error)

BuildHelmCommand constructs an exec.Cmd to run a Helm command with the specified arguments and plugins directory. It takes the path to the Helm executable, a slice of arguments for the Helm command, and the path to the plugins directory.

Parameters:

  • helmPath: The file path to the Helm executable.
  • args: A slice of strings representing the arguments to pass to the Helm command.
  • pluginsDir: The path to the Helm plugins directory, used by Helm to locate additional plugins.

Returns:

  • exec.Cmd: The constructed command that can be executed to run the Helm command.
  • error: An error if there is an issue in creating the command.

func GetRunfile

func GetRunfile(runfile_path string) string

GetRunfile retrieves the path to a runfile given its runfile path relative to the runfiles directory. This is commonly used in build/test environments where runfiles (generated or input files) are organized in specific directories.

Parameters:

  • runfile_path: The relative path to the runfile within the runfiles directory.

Returns:

  • string: The absolute path to the specified runfile, allowing it to be accessed in the file system.

func SandboxFreeEnv

func SandboxFreeEnv(current []string) []string

Commands that run outside of Bazel should be able to access environment variables from the host machine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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