Skip to content

Add targetRef as a concept#2340

Open
justindavies wants to merge 2 commits intokumahq:masterfrom
justindavies:patch-1
Open

Add targetRef as a concept#2340
justindavies wants to merge 2 commits intokumahq:masterfrom
justindavies:patch-1

Conversation

@justindavies
Copy link
Contributor

Adding targetRef as a concept

Did you sign your commit? Instructions

Have you read Contributing guidelines?

Add targetRef as a concept

Signed-off-by: Justin Davies <justin.davies@konghq.com>
@justindavies justindavies requested a review from a team as a code owner June 18, 2025 23:23
@justindavies justindavies requested review from johncowen and lobkovilya and removed request for a team June 18, 2025 23:23
@netlify
Copy link

netlify bot commented Jun 18, 2025

Deploy Preview for kuma ready!

Name Link
🔨 Latest commit 0494ad9
🔍 Latest deploy log https://app.netlify.com/projects/kuma/deploys/68b55cf22bb0c0000805296d
😎 Deploy Preview https://deploy-preview-2340--kuma.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 51 (🔴 down 38 from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

A **Target** (referenced by `targetRef`) is a way to specify exactly which destination resource or workload a policy or routing rule should apply to. Rather than matching all services or inbounds by name or tag, `targetRef` allows fine-grained targeting of:

- A specific **workload instance** (e.g., a single Dataplane proxy)
- A **subset** of inbounds/endpoints for a service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, you are taking here about destination service. Using name inbound in this case is not the best option as we define Inbound as a part of a dataplane proxy. In this case, I think it would be best to call it service port.


#### Why use `targetRef`?

- **Precision**: Apply policies only to a single pod, VM, or data-plane proxy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between pod/vm and data plane here? I think that you cannot have data plane without vm or pod so maybe we can remove it?

Policies always have a clear specific area of impact and goal.
To learn more about [policies checkout the in depth introduction](/docs/{{ page.release }}/policies/introduction).

### Targets (targetRef)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planing on using targets as a concept in docs? Maybe we can just call this section targetRef as it is commonly used in docs and can be easily referenced


### Targets (targetRef)

A **Target** (referenced by `targetRef`) is a way to specify exactly which destination resource or workload a policy or routing rule should apply to. Rather than matching all services or inbounds by name or tag, `targetRef` allows fine-grained targeting of:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A **Target** (referenced by `targetRef`) is a way to specify exactly which destination resource or workload a policy or routing rule should apply to. Rather than matching all services or inbounds by name or tag, `targetRef` allows fine-grained targeting of:
A **Target** (referenced by `targetRef`) is a way to specify exactly which resource a policy or routing rule should apply to. Rather than matching all services or inbounds by name or tag, `targetRef` allows fine-grained targeting of:

Workloads are also resources in Kuma. We can also link it to previous section with Resource concept.


### Targets (targetRef)

A **Target** (referenced by `targetRef`) is a way to specify exactly which destination resource or workload a policy or routing rule should apply to. Rather than matching all services or inbounds by name or tag, `targetRef` allows fine-grained targeting of:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't matching inbounds by name or tag, already fine-grained targeting allowed by targetRef sectionName filed?

@slonka
Copy link
Contributor

slonka commented Aug 27, 2025

@justindavies do you have time to work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants