annotation

abstract suspend fun annotation(key: String, value: String)(source)

Adds a new annotation with a specific key and value to the GameServer resource of this instance. The key always gets a prefix assigned automatically to ensure better isolation and security. Therefore, the keys cannot collide with normal Kubernetes annotations. This allows further metadata to be published about this instance, which can be read elsewhere, and it is possible to filter the GameServer instances more precisely using the key-value pair.

Parameters

key

The key of the annotation that should be added or updated for this GameServer instance.

value

The value of the annotation that should be added or updated for this GameServer instance.

See also

Throws

If the key does not match the pattern for annotation keys and can therefore not be accepted for the Kubernetes GameServer resource.