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

Validation webhook shows multiple errors #382

Merged
merged 5 commits into from
Nov 29, 2021

Conversation

0sewa0
Copy link
Contributor

@0sewa0 0sewa0 commented Nov 24, 2021

Currently the validation webhook only shows the first error it encounters which is not that user friendly if there are multiple problems with the Dynakube. (this would get worse if we add more validation checks)

This change makes it that the user will be given the list of validation errors.
Refactors the codebase by separating the validation checks and their test into separate files so we don't have an ever grooving file(+test file).
Adjusts the nodeSelector check so it recognizes when there are 2 dynakubes which deploys OS OneAgents where atleast 1 of them would deploy a oneagent daemonSet for all nodes (no nodeSelector is set)

mapper/mapper.go Outdated Show resolved Hide resolved
webhook/validation/oneagent.go Outdated Show resolved Hide resolved
webhook/validation/preview.go Outdated Show resolved Hide resolved
@0sewa0 0sewa0 merged commit 42bc5b1 into master Nov 29, 2021
@0sewa0 0sewa0 deleted the refactor/validation-webhook-mulit-error branch November 29, 2021 09:33
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.

None yet

2 participants