Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative for .Release.Time in Helm v3

Since Helm v3 built-in object .Release.Time is removed.

What is the preferred way of injecting a release time into a template now?

like image 685
Aleksandr Erokhin Avatar asked Apr 10 '20 12:04

Aleksandr Erokhin


People also ask

How does Helm 3 Store releases?

The storage is changed in Helm 3 as follows: Releases are stored as Secrets by default. Storage is in the namespace of the release. Naming is changed to sh.

What is _helper TPL in Helm?

tpl? Helm allows for the use of Go templating in resource files for Kubernetes. A file named _helpers.tpl is usually used to define Go template helpers with this syntax: {{- define "yourFnName" -}} {{- printf "%s-%s" .Values.name .Values.version | trunc 63 -}} {{- end -}}

What is the release name in Helm?

ReleaseName is the name you assigned to this installation instance. RevisionNumber is the value from the Helm history command. Namespace is the name space in which the BRM Kubernetes objects reside.

What does {{- mean in Helm?

{{- (with the dash and space added) indicates that whitespace should be chomped left, while -}} means whitespace to the right should be consumed.


1 Answers

It looks like one of the sprig date functions is the way to go now.

For example:

metadata:
    annotations:
        timestamp: {{ now | quote }}
like image 125
Aleksandr Erokhin Avatar answered Oct 18 '22 05:10

Aleksandr Erokhin