Add example for ownershipLabelRules
scothis opened this issue · comments
I couldn't find an example of how ownershipsLabelRules
are expected to work.
I was trying to show logs from a Pod managed by a Knative Service, despite adding the log annotations to the resulting Pod and using --logs
with my deploy command, nothing was showing up...
By reading the source, this seems to solve my issue, but I don't know if I might be "holding it wrong."
ownershipLabelRules:
- path: [spec, template, metadata, labels]
resourceMatchers:
- apiVersionKindMatcher: {apiVersion: serving.knative.dev/v1, kind: Service}
Besides adding this to the website docs, it might be worth adding to the knative examples as well.
Thanks @scothis for bringing it up. We will revisit the docs and add the example so that user has reference while using ownershipLabelRules
If I may, I would like to extend this request with an example for how to use ownershipLabelRules
so that one can see logs for Deployments
that result from a PackageInstall
.
edit: I realise that the relationship between a pkgi
and its resources is not based on ownership but managed by kapp. So ownershipLabelRules
may not help. Either way it would be cool if the logs for pkgi
-"owned" components could be shown.
@renuy I didn't see that config sample. I probably used the table of contents on the page to skip the overview section and go directly to the ownershipLabelRules
section.