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

Containersource use OIDC identity of corresponding SinkBinding #7890

Conversation

creydr
Copy link
Member

@creydr creydr commented May 3, 2024

Currently the Containersource creates a dedicated OIDC identity, while its corresponding SinkBinding does as well. Later the SinkBindings identity is used to create the token secret, which gets mounted into the SinkBinding and thus the Containersources deployment. This leads to having a token for another identity mounted in the containersource, as announced in the containersources .status.auth.serviceAccountName.

This PR addresses it and uses the SinkBindings .status.auth in the Containersources .status.auth

Hint for reviewers:

  • 8ce890f reverts the change which was done to create and expose the OIDC service account for the containersource
  • c5ed064 is the actual change
  • 8c3affe adds an e2e test

Release Note

ContainerSource: use same OIDC identity as corresponding SinkBinding

@creydr creydr requested a review from pierDipi May 3, 2024 09:54
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/test-and-release Test infrastructure, tests or release labels May 3, 2024
@knative-prow knative-prow bot requested review from matzew and mgencur May 3, 2024 09:54
Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.18%. Comparing base (7e1c082) to head (c154504).
Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7890      +/-   ##
==========================================
- Coverage   69.22%   69.18%   -0.04%     
==========================================
  Files         339      341       +2     
  Lines       19494    15816    -3678     
==========================================
- Hits        13494    10943    -2551     
+ Misses       5337     4200    -1137     
- Partials      663      673      +10     

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

@creydr
Copy link
Member Author

creydr commented May 3, 2024

    wait.go:263: Service test-fwowbtfo/dls-fjdfpvwm, ip: 10.14.177.201
    wait.go:282: Endpoints for service test-fwowbtfo/dls-fjdfpvwm, got 1, want >= 1
    wait.go:304: Failed while waiting for service ready: an error on the server ("Internal Server Error: \"/apis/batch/v1/namespaces/test-fwowbtfo/jobs/dls-fjdfpvwm-readiness-check-cnjbkgpz\": the server is currently unable to handle the request") has prevented the request from succeeding (get jobs.batch dls-fjdfpvwm-readiness-check-cnjbkgpz)

Seems like an infra issue
/retest-required

@creydr creydr force-pushed the fix-containersource-use-same-auth-sa-as-sinkbinding branch 2 times, most recently from 560ca00 to 37df46e Compare May 3, 2024 12:07
@creydr creydr force-pushed the fix-containersource-use-same-auth-sa-as-sinkbinding branch from 37df46e to c154504 Compare May 3, 2024 12:14
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

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

knative-prow bot commented May 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, 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

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. area/test-and-release Test infrastructure, tests or release lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants