Giter Site home page Giter Site logo

gameservers-updater's Introduction

GameServers-Updater

参数说明

  • namespace:所处的命名空间
  • gss-name:GameServerSet名称。支持填写多个gss,如 "pve,pvp"。当不填写时默认选择命名空间下全部gss
  • timeout:执行超时时间。默认300s
  • select-ids:选择处于Id列表中的GameServer。如 "1,2" 代表筛选id为1和2的gs
  • select-opsState:选择opsState对应的GameServer。如 "None" 代表筛选opsState为None的gs
  • select-networkDisabled:选择网络可用性为对应值的GameServer。如 "true" 代表筛选networkDisabled为true的gs
  • select-not-container-image:选择容器镜像不为对应值的GameServer。如 "game/nginx:1.17" 代表筛选容器game镜像不为nginx:1.17的gs
  • exp-opsState:希望更改opsState的对应值
  • exp-networkDisabled:希望更改网络可用性的值

使用示例

可以通过创建K8s Job来使用,如

example 1

希望将opsState为None,且容器game镜像pvp:v2的GameServer的opsState都标记为WaitToBeDeleted

cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
  name: example-1
  namespace: kruise-game-system
spec:
  template:
    spec:
      serviceAccountName: kruise-game-controller-manager
      containers:
      - name: updater
        image: registry.cn-beijing.aliyuncs.com/chrisliu95/gs-updater:v1.1
        command:
          - /updater
        args:
          - --gss-name=pvp
          - --namespace=default
          - --select-opsState=None
          - --select-not-container-image=minecraft/pvp:v2
          - --exp-opsState=WaitToBeDeleted
      restartPolicy: Never
EOF

example 2

希望将id为[1,2,3]的GameServer的networkDisabled都标记为true

cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
  name: example-2
  namespace: kruise-game-system
spec:
  template:
    spec:
      serviceAccountName: kruise-game-controller-manager
      containers:
      - name: updater
        image: registry.cn-beijing.aliyuncs.com/chrisliu95/gs-updater:v1.1
        command:
          - /updater
        args:
          - --gss-name=pvp
          - --namespace=default
          - --select-ids=1,2,3
          - --exp-networkDisabled=true
      restartPolicy: Never
EOF

gameservers-updater's People

Contributors

chrisliu1995 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.