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

Allocating multicluster using GameServerAllocation API fails with missing Kind #1864

Closed
pooneh-m opened this issue Oct 23, 2020 · 3 comments · Fixed by #1865 or #1876
Closed

Allocating multicluster using GameServerAllocation API fails with missing Kind #1864

pooneh-m opened this issue Oct 23, 2020 · 3 comments · Fixed by #1865 or #1876
Assignees
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/bug These are bugs.
Milestone

Comments

@pooneh-m
Copy link
Contributor

What happened:
In multicluster allocation, when using GameServerAllocation API to allocate, error "Object 'Kind' is missing in" is returned on the successful call:

cat <<EOF | kubectl apply -oyaml -f -                                                                    
apiVersion: "allocation.agones.dev/v1"
kind: GameServerAllocation
metadata:
  namespace: b
  name: hello
spec:
  multiClusterSetting:
    enabled: true
EOF

error: error when creating "STDIN": Object 'Kind' is missing in '{"metadata":{"creationTimestamp":null},"spec":{"multiClusterSetting":{"policySelector":{}},"required":{},"scheduling":"","metadata":{}},"status":{"state":"Allocated","gameServerName":"fleet-deployment-1-conf-1-l8wdr-khtvq","ports":[{"name":"default","port":7013}],"address":"34.82.237.195","nodeName":"gke-test-cluster-default-pool-4e30e684-l0vn"}}
'

What you expected to happen:
No error

@pooneh-m pooneh-m added the kind/bug These are bugs. label Oct 23, 2020
@pooneh-m pooneh-m self-assigned this Oct 23, 2020
@markmandel
Copy link
Member

If you use kubectl create does it work?

kubectl apply won't work as there is no list or get operations for GSAs.

Context:
https://agones.dev/site/docs/getting-started/create-fleet/#4-allocate-a-game-server-from-the-fleet

@pooneh-m
Copy link
Contributor Author

Both apply and create can allocate, but when doing conversion to return the responses to the caller, it returns error that kind is missing in addition to the allocation status in the error body:

cat <<EOF | kubectl create -oyaml -f -                                                                   
apiVersion: "allocation.agones.dev/v1"
kind: GameServerAllocation
metadata:
  namespace: b
  name: hello
spec:
  multiClusterSetting:
    enabled: true
EOF

error: error when creating "STDIN": Object 'Kind' is missing in '{"metadata":{"creationTimestamp":null},"spec":{"multiClusterSetting":{"policySelector":{}},"required":{},"scheduling":"","metadata":{}},"status":{"state":"Allocated","gameServerName":"fleet-deployment-1-conf-1-l8wdr-7l5hc","ports":[{"name":"default","port":7342}],"address":"34.82.237.195","nodeName":"gke-test-cluster-default-pool-4e30e684-l0vn"}}
'

@markmandel
Copy link
Member

Aaah. Got it! I'll check the PR 👍🏻

@markmandel markmandel added this to the 1.10.0 milestone Nov 3, 2020
@markmandel markmandel added the area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc label Nov 3, 2020
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
2 participants