hiddeco / cronjobber

Cronjobber is a cronjob controller for Kubernetes with support for time zones
Apache License 2.0
244 stars 38 forks source link

Add tzdata into final image #12

Closed bcdonadio closed 5 years ago

bcdonadio commented 5 years ago

Without either the zoneinfo.zip file or the zoneinfo package content (which should be better maintained than the Go's ZIP file) on the final image, the error listed below is logged, UTC is used and no warnings about this defaulting are issued per the logic on this function.

{"level":"debug","ts":"2019-05-07T03:07:10.545Z","logger":"event-broadcaster","caller":"cronjobber/controller.go:81","msg":"Event(v1.ObjectReference{Kind:\"TZCronJob\", Namespace:\"mynamespace\", Name:\"myapp\", UID:\"1e0b63b6-701d-11e9-a10e-ac1f6b6f8b74\", APIVersion:\"cronjobber.hidde.co/v1alpha1\", ResourceVersion:\"38138966\", FieldPath:\"\"}): type: 'Warning' reason: 'InvalidTimeZone' Attempted to run a job with an invalid time zone: America/New_York. open /usr/local/go/lib/time/zoneinfo.zip: no such file or directory"}

This piece of Go's documentation explains the loading order of preference for tzdata.

The present commit should include the tzdata content in the uncompressed (and hopefully most updated) format and fix this error that is only detected on the final image, not being covered by the unit tests.

bcdonadio commented 5 years ago

Forget about it. I did not see the latest update to the deployment resource nor PR #10.