fix: custom crd not printing streams logs#9136
fix: custom crd not printing streams logs#9136renzodavid9 merged 3 commits intoGoogleContainerTools:mainfrom
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #9136 +/- ##
==========================================
- Coverage 70.48% 63.71% -6.77%
==========================================
Files 515 630 +115
Lines 23150 32447 +9297
==========================================
+ Hits 16317 20674 +4357
- Misses 5776 10183 +4407
- Partials 1057 1590 +533 ☔ View full report in Codecov by Sentry. |
fca1c2b to
b4a1a0b
Compare
renzodavid9
left a comment
There was a problem hiding this comment.
Hey @beastpu! Thanks for opening this PR. I left a comment for one more place we need to update the resource lists.
Checking the change, I think I found a case where still we'll not be able to get the logs: when the CRD uses a field different than image to define the image to deploy. When we are going through the manifests to get the images, Skaffold is looking for the specific image field:
skaffold/pkg/skaffold/kubernetes/manifest/images.go
Lines 114 to 117 in 1f591ba
I think the proper way here would be to use the selectors defined in the resourceSelector from the skaffold.yaml.
With that said, I'll create another issue to track that case and tackle that in another PR; I think we can merge this PR once we have the last change from the comment I left. Thanks a lot for your help! 😄
Description
my company uses a custom CRD (openkruise https://openkruise.io/) to manage workloads.
During local development, we discovered that aggregated logs were not being printed. Aggregated logs are crucial for microservices architecture.
skaffold.yaml
sts.yaml
User facing changes (remove if N/A)
I found that the reason was the absence of corresponding GVK (GroupVersionKind) in
manifest.TransformAllowlistandmanifest.TransformDenylist.My solution is to pass ConsolidateTransformConfiguration into the NewResourceSelectorImages method because we can configure resourceSelector in the skaffold.yaml file.