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

Use informer for startupTranslator #1075

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Use informer for startupTranslator #1075

merged 3 commits into from
Jul 12, 2023

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Jul 11, 2023

This patch uses informer for startupTranslator instead of k8s client.

This is alternative of #1066

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 11, 2023
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 11, 2023
@nak3
Copy link
Contributor Author

nak3 commented Jul 11, 2023

@nak3
Copy link
Contributor Author

nak3 commented Jul 11, 2023

/test integration-tests

passed once.

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1075 (c762813) into main (7696db6) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1075   +/-   ##
=======================================
  Coverage   80.95%   80.95%           
=======================================
  Files          18       18           
  Lines        1355     1355           
=======================================
  Hits         1097     1097           
  Misses        205      205           
  Partials       53       53           

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 11, 2023
@nak3 nak3 changed the title [WIP] Use informer for startupTranslator Jul 11, 2023
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 11, 2023
@nak3 nak3 added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 11, 2023
Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

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

Other than that:

/lgtm

/hold for the one comment. Feel free to unhold if this is ok.

startupTranslator := generator.NewIngressTranslator(
func(ns, name string) (*corev1.Secret, error) {
return kubernetesClient.CoreV1().Secrets(ns).Get(ctx, name, metav1.GetOptions{})
return secretInformer.Lister().Secrets(ns).Get(name)
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure, we are now using the filtered secretInformer instead of the unfiltered kubeclient. It seems that Kourier can have just the secret filtered here: https://github.com/knative-sandbox/net-kourier/blob/main/pkg/reconciler/informerfiltering/util.go#L44. So this should be fine, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think no problem.

Secrets for internal-encryption has networking.internal.knative.dev/certificate-uid label in serving repo and Secrets for DomainMapping BYO should be added networking.internal.knative.dev/certificate-uid by users so we just need to take care of the filtered secrets when users enabled the filtering.

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 11, 2023
@knative-prow
Copy link

knative-prow bot commented Jul 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nak3, ReToCode

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

@nak3 nak3 removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2023
@knative-prow knative-prow bot merged commit 85c062d into knative-extensions:main Jul 12, 2023
52 checks passed
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants