Documentation ¶
Overview ¶
Package action provides implementations for each Helm command.
This is not intended to be a stand-alone library, as many of the commands will write to output, and even os.Exit when things go wrong.
Index ¶
- Constants
- Variables
- func AddRepo(homedir, name, repository string)
- func CheckAllPrereqs(home string)
- func CheckKubePrereqs()
- func CheckLatest(version string)
- func CheckLocalPrereqs(home string)
- func Create(chartName, homeDir string)
- func DeleteRepo(homedir, name string)
- func Doctor(home string)
- func Edit(chartName, homeDir string)
- func Fetch(chartName, lname, homedir string)
- func Generate(chart, homedir string, exclude []string)
- func HasPlugin(name string) bool
- func Info(chartName, homedir, format string)
- func Install(chartName, home, namespace string, force bool, client kubectl.Runner)
- func Lint(chartPath string)
- func LintAll(homedir string)
- func List(homedir string)
- func ListRepos(homedir string)
- func Plugin(homedir, cmd string, args []string)
- func PluginName(name string) string
- func PrintREADME(chart, home string)
- func Publish(chartName, homeDir, repo string, force bool)
- func Remove(chart, homedir string, force bool)
- func Search(term, homedir string, regexp bool)
- func Target(client kubectl.Runner)
- func Template(out, in, data string)
- func Uninstall(chartName, home, namespace string, force bool, client kubectl.Runner)
- func Update(home string)
- type GHRepoService
Constants ¶
const ( // Owner is default Helm repository owner or organization. Owner = "helm" // Project is the default Charts repository name. Project = "charts" )
const ( // Chartfile is the name of the YAML file that contains chart metadata. // One must exist inside the top level directory of every chart. Chartfile = "Chart.yaml" )
Variables ¶
var InstallOrder = []string{"Namespace", "Secret", "PersistentVolume", "ServiceAccount", "Service", "Pod", "ReplicationController", "DaemonSet", "Ingress", "Job"}
InstallOrder defines the order in which manifests should be installed, by Kind.
Anything not on the list will be installed after the last listed item, in an indeterminate order.
var UninstallOrder = []string{"Service", "Pod", "ReplicationController", "DaemonSet", "Secret", "PersistentVolume", "ServiceAccount", "Ingress", "Job", "Namespace"}
UninstallOrder defines the order in which manifests are uninstalled.
Unknown manifest types (those not explicitly referenced in this list) will be uninstalled before any of these, since we know that none of the core types depend on non-core types.
Functions ¶
func AddRepo ¶
func AddRepo(homedir, name, repository string)
AddRepo adds a repo to the list of repositories.
func CheckAllPrereqs ¶
func CheckAllPrereqs(home string)
CheckAllPrereqs makes sure we have all the tools we need for overall helm success
func CheckKubePrereqs ¶
func CheckKubePrereqs()
CheckKubePrereqs makes sure we have the tools necessary to interact with a kubernetes cluster
func CheckLatest ¶
func CheckLatest(version string)
CheckLatest checks whether this version of Helm is the latest version.
This does not ensure that this is the latest. If a newer version is found, this generates a message indicating that.
The passed-in version is the base version that will be checked against the remote release list.
func CheckLocalPrereqs ¶
func CheckLocalPrereqs(home string)
CheckLocalPrereqs makes sure we have all the tools we need to work with charts locally
func Create ¶
func Create(chartName, homeDir string)
Create a chart
- chartName being created - homeDir is the helm home directory for the user
func Edit ¶
func Edit(chartName, homeDir string)
Edit charts using the shell-defined $EDITOR
- chartName being edited - homeDir is the helm home directory for the user
func Fetch ¶
func Fetch(chartName, lname, homedir string)
Fetch gets a chart from the source repo and copies to the workdir.
- chartName is the source - lname is the local name for that chart (chart-name); if blank, it is set to the chart. - homedir is the home directory for the user
func Generate ¶
Generate runs generators on the entire chart.
By design, this only operates on workspaces, as it should never be run on the cache.
func Info ¶
func Info(chartName, homedir, format string)
Info prints information about a chart.
- chartName to display - homeDir is the helm home directory for the user - format is a optional Go template
func Install ¶
Install loads a chart into Kubernetes.
If the chart is not found in the workspace, it is fetched and then installed.
During install, manifests are sent to Kubernetes in the ordered specified by InstallOrder.
func Lint ¶
func Lint(chartPath string)
Lint validates that a chart is well-formed
- chartPath path to chart directory
func LintAll ¶
func LintAll(homedir string)
LintAll vlaidates all charts are well-formed
- homedir is the home directory for the user
func Plugin ¶
Plugin attempts to execute a plugin.
It looks on the path for an executable named `helm-COMMAND`, and executes that, passing it all of the arguments received after the subcommand.
Output is passed directly back to the user.
This ensures that the following environment variables are set:
- $HELM_HOME: points to the user's Helm home directory.
- $HELM_DEFAULT_REPO: the local name of the default repository.
- $HELM_COMMAND: the name of the command (as seen by Helm) that resulted in this program being executed.
func PrintREADME ¶
func PrintREADME(chart, home string)
PrintREADME prints the README file (if it exists) to the console.
func Publish ¶
Publish a chart from the workspace to the cache directory
- chartName being published - homeDir is the helm home directory for the user - force publishing even if the chart directory already exists
func Remove ¶
Remove removes a chart from the workdir.
- chart is the source - homedir is the home directory for the user - force will remove installed charts from workspace
Types ¶
type GHRepoService ¶
type GHRepoService interface {
DownloadContents(string, string, string, *github.RepositoryContentGetOptions) (io.ReadCloser, error)
}
GHRepoService is a restricted interface to GitHub client operations.
var RepoService GHRepoService
RepoService is a GitHub client instance.