JovianX / helm-release-plugin

Helm3 plugin that pulls(re-creates) helm Charts from deployed releases, and updates values of deployed releases without the chart.
Apache License 2.0
97 stars 11 forks source link

I am getting the error 'date: invalid date 'tomorrow'' when setting the TTL for 'tomorrow' #26

Closed vilaca closed 1 year ago

vilaca commented 1 year ago

I am getting the error 'date: invalid date 'tomorrow'' when setting the TTL for 'tomorrow'

helm release ttl "$RELEASE" --set='tomorrow' --namespace "$NAMESPACE"

vilaca commented 1 year ago

Maybe TTL is not working at all?

I tried with '1 days' and got:

date: invalid date '1 days' date: invalid date '1 days' Release end of life seted in past.

vadim-zabolotniy commented 1 year ago

Hi @vilaca!

We are sorry that you faced such experience. But I wasn't able to reproduce this bug. Could you please share more details? What OS do you use? Maybe some other details that you considering important to mention.

I tried to set TTL with explicit parameters like: helm release ttl redis --set='tomorrow' --namespace='playground' and dynamic as in you example:

RELEASE=redis
NAMESPACE=playground
helm release ttl "$RELEASE" --set='tomorrow' --namespace "$NAMESPACE"

both case works fine as expected.

genisd commented 1 year ago

Please check which date binary you are using. It must be the coreutils implementation.

$ date --version
date (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
vilaca commented 1 year ago

Hi, I am no longer using this plugin.

vadim-zabolotniy commented 1 year ago

Please check which date binary you are using. It must be the coreutils implementation.

$ date --version
date (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

$ date --version date (GNU coreutils) 9.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

genisd commented 1 year ago

that's the one needed and working (for me). the coreutils variant

genisd commented 1 year ago

Since OP/issue creator is no longer using the plugin, i suggest we close this. But it might be worth adding a mention in the readme regarding the need of the coreutils date binary, the alpine image i ran this within doesn't come default with the right binary either :smile:

rtpro commented 1 year ago

Thanks, @genisd . I added a comment and closed the issue.