Agones: setAnnotation() doesn't set value, only key

Created on 5 Nov 2018  路  2Comments  路  Source: googleforgames/agones

I'm using the REST interface to Agones SDK, with a call like this:

http://localhost:59358/metadata/annotation
body:
{ "key": "players", "value:": "[256, 257]" }

but only the key is set, the value is empty. A kubectl get gs -o yaml returns this:

metadata:
  annotations:
    stable.agones.dev/sdk-players: ""

I'm using Agones 0.5.0-rc

Is there anybody using successfully this API call? Any hint or feedback would be much appreciated, thanks.

Regards,
Fabio

question

All 2 comments

Hello @think01
I noticed a typo in your request body:
http://localhost:59358/metadata/annotation body: { "key": "players", "value:": "[256, 257]" }
You should remove one colon after value:
{ "key": "players", "value": "[256, 257]" }

WHOOOOOOOOPS!
I passed over it so many times...... yes, for sure that's the problem. Correcting and trying, thank you so much...

UPDATE: solved, thank you again :+1:

Was this page helpful?
0 / 5 - 0 ratings