carvel-dev / carvel-dev/kapp

Add example for ownershipLabelRules

Open
#582 4 comments 1 reaction 0 assignees View on GitHub
carvel accepted priority/awaiting-more-evidence
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

I couldn't find an example of how [`ownershipsLabelRules`](https://carvel.dev/kapp/docs/v0.51.0/config/#ownershiplabelrules) 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.