Helm Templates: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
{{External|[https://helm.sh/docs/chart_template_guide/#built-in-objects Built-in Objects]}}
{{External|[https://helm.sh/docs/chart_template_guide/#built-in-objects Built-in Objects]}}


==<tt>Chart</tt>==
==Chart==
Exposes all contents of [[Helm Chart Chart.yaml|Chart.yaml]]. An existing field is available as (note leading dot) <tt>.Chart.<''UpperCasedFirstLetterFieldName''></tt>.  
Exposes all contents of [[Helm Chart Chart.yaml|Chart.yaml]]. An existing field is available as (note leading dot) <tt>.Chart.<''UpperCasedFirstLetterFieldName''></tt>.  


Line 14: Line 14:
  &#123;{ .Chart.Version }}
  &#123;{ .Chart.Version }}


==<tt>Values</tt>==
==Values==
==<tt>Release</tt>==
==Release==
 
===Release.Name===
===<tt>Release.Name</tt>===
Exposes the [[Helm_Concepts#Release_Name|release name]]:
 
  &#123;{ .Release.Name}}
  {{ .Release.Name}}
===Release.Revision===
 
Exposes the [[Helm_Concepts#Release_Revision|release revision]]:
===<tt>Release.Time</tt>===
  &#123;{ .Release.Revision}}
 
===Release.Time===
  {{ .Release.Time}}
Exposes the time of the release:
 
&#123;{ .Release.Time}}
 
===Release.Namespace===
 
Exposes the namespace to be released info, if the manifest does not override:
Release.Name: The release name
&#123;{ .Release.Namespace}}
Release.Time: The time of the release
===Release.IsUpgrade===
Release.Namespace: The namespace to be released into (if the manifest doesn’t override)
This is set to true if the current operation is an upgrade or rollback.
Release.Service: The name of the releasing service (always Tiller).
&#123;{ .Release.IsUpgrade}}
Release.Revision: The revision number of this release. It begins at 1 and is incremented for each helm upgrade.
===Release.IsInstall===
Release.IsUpgrade: This is set to true if the current operation is an upgrade or rollback.
This is set to true if the current operation is an install.
Release.IsInstall: This is set to true if the current operation is an install.
&#123;{ .Release.IsInstall}}
 
===Release.Service===
==<tt>Files</tt>==
Exposes the releasing service - always Tiller
==<tt>Capabilities</tt>==
==Files==
==<tt>Template</tt>==
==Capabilities==
==Template==


=TODO=
=TODO=

Revision as of 00:55, 29 August 2019

Internal

Built-in Objects

Built-in Objects

Chart

Exposes all contents of Chart.yaml. An existing field is available as (note leading dot) .Chart.<UpperCasedFirstLetterFieldName>.

Example:

{{ .Chart.Name }}
{{ .Chart.Version }}

Values

Release

Release.Name

Exposes the release name:

{{ .Release.Name}}

Release.Revision

Exposes the release revision:

{{ .Release.Revision}}

Release.Time

Exposes the time of the release:

{{ .Release.Time}}

Release.Namespace

Exposes the namespace to be released info, if the manifest does not override:

{{ .Release.Namespace}}

Release.IsUpgrade

This is set to true if the current operation is an upgrade or rollback.

{{ .Release.IsUpgrade}}

Release.IsInstall

This is set to true if the current operation is an install.

{{ .Release.IsInstall}}

Release.Service

Exposes the releasing service - always Tiller

Files

Capabilities

Template

TODO

Template Comments

# This is a comment
{{- /*
This is another comment
*/ -}}

TODO