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

support auto generation of Sequence identity service account [OIDC] #7361

Merged
merged 7 commits into from
Nov 16, 2023

Conversation

rahulii
Copy link
Contributor

@rahulii rahulii commented Oct 12, 2023

Fixes #7224

Proposed Changes

  • 🎁 Expose the name of the OIDC service account in the Sequence .status.auth.serviceAccountName
  • 🎁 Create the OIDC service account of the Sequence

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

Expose the Sequence OIDC service account name in the Sequence .status.auth.serviceAccountName after created Service Account.

@knative-prow knative-prow bot requested a review from aliok October 12, 2023 19:48
@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 12, 2023
@knative-prow knative-prow bot requested a review from creydr October 12, 2023 19:48
@knative-prow knative-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 12, 2023
@knative-prow
Copy link

knative-prow bot commented Oct 12, 2023

Hi @rahulii. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@rahulii
Copy link
Contributor Author

rahulii commented Oct 12, 2023

Unit Tests are WIP!

@creydr
Copy link
Member

creydr commented Oct 13, 2023

@rahulii thanks for your contribution so far. Let me know, when this PR is ready for review

@creydr
Copy link
Member

creydr commented Oct 19, 2023

Hi @rahulii,
any updates on this?

@Leo6Leo
Copy link
Member

Leo6Leo commented Oct 30, 2023

Hey @rahulii Are you being blocked by anything? Feel free to share any issues that you are encountering

@creydr
Copy link
Member

creydr commented Nov 10, 2023

As I couldn't commit to this branch, I added #7434 which adds the tests as well.

@creydr
Copy link
Member

creydr commented Nov 14, 2023

@rahulii I also created rahulii#1 which adds the unit tests to your branch. Could you PTAL?

Add unit tests for sequence OIDC service account creation
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 16, 2023
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (f321ba5) 76.86% compared to head (077f701) 76.73%.
Report is 37 commits behind head on main.

Files Patch % Lines
pkg/apis/flows/v1/sequence_lifecycle.go 25.00% 6 Missing ⚠️
pkg/reconciler/sequence/controller.go 82.75% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7361      +/-   ##
==========================================
- Coverage   76.86%   76.73%   -0.13%     
==========================================
  Files         252      253       +1     
  Lines       13727    13963     +236     
==========================================
+ Hits        10551    10715     +164     
- Misses       2650     2712      +62     
- Partials      526      536      +10     

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

@creydr
Copy link
Member

creydr commented Nov 16, 2023

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 16, 2023
@creydr
Copy link
Member

creydr commented Nov 16, 2023

/test upgrade-tests

Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

Thanks a lot @rahulii for this PR. I have only one comment, which would be great if we could solve this before merging.

pkg/reconciler/sequence/controller.go Outdated Show resolved Hide resolved
Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

$ kubectl get sequence sequence -o yaml              
apiVersion: flows.knative.dev/v1
kind: Sequence
metadata:
  name: sequence
  namespace: default
  resourceVersion: "2910"
  uid: 93f23f3d-08ab-41bd-a524-354ae23d7110
spec:
  channelTemplate:
    apiVersion: messaging.knative.dev/v1
    kind: InMemoryChannel
  reply:
    ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: event-display
      namespace: default
  steps:
  - ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: first
      namespace: default
  - ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: second
      namespace: default
status:
  auth:
    serviceAccountName: oidc-flows.knative.dev-sequence-sequence
  ...

✔️

Thanks a lot @rahulii for your patience and finishing the last mile 👍

/lgtm

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

knative-prow bot commented Nov 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, rahulii

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 16, 2023
@knative-prow knative-prow bot merged commit e5f2814 into knative:main Nov 16, 2023
40 of 41 checks passed
creydr added a commit to creydr/knative-eventing that referenced this pull request May 7, 2024
creydr added a commit to creydr/knative-eventing that referenced this pull request May 8, 2024
knative-prow bot pushed a commit that referenced this pull request May 14, 2024
…#7902)

* Update CRDs to include AuthStatus serviceAccountNames

* Revert "support auto generation of Sequence identity service account [OIDC] (#7361)"

This reverts commit e5f2814.

* Update Sequence to expose OIDC identities of underlying Subscriptions

* Revert "Add serviceaccount in parallel (#7373)"

This reverts commit dc96522.

* Update Parallel to expose OIDC identities of underlying Subscriptions

* Add e2e test for Parallel

* Add e2e test for Sequence

* Add unit tests
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support auto generation of Sequence identity service account and expose in AuthStatus
3 participants