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

If GameServer webhook validation fails, it doesn't raise up to Fleet #765

Closed
markmandel opened this issue May 14, 2019 · 1 comment
Closed
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/bug These are bugs.
Milestone

Comments

@markmandel
Copy link
Member

What happened:
Create a Fleet with an invalid GameServer specification - no error was returned, and no GameServer was created.

For example (container is in the wrong spot):

apiVersion: "stable.agones.dev/v1alpha1"
kind: Fleet
metadata:
  name: zoba-fleet
spec:
  container: 1st
  replicas: 1
  scheduling: Packed
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
  template:
    metadata:
      labels:
        foo: bar
    spec:
      ports:
      - name: default
        portPolicy: Dynamic
        containerPort: 7788
      - containerPort: 3434
        protocol: TCP
        name: tcp
      health:
        initialDelaySeconds: 30
        periodSeconds: 10
      template:
        spec:
          containers:
          - name: 1st
            image: nginx
          - name: 2nd
            image: debian
            volumeMounts:
            - name: html
              mountPath: /html
            command: ["/bin/sh", "-c"]
            args:
              - while true; do
                  date >> /html/index.html;
                  sleep 1;
                done

What you expected to happen:

Should return a validation error as soon as the Fleet is created - i.e. the Fleet shouldn't get created at all, and the user should get a message as to why.

How to reproduce it (as minimally and precisely as possible):

copy paste the above into bad-fleet.yaml, and kubectl apply -f bad-fleet.yaml

Anything else we need to know?:

Environment:

  • Agones version: 0.9.0
  • Kubernetes version (use kubectl version): 1.11.x
  • Cloud provider or hardware configuration: ???
  • Install method (yaml/helm): ???
  • Troubleshooting guide log(s): ???
  • Others:
@markmandel markmandel added the kind/bug These are bugs. label May 14, 2019
@aLekSer
Copy link
Collaborator

aLekSer commented May 14, 2019

I will make a pull request to fix this issue.

aLekSer added a commit to aLekSer/agones that referenced this issue May 15, 2019
Now we perform additional validation on the Gameserver specification.
For googleforgames#765.
aLekSer added a commit to aLekSer/agones that referenced this issue May 17, 2019
Now we perform additional validation on the Gameserver specification.
For googleforgames#765.
aLekSer added a commit to aLekSer/agones that referenced this issue May 21, 2019
Now we perform additional validation on the Gameserver specification.
For googleforgames#765.
aLekSer added a commit to aLekSer/agones that referenced this issue May 21, 2019
Now we perform additional validation on the Gameserver specification.
For googleforgames#765.
aLekSer added a commit to aLekSer/agones that referenced this issue May 21, 2019
Now we perform additional validation on the Gameserver specification.
For googleforgames#765.
aLekSer added a commit to aLekSer/agones that referenced this issue May 22, 2019
Now we perform additional validation on the Gameserver specification.
For googleforgames#765.
markmandel pushed a commit that referenced this issue May 22, 2019
Now we perform additional validation on the Gameserver specification.
For #765.
@markmandel markmandel added this to the 0.11.0 milestone May 22, 2019
@markmandel markmandel added the area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc label May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

2 participants