helmdocs

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuiltInObjects = []HelmDocumentation{
		{"Values", ".Values", `The values made available through values.yaml, --set and -f.`},
		{"Chart", ".Chart", "Chart metadata"},
		{"Subcharts", ".Subcharts", "This provides access to the scope (.Values, .Charts, .Releases etc.) of subcharts to the parent. For example .Subcharts.mySubChart.myValue to access the myValue in the mySubChart chart."},
		{"Files", ".Files.Get $str", "access non-template files within the chart"},
		{"Capabilities", ".Capabilities.KubeVersion ", "access capabilities of Kubernetes"},
		{"Release", ".Release", `Built-in release values. Attributes include:
    - .Release.Name: Name of the release
    - .Release.Time: Time release was executed
    - .Release.Namespace: Namespace into which release will be placed (if not overridden)
    - .Release.Service: The service that produced this release. Usually Tiller.
    - .Release.IsUpgrade: True if this is an upgrade
    - .Release.IsInstall: True if this is an install
    - .Release.Revision: The revision number
    `},
		{"Template", ".Template", "Contains information about the current template that is being executed"},
	}
	BuiltinFuncs = []HelmDocumentation{
		{"template", "template $str $ctx", "render the template at location $str"},
		{"define", "define $str", "define a template with the name $str"},
		{"and", "and $a $b ...", "if $a then $b else $a"},
		{"call", "call $func $arg $arg2 ...", "call a $func with all $arg(s)"},
		{"html", "html $str", "escape $str for injection into HTML"},
		{"index", "index $collection $key $key2 ...", "get item out of (nested) collection"},
		{"js", "js $str", "encode $str for embedding in JavaScript"},
		{"len", "len $countable", "get the length of a $countable object (list, string, etc)"},
		{"not", "not $x", "negate the boolean value of $x"},
		{"or", "or $a $b", "if $a then $a else $b"},
		{"print", "print $val", "print value"},
		{"printf", "printf $format $val ...", "print $format, injecting values. Follows Sprintf conventions."},
		{"println", "println $val", "print $val followed by newline"},
		{"urlquery", "urlquery $val", "escape value for injecting into a URL query string"},
		{"ne", "ne $a $b", "returns true if $a != $b"},
		{"eq", "eq $a $b ...", "returns true if $a == $b (== ...)"},
		{"lt", "lt $a $b", "returns true if $a < $b"},
		{"gt", "gt $a $b", "returns true if $a > $b"},
		{"le", "le $a $b", "returns true if $a <= $b"},
		{"ge", "ge $a $b", "returns true if $a >= $b"},
	}
	SprigFuncs = []HelmDocumentation{}/* 108 elements not displayed */

	HelmFuncs = []HelmDocumentation{
		{"include", "include $str $ctx", "(chainable) include the named template with the given context."},
		{"toYaml", "toYaml $var", "convert $var to YAML"},
		{"toJson", "toJson $var", "convert $var to JSON"},
		{"toToml", "toToml $var", "convert $var to TOML"},
		{"fromYaml", "fromYaml $str", "parse YAML into a dict or list"},
		{"fromJson", "fromJson $str", "parse JSON $str into a dict or list"},
		{"required", "required $str $val", "fail template with message $str if $val is not provided or is empty"},
	}

	AllFuncs = util.ConcatMultipleSlices([][]HelmDocumentation{HelmFuncs, SprigFuncs, BuiltinFuncs})

	CapabilitiesVals = []HelmDocumentation{
		{"TillerVersion", ".Capabilities.TillerVersion", "Tiller version"},
		{"APIVersions", "Capabilities.APIVersions", "A set of versions."},
		{"APIVersions.Has", "Capabilities.APIVersions.Has $version", "Indicates whether a version (e.g., batch/v1) or resource (e.g., apps/v1/Deployment) is available on the cluster."},
		{"KubeVersion", "Capabilities.KubeVersion", "The Kubernetes version."},
		{"KubeVersion.Version", "Capabilities.KubeVersion.Version", "The Kubernetes version in semver format."},
		{"KubeVersion.Major", "Capabilities.KubeVersion.Major", "The Kubernetes major version."},
		{"KubeVersion.Minor", "Capabilities.KubeVersion.Minor", "The Kubernetes minor version."},
		{"KubeVersion.GitCommit", "Capabilities.HelmVersion", "The object containing the Helm Version details, it is the same output of helm version."},
		{"KubeVersion.GitTreeState", "Capabilities.HelmVersion.Version", "The current Helm version in semver format."},
		{"HelmVersion.GitCommit", "Capabilities.HelmVersion.GitCommit", "The Helm git sha1."},
		{"HelmVersion.GitTreeState", "Capabilities.HelmVersion.GitTreeState", "The state of the Helm git tree."},
		{"HelmVersion.GoVersion", "Capabilities.HelmVersion.GoVersion", "The version of the Go compiler used."},
	}

	ChartVals = []HelmDocumentation{
		{"Name", ".Chart.Name", "Name of the chart"},
		{"Version", ".Chart.Version", "Version of the chart"},
		{"Description", ".Chart.Description", "Chart description"},
		{"Keywords", ".Chart.Keywords", "A list of keywords (as strings)"},
		{"Home", ".Chart.Home", "The chart homepage URL"},
		{"Sources", ".Chart.Sources", "A list of chart download URLs"},
		{"Maintainers", ".Chart.Maintainers", "list of maintainer objects"},
		{"Icon", ".Chart.Icon", "The URL to the chart's icon file"},
		{"AppVersion", ".Chart.AppVersion", "The version of the main app contained in this chart"},
		{"Deprecated", ".Chart.Deprecated", "If true, this chart is no longer maintained"},
		{"TillerVersion", ".Chart.TillerVersion", "The version (range) if Tiller that this chart can run on."},
		{"APIVersion", ".Chart.APIVersion", "The API Version of this chart"},
		{"Condition", ".Chart.Condition", "The condition to check to enable chart"},
		{"Tags", ".Chart.Tags", "The tags to check to enable chart"},
		{"Annotations", ".Chart.Annotations", "Additional annotations (key-value pairs)"},
		{"KubeVersion", ".Chart.KubeVersion", "Kubernetes version required"},
		{"Dependencies", ".Chart.Dependencies", "List of chart dependencies"},
		{"Type", ".Chart.Type", "Chart type (application or library)"},
	}

	TemplateVals = []HelmDocumentation{
		{"Name", ".Template.Name", "A namespaced file path to the current template (e.g. mychart/templates/mytemplate.yaml)"},
		{"BasePath", ".Template.BasePath", "The namespaced path to the templates directory of the current chart (e.g. mychart/templates)."},
	}

	ReleaseVals = []HelmDocumentation{
		{"Name", ".Release.Name", "Name of the release"},
		{"Time", ".Release.Time", "Time of the release"},
		{"Namespace", ".Release.Namespace", "Default namespace of the release"},
		{"Service", ".Release.Service", "The service that is rendering the present template. On Helm, this is always Helm"},
		{"IsUpgrade", ".Release.IsUpgrade", "True if this is an upgrade operation"},
		{"IsInstall", ".Release.IsInstall", "True if this is an install operation"},
		{"Revision", ".Release.Revision", "Release revision number (starts at 1)"},
	}

	FilesVals = []HelmDocumentation{
		{"Get", ".Files.Get $path", "Get file contents. Path is relative to chart."},
		{"GetBytes", ".Files.GetBytes $path", "Get file contents as a byte array. Path is relative to chart."},
		{"Glob", ".Files.Glob $glob", "Returns a list of files whose names match the given shell glob pattern."},
		{"Lines", ".Files.Lines $path", "Reads a file line-by-line. This is useful for iterating over each line in a file."},
		{"AsSecrets", ".Files.AsSecrets $path", "Returns the file bodies as Base 64 encoded strings."},
		{"AsConfig", ".Files.AsConfig $path", "Returns file bodies as a YAML map."},
	}

	BuiltInOjectVals = map[string][]HelmDocumentation{
		"Chart":        ChartVals,
		"Release":      ReleaseVals,
		"Files":        FilesVals,
		"Capabilities": CapabilitiesVals,
		"Template":     TemplateVals,
	}
)

Functions

This section is empty.

Types

type HelmDocumentation

type HelmDocumentation struct {
	Name   string
	Detail string
	Doc    string
}

func GetFunctionByName

func GetFunctionByName(name string) (HelmDocumentation, bool)

Jump to

Keyboard shortcuts

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