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

add hostPort and container validations to webhook #106

Merged
merged 1 commit into from
Feb 25, 2018

Conversation

cyriltovena
Copy link
Collaborator

@cyriltovena cyriltovena commented Feb 25, 2018

I have added the remaining validations:

  • Container is mandatory if multiple containers are specified in the pod.
  • HostPort should only be used with static PortPolicy

I've still added the Container one even though this _, _, err := gs.FindGameServerContainer() would satisfy it, I think having a better error message make sense.

fixes #10 unless you want to wait for PodSpecTemplate via ref on the OpenAPIv3

@cyriltovena cyriltovena changed the title add hostPort and container validation to webhook add hostPort and container validations to webhook Feb 25, 2018
@markmandel markmandel self-requested a review February 25, 2018 02:12
@markmandel markmandel added the kind/feature New features for Agones label Feb 25, 2018
@markmandel markmandel added this to the 0.1 milestone Feb 25, 2018
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

LGTM!

@markmandel markmandel merged commit 6d52309 into master Feb 25, 2018
@markmandel markmandel deleted the feature/webhook-validation branch February 25, 2018 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GameServer definition validation
2 participants