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

Adjust to Cloud API #16

Merged
merged 7 commits into from
Nov 3, 2023
Merged

Adjust to Cloud API #16

merged 7 commits into from
Nov 3, 2023

Conversation

f1ames
Copy link
Contributor

@f1ames f1ames commented Nov 3, 2023

This PR fixes couple of issues and adjust to Cloud API.

Changes

  • Simplified namespaces sending logic (without diffing as it's not needed now).
  • Adjusted queries to match Cloud API.

Fixes

  • Replaced how Policy and Binding CRDs are updated. Earlier it was by replace, but it required resourceVersion (which would need to be fetched from resource). Now, it is done by patching resource.
  • Reworked PolicyUpdater cache logic - it is used to determine if resource should be created, updated or deleted. Since it's in-memory, it gets wiped out when pod is recreated. I added init logic to populate the cache with existing resources read from the cluster.

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@f1ames f1ames marked this pull request as ready for review November 3, 2023 11:40
Copy link

@WitoDelnat WitoDelnat left a comment

Choose a reason for hiding this comment

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

LGTM!

@f1ames f1ames merged commit ff9864f into main Nov 3, 2023
17 checks passed
@f1ames f1ames deleted the f1ames/fix/adjust-to-cloud branch November 3, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants