You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default controller for CronJob in Kubernetes v1.21 has been changed to CronJobControllerV2.
At that time, the minimum execution unit of CronJob was changed to 1 minute.
Hey @yu-shiba. Thanks for letting us know the issues. After deep dive into the CronJobControllerV2, the getJobName has indeed used Unix Time in minutes instead of only Unix Time. Therefore, changing UnixTime from 10 characters to 9 characters currently and as a result, making the assumption of 10 characters wrong though. What I am asking myself was is there really a need to check 10 runes or only Unix Time is fine? Will ask my teammates about this before making any decision and fixed this ASAP
Hi @khanhntd and team. Thank you for providing us with a useful product.
I noticed this issue because the CronJob pod name shown in "CloudWatch Container Insights" was wrong.
I hope my findings will help you to resolve the issue as soon as possible.
What I am asking myself was is there really a need to check 10 runes or only Unix Time is fine?
I thought the same thing about this. And I couldn't make this decision, so I just let you know the results of the survey instead of PR.
The default controller for CronJob in Kubernetes v1.21 has been changed to CronJobControllerV2.
At that time, the minimum execution unit of CronJob was changed to 1 minute.
Therefore, the generation of Cron Job name is changed from 11 characters of
"-" + UnixTime
. (Probably from 9 to 10 characters).https://github.com/kubernetes/kubernetes/blob/v1.20.1/pkg/controller/cronjob/utils.go#L245
But CloudWatch Agent is not able to capture the correct PodName because the code assumes 11 characters (10 characters without "-" in the code).
https://github.com/aws/amazon-cloudwatch-agent/blob/master/plugins/processors/k8sdecorator/stores/utils.go#L71
So, even if define a CronJob like "iam-waiting-for-EKS-1-22", the PodName will be "iam".
This issue can be confirmed by running CloudWatch Agent with EKS 1.21 in the standard state (not disabled by feature-gate).
The text was updated successfully, but these errors were encountered: