Skip to content

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Aug 8, 2025

What does it do ?

Reduce memory footprint for service kinds in istio sources. Similar solution to #5596, with difference that trying to work out a framework that could be used accross multiple kube object kinds

Follow-up:

  • remove this logic
    for _, ep := range endpoints {
    instead do target sorting here
    func NewEndpointWithTTL(dnsName, recordType string, ttl TTL, targets ...string) *Endpoint {
    . Most likely few more unit tests required
  • Review duplicated logic in istio
    func (sc *gatewaySource) targetsFromIngress(ctx context.Context, ingressStr string, gateway *networkingv1beta1.Gateway) (endpoint.Targets, error) {
    and istio_virtualservice
    func (sc *virtualServiceSource) targetsFromIngress(ctx context.Context, ingressStr string, gateway *v1beta1.Gateway) (endpoint.Targets, error) {
    . There are 2 issues
    1. Kube API call on each run sc.kubeClient.NetworkingV1().Ingresses(namespace).Get(ctx, name, metav1.GetOptions{})
    2. When istio and istio_virtualservice enabled, the same logic is executed twice, and then wrapper dedupsource removes duplicates. This is super inneficient, as same logic executed in both sources
    3. FQDN Templating, with kube transfomers, we could execute FQDN during the entity is added to the infromer cache. This has one major advantage, execute FQDN once on entity added vs execute FQDN every time the Endpoint method executes.

Motivation

Slicing PR #5708
Relates: #5595

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 8, 2025
@k8s-ci-robot k8s-ci-robot requested a review from mloiseleur August 8, 2025 09:50
@k8s-ci-robot k8s-ci-robot requested a review from szuecs August 8, 2025 09:50
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 8, 2025
@ivankatliarchuk
Copy link
Contributor Author

/retest

@ivankatliarchuk ivankatliarchuk force-pushed the chore-istio-transformers branch from 956b583 to 39f237c Compare August 8, 2025 10:10
@ivankatliarchuk ivankatliarchuk marked this pull request as draft August 8, 2025 10:15
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 8, 2025
@ivankatliarchuk ivankatliarchuk force-pushed the chore-istio-transformers branch from 39f237c to daa007e Compare August 8, 2025 10:31
@ivankatliarchuk ivankatliarchuk force-pushed the chore-istio-transformers branch from daa007e to 6a0f06c Compare August 8, 2025 11:15
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 14, 2025
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 14, 2025
@ivankatliarchuk ivankatliarchuk marked this pull request as ready for review August 14, 2025 10:39
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2025
@mloiseleur mloiseleur changed the title chore(source/istio): added transfomrers refactor(source/istio): add transformers Aug 16, 2025
Copy link
Collaborator

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2025
@ivankatliarchuk
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivankatliarchuk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2025
@k8s-ci-robot k8s-ci-robot merged commit d2d2b40 into kubernetes-sigs:master Aug 16, 2025
15 checks passed
troll-os pushed a commit to FiligranHQ/external-dns that referenced this pull request Aug 28, 2025
* chore(source/istio): added transfomrers

Signed-off-by: ivan katliarchuk <[email protected]>

* chore(source/istio): added transfomrers

Signed-off-by: ivan katliarchuk <[email protected]>

* chore(source/istio): added transfomrers

Signed-off-by: ivan katliarchuk <[email protected]>

* chore(source/istio): added transfomrers

Signed-off-by: ivan katliarchuk <[email protected]>

---------

Signed-off-by: ivan katliarchuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants