11

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

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

Aleksandr Erokhin
  • 1,904
  • 3
  • 17
  • 32

1 Answers1

9

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

For example:

metadata:
    annotations:
        timestamp: {{ now | quote }}
Aleksandr Erokhin
  • 1,904
  • 3
  • 17
  • 32
  • 2
    At least from the implementation standpoint, using now always returns a new value while the .Release.time might not (from a quick code read, it looks like its getting initalizied once). Depending on what you do with 'now' it might not be the same as .Release.time – sigi Aug 17 '21 at 13:39