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

Watch only our own OIDC-related secrets #8070

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Jul 4, 2024

This reduces memory consumption on large clusters by watching only our own OIDC-related secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 4, 2024
@knative-prow knative-prow bot requested review from aslom and creydr July 4, 2024 16:14
@pierDipi pierDipi changed the title [WIP] Filter OIDC secrets [WIP] Watch only our own OIDC-related secrets Jul 4, 2024
@knative-prow-robot
Copy link
Contributor

@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.33 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.33

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pierDipi
Copy link
Member Author

pierDipi commented Jul 4, 2024

/cherry-pick release-1.14

@knative-prow-robot
Copy link
Contributor

@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pierDipi
Copy link
Member Author

pierDipi commented Jul 4, 2024

/cherry-pick release-1.13

@knative-prow-robot
Copy link
Contributor

@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.13 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.13

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pierDipi pierDipi changed the title [WIP] Watch only our own OIDC-related secrets Watch only our own OIDC-related secrets Jul 4, 2024
@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 4, 2024
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.

Project coverage is 67.89%. Comparing base (5a96619) to head (352cd75).

Files Patch % Lines
pkg/auth/serviceaccount.go 11.11% 8 Missing ⚠️
pkg/reconciler/sinkbinding/sinkbinding.go 0.00% 3 Missing ⚠️
pkg/reconciler/sinkbinding/controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8070      +/-   ##
==========================================
- Coverage   67.92%   67.89%   -0.04%     
==========================================
  Files         367      367              
  Lines       17323    17332       +9     
==========================================
  Hits        11767    11767              
- Misses       4823     4832       +9     
  Partials      733      733              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

/lgtm

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

knative-prow bot commented Jul 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, pierDipi

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

@Cali0707
Copy link
Member

Cali0707 commented Jul 4, 2024

/test upgrade-tests

@knative-prow knative-prow bot merged commit 8e039dd into knative:main Jul 4, 2024
35 of 36 checks passed
@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #8071

In response to this:

/cherry-pick release-1.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow-robot
Copy link
Contributor

@pierDipi: #8070 failed to apply on top of branch "release-1.13":

Applying: Filter OIDC secrets
Using index info to reconstruct a base tree...
M	pkg/auth/serviceaccount.go
M	pkg/reconciler/sinkbinding/controller.go
M	vendor/modules.txt
Falling back to patching base and 3-way merge...
Auto-merging vendor/modules.txt
Auto-merging pkg/reconciler/sinkbinding/controller.go
CONFLICT (content): Merge conflict in pkg/reconciler/sinkbinding/controller.go
Auto-merging pkg/auth/serviceaccount.go
CONFLICT (content): Merge conflict in pkg/auth/serviceaccount.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Filter OIDC secrets
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.13

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Cali0707 pushed a commit to Cali0707/eventing that referenced this pull request Jul 4, 2024
Filter OIDC secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Cali0707 pushed a commit to Cali0707/eventing that referenced this pull request Jul 4, 2024
Filter OIDC secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Cali0707 pushed a commit to Cali0707/eventing that referenced this pull request Jul 4, 2024
Filter OIDC secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
openshift-merge-bot bot pushed a commit to openshift-knative/eventing that referenced this pull request Jul 5, 2024
Filter OIDC secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
openshift-merge-bot bot pushed a commit to openshift-knative/eventing that referenced this pull request Jul 5, 2024
Filter OIDC secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
knative-prow bot pushed a commit that referenced this pull request Jul 9, 2024
* Watch only our own OIDC-related secrets (#8070)

Filter OIDC secrets

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* ./hack/update-deps.sh

Signed-off-by: Calum Murray <cmurray@redhat.com>

* fix: serviceaccountInformer -> oidcServiceaccountInformer

Signed-off-by: Calum Murray <cmurray@redhat.com>

* fix: add oidc label selector to main contexts (partial cherry pick of #7527)

Signed-off-by: Calum Murray <cmurray@redhat.com>

* fix: don't use filtered sa informer when sa is not labelled

Signed-off-by: Calum Murray <cmurray@redhat.com>

---------

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
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.

3 participants