Home > Blockchain >  How to get current date in Helm
How to get current date in Helm

Time:05-11

I need to get the current date in Helm with the following format YY-MM-DD. I'm trying {{ now | date }} but this returns an error because the number of arguments expected by date is two, not one.

CodePudding user response:

Try Format the date to YEAR-MONTH-DAY:

{{ now | date "20060102150405" }}

Source here:

or add the following annotation :

annotations:
   deploymentTime: {{ now | date "2006-01-02T15:04:05" }}
  • Related