Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for ownershipLabelRules #582

Open
scothis opened this issue Aug 18, 2022 · 4 comments
Open

Add example for ownershipLabelRules #582

scothis opened this issue Aug 18, 2022 · 4 comments
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@scothis
Copy link
Contributor

scothis commented Aug 18, 2022

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.

@scothis scothis added the carvel triage This issue has not yet been reviewed for validity label Aug 18, 2022
@rohitagg2020
Copy link
Contributor

Thanks @scothis for bringing it up. We will revisit the docs and add the example so that user has reference while using ownershipLabelRules

@mamachanko
Copy link
Contributor

mamachanko commented Aug 19, 2022

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
Copy link
Contributor

renuy commented Aug 22, 2022

@scothis , There is a format in the same page you linked above, was it not helpful or not easily obvious in the documentation?

We could look at adding this as an example in our examples folder as you have suggested.

@renuy renuy added carvel accepted This issue should be considered for future work and that the triage process has been completed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed carvel triage This issue has not yet been reviewed for validity labels Aug 22, 2022
@scothis
Copy link
Contributor Author

scothis commented Aug 22, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
Status: To Triage
Development

No branches or pull requests

4 participants