-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat(ws): add validation webhooks for Workspace and WorkspaceKind #34
Conversation
Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
… webhook Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
@thesuperzapper I've added a commit to refactor the |
Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
@Adembc thanks for your work on this and the rest of GSOC! I did quite a bit of refactoring in the following commits: The WorkspaceKind webhook needed a lot of work to make it behave correctly (and detect redirect cycles in a semi-efficient way), and I also made the tests specifically check for each kind of error and added some "success" cases, because otherwise everything might just be failing. I think this PR should be ready for an initial merge now, there should only be two things left to have a fully working controller, I will raise issues so we can track that work publicly:
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thesuperzapper The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR makes the following changes:
Workspace Validations:
spec.kind
(must reference an existing WorkspaceKind).WorkspaceKind Validations:
spec.podTemplate.options.imageConfig.values[].spec
spec.podTemplate.options.podConfig.values[].spec
spec.podTemplate.options.imageConfig.values[].spec.ports[].port
are unique.spec.podTemplate.extraEnv[].value
is a valid Go template.Tests: