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

Potential loop while loading policies or data from ConfigMaps #131

Closed
rg2011 opened this issue Mar 4, 2022 · 1 comment
Closed

Potential loop while loading policies or data from ConfigMaps #131

rg2011 opened this issue Mar 4, 2022 · 1 comment

Comments

@rg2011
Copy link
Contributor

rg2011 commented Mar 4, 2022

When configured to load policies or data from ConfigMaps, kube-mgmt listens for changes in ConfigMaps, updates OPA, and annotates the ConfigMap with openpolicyagent.org/policy-status = {"status":"ok"} or {status="error", "error":"..."}.

But annotating the ConfigMap actually triggers a new update, if the annotation was not already present, or has changed. This has the risk of errors introducing infinite loops, if the error message changes from one update to the next.

It may be worth computing some checksum of the information in the ConfigMap (labels and data, which are the only things used by kube-mgmt), and only updating OPA if this checksum changes.

@rg2011
Copy link
Contributor Author

rg2011 commented Mar 7, 2022

Fixed by #133

@rg2011 rg2011 closed this as completed Mar 7, 2022
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

No branches or pull requests

1 participant