Helm template quote causing invalid cron format
junaid-ali opened this issue · comments
Junaid Ali commented
The quoting around cron value defined in helm _helpers.tpl
causing invalid cron format error.
$ k logs cockroachdb-rotate-self-signer-client-xxxxxxxxxxxxxx
time="2021-10-01T00:00:05Z" level=info msg="CA secret [cockroachdb-ca-secret] is found in ready state, skipping CA generation"
time="2021-10-01T00:00:05Z" level=info msg="Node Certificate: Failed to verify expiry date due to invalid cron, rotating certificate"
time="2021-10-01T00:00:05Z" level=info msg="Generating node certificate"
time="2021-10-01T00:00:06Z" level=info msg="Generated and saved node key and certificate in secret [cockroachdb-node-secret]"
time="2021-10-01T00:00:06Z" level=info msg="Performing rolling update after certificate rotation"
time="2021-10-01T00:00:11Z" level=info msg="Pod cockroachdb-0 in ready state now"
time="2021-10-01T00:00:11Z" level=info msg="waiting for 30s duration for pod readiness"
time="2021-10-01T00:00:46Z" level=info msg="Pod cockroachdb-1 in ready state now"
time="2021-10-01T00:00:46Z" level=info msg="waiting for 30s duration for pod readiness"
time="2021-10-01T00:01:38Z" level=info msg="Pod cockroachdb-2 in ready state now"
time="2021-10-01T00:01:38Z" level=info msg="waiting for 30s duration for pod readiness"
time="2021-10-01T00:02:08Z" level=info msg="Waiting until all pods are in the ready state"
time="2021-10-01T00:02:08Z" level=info msg="All replicas are ready"
time="2021-10-01T00:02:08Z" level=info msg="Client Certificate: Failed to verify expiry date due to invalid cron, rotating certificate"
time="2021-10-01T00:02:08Z" level=info msg="Generating client certificate"
time="2021-10-01T00:02:09Z" level=info msg="Generated and saved client key and certificate in secret [cockroachdb-client-secret]"
I added a debug msg to check this, and as you can see the quotes are rendered as it is:
time="2021-10-11T23:24:48Z" level=info msg="CA secret [crdb-cockroachdb-ca-secret] is found in ready state, skipping CA generation"
---> cron string is "*/2 * * * *" ########### cronStr value has double quotes in it.
time="2021-10-11T23:24:48Z" level=info msg="Node Certificate: Failed to verify expiry date due to invalid cron, rotating certificate"
time="2021-10-11T23:24:48Z" level=info msg="Generating node certificate"