简体   繁体   English

Skaffold dev stream 由 helm hooks 创建的 pod 日志

[英]Skaffold dev stream logs of pods created by helm hooks

I would like to see the output from my pre-install/post-install helm hooks when using skaffold dev , but this does not seem to work.我想在使用skaffold dev时从我的安装前/安装后 helm hooks 中查看 output ,但这似乎不起作用。

Which filters does skaffold use to get all the pods for log tailing? skaffold 使用哪些过滤器来获取日志拖尾的所有 pod? Is there a way to force skaffold to pick up the hooks by applying some labels (eg skaffold.dev/run-id: static )?有没有办法通过应用一些标签来强制 skaffold 拿起钩子(例如skaffold.dev/run-id: static )?

Context语境

Doing dev with local docker, the image building is pretty fast, so for some use cases there is no need to use file sync and special dev-mode container images with file watching inside.使用本地 docker 进行开发,映像构建非常快,因此对于某些用例,无需使用文件同步和特殊的开发模式容器映像,其中包含文件监视。

There is this feature request: https://github.com/GoogleContainerTools/skaffold/issues/1441 , but this is for adding hooks to skaffold itself.有这个功能请求: https://github.com/GoogleContainerTools/skaffold/issues/1441 ,但这是为了向 skaffold 本身添加钩子。

The pods created by helm hooks are not removed ( https://github.com/GoogleContainerTools/skaffold/issues/2876 ), but this is expected behavior for helm delete . helm hooks 创建的 pod 不会被删除( https://github.com/GoogleContainerTools/skaffold/issues/2876 ),但这是helm delete的预期行为。

Thanks @acristu for the question.感谢@acristu 的提问。 Skaffold dev here. Skaffold 开发人员在这里。 Currently, skaffold is unaware of pods deployed in the pre and post helm hooks.目前,skaffold 不知道部署在 pre 和 post helm hook 中的 pod。 The reason, we don't parse the manifests in these hooks and hence can't transform those to add the required label skaffold.dev/run-id原因是,我们不解析这些钩子中的清单,因此无法转换它们以添加所需的 label skaffold.dev/run-id

Currently there is no way to force skaffold to pick up the logs from these pods/containers目前没有办法强制 skaffold 从这些 pod/容器中提取日志

That said we had a pending feature request to extend the current log configuration to include resourceType or resourceName like portForward section也就是说,我们有一个待处理的功能请求来扩展当前的日志配置以包含resourceTyperesourceName ,如portForward部分

portForward:    #   describes user defined resources to port-forward.
- resourceType: #   Kubernetes type that should be port forwarded.           
  resourceName:

Supporting this in skaffold would be great idea.在 skaffold 中支持这一点将是个好主意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM