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

catalog: improve the bound workload identity encoding on services #20458

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

rboyer
Copy link
Member

@rboyer rboyer commented Feb 2, 2024

Description

The endpoints controller currently encodes the list of unique workload identities referenced by all workload matched by a Service into a special data-bearing status condition on that Service. This allows a downstream controller to avoid an expensive watch on the ServiceEndpoints type just to get this data.

The current encoding does not lend itself well to machine parsing, which is what the field is meant for, so this PR simplifies the encoding from:

"blah blah: " + strings.Join(ids, ",") + "."

to

strings.Join(ids, ",")

It also provides an exported utility function to easily extract this data.

PR Checklist

  • updated test coverage
  • [ ] external facing docs updated
  • appropriate backport labels added
  • not a security concern

@rboyer rboyer added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test backport/1.18 labels Feb 2, 2024
@rboyer rboyer self-assigned this Feb 2, 2024
@rboyer rboyer force-pushed the rboyer/change-service-wi-cond-formatting branch from 4fb3e5e to c0021f6 Compare February 2, 2024 21:08
@rboyer rboyer merged commit deca6a4 into main Feb 2, 2024
90 checks passed
@rboyer rboyer deleted the rboyer/change-service-wi-cond-formatting branch February 2, 2024 22:28
rboyer added a commit that referenced this pull request Feb 2, 2024
…0458)

The endpoints controller currently encodes the list of unique workload identities 
referenced by all workload matched by a Service into a special data-bearing 
status condition on that Service. This allows a downstream controller to avoid an 
expensive watch on the ServiceEndpoints type just to get this data.

The current encoding does not lend itself well to machine parsing, which is what 
the field is meant for, so this PR simplifies the encoding from:

    "blah blah: " + strings.Join(ids, ",") + "."

to

    strings.Join(ids, ",")

It also provides an exported utility function to easily extract this data.
rboyer added a commit that referenced this pull request Feb 2, 2024
…services into release/1.18.x (#20467)

catalog: improve the bound workload identity encoding on services (#20458)

The endpoints controller currently encodes the list of unique workload identities 
referenced by all workload matched by a Service into a special data-bearing 
status condition on that Service. This allows a downstream controller to avoid an 
expensive watch on the ServiceEndpoints type just to get this data.

The current encoding does not lend itself well to machine parsing, which is what 
the field is meant for, so this PR simplifies the encoding from:

    "blah blah: " + strings.Join(ids, ",") + "."

to

    strings.Join(ids, ",")

It also provides an exported utility function to easily extract this data.

Co-authored-by: R.B. Boyer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants