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

operator/certrotation: introduce an optional lock to CABundleConfigMap and RotatedSigningCASecret #1753

Conversation

p0lyn0mial
Copy link
Contributor

@p0lyn0mial p0lyn0mial commented Jul 3, 2024

To preserve the current behaviour and make the controllers thread safe
I've decided to introduce an optional mutex which can be used when the instance
is shared across multiple controllers.

This approach requires the fewest changes and resolves the race condition.

Perhaps the best approach would be to create separate controllers for CABundleConfigMap and RotatedSigningCASecret.

proof: https://gist.github.com/p0lyn0mial/176bece543907dbd9ac6b5306a170eda

a simpler version of #1752

Alternative for #1722

@p0lyn0mial
Copy link
Contributor Author

/assign @vrutkovs @tkashem

Copy link
Contributor

openshift-ci bot commented Jul 3, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: p0lyn0mial
Once this PR has been reviewed and has the lgtm label, please assign soltysh for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

openshift-ci bot commented Jul 3, 2024

@p0lyn0mial: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@p0lyn0mial
Copy link
Contributor Author

/hold

before merging we should run the test that fails due to the race condition, see: #1722 (comment)

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 3, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 11, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

@p0lyn0mial
Copy link
Contributor Author

/close

now, once we know where the issue is we can apply a different fix #1763

@p0lyn0mial p0lyn0mial closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants