Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support of CreateLogGroup for awslogs #29504
- What I did
This fix tries to address the issue raised in #29334 where it was not possible to create log group for awslogs (CloudWatch) on-demand. Log group has to be created explicitly before container is running.
This behavior is inconsistent with AWS logs agent where log groups are always created as needed.
- How I did it
This fix addresses the issue by add
- How to verify it
Related unit test has been updated. And tests have also been done manually in AWS.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #29334.
Signed-off-by: Yong Tang email@example.com
referenced this pull request
Dec 17, 2016
I think the code mostly looks reasonable, but there are a few questions we should answer:
- Is it better to always call
awslogs-create-group=trueand take a (very small) performance hit if the group already exists, or would it be better to attempt calling
CreateLogStreamfirst and only call
CreateLogGroupif there is an error because the group doesn't exist? I think I would prefer the second option, since it won't require that you have the
logs:CreateLogGrouppermission in your IAM policy as long as the group already exists. On the other hand, if you're specifying
awslogs-create-group=trueand you don't have permission, that's a fairly sensible error to get.
- The log stream allows templates. Should the log group also allow templates? I don't have a strong opinion here.
docs in this repository LGTM
@yongtang can you open a PR in the docs repository (the