agones.dev/agones@v1.54.0/examples/wasmfleetautoscaler.yaml (about) 1 --- 2 # Copyright 2025 Google LLC All Rights Reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # 17 # Full example of a FleetAutoscaler that is using wasm for it's custom 18 # aautomation logic - this is used to scale a Fleet. 19 # 20 21 # 22 # For a full reference and details: https://agones.dev/site/docs/reference/fleetautoscaler/ 23 # 24 apiVersion: autoscaling.agones.dev/v1 25 kind: FleetAutoscaler 26 metadata: 27 name: webhook-fleet-autoscaler 28 spec: 29 fleetName: simple-game-server 30 policy: 31 # type of the policy - this example is Webhook 32 type: Wasm 33 # parameters for the wasm policy 34 wasm: 35 # The exported function to call in the wasm module, defaults to 'scale' 36 function: 'scale' 37 # Config values to pass to the wasm program on startup 38 config: 39 buffer_size: "10" 40 from: 41 url: 42 # use a service, or direct URL 43 service: 44 name: fileserver 45 namespace: default 46 path: /wasm/plugin.wasm 47 # optionally can define a full URL if not hosted on cluster (or you just want to). 48 # url: "https://my-bucket-storage.cloud/wasm/plugin.wasm" 49 # caBundle: optional, used for HTTPS paths with custom certs 50 # optional hex encoded sha256 hash to match against wasm file (it's optional, but recommended) 51 hash: "df7199d01a25bf34b3d650c7e6f685736b2c794e6a526d86b2e55bf074df3f36"