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

feat: Add ServiceAccount CRD #1126

Merged
merged 26 commits into from
Jul 2, 2024
Merged

Conversation

maciaszczykm
Copy link
Member

Test Plan

Checklist

  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a meaningful title and summary to convey the impact of this PR to a user.

Copy link

linear bot commented Jul 1, 2024

@maciaszczykm maciaszczykm added the enhancement New feature or request label Jul 1, 2024
@maciaszczykm maciaszczykm marked this pull request as ready for review July 2, 2024 10:23
@maciaszczykm maciaszczykm requested review from michaeljguarino and a team July 2, 2024 10:23
sa.Status.ID = &apiServiceAccount.ID
sa.Status.SHA = &sha

err = r.syncToken(ctx, sa)
Copy link
Member

Choose a reason for hiding this comment

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

will this logic create a new access token on each reconcile?

Copy link
Member Author

@maciaszczykm maciaszczykm Jul 2, 2024

Choose a reason for hiding this comment

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

No, it checks if ServiceAccount has ReadyTokenCondition set to False and if that is the case then it exits early from the syncToken method. It will only execute if something changed in the CRD (see lines 96-98).

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok

@maciaszczykm maciaszczykm merged commit 80e2d09 into master Jul 2, 2024
13 checks passed
@maciaszczykm maciaszczykm deleted the marcin/prod-2346-serviceaccount-crd branch July 2, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants