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

Deployments are deemed different even if there are no changes in the Nexus CR #137

Closed
LCaparelli opened this issue Aug 10, 2020 · 0 comments · Fixed by #138
Closed

Deployments are deemed different even if there are no changes in the Nexus CR #137

LCaparelli opened this issue Aug 10, 2020 · 0 comments · Fixed by #138
Assignees
Labels
bug 🐛 Something isn't working
Milestone

Comments

@LCaparelli
Copy link
Member

Describe the bug
Deployments are deemed different even if there are no changes in the Nexus CR. This is due to the server setting default values we don't touch when creating the Deployment and the default comparator running reflect.DeepEqual() on the Deployment spec.

To Reproduce
Steps to reproduce the behavior:

  1. Produce a CR which does not set the image Pull Policy
  2. Observe the logs for the second reconciliation

Expected behavior
Required and deployed Deployments are deemed equal and it doesn't get updated.

Environment
Current version, any platform.

Additional context
We can bypass this altogether by having our own custom comparator that only cares about what we change. This way we don't have to worry about defaults the API server would set anyway and we won't perform as many comparisons using reflection, which will likely improve performance. On the other hand it's more code to maintain, but probably worth the trouble.

@LCaparelli LCaparelli added the bug 🐛 Something isn't working label Aug 10, 2020
@LCaparelli LCaparelli self-assigned this Aug 10, 2020
@LCaparelli LCaparelli added this to the v0.3.0 milestone Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant