mirror of https://github.com/openkruise/charts.git
Compare commits
26 Commits
kruise-gam
...
master
Author | SHA1 | Date |
---|---|---|
|
d0cfc2e2d7 | |
|
1259df091a | |
|
2b75a2f7db | |
|
8cbbdac027 | |
|
8b4803f8cc | |
|
8c097e79ea | |
|
1f4d8405c6 | |
|
9deb623ef1 | |
|
8dca36c77a | |
|
79e725cb0e | |
|
1806e0a55c | |
|
083a43ccf6 | |
|
4d538cf371 | |
|
e111262f53 | |
|
6b875eefa1 | |
|
3103338756 | |
|
32acdf43d6 | |
|
c4879675db | |
|
e9c56f1925 | |
|
b96d3417bd | |
|
6af33c3cbc | |
|
5e41bbdcdf | |
|
eab1d11a45 | |
|
7afba0dc8f | |
|
c0a6585e27 | |
|
bc4068ea76 |
|
@ -0,0 +1,81 @@
|
|||
name: E2E-base
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
pull_request: { }
|
||||
workflow_dispatch: { }
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
KIND_VERSION: 'v0.18.0'
|
||||
KIND_VERSION_FOR_HIGHER: 'v0.22.0'
|
||||
KIND_CLUSTER_NAME: 'ci-testing'
|
||||
# todo: add kruise e2e here
|
||||
jobs:
|
||||
# 1.27-
|
||||
install-for-lower:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
kind-version: [ v1.20.15, v1.24.6, v1.26.3 ]
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Kind Cluster ${{ matrix.kind-version }}
|
||||
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
|
||||
with:
|
||||
node_image: kindest/node:${{ matrix.kind-version }}
|
||||
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
|
||||
config: ./test/kind-conf.yaml
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
- name: Install Kruise
|
||||
run: |
|
||||
make install-kruise-from-local
|
||||
- name: install Kruise state metrics
|
||||
run: |
|
||||
make install-kruise-state-metrics-from-local
|
||||
- name: install Kruise rollout
|
||||
if: ${{ ! startsWith(matrix.kind-version, 'v1.18') }}
|
||||
run: |
|
||||
make install-kruise-rollout-from-local
|
||||
- name: install Kruise game
|
||||
run: |
|
||||
make install-kruise-game-from-local
|
||||
|
||||
# 1.27+
|
||||
install-for-higher:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
kind-version: [ v1.28.7, v1.30.8 ]
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Kind Cluster ${{ matrix.kind-version }}
|
||||
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
|
||||
with:
|
||||
node_image: kindest/node:${{ matrix.kind-version }}
|
||||
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
|
||||
config: ./test/kind-conf-with-vpa.yaml
|
||||
version: ${{ env.KIND_VERSION_FOR_HIGHER }}
|
||||
- name: Install Kruise
|
||||
run: |
|
||||
make install-kruise-from-local
|
||||
- name: install Kruise state metrics
|
||||
run: |
|
||||
make install-kruise-state-metrics-from-local
|
||||
- name: install Kruise rollout
|
||||
run: |
|
||||
make install-kruise-rollout-from-local
|
||||
- name: install Kruise game
|
||||
run: |
|
||||
make install-kruise-game-from-local
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
python-version: 3.x
|
||||
|
||||
- name: Setup Chart Linting
|
||||
id: lint
|
||||
|
|
|
@ -16,6 +16,19 @@ Any breaking changes to a chart (backwards incompatible) require:
|
|||
* Bump of the current Major version of the chart
|
||||
* State possible manual changes for this chart version in the `Upgrading` section of the chart's `README.md.gotmpl` ([See Upgrade](#upgrades))
|
||||
|
||||
A pseudo version called `next` is used to prepare changes for the next major release, any fix and optimization of the chart can be made in the next version. Before creating the actual new major version, one should copy the content of `next` version and make changes accordingly. As an example, when preparing for the new major release of kruise 1.8.0, the operations is as follows:
|
||||
```
|
||||
cd <repo-root>/versions/kruise/
|
||||
cp -r next 1.8.0
|
||||
```
|
||||
|
||||
Before creating a new minor version, one should copy the latest version of corresponding major version. As an example. when preparing for the next minor release of kruise 1.7.x, and the latest version of 1.7.x is 1.7.3, then the operation is as follows:
|
||||
```
|
||||
cd <repo-root>/versions/kruise/
|
||||
cp -r 1.7.3 1.7.4
|
||||
```
|
||||
|
||||
|
||||
### Immutability
|
||||
|
||||
Each release for each chart must be immutable. Any change to a chart (even just documentation) requires a version bump. Trying to release the same version twice will result in an error.
|
||||
|
@ -88,4 +101,11 @@ The linting can be invoked manually with the following command:
|
|||
|
||||
## Publishing Changes
|
||||
|
||||
Changes are automatically publish whenever a commit is merged to master. The CI job (see `./.github/workflows/publish.yml`).
|
||||
Before actually publish new releases, one should link the chart directory to the corresponding version directory. As an example, if one is about to release kruise 1.7.4, the operation is as follows:
|
||||
|
||||
```
|
||||
cd <repo-root>/charts
|
||||
ln -sf ../versions/kruise/1.7.4 kruise
|
||||
```
|
||||
|
||||
Changes are automatically publish whenever a commit is merged to master. The CI job (see `./.github/workflows/publish.yml`).
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
IMG ?= openkruise/kruise-manager:test
|
||||
|
||||
|
||||
.PHONY: install-kruise-from-local
|
||||
install-kruise-from-local:
|
||||
helm install kruise charts/kruise
|
||||
./scripts/check-kruise.sh
|
||||
|
||||
.PHONY: install-kruise-from-helm
|
||||
install-kruise-from-helm:
|
||||
helm install kruise openkruise/kruise
|
||||
./scripts/check-kruise.sh
|
||||
|
||||
.PHONY: install-kruise-state-metrics-from-local
|
||||
install-kruise-state-metrics-from-local:
|
||||
helm install kruise-sm charts/kruise-state-metrics --set installation.installServiceMonitor=false
|
||||
sleep 1
|
||||
kubectl -n kruise-system wait --for=condition=Ready pods -l control-plane=kruise-state-metrics --timeout=60s || exit 1
|
||||
|
||||
.PHONY: install-kruise-rollout-from-local
|
||||
install-kruise-rollout-from-local:
|
||||
helm install kruise-rollout charts/kruise-rollout
|
||||
sleep 1
|
||||
kubectl -n kruise-rollout wait --for=condition=Ready pods -l control-plane=kruise-rollout-controller-manager --timeout=60s || exit 1
|
||||
|
||||
|
||||
.PHONY: install-kruise-game-from-local
|
||||
install-kruise-game-from-local:
|
||||
helm install kruise-game charts/kruise-game
|
||||
sleep 1
|
||||
kubectl -n kruise-game-system wait --for=condition=Ready pods -l control-plane=kruise-game-controller-manager --timeout=60s || exit 1
|
||||
|
||||
install-from-local: install-kruise-from-local install-kruise-state-metrics-from-local
|
|
@ -1 +1 @@
|
|||
../versions/kruise/1.6.3
|
||||
../versions/kruise/1.8.0
|
|
@ -1 +1 @@
|
|||
../versions/kruise-game/0.8
|
||||
../versions/kruise-game/1.0.0
|
|
@ -1 +1 @@
|
|||
../versions/kruise-rollout/0.4.1
|
||||
../versions/kruise-rollout/0.6.1
|
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2023 Alibaba Group Holding Ltd.
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
|
||||
NODES=$(kubectl get node | wc -l)
|
||||
NODES=$(($NODES-1))
|
||||
EXCEPT_PODS=$(($NODES+2))
|
||||
for ((i=1;i<20;i++));
|
||||
do
|
||||
set +e
|
||||
PODS=$(kubectl get pod -n kruise-system | grep -c '1/1')
|
||||
set -e
|
||||
if [ "$PODS" -eq "$EXCEPT_PODS" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 3
|
||||
done
|
||||
set +e
|
||||
PODS=$(kubectl get pod -n kruise-system | grep -c '1/1')
|
||||
kubectl get node
|
||||
kubectl get all -n kruise-system
|
||||
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --tail 100
|
||||
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true --tail 100
|
||||
set -e
|
||||
if [ "$PODS" -eq "$EXCEPT_PODS" ]; then
|
||||
echo "Wait for kruise-manager and kruise-daemon ready successfully"
|
||||
else
|
||||
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
|
||||
exit 1
|
||||
fi
|
|
@ -0,0 +1,9 @@
|
|||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
- role: worker
|
||||
- role: worker
|
||||
- role: worker
|
||||
featureGates:
|
||||
InPlacePodVerticalScaling: true
|
|
@ -0,0 +1,7 @@
|
|||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
- role: worker
|
||||
- role: worker
|
||||
- role: worker
|
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
name: kruise-game
|
||||
description: Helm chart for kruise-game components
|
||||
version: 0.10.0
|
||||
appVersion: 0.10.0
|
||||
kubeVersion: ">= 1.16.0-0"
|
||||
sources:
|
||||
- https://github.com/openkruise/kruise-game
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Changed]: https://github.com/openkruise/kruise-game/blob/master/CHANGELOG.md"
|
|
@ -0,0 +1,45 @@
|
|||
# Kruise Game v0.10.0
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the kruise-game chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------------|-----------------------------------------------------------------------------|----------------------------------|
|
||||
| `installation.namespace` | Namespace for kruise-game operation installation | `kruise-game-system` |
|
||||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
|
||||
| `kruiseGame.fullname` | Nick name for kruise-game deployment and other configurations | `kruise-game-controller-manager` |
|
||||
| `kruiseGame.healthBindPort` | Port for checking health of kruise-game container | `8082` |
|
||||
| `kruiseGame.webhook.port` | Port of webhook served by kruise-game container | `443` |
|
||||
| `kruiseGame.webhook.targetPort` | ObjectSelector for workloads in MutatingWebhookConfigurations | `9876` |
|
||||
| `kruiseGame.apiServerQps` | Indicates the maximum QPS to the master from kruise-game-controller-manager | `5` |
|
||||
| `kruiseGame.apiServerQpsBurst` | Maximum burst for throttle of kruise-game-controller-manager | `10` |
|
||||
| `replicaCount` | Replicas of kruise-game deployment | `1` |
|
||||
| `image.repository` | Repository for kruise-game image | `openkruise/kruise-game-manager` |
|
||||
| `image.tag` | Tag for kruise-game image | `v0.10.0` |
|
||||
| `image.pullPolicy` | ImagePullPolicy for kruise-game container | `Always` |
|
||||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-game | ` ` |
|
||||
| `service.port` | Port of kruise-game service | `8443` |
|
||||
| `resources.limits.cpu` | CPU resource limit of kruise-game container | `500m` |
|
||||
| `resources.limits.memory` | Memory resource limit of kruise-game container | `1Gi` |
|
||||
| `resources.requests.cpu` | CPU resource request of kruise-game container | `10m` |
|
||||
| `resources.requests.memory` | Memory resource request of kruise-game container | `64Mi` |
|
||||
| `prometheus.enabled` | Whether to bind metric endpoint | `true` |
|
||||
| `prometheus.monitorService.port` | Port of the monitorservice bind to | `8080` |
|
||||
| `scale.service.port` | Port of the external scaler server binds to | `6000` |
|
||||
| `scale.service.targetPort` | TargetPort of the external scaler server binds to | `6000` |
|
||||
| `network.totalWaitTime` | Maximum time to wait for network ready, the unit is seconds | `60` |
|
||||
| `network.probeIntervalTime` | Time interval for detecting network status, the unit is seconds | `5` |
|
||||
| `cloudProvider.installCRD` | Whether to install CloudProvider CRD | `true` |
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
### Optional: the local image for China
|
||||
|
||||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:
|
||||
|
||||
```bash
|
||||
$ helm install kruise-game https://... --set image.repository=registry.cn-hangzhou.aliyuncs.com/acs/kruise-game-manager
|
||||
...
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kruise-game.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kruise-game.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kruise-game.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kruise-game.labels" -}}
|
||||
helm.sh/chart: {{ include "kruise-game.chart" . }}
|
||||
{{ include "kruise-game.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "kruise-game.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kruise-game.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kruise-game.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "kruise-game.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,72 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kruise-game-manager-config
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
data:
|
||||
config.toml: |
|
||||
[kubernetes]
|
||||
enable = true
|
||||
[kubernetes.hostPort]
|
||||
max_port = 9000
|
||||
min_port = 8000
|
||||
|
||||
[alibabacloud]
|
||||
enable = true
|
||||
[alibabacloud.slb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
block_ports = [593]
|
||||
[alibabacloud.nlb]
|
||||
max_port = 1502
|
||||
min_port = 1000
|
||||
block_ports = [1025, 1434, 1068]
|
||||
|
||||
[volcengine]
|
||||
enable = true
|
||||
[volcengine.clb]
|
||||
max_port = 600
|
||||
min_port = 550
|
||||
block_ports = [593]
|
||||
|
||||
[aws]
|
||||
enable = false
|
||||
[aws.nlb]
|
||||
max_port = 30050
|
||||
min_port = 30001
|
||||
|
||||
[jdcloud]
|
||||
enable = false
|
||||
[jdcloud.nlb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
|
||||
[tencentcloud]
|
||||
enable = true
|
||||
[tencentcloud.clb]
|
||||
min_port = 700
|
||||
max_port = 750
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :8081
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:8080
|
||||
webhook:
|
||||
port: 9443
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: c637bb1e.my.domain
|
||||
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||
# when the Manager ends. This requires the binary to immediately end when the
|
||||
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||
# speeds up voluntary leader transitions as the new leader don't have to wait
|
||||
# LeaseDuration time first.
|
||||
# In the default scaffold provided, the program ends immediately after
|
||||
# the manager stops, so would be fine to enable this option. However,
|
||||
# if you are doing or is intended to do any operation such as perform cleanups
|
||||
# after the manager stops then its usage might be unsafe.
|
||||
# leaderElectionReleaseOnCancel: true
|
||||
|
||||
|
|
@ -0,0 +1,928 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: gameservers.game.kruise.io
|
||||
spec:
|
||||
group: game.kruise.io
|
||||
names:
|
||||
kind: GameServer
|
||||
listKind: GameServerList
|
||||
plural: gameservers
|
||||
shortNames:
|
||||
- gs
|
||||
singular: gameserver
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The current state of GameServer
|
||||
jsonPath: .status.currentState
|
||||
name: STATE
|
||||
type: string
|
||||
- description: The operations state of GameServer
|
||||
jsonPath: .spec.opsState
|
||||
name: OPSSTATE
|
||||
type: string
|
||||
- description: The current deletionPriority of GameServer
|
||||
jsonPath: .status.deletionPriority
|
||||
name: DP
|
||||
type: string
|
||||
- description: The current updatePriority of GameServer
|
||||
jsonPath: .status.updatePriority
|
||||
name: UP
|
||||
type: string
|
||||
- description: The age of GameServer
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GameServer is the Schema for the gameservers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GameServerSpec defines the desired state of GameServer
|
||||
properties:
|
||||
containers:
|
||||
description: Containers can be used to make the corresponding GameServer
|
||||
container fields different from the fields defined by GameServerTemplate
|
||||
in GameServerSetSpec.
|
||||
items:
|
||||
properties:
|
||||
image:
|
||||
description: Image indicates the image of the container to update.
|
||||
When Image updated, pod.spec.containers[*].image will be updated
|
||||
immediately.
|
||||
type: string
|
||||
name:
|
||||
description: Name indicates the name of the container to update.
|
||||
type: string
|
||||
resources:
|
||||
description: Resources indicates the resources of the container
|
||||
to update. When Resources updated, pod.spec.containers[*].Resources
|
||||
will be not updated immediately, which will be updated when
|
||||
pod recreate.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount of compute
|
||||
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount of compute
|
||||
resources required. If Requests is omitted for a container,
|
||||
it defaults to Limits if that is explicitly specified,
|
||||
otherwise to an implementation-defined value. More info:
|
||||
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
networkDisabled:
|
||||
type: boolean
|
||||
opsState:
|
||||
type: string
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
status:
|
||||
description: GameServerStatus defines the observed state of GameServer
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions is an array of current observed GameServer
|
||||
conditions.
|
||||
items:
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: Last time we probed the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one status
|
||||
to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Human-readable message indicating details about
|
||||
last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: Unique, one-word, CamelCase reason for the condition's
|
||||
last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status is the status of the condition. Can be True,
|
||||
False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type is the type of the condition.
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
currentState:
|
||||
type: string
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
desiredState:
|
||||
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
|
||||
of cluster Important: Run "make" to regenerate code after modifying
|
||||
this file'
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
networkStatus:
|
||||
properties:
|
||||
createTime:
|
||||
format: date-time
|
||||
type: string
|
||||
currentNetworkState:
|
||||
type: string
|
||||
desiredNetworkState:
|
||||
type: string
|
||||
externalAddresses:
|
||||
items:
|
||||
properties:
|
||||
endPoint:
|
||||
type: string
|
||||
ip:
|
||||
type: string
|
||||
portRange:
|
||||
properties:
|
||||
portRange:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
type: object
|
||||
ports:
|
||||
description: TODO add IPv6
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- ip
|
||||
type: object
|
||||
type: array
|
||||
internalAddresses:
|
||||
items:
|
||||
properties:
|
||||
endPoint:
|
||||
type: string
|
||||
ip:
|
||||
type: string
|
||||
portRange:
|
||||
properties:
|
||||
portRange:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
type: object
|
||||
ports:
|
||||
description: TODO add IPv6
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- ip
|
||||
type: object
|
||||
type: array
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
networkType:
|
||||
type: string
|
||||
type: object
|
||||
podStatus:
|
||||
description: PodStatus represents information about the status of
|
||||
a pod. Status may trail the actual state of a system, especially
|
||||
if the node that hosts the pod cannot contact the control plane.
|
||||
properties:
|
||||
conditions:
|
||||
description: 'Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
items:
|
||||
description: PodCondition contains details for the current condition
|
||||
of this pod.
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: Last time we probed the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one
|
||||
status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Human-readable message indicating details about
|
||||
last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: Unique, one-word, CamelCase reason for the
|
||||
condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: 'Status is the status of the condition. Can
|
||||
be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
type: string
|
||||
type:
|
||||
description: 'Type is the type of the condition. More info:
|
||||
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
containerStatuses:
|
||||
description: 'The list has one entry per container in the manifest.
|
||||
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status'
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
ephemeralContainerStatuses:
|
||||
description: Status for any ephemeral containers that have run
|
||||
in this pod. This field is beta-level and available on clusters
|
||||
that haven't disabled the EphemeralContainers feature gate.
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
hostIP:
|
||||
description: IP address of the host to which the pod is assigned.
|
||||
Empty if not yet scheduled.
|
||||
type: string
|
||||
initContainerStatuses:
|
||||
description: 'The list has one entry per init container in the
|
||||
manifest. The most recent successful init container will have
|
||||
ready = true, the most recently started container will have
|
||||
startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status'
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
message:
|
||||
description: A human readable message indicating details about
|
||||
why the pod is in this condition.
|
||||
type: string
|
||||
nominatedNodeName:
|
||||
description: nominatedNodeName is set only when this pod preempts
|
||||
other pods on the node, but it cannot be scheduled right away
|
||||
as preemption victims receive their graceful termination periods.
|
||||
This field does not guarantee that the pod will be scheduled
|
||||
on this node. Scheduler may decide to place the pod elsewhere
|
||||
if other nodes become available sooner. Scheduler may also decide
|
||||
to give the resources on this node to a higher priority pod
|
||||
that is created after preemption. As a result, this field may
|
||||
be different than PodSpec.nodeName when the pod is scheduled.
|
||||
type: string
|
||||
phase:
|
||||
description: "The phase of a Pod is a simple, high-level summary
|
||||
of where the Pod is in its lifecycle. The conditions array,
|
||||
the reason and message fields, and the individual container
|
||||
status arrays contain more detail about the pod's status. There
|
||||
are five possible phase values: \n Pending: The pod has been
|
||||
accepted by the Kubernetes system, but one or more of the container
|
||||
images has not been created. This includes time before being
|
||||
scheduled as well as time spent downloading images over the
|
||||
network, which could take a while. Running: The pod has been
|
||||
bound to a node, and all of the containers have been created.
|
||||
At least one container is still running, or is in the process
|
||||
of starting or restarting. Succeeded: All containers in the
|
||||
pod have terminated in success, and will not be restarted. Failed:
|
||||
All containers in the pod have terminated, and at least one
|
||||
container has terminated in failure. The container either exited
|
||||
with non-zero status or was terminated by the system. Unknown:
|
||||
For some reason the state of the pod could not be obtained,
|
||||
typically due to an error in communicating with the host of
|
||||
the pod. \n More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase"
|
||||
type: string
|
||||
podIP:
|
||||
description: IP address allocated to the pod. Routable at least
|
||||
within the cluster. Empty if not yet allocated.
|
||||
type: string
|
||||
podIPs:
|
||||
description: podIPs holds the IP addresses allocated to the pod.
|
||||
If this field is specified, the 0th entry must match the podIP
|
||||
field. Pods may be allocated at most 1 value for each of IPv4
|
||||
and IPv6. This list is empty if no IPs have been allocated yet.
|
||||
items:
|
||||
description: 'IP address information for entries in the (plural)
|
||||
PodIPs field. Each entry includes: IP: An IP address allocated
|
||||
to the pod. Routable at least within the cluster.'
|
||||
properties:
|
||||
ip:
|
||||
description: ip is an IP address (IPv4 or IPv6) assigned
|
||||
to the pod
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
qosClass:
|
||||
description: 'The Quality of Service (QOS) classification assigned
|
||||
to the pod based on resource requirements See PodQOSClass type
|
||||
for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md'
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about
|
||||
why the pod is in this state. e.g. 'Evicted'
|
||||
type: string
|
||||
startTime:
|
||||
description: RFC 3339 date and time at which the object was acknowledged
|
||||
by the Kubelet. This is before the Kubelet pulled the container
|
||||
image(s) for the pod.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
serviceQualitiesConditions:
|
||||
items:
|
||||
properties:
|
||||
lastActionTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
lastProbeTime:
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
result:
|
||||
description: Result indicate the probe message returned by the
|
||||
script
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Lifecycle defines the lifecycle hooks for Pods pre-delete,
|
||||
in-place update.
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
|
@ -0,0 +1,861 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: gameserversets.game.kruise.io
|
||||
spec:
|
||||
group: game.kruise.io
|
||||
names:
|
||||
kind: GameServerSet
|
||||
listKind: GameServerSetList
|
||||
plural: gameserversets
|
||||
shortNames:
|
||||
- gss
|
||||
singular: gameserverset
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The desired number of GameServers.
|
||||
jsonPath: .spec.replicas
|
||||
name: DESIRED
|
||||
type: integer
|
||||
- description: The number of currently all GameServers.
|
||||
jsonPath: .status.replicas
|
||||
name: CURRENT
|
||||
type: integer
|
||||
- description: The number of GameServers updated.
|
||||
jsonPath: .status.updatedReplicas
|
||||
name: UPDATED
|
||||
type: integer
|
||||
- description: The number of GameServers ready.
|
||||
jsonPath: .status.readyReplicas
|
||||
name: READY
|
||||
type: integer
|
||||
- description: The number of GameServers Maintaining.
|
||||
jsonPath: .status.maintainingReplicas
|
||||
name: Maintaining
|
||||
type: integer
|
||||
- description: The number of GameServers WaitToBeDeleted.
|
||||
jsonPath: .status.waitToBeDeletedReplicas
|
||||
name: WaitToBeDeleted
|
||||
type: integer
|
||||
- description: The age of GameServerSet.
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GameServerSet is the Schema for the gameserversets API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GameServerSetSpec defines the desired state of GameServerSet
|
||||
properties:
|
||||
gameServerTemplate:
|
||||
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file'
|
||||
properties:
|
||||
reclaimPolicy:
|
||||
description: ReclaimPolicy indicates the reclaim policy for GameServer.
|
||||
Default is Cascade.
|
||||
type: string
|
||||
volumeClaimTemplates:
|
||||
items:
|
||||
description: PersistentVolumeClaim is a user's request for and
|
||||
claim to a persistent volume
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of
|
||||
this representation of an object. Servers should convert
|
||||
recognized schemas to the latest internal value, and may
|
||||
reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST
|
||||
resource this object represents. Servers may infer this
|
||||
from the endpoint the client submits requests to. Cannot
|
||||
be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: 'spec defines the desired characteristics of
|
||||
a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
|
||||
properties:
|
||||
accessModes:
|
||||
description: 'accessModes contains the desired access
|
||||
modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
dataSource:
|
||||
description: 'dataSource field can be used to specify
|
||||
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
|
||||
* An existing PVC (PersistentVolumeClaim) If the provisioner
|
||||
or an external controller can support the specified
|
||||
data source, it will create a new volume based on
|
||||
the contents of the specified data source. If the
|
||||
AnyVolumeDataSource feature gate is enabled, this
|
||||
field will always have the same contents as the DataSourceRef
|
||||
field.'
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup is the group for the resource
|
||||
being referenced. If APIGroup is not specified,
|
||||
the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being
|
||||
referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being
|
||||
referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
dataSourceRef:
|
||||
description: 'dataSourceRef specifies the object from
|
||||
which to populate the volume with data, if a non-empty
|
||||
volume is desired. This may be any local object from
|
||||
a non-empty API group (non core object) or a PersistentVolumeClaim
|
||||
object. When this field is specified, volume binding
|
||||
will only succeed if the type of the specified object
|
||||
matches some installed volume populator or dynamic
|
||||
provisioner. This field will replace the functionality
|
||||
of the DataSource field and as such if both fields
|
||||
are non-empty, they must have the same value. For
|
||||
backwards compatibility, both fields (DataSource and
|
||||
DataSourceRef) will be set to the same value automatically
|
||||
if one of them is empty and the other is non-empty.
|
||||
There are two important differences between DataSource
|
||||
and DataSourceRef: * While DataSource only allows
|
||||
two specific types of objects, DataSourceRef allows
|
||||
any non-core object, as well as PersistentVolumeClaim
|
||||
objects. * While DataSource ignores disallowed values
|
||||
(dropping them), DataSourceRef preserves all values,
|
||||
and generates an error if a disallowed value is specified.
|
||||
(Beta) Using this field requires the AnyVolumeDataSource
|
||||
feature gate to be enabled.'
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup is the group for the resource
|
||||
being referenced. If APIGroup is not specified,
|
||||
the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being
|
||||
referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being
|
||||
referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
resources:
|
||||
description: 'resources represents the minimum resources
|
||||
the volume should have. If RecoverVolumeExpansionFailure
|
||||
feature is enabled users are allowed to specify resource
|
||||
requirements that are lower than previous value but
|
||||
must still be higher than capacity recorded in the
|
||||
status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount
|
||||
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount
|
||||
of compute resources required. If Requests is
|
||||
omitted for a container, it defaults to Limits
|
||||
if that is explicitly specified, otherwise to
|
||||
an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
selector:
|
||||
description: selector is a label query over volumes
|
||||
to consider for binding.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a
|
||||
selector that contains values, a key, and an
|
||||
operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the
|
||||
selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship
|
||||
to a set of values. Valid operators are
|
||||
In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist, the
|
||||
values array must be empty. This array is
|
||||
replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In",
|
||||
and the values array contains only "value". The
|
||||
requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
storageClassName:
|
||||
description: 'storageClassName is the name of the StorageClass
|
||||
required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
|
||||
type: string
|
||||
volumeMode:
|
||||
description: volumeMode defines what type of volume
|
||||
is required by the claim. Value of Filesystem is implied
|
||||
when not included in claim spec.
|
||||
type: string
|
||||
volumeName:
|
||||
description: volumeName is the binding reference to
|
||||
the PersistentVolume backing this claim.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: 'status represents the current information/status
|
||||
of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
|
||||
properties:
|
||||
accessModes:
|
||||
description: 'accessModes contains the actual access
|
||||
modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
allocatedResources:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: allocatedResources is the storage resource
|
||||
within AllocatedResources tracks the capacity allocated
|
||||
to a PVC. It may be larger than the actual capacity
|
||||
when a volume expansion operation is requested. For
|
||||
storage quota, the larger value from allocatedResources
|
||||
and PVC.spec.resources is used. If allocatedResources
|
||||
is not set, PVC.spec.resources alone is used for quota
|
||||
calculation. If a volume expansion capacity request
|
||||
is lowered, allocatedResources is only lowered if
|
||||
there are no expansion operations in progress and
|
||||
if the actual volume capacity is equal or lower than
|
||||
the requested capacity. This is an alpha field and
|
||||
requires enabling RecoverVolumeExpansionFailure feature.
|
||||
type: object
|
||||
capacity:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: capacity represents the actual resources
|
||||
of the underlying volume.
|
||||
type: object
|
||||
conditions:
|
||||
description: conditions is the current Condition of
|
||||
persistent volume claim. If underlying persistent
|
||||
volume is being resized then the Condition will be
|
||||
set to 'ResizeStarted'.
|
||||
items:
|
||||
description: PersistentVolumeClaimCondition contails
|
||||
details about state of pvc
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: lastProbeTime is the time we probed
|
||||
the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the time the
|
||||
condition transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is the human-readable message
|
||||
indicating details about last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: reason is a unique, this should be
|
||||
a short, machine understandable string that
|
||||
gives the reason for condition's last transition.
|
||||
If it reports "ResizeStarted" that means the
|
||||
underlying persistent volume is being resized.
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
description: PersistentVolumeClaimConditionType
|
||||
is a valid value of PersistentVolumeClaimCondition.Type
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
phase:
|
||||
description: phase represents the current phase of PersistentVolumeClaim.
|
||||
type: string
|
||||
resizeStatus:
|
||||
description: resizeStatus stores status of resize operation.
|
||||
ResizeStatus is not set by default but when expansion
|
||||
is complete resizeStatus is set to empty string by
|
||||
resize controller or kubelet. This is an alpha field
|
||||
and requires enabling RecoverVolumeExpansionFailure
|
||||
feature.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
lifecycle:
|
||||
description: Lifecycle contains the hooks for Pod lifecycle.
|
||||
properties:
|
||||
inPlaceUpdate:
|
||||
description: InPlaceUpdate is the hook before Pod to update and
|
||||
after Pod has been updated.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Currently,
|
||||
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
|
||||
hook. Default to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
preDelete:
|
||||
description: PreDelete is the hook before Pod to be deleted.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Currently,
|
||||
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
|
||||
hook. Default to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
preNormal:
|
||||
description: PreNormal is the hook after Pod to be created and
|
||||
ready to be Normal.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Currently,
|
||||
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
|
||||
hook. Default to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
network:
|
||||
properties:
|
||||
networkConf:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
networkType:
|
||||
type: string
|
||||
type: object
|
||||
replicas:
|
||||
description: replicas is the desired number of replicas of the given
|
||||
Template. These are replicas in the sense that they are instantiations
|
||||
of the same Template, but individual replicas also have a consistent
|
||||
identity.
|
||||
format: int32
|
||||
minimum: 0
|
||||
type: integer
|
||||
reserveGameServerIds:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
scaleStrategy:
|
||||
properties:
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'The maximum number of pods that can be unavailable
|
||||
during scaling. Value can be an absolute number (ex: 5) or a
|
||||
percentage of desired pods (ex: 10%). Absolute number is calculated
|
||||
from percentage by rounding down. It can just be allowed to
|
||||
work with Parallel podManagementPolicy.'
|
||||
x-kubernetes-int-or-string: true
|
||||
scaleDownStrategyType:
|
||||
description: ScaleDownStrategyType indicates the scaling down
|
||||
strategy. Default is GeneralScaleDownStrategyType
|
||||
type: string
|
||||
type: object
|
||||
serviceName:
|
||||
type: string
|
||||
serviceQualities:
|
||||
items:
|
||||
properties:
|
||||
containerName:
|
||||
type: string
|
||||
exec:
|
||||
description: Exec specifies the action to take.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command line to execute inside
|
||||
the container, the working directory for the command is
|
||||
root ('/') in the container's filesystem. The command
|
||||
is simply exec'd, it is not run inside a shell, so traditional
|
||||
shell instructions ('|', etc) won't work. To use a shell,
|
||||
you need to explicitly call out to that shell. Exit status
|
||||
of 0 is treated as live/healthy and non-zero is unhealthy.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
failureThreshold:
|
||||
description: Minimum consecutive failures for the probe to be
|
||||
considered failed after having succeeded. Defaults to 3. Minimum
|
||||
value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
grpc:
|
||||
description: GRPC specifies an action involving a GRPC port.
|
||||
This is a beta field and requires enabling GRPCContainerProbe
|
||||
feature gate.
|
||||
properties:
|
||||
port:
|
||||
description: Port number of the gRPC service. Number must
|
||||
be in the range 1 to 65535.
|
||||
format: int32
|
||||
type: integer
|
||||
service:
|
||||
description: "Service is the name of the service to place
|
||||
in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
||||
\n If this is not specified, the default behavior is defined
|
||||
by gRPC."
|
||||
type: string
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
httpGet:
|
||||
description: HTTPGet specifies the http request to perform.
|
||||
properties:
|
||||
host:
|
||||
description: Host name to connect to, defaults to the pod
|
||||
IP. You probably want to set "Host" in httpHeaders instead.
|
||||
type: string
|
||||
httpHeaders:
|
||||
description: Custom headers to set in the request. HTTP
|
||||
allows repeated headers.
|
||||
items:
|
||||
description: HTTPHeader describes a custom header to be
|
||||
used in HTTP probes
|
||||
properties:
|
||||
name:
|
||||
description: The header field name
|
||||
type: string
|
||||
value:
|
||||
description: The header field value
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
path:
|
||||
description: Path to access on the HTTP server.
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Name or number of the port to access on the
|
||||
container. Number must be in the range 1 to 65535. Name
|
||||
must be an IANA_SVC_NAME.
|
||||
x-kubernetes-int-or-string: true
|
||||
scheme:
|
||||
description: Scheme to use for connecting to the host. Defaults
|
||||
to HTTP.
|
||||
type: string
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
initialDelaySeconds:
|
||||
description: 'Number of seconds after the container has started
|
||||
before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
|
||||
format: int32
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
periodSeconds:
|
||||
description: How often (in seconds) to perform the probe. Default
|
||||
to 10 seconds. Minimum value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
permanent:
|
||||
description: Whether to make GameServerSpec not change after
|
||||
the ServiceQualityAction is executed. When Permanent is true,
|
||||
regardless of the detection results, ServiceQualityAction
|
||||
will only be executed once. When Permanent is false, ServiceQualityAction
|
||||
can be executed again even though ServiceQualityAction has
|
||||
been executed.
|
||||
type: boolean
|
||||
serviceQualityAction:
|
||||
items:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
containers:
|
||||
description: Containers can be used to make the corresponding
|
||||
GameServer container fields different from the fields
|
||||
defined by GameServerTemplate in GameServerSetSpec.
|
||||
items:
|
||||
properties:
|
||||
image:
|
||||
description: Image indicates the image of the container
|
||||
to update. When Image updated, pod.spec.containers[*].image
|
||||
will be updated immediately.
|
||||
type: string
|
||||
name:
|
||||
description: Name indicates the name of the container
|
||||
to update.
|
||||
type: string
|
||||
resources:
|
||||
description: Resources indicates the resources of
|
||||
the container to update. When Resources updated,
|
||||
pod.spec.containers[*].Resources will be not updated
|
||||
immediately, which will be updated when pod recreate.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount
|
||||
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum
|
||||
amount of compute resources required. If Requests
|
||||
is omitted for a container, it defaults to
|
||||
Limits if that is explicitly specified, otherwise
|
||||
to an implementation-defined value. More info:
|
||||
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
networkDisabled:
|
||||
type: boolean
|
||||
opsState:
|
||||
type: string
|
||||
result:
|
||||
description: Result indicate the probe message returned
|
||||
by the script. When Result is defined, it would exec
|
||||
action only when the according Result is actually returns.
|
||||
type: string
|
||||
state:
|
||||
type: boolean
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- state
|
||||
type: object
|
||||
type: array
|
||||
successThreshold:
|
||||
description: Minimum consecutive successes for the probe to
|
||||
be considered successful after having failed. Defaults to
|
||||
1. Must be 1 for liveness and startup. Minimum value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
tcpSocket:
|
||||
description: TCPSocket specifies an action involving a TCP port.
|
||||
properties:
|
||||
host:
|
||||
description: 'Optional: Host name to connect to, defaults
|
||||
to the pod IP.'
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Number or name of the port to access on the
|
||||
container. Number must be in the range 1 to 65535. Name
|
||||
must be an IANA_SVC_NAME.
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
terminationGracePeriodSeconds:
|
||||
description: Optional duration in seconds the pod needs to terminate
|
||||
gracefully upon probe failure. The grace period is the duration
|
||||
in seconds after the processes running in the pod are sent
|
||||
a termination signal and the time when the processes are forcibly
|
||||
halted with a kill signal. Set this value longer than the
|
||||
expected cleanup time for your process. If this value is nil,
|
||||
the pod's terminationGracePeriodSeconds will be used. Otherwise,
|
||||
this value overrides the value provided by the pod spec. Value
|
||||
must be non-negative integer. The value zero indicates stop
|
||||
immediately via the kill signal (no opportunity to shut down).
|
||||
This is a beta field and requires enabling ProbeTerminationGracePeriod
|
||||
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
|
||||
is used if unset.
|
||||
format: int64
|
||||
type: integer
|
||||
timeoutSeconds:
|
||||
description: 'Number of seconds after which the probe times
|
||||
out. Defaults to 1 second. Minimum value is 1. More info:
|
||||
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
- permanent
|
||||
type: object
|
||||
type: array
|
||||
updateStrategy:
|
||||
properties:
|
||||
rollingUpdate:
|
||||
description: RollingUpdate is used to communicate parameters when
|
||||
Type is RollingUpdateStatefulSetStrategyType.
|
||||
properties:
|
||||
inPlaceUpdateStrategy:
|
||||
description: UnorderedUpdate contains strategies for non-ordered
|
||||
update. If it is not nil, pods will be updated with non-ordered
|
||||
sequence. Noted that UnorderedUpdate can only be allowed
|
||||
to work with Parallel podManagementPolicy UnorderedUpdate
|
||||
*kruiseV1beta1.UnorderedUpdateStrategy `json:"unorderedUpdate,omitempty"`
|
||||
InPlaceUpdateStrategy contains strategies for in-place update.
|
||||
properties:
|
||||
gracePeriodSeconds:
|
||||
description: GracePeriodSeconds is the timespan between
|
||||
set Pod status to not-ready and update images in Pod
|
||||
spec when in-place update a Pod.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'The maximum number of pods that can be unavailable
|
||||
during the update. Value can be an absolute number (ex:
|
||||
5) or a percentage of desired pods (ex: 10%). Absolute number
|
||||
is calculated from percentage by rounding down. Also, maxUnavailable
|
||||
can just be allowed to work with Parallel podManagementPolicy.
|
||||
Defaults to 1.'
|
||||
x-kubernetes-int-or-string: true
|
||||
minReadySeconds:
|
||||
description: MinReadySeconds indicates how long will the pod
|
||||
be considered ready after it's updated. MinReadySeconds
|
||||
works with both OrderedReady and Parallel podManagementPolicy.
|
||||
It affects the pod scale up speed when the podManagementPolicy
|
||||
is set to be OrderedReady. Combined with MaxUnavailable,
|
||||
it affects the pod update speed regardless of podManagementPolicy.
|
||||
Default value is 0, max is 300.
|
||||
format: int32
|
||||
type: integer
|
||||
partition:
|
||||
description: 'Partition indicates the ordinal at which the
|
||||
StatefulSet should be partitioned by default. But if unorderedUpdate
|
||||
has been set: - Partition indicates the number of pods with
|
||||
non-updated revisions when rolling update. - It means controller
|
||||
will update $(replicas - partition) number of pod. Default
|
||||
value is 0.'
|
||||
format: int32
|
||||
type: integer
|
||||
paused:
|
||||
description: Paused indicates that the StatefulSet is paused.
|
||||
Default value is false
|
||||
type: boolean
|
||||
podUpdatePolicy:
|
||||
description: PodUpdatePolicy indicates how pods should be
|
||||
updated Default value is "ReCreate"
|
||||
type: string
|
||||
type: object
|
||||
type:
|
||||
description: Type indicates the type of the StatefulSetUpdateStrategy.
|
||||
Default is RollingUpdate.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- replicas
|
||||
type: object
|
||||
status:
|
||||
description: GameServerSetStatus defines the observed state of GameServerSet
|
||||
properties:
|
||||
availableReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
currentReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
labelSelector:
|
||||
description: LabelSelector is label selectors for query over pods
|
||||
that should match the replica count used by HPA.
|
||||
type: string
|
||||
maintainingReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
observedGeneration:
|
||||
description: The generation observed by the controller.
|
||||
format: int64
|
||||
type: integer
|
||||
readyReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
replicas:
|
||||
description: replicas from advancedStatefulSet
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReadyReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
waitToBeDeletedReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- availableReplicas
|
||||
- currentReplicas
|
||||
- readyReplicas
|
||||
- replicas
|
||||
- updatedReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
scale:
|
||||
labelSelectorPath: .status.labelSelector
|
||||
specReplicasPath: .spec.replicas
|
||||
statusReplicasPath: .status.replicas
|
||||
status: {}
|
|
@ -0,0 +1,110 @@
|
|||
{{- if .Values.installation.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: {{ .Values.installation.namespace }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-controller-manager-metrics-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/default-container: manager
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
# securityContext:
|
||||
# runAsNonRoot: true
|
||||
# TODO(user): For common cases that do not require escalating privileges
|
||||
# it is recommended to ensure that all your Pods/Containers are restrictive.
|
||||
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
|
||||
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
|
||||
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
|
||||
# seccompProfile:
|
||||
# type: RuntimeDefault
|
||||
containers:
|
||||
- command:
|
||||
- /manager
|
||||
args:
|
||||
- --leader-elect=false
|
||||
- --provider-config=/etc/kruise-game/config.toml
|
||||
- --api-server-qps={{ .Values.kruiseGame.apiServerQps }}
|
||||
- --api-server-qps-burst={{ .Values.kruiseGame.apiServerQpsBurst }}
|
||||
- --scale-server-bind-address=:{{ .Values.scale.service.targetPort }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- --metrics-bind-address=:{{ .Values.prometheus.monitorService.port }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
name: manager
|
||||
env:
|
||||
- name: "NETWORK_TOTAL_WAIT_TIME"
|
||||
value: {{ .Values.network.totalWaitTime | quote }}
|
||||
- name: "NETWORK_PROBE_INTERVAL_TIME"
|
||||
value: {{ .Values.network.probeIntervalTime | quote }}
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: {{ .Values.prometheus.monitorService.port }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- "ALL"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
# TODO(user): Configure the resources accordingly based on the project requirements.
|
||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kruise-game
|
||||
name: provider-config
|
||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: config.toml
|
||||
path: config.toml
|
||||
name: kruise-game-manager-config
|
||||
name: provider-config
|
|
@ -0,0 +1,17 @@
|
|||
{{- if .Values.prometheus.enabled }}
|
||||
# Prometheus Monitor Service (Metrics)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-controller-manager-metrics-monitor
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
endpoints:
|
||||
- path: /metrics
|
||||
port: https
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- end }}
|
|
@ -0,0 +1,422 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: kruise-game-leader-election-role
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kruise-game-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- podprobemarkers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- elbv2.k8s.aws
|
||||
resources:
|
||||
- targetgroupbindings
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- listeners
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- targetgroups
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.cloud.tencent.com
|
||||
resources:
|
||||
- dedicatedclblisteners
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.cloud.tencent.com
|
||||
resources:
|
||||
- dedicatedclblisteners/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- "/metrics"
|
||||
verbs:
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-proxy-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kruise-game-leader-election-rolebinding
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: kruise-game-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kruise-game-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-proxy-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: proxy-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-external-scaler
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.scale.service.port }}
|
||||
targetPort: {{ .Values.scale.service.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-webhook-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.kruiseGame.webhook.port }}
|
||||
targetPort: {{ .Values.kruiseGame.webhook.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,66 @@
|
|||
# Default values for kruise-game.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# values for kruise-game installation
|
||||
installation:
|
||||
namespace: kruise-game-system
|
||||
createNamespace: true
|
||||
|
||||
kruiseGame:
|
||||
fullname: kruise-game-controller-manager
|
||||
healthBindPort: "8082"
|
||||
webhook:
|
||||
port: 443
|
||||
targetPort: 9876
|
||||
apiServerQps: 5
|
||||
apiServerQpsBurst: 10
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: openkruise/kruise-game-manager
|
||||
tag: v0.10.0
|
||||
pullPolicy: Always
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
|
||||
serviceAccount:
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
|
||||
service:
|
||||
port: 8443
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
monitorService:
|
||||
port: 8080
|
||||
scale:
|
||||
service:
|
||||
port: 6000
|
||||
targetPort: 6000
|
||||
|
||||
network:
|
||||
totalWaitTime: 60
|
||||
probeIntervalTime: 5
|
||||
|
||||
cloudProvider:
|
||||
installCRD: true
|
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
name: kruise-game
|
||||
description: Helm chart for kruise-game components
|
||||
version: 0.9.0
|
||||
appVersion: 0.9.0
|
||||
kubeVersion: ">= 1.16.0-0"
|
||||
sources:
|
||||
- https://github.com/openkruise/kruise-game
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Changed]: https://github.com/openkruise/kruise-game/blob/master/CHANGELOG.md"
|
|
@ -0,0 +1,45 @@
|
|||
# Kruise Game v0.9.0
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the kruise-game chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------------|-----------------------------------------------------------------------------|----------------------------------|
|
||||
| `installation.namespace` | Namespace for kruise-game operation installation | `kruise-game-system` |
|
||||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
|
||||
| `kruiseGame.fullname` | Nick name for kruise-game deployment and other configurations | `kruise-game-controller-manager` |
|
||||
| `kruiseGame.healthBindPort` | Port for checking health of kruise-game container | `8082` |
|
||||
| `kruiseGame.webhook.port` | Port of webhook served by kruise-game container | `443` |
|
||||
| `kruiseGame.webhook.targetPort` | ObjectSelector for workloads in MutatingWebhookConfigurations | `9876` |
|
||||
| `kruiseGame.apiServerQps` | Indicates the maximum QPS to the master from kruise-game-controller-manager | `5` |
|
||||
| `kruiseGame.apiServerQpsBurst` | Maximum burst for throttle of kruise-game-controller-manager | `10` |
|
||||
| `replicaCount` | Replicas of kruise-game deployment | `1` |
|
||||
| `image.repository` | Repository for kruise-game image | `openkruise/kruise-game-manager` |
|
||||
| `image.tag` | Tag for kruise-game image | `v0.9.0` |
|
||||
| `image.pullPolicy` | ImagePullPolicy for kruise-game container | `Always` |
|
||||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-game | ` ` |
|
||||
| `service.port` | Port of kruise-game service | `8443` |
|
||||
| `resources.limits.cpu` | CPU resource limit of kruise-game container | `500m` |
|
||||
| `resources.limits.memory` | Memory resource limit of kruise-game container | `1Gi` |
|
||||
| `resources.requests.cpu` | CPU resource request of kruise-game container | `10m` |
|
||||
| `resources.requests.memory` | Memory resource request of kruise-game container | `64Mi` |
|
||||
| `prometheus.enabled` | Whether to bind metric endpoint | `true` |
|
||||
| `prometheus.monitorService.port` | Port of the monitorservice bind to | `8080` |
|
||||
| `scale.service.port` | Port of the external scaler server binds to | `6000` |
|
||||
| `scale.service.targetPort` | TargetPort of the external scaler server binds to | `6000` |
|
||||
| `network.totalWaitTime` | Maximum time to wait for network ready, the unit is seconds | `60` |
|
||||
| `network.probeIntervalTime` | Time interval for detecting network status, the unit is seconds | `5` |
|
||||
| `cloudProvider.installCRD` | Whether to install CloudProvider CRD | `true` |
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
### Optional: the local image for China
|
||||
|
||||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:
|
||||
|
||||
```bash
|
||||
$ helm install kruise-game https://... --set image.repository=registry.cn-hangzhou.aliyuncs.com/acs/kruise-game-manager
|
||||
...
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kruise-game.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kruise-game.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kruise-game.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kruise-game.labels" -}}
|
||||
helm.sh/chart: {{ include "kruise-game.chart" . }}
|
||||
{{ include "kruise-game.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "kruise-game.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kruise-game.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kruise-game.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "kruise-game.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,99 @@
|
|||
{{- if .Values.cloudProvider.installCRD }}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: poddnats.alibabacloud.com
|
||||
spec:
|
||||
group: alibabacloud.com
|
||||
names:
|
||||
kind: PodDNAT
|
||||
listKind: PodDNATList
|
||||
plural: poddnats
|
||||
singular: poddnat
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PodDNAT is the Schema for the poddnats API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PodDNATSpec defines the desired state of PodDNAT
|
||||
properties:
|
||||
eni:
|
||||
type: string
|
||||
entryId:
|
||||
type: string
|
||||
externalIP:
|
||||
type: string
|
||||
externalPort:
|
||||
type: string
|
||||
internalIP:
|
||||
type: string
|
||||
internalPort:
|
||||
type: string
|
||||
portMapping:
|
||||
items:
|
||||
properties:
|
||||
externalPort:
|
||||
type: string
|
||||
internalPort:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
protocol:
|
||||
type: string
|
||||
tableId:
|
||||
type: string
|
||||
vswitch:
|
||||
type: string
|
||||
zoneID:
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: PodDNATStatus defines the observed state of PodDNAT
|
||||
properties:
|
||||
created:
|
||||
description: created create status
|
||||
type: string
|
||||
entries:
|
||||
description: entries
|
||||
items:
|
||||
description: Entry record for forwardEntry
|
||||
properties:
|
||||
externalIP:
|
||||
type: string
|
||||
externalPort:
|
||||
type: string
|
||||
forwardEntryId:
|
||||
type: string
|
||||
internalIP:
|
||||
type: string
|
||||
internalPort:
|
||||
type: string
|
||||
ipProtocol:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
{{- end }}
|
|
@ -0,0 +1,57 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kruise-game-manager-config
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
data:
|
||||
config.toml: |
|
||||
[kubernetes]
|
||||
enable = true
|
||||
[kubernetes.hostPort]
|
||||
max_port = 9000
|
||||
min_port = 8000
|
||||
|
||||
[alibabacloud]
|
||||
enable = true
|
||||
[alibabacloud.slb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
[alibabacloud.nlb]
|
||||
max_port = 1500
|
||||
min_port = 1000
|
||||
|
||||
[volcengine]
|
||||
enable = true
|
||||
[volcengine.clb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
|
||||
[aws]
|
||||
enable = false
|
||||
[aws.nlb]
|
||||
max_port = 30050
|
||||
min_port = 30001
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :8081
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:8080
|
||||
webhook:
|
||||
port: 9443
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: c637bb1e.my.domain
|
||||
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||
# when the Manager ends. This requires the binary to immediately end when the
|
||||
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||
# speeds up voluntary leader transitions as the new leader don't have to wait
|
||||
# LeaseDuration time first.
|
||||
# In the default scaffold provided, the program ends immediately after
|
||||
# the manager stops, so would be fine to enable this option. However,
|
||||
# if you are doing or is intended to do any operation such as perform cleanups
|
||||
# after the manager stops then its usage might be unsafe.
|
||||
# leaderElectionReleaseOnCancel: true
|
||||
|
||||
|
|
@ -0,0 +1,928 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: gameservers.game.kruise.io
|
||||
spec:
|
||||
group: game.kruise.io
|
||||
names:
|
||||
kind: GameServer
|
||||
listKind: GameServerList
|
||||
plural: gameservers
|
||||
shortNames:
|
||||
- gs
|
||||
singular: gameserver
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The current state of GameServer
|
||||
jsonPath: .status.currentState
|
||||
name: STATE
|
||||
type: string
|
||||
- description: The operations state of GameServer
|
||||
jsonPath: .spec.opsState
|
||||
name: OPSSTATE
|
||||
type: string
|
||||
- description: The current deletionPriority of GameServer
|
||||
jsonPath: .status.deletionPriority
|
||||
name: DP
|
||||
type: string
|
||||
- description: The current updatePriority of GameServer
|
||||
jsonPath: .status.updatePriority
|
||||
name: UP
|
||||
type: string
|
||||
- description: The age of GameServer
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GameServer is the Schema for the gameservers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GameServerSpec defines the desired state of GameServer
|
||||
properties:
|
||||
containers:
|
||||
description: Containers can be used to make the corresponding GameServer
|
||||
container fields different from the fields defined by GameServerTemplate
|
||||
in GameServerSetSpec.
|
||||
items:
|
||||
properties:
|
||||
image:
|
||||
description: Image indicates the image of the container to update.
|
||||
When Image updated, pod.spec.containers[*].image will be updated
|
||||
immediately.
|
||||
type: string
|
||||
name:
|
||||
description: Name indicates the name of the container to update.
|
||||
type: string
|
||||
resources:
|
||||
description: Resources indicates the resources of the container
|
||||
to update. When Resources updated, pod.spec.containers[*].Resources
|
||||
will be not updated immediately, which will be updated when
|
||||
pod recreate.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount of compute
|
||||
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount of compute
|
||||
resources required. If Requests is omitted for a container,
|
||||
it defaults to Limits if that is explicitly specified,
|
||||
otherwise to an implementation-defined value. More info:
|
||||
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
networkDisabled:
|
||||
type: boolean
|
||||
opsState:
|
||||
type: string
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
status:
|
||||
description: GameServerStatus defines the observed state of GameServer
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions is an array of current observed GameServer
|
||||
conditions.
|
||||
items:
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: Last time we probed the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one status
|
||||
to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Human-readable message indicating details about
|
||||
last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: Unique, one-word, CamelCase reason for the condition's
|
||||
last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status is the status of the condition. Can be True,
|
||||
False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type is the type of the condition.
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
currentState:
|
||||
type: string
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
desiredState:
|
||||
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
|
||||
of cluster Important: Run "make" to regenerate code after modifying
|
||||
this file'
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
networkStatus:
|
||||
properties:
|
||||
createTime:
|
||||
format: date-time
|
||||
type: string
|
||||
currentNetworkState:
|
||||
type: string
|
||||
desiredNetworkState:
|
||||
type: string
|
||||
externalAddresses:
|
||||
items:
|
||||
properties:
|
||||
endPoint:
|
||||
type: string
|
||||
ip:
|
||||
type: string
|
||||
portRange:
|
||||
properties:
|
||||
portRange:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
type: object
|
||||
ports:
|
||||
description: TODO add IPv6
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- ip
|
||||
type: object
|
||||
type: array
|
||||
internalAddresses:
|
||||
items:
|
||||
properties:
|
||||
endPoint:
|
||||
type: string
|
||||
ip:
|
||||
type: string
|
||||
portRange:
|
||||
properties:
|
||||
portRange:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
type: object
|
||||
ports:
|
||||
description: TODO add IPv6
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- ip
|
||||
type: object
|
||||
type: array
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
networkType:
|
||||
type: string
|
||||
type: object
|
||||
podStatus:
|
||||
description: PodStatus represents information about the status of
|
||||
a pod. Status may trail the actual state of a system, especially
|
||||
if the node that hosts the pod cannot contact the control plane.
|
||||
properties:
|
||||
conditions:
|
||||
description: 'Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
items:
|
||||
description: PodCondition contains details for the current condition
|
||||
of this pod.
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: Last time we probed the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one
|
||||
status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Human-readable message indicating details about
|
||||
last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: Unique, one-word, CamelCase reason for the
|
||||
condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: 'Status is the status of the condition. Can
|
||||
be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
type: string
|
||||
type:
|
||||
description: 'Type is the type of the condition. More info:
|
||||
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
containerStatuses:
|
||||
description: 'The list has one entry per container in the manifest.
|
||||
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status'
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
ephemeralContainerStatuses:
|
||||
description: Status for any ephemeral containers that have run
|
||||
in this pod. This field is beta-level and available on clusters
|
||||
that haven't disabled the EphemeralContainers feature gate.
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
hostIP:
|
||||
description: IP address of the host to which the pod is assigned.
|
||||
Empty if not yet scheduled.
|
||||
type: string
|
||||
initContainerStatuses:
|
||||
description: 'The list has one entry per init container in the
|
||||
manifest. The most recent successful init container will have
|
||||
ready = true, the most recently started container will have
|
||||
startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status'
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
message:
|
||||
description: A human readable message indicating details about
|
||||
why the pod is in this condition.
|
||||
type: string
|
||||
nominatedNodeName:
|
||||
description: nominatedNodeName is set only when this pod preempts
|
||||
other pods on the node, but it cannot be scheduled right away
|
||||
as preemption victims receive their graceful termination periods.
|
||||
This field does not guarantee that the pod will be scheduled
|
||||
on this node. Scheduler may decide to place the pod elsewhere
|
||||
if other nodes become available sooner. Scheduler may also decide
|
||||
to give the resources on this node to a higher priority pod
|
||||
that is created after preemption. As a result, this field may
|
||||
be different than PodSpec.nodeName when the pod is scheduled.
|
||||
type: string
|
||||
phase:
|
||||
description: "The phase of a Pod is a simple, high-level summary
|
||||
of where the Pod is in its lifecycle. The conditions array,
|
||||
the reason and message fields, and the individual container
|
||||
status arrays contain more detail about the pod's status. There
|
||||
are five possible phase values: \n Pending: The pod has been
|
||||
accepted by the Kubernetes system, but one or more of the container
|
||||
images has not been created. This includes time before being
|
||||
scheduled as well as time spent downloading images over the
|
||||
network, which could take a while. Running: The pod has been
|
||||
bound to a node, and all of the containers have been created.
|
||||
At least one container is still running, or is in the process
|
||||
of starting or restarting. Succeeded: All containers in the
|
||||
pod have terminated in success, and will not be restarted. Failed:
|
||||
All containers in the pod have terminated, and at least one
|
||||
container has terminated in failure. The container either exited
|
||||
with non-zero status or was terminated by the system. Unknown:
|
||||
For some reason the state of the pod could not be obtained,
|
||||
typically due to an error in communicating with the host of
|
||||
the pod. \n More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase"
|
||||
type: string
|
||||
podIP:
|
||||
description: IP address allocated to the pod. Routable at least
|
||||
within the cluster. Empty if not yet allocated.
|
||||
type: string
|
||||
podIPs:
|
||||
description: podIPs holds the IP addresses allocated to the pod.
|
||||
If this field is specified, the 0th entry must match the podIP
|
||||
field. Pods may be allocated at most 1 value for each of IPv4
|
||||
and IPv6. This list is empty if no IPs have been allocated yet.
|
||||
items:
|
||||
description: 'IP address information for entries in the (plural)
|
||||
PodIPs field. Each entry includes: IP: An IP address allocated
|
||||
to the pod. Routable at least within the cluster.'
|
||||
properties:
|
||||
ip:
|
||||
description: ip is an IP address (IPv4 or IPv6) assigned
|
||||
to the pod
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
qosClass:
|
||||
description: 'The Quality of Service (QOS) classification assigned
|
||||
to the pod based on resource requirements See PodQOSClass type
|
||||
for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md'
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about
|
||||
why the pod is in this state. e.g. 'Evicted'
|
||||
type: string
|
||||
startTime:
|
||||
description: RFC 3339 date and time at which the object was acknowledged
|
||||
by the Kubelet. This is before the Kubelet pulled the container
|
||||
image(s) for the pod.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
serviceQualitiesConditions:
|
||||
items:
|
||||
properties:
|
||||
lastActionTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
lastProbeTime:
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
result:
|
||||
description: Result indicate the probe message returned by the
|
||||
script
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Lifecycle defines the lifecycle hooks for Pods pre-delete,
|
||||
in-place update.
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
|
@ -0,0 +1,838 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: gameserversets.game.kruise.io
|
||||
spec:
|
||||
group: game.kruise.io
|
||||
names:
|
||||
kind: GameServerSet
|
||||
listKind: GameServerSetList
|
||||
plural: gameserversets
|
||||
shortNames:
|
||||
- gss
|
||||
singular: gameserverset
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The desired number of GameServers.
|
||||
jsonPath: .spec.replicas
|
||||
name: DESIRED
|
||||
type: integer
|
||||
- description: The number of currently all GameServers.
|
||||
jsonPath: .status.replicas
|
||||
name: CURRENT
|
||||
type: integer
|
||||
- description: The number of GameServers updated.
|
||||
jsonPath: .status.updatedReplicas
|
||||
name: UPDATED
|
||||
type: integer
|
||||
- description: The number of GameServers ready.
|
||||
jsonPath: .status.readyReplicas
|
||||
name: READY
|
||||
type: integer
|
||||
- description: The number of GameServers Maintaining.
|
||||
jsonPath: .status.maintainingReplicas
|
||||
name: Maintaining
|
||||
type: integer
|
||||
- description: The number of GameServers WaitToBeDeleted.
|
||||
jsonPath: .status.waitToBeDeletedReplicas
|
||||
name: WaitToBeDeleted
|
||||
type: integer
|
||||
- description: The age of GameServerSet.
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GameServerSet is the Schema for the gameserversets API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GameServerSetSpec defines the desired state of GameServerSet
|
||||
properties:
|
||||
gameServerTemplate:
|
||||
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file'
|
||||
properties:
|
||||
reclaimPolicy:
|
||||
description: ReclaimPolicy indicates the reclaim policy for GameServer.
|
||||
Default is Cascade.
|
||||
type: string
|
||||
volumeClaimTemplates:
|
||||
items:
|
||||
description: PersistentVolumeClaim is a user's request for and
|
||||
claim to a persistent volume
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of
|
||||
this representation of an object. Servers should convert
|
||||
recognized schemas to the latest internal value, and may
|
||||
reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST
|
||||
resource this object represents. Servers may infer this
|
||||
from the endpoint the client submits requests to. Cannot
|
||||
be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: 'spec defines the desired characteristics of
|
||||
a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
|
||||
properties:
|
||||
accessModes:
|
||||
description: 'accessModes contains the desired access
|
||||
modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
dataSource:
|
||||
description: 'dataSource field can be used to specify
|
||||
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
|
||||
* An existing PVC (PersistentVolumeClaim) If the provisioner
|
||||
or an external controller can support the specified
|
||||
data source, it will create a new volume based on
|
||||
the contents of the specified data source. If the
|
||||
AnyVolumeDataSource feature gate is enabled, this
|
||||
field will always have the same contents as the DataSourceRef
|
||||
field.'
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup is the group for the resource
|
||||
being referenced. If APIGroup is not specified,
|
||||
the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being
|
||||
referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being
|
||||
referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
dataSourceRef:
|
||||
description: 'dataSourceRef specifies the object from
|
||||
which to populate the volume with data, if a non-empty
|
||||
volume is desired. This may be any local object from
|
||||
a non-empty API group (non core object) or a PersistentVolumeClaim
|
||||
object. When this field is specified, volume binding
|
||||
will only succeed if the type of the specified object
|
||||
matches some installed volume populator or dynamic
|
||||
provisioner. This field will replace the functionality
|
||||
of the DataSource field and as such if both fields
|
||||
are non-empty, they must have the same value. For
|
||||
backwards compatibility, both fields (DataSource and
|
||||
DataSourceRef) will be set to the same value automatically
|
||||
if one of them is empty and the other is non-empty.
|
||||
There are two important differences between DataSource
|
||||
and DataSourceRef: * While DataSource only allows
|
||||
two specific types of objects, DataSourceRef allows
|
||||
any non-core object, as well as PersistentVolumeClaim
|
||||
objects. * While DataSource ignores disallowed values
|
||||
(dropping them), DataSourceRef preserves all values,
|
||||
and generates an error if a disallowed value is specified.
|
||||
(Beta) Using this field requires the AnyVolumeDataSource
|
||||
feature gate to be enabled.'
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup is the group for the resource
|
||||
being referenced. If APIGroup is not specified,
|
||||
the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being
|
||||
referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being
|
||||
referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
resources:
|
||||
description: 'resources represents the minimum resources
|
||||
the volume should have. If RecoverVolumeExpansionFailure
|
||||
feature is enabled users are allowed to specify resource
|
||||
requirements that are lower than previous value but
|
||||
must still be higher than capacity recorded in the
|
||||
status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount
|
||||
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount
|
||||
of compute resources required. If Requests is
|
||||
omitted for a container, it defaults to Limits
|
||||
if that is explicitly specified, otherwise to
|
||||
an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
selector:
|
||||
description: selector is a label query over volumes
|
||||
to consider for binding.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a
|
||||
selector that contains values, a key, and an
|
||||
operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the
|
||||
selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship
|
||||
to a set of values. Valid operators are
|
||||
In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist, the
|
||||
values array must be empty. This array is
|
||||
replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In",
|
||||
and the values array contains only "value". The
|
||||
requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
storageClassName:
|
||||
description: 'storageClassName is the name of the StorageClass
|
||||
required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
|
||||
type: string
|
||||
volumeMode:
|
||||
description: volumeMode defines what type of volume
|
||||
is required by the claim. Value of Filesystem is implied
|
||||
when not included in claim spec.
|
||||
type: string
|
||||
volumeName:
|
||||
description: volumeName is the binding reference to
|
||||
the PersistentVolume backing this claim.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: 'status represents the current information/status
|
||||
of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
|
||||
properties:
|
||||
accessModes:
|
||||
description: 'accessModes contains the actual access
|
||||
modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
allocatedResources:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: allocatedResources is the storage resource
|
||||
within AllocatedResources tracks the capacity allocated
|
||||
to a PVC. It may be larger than the actual capacity
|
||||
when a volume expansion operation is requested. For
|
||||
storage quota, the larger value from allocatedResources
|
||||
and PVC.spec.resources is used. If allocatedResources
|
||||
is not set, PVC.spec.resources alone is used for quota
|
||||
calculation. If a volume expansion capacity request
|
||||
is lowered, allocatedResources is only lowered if
|
||||
there are no expansion operations in progress and
|
||||
if the actual volume capacity is equal or lower than
|
||||
the requested capacity. This is an alpha field and
|
||||
requires enabling RecoverVolumeExpansionFailure feature.
|
||||
type: object
|
||||
capacity:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: capacity represents the actual resources
|
||||
of the underlying volume.
|
||||
type: object
|
||||
conditions:
|
||||
description: conditions is the current Condition of
|
||||
persistent volume claim. If underlying persistent
|
||||
volume is being resized then the Condition will be
|
||||
set to 'ResizeStarted'.
|
||||
items:
|
||||
description: PersistentVolumeClaimCondition contails
|
||||
details about state of pvc
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: lastProbeTime is the time we probed
|
||||
the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the time the
|
||||
condition transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is the human-readable message
|
||||
indicating details about last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: reason is a unique, this should be
|
||||
a short, machine understandable string that
|
||||
gives the reason for condition's last transition.
|
||||
If it reports "ResizeStarted" that means the
|
||||
underlying persistent volume is being resized.
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
description: PersistentVolumeClaimConditionType
|
||||
is a valid value of PersistentVolumeClaimCondition.Type
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
phase:
|
||||
description: phase represents the current phase of PersistentVolumeClaim.
|
||||
type: string
|
||||
resizeStatus:
|
||||
description: resizeStatus stores status of resize operation.
|
||||
ResizeStatus is not set by default but when expansion
|
||||
is complete resizeStatus is set to empty string by
|
||||
resize controller or kubelet. This is an alpha field
|
||||
and requires enabling RecoverVolumeExpansionFailure
|
||||
feature.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
lifecycle:
|
||||
description: Lifecycle contains the hooks for Pod lifecycle.
|
||||
properties:
|
||||
inPlaceUpdate:
|
||||
description: InPlaceUpdate is the hook before Pod to update and
|
||||
after Pod has been updated.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Default
|
||||
to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
preDelete:
|
||||
description: PreDelete is the hook before Pod to be deleted.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Default
|
||||
to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
network:
|
||||
properties:
|
||||
networkConf:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
networkType:
|
||||
type: string
|
||||
type: object
|
||||
replicas:
|
||||
description: replicas is the desired number of replicas of the given
|
||||
Template. These are replicas in the sense that they are instantiations
|
||||
of the same Template, but individual replicas also have a consistent
|
||||
identity.
|
||||
format: int32
|
||||
minimum: 0
|
||||
type: integer
|
||||
reserveGameServerIds:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
scaleStrategy:
|
||||
properties:
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'The maximum number of pods that can be unavailable
|
||||
during scaling. Value can be an absolute number (ex: 5) or a
|
||||
percentage of desired pods (ex: 10%). Absolute number is calculated
|
||||
from percentage by rounding down. It can just be allowed to
|
||||
work with Parallel podManagementPolicy.'
|
||||
x-kubernetes-int-or-string: true
|
||||
scaleDownStrategyType:
|
||||
description: ScaleDownStrategyType indicates the scaling down
|
||||
strategy. Default is GeneralScaleDownStrategyType
|
||||
type: string
|
||||
type: object
|
||||
serviceName:
|
||||
type: string
|
||||
serviceQualities:
|
||||
items:
|
||||
properties:
|
||||
containerName:
|
||||
type: string
|
||||
exec:
|
||||
description: Exec specifies the action to take.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command line to execute inside
|
||||
the container, the working directory for the command is
|
||||
root ('/') in the container's filesystem. The command
|
||||
is simply exec'd, it is not run inside a shell, so traditional
|
||||
shell instructions ('|', etc) won't work. To use a shell,
|
||||
you need to explicitly call out to that shell. Exit status
|
||||
of 0 is treated as live/healthy and non-zero is unhealthy.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
failureThreshold:
|
||||
description: Minimum consecutive failures for the probe to be
|
||||
considered failed after having succeeded. Defaults to 3. Minimum
|
||||
value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
grpc:
|
||||
description: GRPC specifies an action involving a GRPC port.
|
||||
This is a beta field and requires enabling GRPCContainerProbe
|
||||
feature gate.
|
||||
properties:
|
||||
port:
|
||||
description: Port number of the gRPC service. Number must
|
||||
be in the range 1 to 65535.
|
||||
format: int32
|
||||
type: integer
|
||||
service:
|
||||
description: "Service is the name of the service to place
|
||||
in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
||||
\n If this is not specified, the default behavior is defined
|
||||
by gRPC."
|
||||
type: string
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
httpGet:
|
||||
description: HTTPGet specifies the http request to perform.
|
||||
properties:
|
||||
host:
|
||||
description: Host name to connect to, defaults to the pod
|
||||
IP. You probably want to set "Host" in httpHeaders instead.
|
||||
type: string
|
||||
httpHeaders:
|
||||
description: Custom headers to set in the request. HTTP
|
||||
allows repeated headers.
|
||||
items:
|
||||
description: HTTPHeader describes a custom header to be
|
||||
used in HTTP probes
|
||||
properties:
|
||||
name:
|
||||
description: The header field name
|
||||
type: string
|
||||
value:
|
||||
description: The header field value
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
path:
|
||||
description: Path to access on the HTTP server.
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Name or number of the port to access on the
|
||||
container. Number must be in the range 1 to 65535. Name
|
||||
must be an IANA_SVC_NAME.
|
||||
x-kubernetes-int-or-string: true
|
||||
scheme:
|
||||
description: Scheme to use for connecting to the host. Defaults
|
||||
to HTTP.
|
||||
type: string
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
initialDelaySeconds:
|
||||
description: 'Number of seconds after the container has started
|
||||
before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
|
||||
format: int32
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
periodSeconds:
|
||||
description: How often (in seconds) to perform the probe. Default
|
||||
to 10 seconds. Minimum value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
permanent:
|
||||
description: Whether to make GameServerSpec not change after
|
||||
the ServiceQualityAction is executed. When Permanent is true,
|
||||
regardless of the detection results, ServiceQualityAction
|
||||
will only be executed once. When Permanent is false, ServiceQualityAction
|
||||
can be executed again even though ServiceQualityAction has
|
||||
been executed.
|
||||
type: boolean
|
||||
serviceQualityAction:
|
||||
items:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
containers:
|
||||
description: Containers can be used to make the corresponding
|
||||
GameServer container fields different from the fields
|
||||
defined by GameServerTemplate in GameServerSetSpec.
|
||||
items:
|
||||
properties:
|
||||
image:
|
||||
description: Image indicates the image of the container
|
||||
to update. When Image updated, pod.spec.containers[*].image
|
||||
will be updated immediately.
|
||||
type: string
|
||||
name:
|
||||
description: Name indicates the name of the container
|
||||
to update.
|
||||
type: string
|
||||
resources:
|
||||
description: Resources indicates the resources of
|
||||
the container to update. When Resources updated,
|
||||
pod.spec.containers[*].Resources will be not updated
|
||||
immediately, which will be updated when pod recreate.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount
|
||||
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum
|
||||
amount of compute resources required. If Requests
|
||||
is omitted for a container, it defaults to
|
||||
Limits if that is explicitly specified, otherwise
|
||||
to an implementation-defined value. More info:
|
||||
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
networkDisabled:
|
||||
type: boolean
|
||||
opsState:
|
||||
type: string
|
||||
result:
|
||||
description: Result indicate the probe message returned
|
||||
by the script. When Result is defined, it would exec
|
||||
action only when the according Result is actually returns.
|
||||
type: string
|
||||
state:
|
||||
type: boolean
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- state
|
||||
type: object
|
||||
type: array
|
||||
successThreshold:
|
||||
description: Minimum consecutive successes for the probe to
|
||||
be considered successful after having failed. Defaults to
|
||||
1. Must be 1 for liveness and startup. Minimum value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
tcpSocket:
|
||||
description: TCPSocket specifies an action involving a TCP port.
|
||||
properties:
|
||||
host:
|
||||
description: 'Optional: Host name to connect to, defaults
|
||||
to the pod IP.'
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Number or name of the port to access on the
|
||||
container. Number must be in the range 1 to 65535. Name
|
||||
must be an IANA_SVC_NAME.
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
terminationGracePeriodSeconds:
|
||||
description: Optional duration in seconds the pod needs to terminate
|
||||
gracefully upon probe failure. The grace period is the duration
|
||||
in seconds after the processes running in the pod are sent
|
||||
a termination signal and the time when the processes are forcibly
|
||||
halted with a kill signal. Set this value longer than the
|
||||
expected cleanup time for your process. If this value is nil,
|
||||
the pod's terminationGracePeriodSeconds will be used. Otherwise,
|
||||
this value overrides the value provided by the pod spec. Value
|
||||
must be non-negative integer. The value zero indicates stop
|
||||
immediately via the kill signal (no opportunity to shut down).
|
||||
This is a beta field and requires enabling ProbeTerminationGracePeriod
|
||||
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
|
||||
is used if unset.
|
||||
format: int64
|
||||
type: integer
|
||||
timeoutSeconds:
|
||||
description: 'Number of seconds after which the probe times
|
||||
out. Defaults to 1 second. Minimum value is 1. More info:
|
||||
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
- permanent
|
||||
type: object
|
||||
type: array
|
||||
updateStrategy:
|
||||
properties:
|
||||
rollingUpdate:
|
||||
description: RollingUpdate is used to communicate parameters when
|
||||
Type is RollingUpdateStatefulSetStrategyType.
|
||||
properties:
|
||||
inPlaceUpdateStrategy:
|
||||
description: UnorderedUpdate contains strategies for non-ordered
|
||||
update. If it is not nil, pods will be updated with non-ordered
|
||||
sequence. Noted that UnorderedUpdate can only be allowed
|
||||
to work with Parallel podManagementPolicy UnorderedUpdate
|
||||
*kruiseV1beta1.UnorderedUpdateStrategy `json:"unorderedUpdate,omitempty"`
|
||||
InPlaceUpdateStrategy contains strategies for in-place update.
|
||||
properties:
|
||||
gracePeriodSeconds:
|
||||
description: GracePeriodSeconds is the timespan between
|
||||
set Pod status to not-ready and update images in Pod
|
||||
spec when in-place update a Pod.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'The maximum number of pods that can be unavailable
|
||||
during the update. Value can be an absolute number (ex:
|
||||
5) or a percentage of desired pods (ex: 10%). Absolute number
|
||||
is calculated from percentage by rounding down. Also, maxUnavailable
|
||||
can just be allowed to work with Parallel podManagementPolicy.
|
||||
Defaults to 1.'
|
||||
x-kubernetes-int-or-string: true
|
||||
minReadySeconds:
|
||||
description: MinReadySeconds indicates how long will the pod
|
||||
be considered ready after it's updated. MinReadySeconds
|
||||
works with both OrderedReady and Parallel podManagementPolicy.
|
||||
It affects the pod scale up speed when the podManagementPolicy
|
||||
is set to be OrderedReady. Combined with MaxUnavailable,
|
||||
it affects the pod update speed regardless of podManagementPolicy.
|
||||
Default value is 0, max is 300.
|
||||
format: int32
|
||||
type: integer
|
||||
partition:
|
||||
description: 'Partition indicates the ordinal at which the
|
||||
StatefulSet should be partitioned by default. But if unorderedUpdate
|
||||
has been set: - Partition indicates the number of pods with
|
||||
non-updated revisions when rolling update. - It means controller
|
||||
will update $(replicas - partition) number of pod. Default
|
||||
value is 0.'
|
||||
format: int32
|
||||
type: integer
|
||||
paused:
|
||||
description: Paused indicates that the StatefulSet is paused.
|
||||
Default value is false
|
||||
type: boolean
|
||||
podUpdatePolicy:
|
||||
description: PodUpdatePolicy indicates how pods should be
|
||||
updated Default value is "ReCreate"
|
||||
type: string
|
||||
type: object
|
||||
type:
|
||||
description: Type indicates the type of the StatefulSetUpdateStrategy.
|
||||
Default is RollingUpdate.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- replicas
|
||||
type: object
|
||||
status:
|
||||
description: GameServerSetStatus defines the observed state of GameServerSet
|
||||
properties:
|
||||
availableReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
currentReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
labelSelector:
|
||||
description: LabelSelector is label selectors for query over pods
|
||||
that should match the replica count used by HPA.
|
||||
type: string
|
||||
maintainingReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
observedGeneration:
|
||||
description: The generation observed by the controller.
|
||||
format: int64
|
||||
type: integer
|
||||
readyReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
replicas:
|
||||
description: replicas from advancedStatefulSet
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReadyReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
waitToBeDeletedReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- availableReplicas
|
||||
- currentReplicas
|
||||
- readyReplicas
|
||||
- replicas
|
||||
- updatedReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
scale:
|
||||
labelSelectorPath: .status.labelSelector
|
||||
specReplicasPath: .spec.replicas
|
||||
statusReplicasPath: .status.replicas
|
||||
status: {}
|
|
@ -0,0 +1,121 @@
|
|||
{{- if .Values.installation.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: {{ .Values.installation.namespace }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-controller-manager-metrics-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/default-container: manager
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
# securityContext:
|
||||
# runAsNonRoot: true
|
||||
# TODO(user): For common cases that do not require escalating privileges
|
||||
# it is recommended to ensure that all your Pods/Containers are restrictive.
|
||||
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
|
||||
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
|
||||
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
|
||||
# seccompProfile:
|
||||
# type: RuntimeDefault
|
||||
containers:
|
||||
- command:
|
||||
- /manager
|
||||
args:
|
||||
- --leader-elect=false
|
||||
- --provider-config=/etc/kruise-game/config.toml
|
||||
- --api-server-qps={{ .Values.kruiseGame.apiServerQps }}
|
||||
- --api-server-qps-burst={{ .Values.kruiseGame.apiServerQpsBurst }}
|
||||
- --scale-server-bind-address=:{{ .Values.scale.service.targetPort }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- --metrics-bind-address=:{{ .Values.prometheus.monitorService.port }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
name: manager
|
||||
env:
|
||||
- name: "NETWORK_TOTAL_WAIT_TIME"
|
||||
value: {{ .Values.network.totalWaitTime | quote }}
|
||||
- name: "NETWORK_PROBE_INTERVAL_TIME"
|
||||
value: {{ .Values.network.probeIntervalTime | quote }}
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: {{ .Values.prometheus.monitorService.port }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- "ALL"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
# TODO(user): Configure the resources accordingly based on the project requirements.
|
||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kruise-game
|
||||
name: provider-config
|
||||
topologySpreadConstraints:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
|
||||
matchLabelKeys:
|
||||
- pod-template-hash
|
||||
{{- end }}
|
||||
maxSkew: 1
|
||||
topologyKey: topology.kubernetes.io/zone
|
||||
whenUnsatisfiable: ScheduleAnyway
|
||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: config.toml
|
||||
path: config.toml
|
||||
name: kruise-game-manager-config
|
||||
name: provider-config
|
|
@ -0,0 +1,17 @@
|
|||
{{- if .Values.prometheus.enabled }}
|
||||
# Prometheus Monitor Service (Metrics)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-controller-manager-metrics-monitor
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
endpoints:
|
||||
- path: /metrics
|
||||
port: https
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- end }}
|
|
@ -0,0 +1,404 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: kruise-game-leader-election-role
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kruise-game-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- podprobemarkers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- elbv2.k8s.aws
|
||||
resources:
|
||||
- targetgroupbindings
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- listeners
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- targetgroups
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- "/metrics"
|
||||
verbs:
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-proxy-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kruise-game-leader-election-rolebinding
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: kruise-game-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kruise-game-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-proxy-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: proxy-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-external-scaler
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.scale.service.port }}
|
||||
targetPort: {{ .Values.scale.service.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-webhook-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.kruiseGame.webhook.port }}
|
||||
targetPort: {{ .Values.kruiseGame.webhook.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,66 @@
|
|||
# Default values for kruise-game.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# values for kruise-game installation
|
||||
installation:
|
||||
namespace: kruise-game-system
|
||||
createNamespace: true
|
||||
|
||||
kruiseGame:
|
||||
fullname: kruise-game-controller-manager
|
||||
healthBindPort: "8082"
|
||||
webhook:
|
||||
port: 443
|
||||
targetPort: 9876
|
||||
apiServerQps: 5
|
||||
apiServerQpsBurst: 10
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: openkruise/kruise-game-manager
|
||||
tag: v0.9.0
|
||||
pullPolicy: Always
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
|
||||
serviceAccount:
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
|
||||
service:
|
||||
port: 8443
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
monitorService:
|
||||
port: 8080
|
||||
scale:
|
||||
service:
|
||||
port: 6000
|
||||
targetPort: 6000
|
||||
|
||||
network:
|
||||
totalWaitTime: 60
|
||||
probeIntervalTime: 5
|
||||
|
||||
cloudProvider:
|
||||
installCRD: true
|
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
name: kruise-game
|
||||
description: Helm chart for kruise-game components
|
||||
version: 1.0.0-rc
|
||||
appVersion: 1.0.0-rc
|
||||
kubeVersion: ">= 1.18.0-0"
|
||||
sources:
|
||||
- https://github.com/openkruise/kruise-game
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Changed]: https://github.com/openkruise/kruise-game/blob/master/CHANGELOG.md"
|
|
@ -0,0 +1,61 @@
|
|||
# Kruise Game v1.0.0
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the kruise-game chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------------|-----------------------------------------------------------------------------|----------------------------------|
|
||||
| `installation.namespace` | Namespace for kruise-game operation installation | `kruise-game-system` |
|
||||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
|
||||
| `kruiseGame.fullname` | Nick name for kruise-game deployment and other configurations | `kruise-game-controller-manager` |
|
||||
| `kruiseGame.healthBindPort` | Port for checking health of kruise-game container | `8082` |
|
||||
| `kruiseGame.webhook.port` | Port of webhook served by kruise-game container | `443` |
|
||||
| `kruiseGame.webhook.targetPort` | ObjectSelector for workloads in MutatingWebhookConfigurations | `9876` |
|
||||
| `kruiseGame.apiServerQps` | Indicates the maximum QPS to the master from kruise-game-controller-manager | `5` |
|
||||
| `kruiseGame.apiServerQpsBurst` | Maximum burst for throttle of kruise-game-controller-manager | `10` |
|
||||
| `kruiseGame.gameserverWorkers` | Max concurrent workers for GameServer controller | `10` |
|
||||
| `kruiseGame.gameserversetWorkers` | Max concurrent workers for GameServerSet controller | `10` |
|
||||
| `replicaCount` | Replicas of kruise-game deployment | `1` |
|
||||
| `image.repository` | Repository for kruise-game image | `openkruise/kruise-game-manager` |
|
||||
| `image.tag` | Tag for kruise-game image | `v1.0.0` |
|
||||
| `image.pullPolicy` | ImagePullPolicy for kruise-game container | `Always` |
|
||||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-game | ` ` |
|
||||
| `service.port` | Port of kruise-game service | `8443` |
|
||||
| `resources.limits.cpu` | CPU resource limit of kruise-game container | `500m` |
|
||||
| `resources.limits.memory` | Memory resource limit of kruise-game container | `1Gi` |
|
||||
| `resources.requests.cpu` | CPU resource request of kruise-game container | `10m` |
|
||||
| `resources.requests.memory` | Memory resource request of kruise-game container | `64Mi` |
|
||||
| `prometheus.enabled` | Whether to bind metric endpoint | `true` |
|
||||
| `prometheus.monitorService.port` | Port of the monitorservice bind to | `8080` |
|
||||
| `scale.service.port` | Port of the external scaler server binds to | `6000` |
|
||||
| `scale.service.targetPort` | TargetPort of the external scaler server binds to | `6000` |
|
||||
| `network.totalWaitTime` | Maximum time to wait for network ready, the unit is seconds | `60` |
|
||||
| `network.probeIntervalTime` | Time interval for detecting network status, the unit is seconds | `5` |
|
||||
| `cloudProvider.installCRD` | Whether to install CloudProvider CRD | `true` |
|
||||
| `indexOffsetScheduler.enabled` | Whether to install index-offset-scheduler | `false` |
|
||||
| `certificates.autoGenerated` | Whether to auto-generate webhook certificates | `true` |
|
||||
| `certificates.secretName` | Name of the secret containing webhook certificates | `kruise-game-certs` |
|
||||
| `certificates.mountPath` | Path to mount webhook certificates in container | `/tmp/webhook-certs/` |
|
||||
| `certificates.certManager.enabled` | Whether to use cert-manager for certificate management | `false` |
|
||||
| `certificates.certManager.duration` | Certificate validity duration | `8760h0m0s` |
|
||||
| `certificates.certManager.renewBefore` | Time before expiry to renew certificate | `5840h0m0s` |
|
||||
| `certificates.certManager.generateCA` | Whether to generate a Certificate Authority | `true` |
|
||||
| `certificates.certManager.caSecretName` | Name of the secret containing the CA certificate | `kruise-game-ca` |
|
||||
| `certificates.certManager.issuer.generate` | Whether to generate the issuer automatically | `true` |
|
||||
| `certificates.certManager.issuer.name` | Name of the certificate issuer | `kruise-ca` |
|
||||
| `certificates.certManager.issuer.kind` | Type of the certificate issuer | `ClusterIssuer` |
|
||||
| `certificates.certManager.issuer.group` | API group of the certificate issuer | `cert-manager.io` |
|
||||
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
### Optional: the local image for China
|
||||
|
||||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:
|
||||
|
||||
```bash
|
||||
$ helm install kruise-game https://... --set image.repository=registry.cn-hangzhou.aliyuncs.com/acs/kruise-game-manager
|
||||
...
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kruise-game.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kruise-game.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kruise-game.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kruise-game.labels" -}}
|
||||
helm.sh/chart: {{ include "kruise-game.chart" . }}
|
||||
{{ include "kruise-game.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "kruise-game.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kruise-game.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kruise-game.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "kruise-game.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,10 @@
|
|||
{{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.issuer.generate }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}-issuer
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ca:
|
||||
secretName: {{ .Values.certificates.certManager.caSecretName }}
|
||||
{{- end }}
|
|
@ -0,0 +1,39 @@
|
|||
{{- if .Values.certificates.certManager.enabled }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}-cert
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
commonName: {{ .Values.kruiseGame.fullname }}
|
||||
dnsNames:
|
||||
- {{ .Values.kruiseGame.webhook.serviceName }}.{{ .Values.installation.namespace }}
|
||||
- {{ .Values.kruiseGame.webhook.serviceName }}.{{ .Values.installation.namespace }}.svc
|
||||
- {{ .Values.kruiseGame.webhook.serviceName }}.{{ .Values.installation.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
secretName: {{ .Values.certificates.secretName }}
|
||||
usages:
|
||||
- server auth
|
||||
- client auth
|
||||
privateKey:
|
||||
rotationPolicy: Always
|
||||
algorithm: RSA
|
||||
size: 2048
|
||||
duration: {{ .Values.certificates.certManager.duration }}
|
||||
renewBefore: {{ .Values.certificates.certManager.renewBefore }}
|
||||
issuerRef:
|
||||
{{- if .Values.certificates.certManager.issuer.generate }}
|
||||
name: {{ .Values.kruiseGame.fullname }}-issuer
|
||||
kind: Issuer
|
||||
group: cert-manager.io
|
||||
{{- else }}
|
||||
{{- if .Values.certificates.certManager.issuer.name }}
|
||||
name: {{ .Values.certificates.certManager.issuer.name }}
|
||||
{{- end }}
|
||||
{{- if .Values.certificates.certManager.issuer.kind }}
|
||||
kind: {{ .Values.certificates.certManager.issuer.kind }}
|
||||
{{- end }}
|
||||
{{- if .Values.certificates.certManager.issuer.group }}
|
||||
group: {{ .Values.certificates.certManager.issuer.group }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,21 @@
|
|||
{{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.generateCA .Values.certificates.certManager.issuer.generate }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}-ca
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
isCA: true
|
||||
commonName: {{ .Values.kruiseGame.fullname }}
|
||||
secretName: {{ .Values.certificates.certManager.caSecretName }}
|
||||
privateKey:
|
||||
rotationPolicy: Always
|
||||
algorithm: RSA
|
||||
size: 2048
|
||||
duration: 8760h0m0s # 1 year
|
||||
renewBefore: 720h0m0s # 1 month
|
||||
issuerRef:
|
||||
name: {{ .Values.kruiseGame.fullname }}-selfsigned-issuer
|
||||
kind: Issuer
|
||||
group: cert-manager.io
|
||||
{{- end }}
|
|
@ -0,0 +1,13 @@
|
|||
{{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.generateCA .Values.certificates.certManager.issuer.generate }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
{{- with .Values.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ .Values.kruiseGame.fullname }}-selfsigned-issuer
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
selfSigned: {}
|
||||
{{- end }}
|
|
@ -0,0 +1,77 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kruise-game-manager-config
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
data:
|
||||
config.toml: |
|
||||
[kubernetes]
|
||||
enable = true
|
||||
[kubernetes.hostPort]
|
||||
max_port = 9000
|
||||
min_port = 8000
|
||||
|
||||
[alibabacloud]
|
||||
enable = true
|
||||
[alibabacloud.slb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
block_ports = [593]
|
||||
[alibabacloud.nlb]
|
||||
max_port = 1502
|
||||
min_port = 1000
|
||||
block_ports = [1025, 1434, 1068]
|
||||
|
||||
[volcengine]
|
||||
enable = true
|
||||
[volcengine.clb]
|
||||
max_port = 600
|
||||
min_port = 550
|
||||
block_ports = [593]
|
||||
|
||||
[aws]
|
||||
enable = false
|
||||
[aws.nlb]
|
||||
max_port = 30050
|
||||
min_port = 30001
|
||||
|
||||
[jdcloud]
|
||||
enable = false
|
||||
[jdcloud.nlb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
|
||||
[tencentcloud]
|
||||
enable = true
|
||||
|
||||
[hwcloud]
|
||||
enable = false
|
||||
[hwcloud.elb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
block_ports = []
|
||||
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :8081
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:8080
|
||||
webhook:
|
||||
port: 9443
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: c637bb1e.my.domain
|
||||
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||
# when the Manager ends. This requires the binary to immediately end when the
|
||||
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||
# speeds up voluntary leader transitions as the new leader don't have to wait
|
||||
# LeaseDuration time first.
|
||||
# In the default scaffold provided, the program ends immediately after
|
||||
# the manager stops, so would be fine to enable this option. However,
|
||||
# if you are doing or is intended to do any operation such as perform cleanups
|
||||
# after the manager stops then its usage might be unsafe.
|
||||
# leaderElectionReleaseOnCancel: true
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,298 @@
|
|||
{{- if .Values.indexOffsetScheduler.enabled }}
|
||||
# service account
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
---
|
||||
# clusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
annotations:
|
||||
rbac.authorization.kubernetes.io/autoupdate: 'true'
|
||||
name: index-offset-scheduler
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
- events.k8s.io
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- kube-scheduler
|
||||
- index-offset-scheduler
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leasecandidates
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- bindings
|
||||
- pods/binding
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- replicationcontrollers
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
- extensions
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- poddisruptionbudgets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csinodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csidrivers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csistoragecapacities
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resourceNames:
|
||||
- kube-scheduler
|
||||
- index-offset-scheduler
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- delete
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
|
||||
---
|
||||
# ClusterRoleBinding: index-offset-scheduler
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: index-offset-scheduler-as-kube-scheduler
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: index-offset-scheduler
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
# ClusterRoleBinding: system:volume-scheduler
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: index-offset-scheduler-as-volume-scheduler
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: system:volume-scheduler
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
# RoleBinding: apiserver
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: index-offset-scheduler-extension-apiserver-authentication-reader
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: extension-apiserver-authentication-reader
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
---
|
||||
# configmap
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: index-offset-scheduler-config
|
||||
namespace: kruise-game-system
|
||||
data:
|
||||
scheduler-config.yaml: |
|
||||
# stable v1 after version 1.25
|
||||
apiVersion: kubescheduler.config.k8s.io/v1
|
||||
kind: KubeSchedulerConfiguration
|
||||
leaderElection:
|
||||
leaderElect: false
|
||||
resourceNamespace: kruise-game-system
|
||||
resourceName: index-offset-scheduler
|
||||
profiles:
|
||||
- schedulerName: index-offset-scheduler
|
||||
plugins:
|
||||
score:
|
||||
enabled:
|
||||
- name: index-offset-scheduler
|
||||
---
|
||||
# deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
labels:
|
||||
app: index-offset-scheduler
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: index-offset-scheduler
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: index-offset-scheduler
|
||||
spec:
|
||||
serviceAccountName: index-offset-scheduler
|
||||
containers:
|
||||
- name: scheduler
|
||||
# change your image
|
||||
image: openkruise/kruise-game-scheduler-index-offset:v1.0
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- /app/index-offset-scheduler
|
||||
- --config=/etc/kubernetes/scheduler-config.yaml
|
||||
- --v=5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/kubernetes
|
||||
# imagePullSecrets:
|
||||
# - name: <your image pull secret>
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: index-offset-scheduler-config
|
||||
{{- end }}
|
|
@ -0,0 +1,126 @@
|
|||
{{- if .Values.installation.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: {{ .Values.installation.namespace }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-controller-manager-metrics-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/default-container: manager
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
# securityContext:
|
||||
# runAsNonRoot: true
|
||||
# TODO(user): For common cases that do not require escalating privileges
|
||||
# it is recommended to ensure that all your Pods/Containers are restrictive.
|
||||
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
|
||||
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
|
||||
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
|
||||
# seccompProfile:
|
||||
# type: RuntimeDefault
|
||||
containers:
|
||||
- command:
|
||||
- /manager
|
||||
args:
|
||||
- --leader-elect=false
|
||||
- --provider-config=/etc/kruise-game/config.toml
|
||||
- --api-server-qps={{ .Values.kruiseGame.apiServerQps }}
|
||||
- --api-server-qps-burst={{ .Values.kruiseGame.apiServerQpsBurst }}
|
||||
- --gameserver-workers={{ .Values.kruiseGame.gameserverWorkers }}
|
||||
- --gameserverset-workers={{ .Values.kruiseGame.gameserversetWorkers }}
|
||||
- --scale-server-bind-address=:{{ .Values.scale.service.targetPort }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- --metrics-bind-address=:{{ .Values.prometheus.monitorService.port }}
|
||||
{{- end }}
|
||||
{{- if not .Values.certificates.autoGenerated }}
|
||||
- --enable-cert-generation={{ .Values.certificates.autoGenerated }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
name: manager
|
||||
env:
|
||||
- name: "NETWORK_TOTAL_WAIT_TIME"
|
||||
value: {{ .Values.network.totalWaitTime | quote }}
|
||||
- name: "NETWORK_PROBE_INTERVAL_TIME"
|
||||
value: {{ .Values.network.probeIntervalTime | quote }}
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: {{ .Values.prometheus.monitorService.port }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- "ALL"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
# TODO(user): Configure the resources accordingly based on the project requirements.
|
||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kruise-game
|
||||
name: provider-config
|
||||
{{- if not .Values.certificates.autoGenerated }}
|
||||
- mountPath: {{ .Values.certificates.mountPath }}
|
||||
name: certificates
|
||||
{{- end }}
|
||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: config.toml
|
||||
path: config.toml
|
||||
name: kruise-game-manager-config
|
||||
name: provider-config
|
||||
{{- if not .Values.certificates.autoGenerated }}
|
||||
- name: certificates
|
||||
secret:
|
||||
defaultMode: 420
|
||||
secretName: {{ .Values.certificates.secretName}}
|
||||
optional: {{ and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }}
|
||||
{{- end }}
|
|
@ -0,0 +1,17 @@
|
|||
{{- if .Values.prometheus.enabled }}
|
||||
# Prometheus Monitor Service (Metrics)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-controller-manager-metrics-monitor
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
endpoints:
|
||||
- path: /metrics
|
||||
port: https
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- end }}
|
|
@ -0,0 +1,404 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: kruise-game-leader-election-role
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kruise-game-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- podprobemarkers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- elbv2.k8s.aws
|
||||
resources:
|
||||
- targetgroupbindings
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- listeners
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- targetgroups
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- "/metrics"
|
||||
verbs:
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-proxy-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kruise-game-leader-election-rolebinding
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: kruise-game-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kruise-game-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-proxy-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: proxy-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-external-scaler
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.scale.service.port }}
|
||||
targetPort: {{ .Values.scale.service.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,44 @@
|
|||
{{- if not .Values.certificates.autoGenerated }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.certificates.certManager.enabled }}
|
||||
{{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }}
|
||||
cert-manager.io/inject-ca-from-secret: {{ .Values.installation.namespace }}/{{ .Values.certificates.certManager.caSecretName }}
|
||||
{{- else }}
|
||||
cert-manager.io/inject-ca-from: {{ .Values.installation.namespace }}/{{ .Values.kruiseGame.fullname }}-cert
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-mutating-webhook
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
- v1beta1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
path: /mutate-v1-pod
|
||||
failurePolicy: {{ .Values.kruiseGame.webhook.failurePolicy }}
|
||||
matchPolicy: Equivalent
|
||||
name: mgameserverset.kb.io
|
||||
rules:
|
||||
- operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
- DELETE
|
||||
apiGroups:
|
||||
- ""
|
||||
apiVersions:
|
||||
- v1
|
||||
resources:
|
||||
- pods
|
||||
objectSelector:
|
||||
matchExpressions:
|
||||
- key: game.kruise.io/owner-gss
|
||||
operator: Exists
|
||||
sideEffects: None
|
||||
{{- end }}
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.kruiseGame.webhook.port }}
|
||||
targetPort: {{ .Values.kruiseGame.webhook.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,42 @@
|
|||
{{- if not .Values.certificates.autoGenerated }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.certificates.certManager.enabled }}
|
||||
{{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }}
|
||||
cert-manager.io/inject-ca-from-secret: {{ .Values.installation.namespace }}/{{ .Values.certificates.certManager.caSecretName }}
|
||||
{{- else }}
|
||||
cert-manager.io/inject-ca-from: {{ .Values.installation.namespace }}/{{ .Values.kruiseGame.fullname }}-cert
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-validating-webhook
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
- v1beta1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
path: /validate-v1alpha1-gss
|
||||
failurePolicy: {{ .Values.kruiseGame.webhook.failurePolicy }}
|
||||
matchPolicy: Equivalent
|
||||
name: vgameserverset.kb.io
|
||||
namespaceSelector: {}
|
||||
objectSelector: {}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
apiVersions:
|
||||
- v1alpha1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- gameserversets
|
||||
sideEffects: None
|
||||
timeoutSeconds: 10
|
||||
{{- end }}
|
|
@ -0,0 +1,93 @@
|
|||
# Default values for kruise-game.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# values for kruise-game installation
|
||||
installation:
|
||||
namespace: kruise-game-system
|
||||
createNamespace: true
|
||||
|
||||
kruiseGame:
|
||||
fullname: kruise-game-controller-manager
|
||||
healthBindPort: "8082"
|
||||
webhook:
|
||||
serviceName: kruise-game-webhook-service
|
||||
port: 443
|
||||
targetPort: 9876
|
||||
failurePolicy: Fail
|
||||
apiServerQps: 5
|
||||
apiServerQpsBurst: 10
|
||||
gameserverWorkers: 10
|
||||
gameserversetWorkers: 10
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: openkruise/kruise-game-manager
|
||||
tag: v1.0.0
|
||||
pullPolicy: Always
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
|
||||
serviceAccount:
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
|
||||
service:
|
||||
port: 8443
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
monitorService:
|
||||
port: 8080
|
||||
scale:
|
||||
service:
|
||||
port: 6000
|
||||
targetPort: 6000
|
||||
|
||||
network:
|
||||
totalWaitTime: 60
|
||||
probeIntervalTime: 5
|
||||
|
||||
cloudProvider:
|
||||
installCRD: true
|
||||
|
||||
indexOffsetScheduler:
|
||||
enabled: false
|
||||
|
||||
# Kubernetes cluster domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
certificates:
|
||||
autoGenerated: true
|
||||
secretName: kruise-game-certs
|
||||
mountPath: /tmp/webhook-certs/
|
||||
certManager:
|
||||
enabled: false
|
||||
duration: 8760h0m0s # 1 year
|
||||
renewBefore: 5840h0m0s # 8 months
|
||||
generateCA: true
|
||||
caSecretName: "kruise-game-ca"
|
||||
# -- Reference to custom Issuer. If issuer.generate is false, then issuer.group, issuer.kind and issuer.name are required
|
||||
issuer:
|
||||
generate: true
|
||||
name: kruise-ca
|
||||
kind: ClusterIssuer
|
||||
group: cert-manager.io
|
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
name: kruise-game
|
||||
description: Helm chart for kruise-game components
|
||||
version: 1.0.0
|
||||
appVersion: 1.0.0
|
||||
kubeVersion: ">= 1.18.0-0"
|
||||
sources:
|
||||
- https://github.com/openkruise/kruise-game
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Changed]: https://github.com/openkruise/kruise-game/blob/master/CHANGELOG.md"
|
|
@ -0,0 +1,61 @@
|
|||
# Kruise Game v1.0.0
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the kruise-game chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------------|-----------------------------------------------------------------------------|----------------------------------|
|
||||
| `installation.namespace` | Namespace for kruise-game operation installation | `kruise-game-system` |
|
||||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
|
||||
| `kruiseGame.fullname` | Nick name for kruise-game deployment and other configurations | `kruise-game-controller-manager` |
|
||||
| `kruiseGame.healthBindPort` | Port for checking health of kruise-game container | `8082` |
|
||||
| `kruiseGame.webhook.port` | Port of webhook served by kruise-game container | `443` |
|
||||
| `kruiseGame.webhook.targetPort` | ObjectSelector for workloads in MutatingWebhookConfigurations | `9876` |
|
||||
| `kruiseGame.apiServerQps` | Indicates the maximum QPS to the master from kruise-game-controller-manager | `5` |
|
||||
| `kruiseGame.apiServerQpsBurst` | Maximum burst for throttle of kruise-game-controller-manager | `10` |
|
||||
| `kruiseGame.gameserverWorkers` | Max concurrent workers for GameServer controller | `10` |
|
||||
| `kruiseGame.gameserversetWorkers` | Max concurrent workers for GameServerSet controller | `10` |
|
||||
| `replicaCount` | Replicas of kruise-game deployment | `1` |
|
||||
| `image.repository` | Repository for kruise-game image | `openkruise/kruise-game-manager` |
|
||||
| `image.tag` | Tag for kruise-game image | `v1.0.0` |
|
||||
| `image.pullPolicy` | ImagePullPolicy for kruise-game container | `Always` |
|
||||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-game | ` ` |
|
||||
| `service.port` | Port of kruise-game service | `8443` |
|
||||
| `resources.limits.cpu` | CPU resource limit of kruise-game container | `500m` |
|
||||
| `resources.limits.memory` | Memory resource limit of kruise-game container | `1Gi` |
|
||||
| `resources.requests.cpu` | CPU resource request of kruise-game container | `10m` |
|
||||
| `resources.requests.memory` | Memory resource request of kruise-game container | `64Mi` |
|
||||
| `prometheus.enabled` | Whether to bind metric endpoint | `true` |
|
||||
| `prometheus.monitorService.port` | Port of the monitorservice bind to | `8080` |
|
||||
| `scale.service.port` | Port of the external scaler server binds to | `6000` |
|
||||
| `scale.service.targetPort` | TargetPort of the external scaler server binds to | `6000` |
|
||||
| `network.totalWaitTime` | Maximum time to wait for network ready, the unit is seconds | `60` |
|
||||
| `network.probeIntervalTime` | Time interval for detecting network status, the unit is seconds | `5` |
|
||||
| `cloudProvider.installCRD` | Whether to install CloudProvider CRD | `true` |
|
||||
| `indexOffsetScheduler.enabled` | Whether to install index-offset-scheduler | `false` |
|
||||
| `certificates.autoGenerated` | Whether to auto-generate webhook certificates | `true` |
|
||||
| `certificates.secretName` | Name of the secret containing webhook certificates | `kruise-game-certs` |
|
||||
| `certificates.mountPath` | Path to mount webhook certificates in container | `/tmp/webhook-certs/` |
|
||||
| `certificates.certManager.enabled` | Whether to use cert-manager for certificate management | `false` |
|
||||
| `certificates.certManager.duration` | Certificate validity duration | `8760h0m0s` |
|
||||
| `certificates.certManager.renewBefore` | Time before expiry to renew certificate | `5840h0m0s` |
|
||||
| `certificates.certManager.generateCA` | Whether to generate a Certificate Authority | `true` |
|
||||
| `certificates.certManager.caSecretName` | Name of the secret containing the CA certificate | `kruise-game-ca` |
|
||||
| `certificates.certManager.issuer.generate` | Whether to generate the issuer automatically | `true` |
|
||||
| `certificates.certManager.issuer.name` | Name of the certificate issuer | `kruise-ca` |
|
||||
| `certificates.certManager.issuer.kind` | Type of the certificate issuer | `ClusterIssuer` |
|
||||
| `certificates.certManager.issuer.group` | API group of the certificate issuer | `cert-manager.io` |
|
||||
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
### Optional: the local image for China
|
||||
|
||||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:
|
||||
|
||||
```bash
|
||||
$ helm install kruise-game https://... --set image.repository=registry.cn-hangzhou.aliyuncs.com/acs/kruise-game-manager
|
||||
...
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kruise-game.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kruise-game.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kruise-game.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kruise-game.labels" -}}
|
||||
helm.sh/chart: {{ include "kruise-game.chart" . }}
|
||||
{{ include "kruise-game.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "kruise-game.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kruise-game.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kruise-game.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "kruise-game.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,10 @@
|
|||
{{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.issuer.generate }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}-issuer
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ca:
|
||||
secretName: {{ .Values.certificates.certManager.caSecretName }}
|
||||
{{- end }}
|
|
@ -0,0 +1,39 @@
|
|||
{{- if .Values.certificates.certManager.enabled }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}-cert
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
commonName: {{ .Values.kruiseGame.fullname }}
|
||||
dnsNames:
|
||||
- {{ .Values.kruiseGame.webhook.serviceName }}.{{ .Values.installation.namespace }}
|
||||
- {{ .Values.kruiseGame.webhook.serviceName }}.{{ .Values.installation.namespace }}.svc
|
||||
- {{ .Values.kruiseGame.webhook.serviceName }}.{{ .Values.installation.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
secretName: {{ .Values.certificates.secretName }}
|
||||
usages:
|
||||
- server auth
|
||||
- client auth
|
||||
privateKey:
|
||||
rotationPolicy: Always
|
||||
algorithm: RSA
|
||||
size: 2048
|
||||
duration: {{ .Values.certificates.certManager.duration }}
|
||||
renewBefore: {{ .Values.certificates.certManager.renewBefore }}
|
||||
issuerRef:
|
||||
{{- if .Values.certificates.certManager.issuer.generate }}
|
||||
name: {{ .Values.kruiseGame.fullname }}-issuer
|
||||
kind: Issuer
|
||||
group: cert-manager.io
|
||||
{{- else }}
|
||||
{{- if .Values.certificates.certManager.issuer.name }}
|
||||
name: {{ .Values.certificates.certManager.issuer.name }}
|
||||
{{- end }}
|
||||
{{- if .Values.certificates.certManager.issuer.kind }}
|
||||
kind: {{ .Values.certificates.certManager.issuer.kind }}
|
||||
{{- end }}
|
||||
{{- if .Values.certificates.certManager.issuer.group }}
|
||||
group: {{ .Values.certificates.certManager.issuer.group }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,21 @@
|
|||
{{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.generateCA .Values.certificates.certManager.issuer.generate }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}-ca
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
isCA: true
|
||||
commonName: {{ .Values.kruiseGame.fullname }}
|
||||
secretName: {{ .Values.certificates.certManager.caSecretName }}
|
||||
privateKey:
|
||||
rotationPolicy: Always
|
||||
algorithm: RSA
|
||||
size: 2048
|
||||
duration: 8760h0m0s # 1 year
|
||||
renewBefore: 720h0m0s # 1 month
|
||||
issuerRef:
|
||||
name: {{ .Values.kruiseGame.fullname }}-selfsigned-issuer
|
||||
kind: Issuer
|
||||
group: cert-manager.io
|
||||
{{- end }}
|
|
@ -0,0 +1,13 @@
|
|||
{{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.generateCA .Values.certificates.certManager.issuer.generate }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
{{- with .Values.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ .Values.kruiseGame.fullname }}-selfsigned-issuer
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
selfSigned: {}
|
||||
{{- end }}
|
|
@ -0,0 +1,77 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kruise-game-manager-config
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
data:
|
||||
config.toml: |
|
||||
[kubernetes]
|
||||
enable = true
|
||||
[kubernetes.hostPort]
|
||||
max_port = 9000
|
||||
min_port = 8000
|
||||
|
||||
[alibabacloud]
|
||||
enable = true
|
||||
[alibabacloud.slb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
block_ports = [593]
|
||||
[alibabacloud.nlb]
|
||||
max_port = 1502
|
||||
min_port = 1000
|
||||
block_ports = [1025, 1434, 1068]
|
||||
|
||||
[volcengine]
|
||||
enable = true
|
||||
[volcengine.clb]
|
||||
max_port = 600
|
||||
min_port = 550
|
||||
block_ports = [593]
|
||||
|
||||
[aws]
|
||||
enable = false
|
||||
[aws.nlb]
|
||||
max_port = 30050
|
||||
min_port = 30001
|
||||
|
||||
[jdcloud]
|
||||
enable = false
|
||||
[jdcloud.nlb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
|
||||
[tencentcloud]
|
||||
enable = true
|
||||
|
||||
[hwcloud]
|
||||
enable = false
|
||||
[hwcloud.elb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
block_ports = []
|
||||
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :8081
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:8080
|
||||
webhook:
|
||||
port: 9443
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: c637bb1e.my.domain
|
||||
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||
# when the Manager ends. This requires the binary to immediately end when the
|
||||
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||
# speeds up voluntary leader transitions as the new leader don't have to wait
|
||||
# LeaseDuration time first.
|
||||
# In the default scaffold provided, the program ends immediately after
|
||||
# the manager stops, so would be fine to enable this option. However,
|
||||
# if you are doing or is intended to do any operation such as perform cleanups
|
||||
# after the manager stops then its usage might be unsafe.
|
||||
# leaderElectionReleaseOnCancel: true
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,299 @@
|
|||
{{- if .Values.indexOffsetScheduler.enabled }}
|
||||
# service account
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
---
|
||||
# clusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
annotations:
|
||||
rbac.authorization.kubernetes.io/autoupdate: 'true'
|
||||
name: index-offset-scheduler
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
- events.k8s.io
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- kube-scheduler
|
||||
- index-offset-scheduler
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leasecandidates
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- bindings
|
||||
- pods/binding
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- replicationcontrollers
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
- extensions
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- poddisruptionbudgets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csinodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csidrivers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- csistoragecapacities
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resourceNames:
|
||||
- kube-scheduler
|
||||
- index-offset-scheduler
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- delete
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
|
||||
---
|
||||
# ClusterRoleBinding: index-offset-scheduler
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: index-offset-scheduler-as-kube-scheduler
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: index-offset-scheduler
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
# ClusterRoleBinding: system:volume-scheduler
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: index-offset-scheduler-as-volume-scheduler
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: system:volume-scheduler
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
# RoleBinding: apiserver
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: index-offset-scheduler-extension-apiserver-authentication-reader
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: extension-apiserver-authentication-reader
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
---
|
||||
# configmap
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: index-offset-scheduler-config
|
||||
namespace: kruise-game-system
|
||||
data:
|
||||
scheduler-config.yaml: |
|
||||
# stable v1 after version 1.25
|
||||
apiVersion: kubescheduler.config.k8s.io/v1
|
||||
kind: KubeSchedulerConfiguration
|
||||
leaderElection:
|
||||
leaderElect: false
|
||||
resourceNamespace: kruise-game-system
|
||||
resourceName: index-offset-scheduler
|
||||
profiles:
|
||||
- schedulerName: index-offset-scheduler
|
||||
plugins:
|
||||
score:
|
||||
enabled:
|
||||
- name: index-offset-scheduler
|
||||
weight: {{ .Values.indexOffsetScheduler.weight }}
|
||||
---
|
||||
# deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: index-offset-scheduler
|
||||
namespace: kruise-game-system
|
||||
labels:
|
||||
app: index-offset-scheduler
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: index-offset-scheduler
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: index-offset-scheduler
|
||||
spec:
|
||||
serviceAccountName: index-offset-scheduler
|
||||
containers:
|
||||
- name: scheduler
|
||||
# change your image
|
||||
image: openkruise/kruise-game-scheduler-index-offset:v1.0
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- /app/index-offset-scheduler
|
||||
- --config=/etc/kubernetes/scheduler-config.yaml
|
||||
- --v=5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/kubernetes
|
||||
# imagePullSecrets:
|
||||
# - name: <your image pull secret>
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: index-offset-scheduler-config
|
||||
{{- end }}
|
|
@ -0,0 +1,126 @@
|
|||
{{- if .Values.installation.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: {{ .Values.installation.namespace }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-controller-manager-metrics-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/default-container: manager
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
# securityContext:
|
||||
# runAsNonRoot: true
|
||||
# TODO(user): For common cases that do not require escalating privileges
|
||||
# it is recommended to ensure that all your Pods/Containers are restrictive.
|
||||
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
|
||||
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
|
||||
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
|
||||
# seccompProfile:
|
||||
# type: RuntimeDefault
|
||||
containers:
|
||||
- command:
|
||||
- /manager
|
||||
args:
|
||||
- --leader-elect=false
|
||||
- --provider-config=/etc/kruise-game/config.toml
|
||||
- --api-server-qps={{ .Values.kruiseGame.apiServerQps }}
|
||||
- --api-server-qps-burst={{ .Values.kruiseGame.apiServerQpsBurst }}
|
||||
- --gameserver-workers={{ .Values.kruiseGame.gameserverWorkers }}
|
||||
- --gameserverset-workers={{ .Values.kruiseGame.gameserversetWorkers }}
|
||||
- --scale-server-bind-address=:{{ .Values.scale.service.targetPort }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- --metrics-bind-address=:{{ .Values.prometheus.monitorService.port }}
|
||||
{{- end }}
|
||||
{{- if not .Values.certificates.autoGenerated }}
|
||||
- --enable-cert-generation={{ .Values.certificates.autoGenerated }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
name: manager
|
||||
env:
|
||||
- name: "NETWORK_TOTAL_WAIT_TIME"
|
||||
value: {{ .Values.network.totalWaitTime | quote }}
|
||||
- name: "NETWORK_PROBE_INTERVAL_TIME"
|
||||
value: {{ .Values.network.probeIntervalTime | quote }}
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: {{ .Values.prometheus.monitorService.port }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- "ALL"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
# TODO(user): Configure the resources accordingly based on the project requirements.
|
||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kruise-game
|
||||
name: provider-config
|
||||
{{- if not .Values.certificates.autoGenerated }}
|
||||
- mountPath: {{ .Values.certificates.mountPath }}
|
||||
name: certificates
|
||||
{{- end }}
|
||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: config.toml
|
||||
path: config.toml
|
||||
name: kruise-game-manager-config
|
||||
name: provider-config
|
||||
{{- if not .Values.certificates.autoGenerated }}
|
||||
- name: certificates
|
||||
secret:
|
||||
defaultMode: 420
|
||||
secretName: {{ .Values.certificates.secretName}}
|
||||
optional: {{ and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }}
|
||||
{{- end }}
|
|
@ -0,0 +1,17 @@
|
|||
{{- if .Values.prometheus.enabled }}
|
||||
# Prometheus Monitor Service (Metrics)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-controller-manager-metrics-monitor
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
endpoints:
|
||||
- path: /metrics
|
||||
port: https
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- end }}
|
|
@ -0,0 +1,404 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: kruise-game-leader-election-role
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kruise-game-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- podprobemarkers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- elbv2.k8s.aws
|
||||
resources:
|
||||
- targetgroupbindings
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- listeners
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- targetgroups
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- "/metrics"
|
||||
verbs:
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-proxy-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kruise-game-leader-election-rolebinding
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: kruise-game-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kruise-game-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-proxy-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: proxy-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-external-scaler
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.scale.service.port }}
|
||||
targetPort: {{ .Values.scale.service.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,44 @@
|
|||
{{- if not .Values.certificates.autoGenerated }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.certificates.certManager.enabled }}
|
||||
{{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }}
|
||||
cert-manager.io/inject-ca-from-secret: {{ .Values.installation.namespace }}/{{ .Values.certificates.certManager.caSecretName }}
|
||||
{{- else }}
|
||||
cert-manager.io/inject-ca-from: {{ .Values.installation.namespace }}/{{ .Values.kruiseGame.fullname }}-cert
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-mutating-webhook
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
- v1beta1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
path: /mutate-v1-pod
|
||||
failurePolicy: {{ .Values.kruiseGame.webhook.failurePolicy }}
|
||||
matchPolicy: Equivalent
|
||||
name: mgameserverset.kb.io
|
||||
rules:
|
||||
- operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
- DELETE
|
||||
apiGroups:
|
||||
- ""
|
||||
apiVersions:
|
||||
- v1
|
||||
resources:
|
||||
- pods
|
||||
objectSelector:
|
||||
matchExpressions:
|
||||
- key: game.kruise.io/owner-gss
|
||||
operator: Exists
|
||||
sideEffects: None
|
||||
{{- end }}
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.kruiseGame.webhook.port }}
|
||||
targetPort: {{ .Values.kruiseGame.webhook.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,42 @@
|
|||
{{- if not .Values.certificates.autoGenerated }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.certificates.certManager.enabled }}
|
||||
{{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }}
|
||||
cert-manager.io/inject-ca-from-secret: {{ .Values.installation.namespace }}/{{ .Values.certificates.certManager.caSecretName }}
|
||||
{{- else }}
|
||||
cert-manager.io/inject-ca-from: {{ .Values.installation.namespace }}/{{ .Values.kruiseGame.fullname }}-cert
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-validating-webhook
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
- v1beta1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
path: /validate-v1alpha1-gss
|
||||
failurePolicy: {{ .Values.kruiseGame.webhook.failurePolicy }}
|
||||
matchPolicy: Equivalent
|
||||
name: vgameserverset.kb.io
|
||||
namespaceSelector: {}
|
||||
objectSelector: {}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
apiVersions:
|
||||
- v1alpha1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- gameserversets
|
||||
sideEffects: None
|
||||
timeoutSeconds: 10
|
||||
{{- end }}
|
|
@ -0,0 +1,94 @@
|
|||
# Default values for kruise-game.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# values for kruise-game installation
|
||||
installation:
|
||||
namespace: kruise-game-system
|
||||
createNamespace: true
|
||||
|
||||
kruiseGame:
|
||||
fullname: kruise-game-controller-manager
|
||||
healthBindPort: "8082"
|
||||
webhook:
|
||||
serviceName: kruise-game-webhook-service
|
||||
port: 443
|
||||
targetPort: 9876
|
||||
failurePolicy: Fail
|
||||
apiServerQps: 5
|
||||
apiServerQpsBurst: 10
|
||||
gameserverWorkers: 10
|
||||
gameserversetWorkers: 10
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: openkruise/kruise-game-manager
|
||||
tag: v1.0.0
|
||||
pullPolicy: Always
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
|
||||
serviceAccount:
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
|
||||
service:
|
||||
port: 8443
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
monitorService:
|
||||
port: 8080
|
||||
scale:
|
||||
service:
|
||||
port: 6000
|
||||
targetPort: 6000
|
||||
|
||||
network:
|
||||
totalWaitTime: 60
|
||||
probeIntervalTime: 5
|
||||
|
||||
cloudProvider:
|
||||
installCRD: true
|
||||
|
||||
indexOffsetScheduler:
|
||||
enabled: false
|
||||
weight: 100
|
||||
|
||||
# Kubernetes cluster domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
certificates:
|
||||
autoGenerated: true
|
||||
secretName: kruise-game-certs
|
||||
mountPath: /tmp/webhook-certs/
|
||||
certManager:
|
||||
enabled: false
|
||||
duration: 8760h0m0s # 1 year
|
||||
renewBefore: 5840h0m0s # 8 months
|
||||
generateCA: true
|
||||
caSecretName: "kruise-game-ca"
|
||||
# -- Reference to custom Issuer. If issuer.generate is false, then issuer.group, issuer.kind and issuer.name are required
|
||||
issuer:
|
||||
generate: true
|
||||
name: kruise-ca
|
||||
kind: ClusterIssuer
|
||||
group: cert-manager.io
|
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
name: kruise-game
|
||||
description: Helm chart for kruise-game components
|
||||
version: 0.9.0
|
||||
appVersion: 0.9.0
|
||||
kubeVersion: ">= 1.16.0-0"
|
||||
sources:
|
||||
- https://github.com/openkruise/kruise-game
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Changed]: https://github.com/openkruise/kruise-game/blob/master/CHANGELOG.md"
|
|
@ -0,0 +1,45 @@
|
|||
# Kruise Game v0.9.0
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the kruise-game chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------------|-----------------------------------------------------------------------------|----------------------------------|
|
||||
| `installation.namespace` | Namespace for kruise-game operation installation | `kruise-game-system` |
|
||||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
|
||||
| `kruiseGame.fullname` | Nick name for kruise-game deployment and other configurations | `kruise-game-controller-manager` |
|
||||
| `kruiseGame.healthBindPort` | Port for checking health of kruise-game container | `8082` |
|
||||
| `kruiseGame.webhook.port` | Port of webhook served by kruise-game container | `443` |
|
||||
| `kruiseGame.webhook.targetPort` | ObjectSelector for workloads in MutatingWebhookConfigurations | `9876` |
|
||||
| `kruiseGame.apiServerQps` | Indicates the maximum QPS to the master from kruise-game-controller-manager | `5` |
|
||||
| `kruiseGame.apiServerQpsBurst` | Maximum burst for throttle of kruise-game-controller-manager | `10` |
|
||||
| `replicaCount` | Replicas of kruise-game deployment | `1` |
|
||||
| `image.repository` | Repository for kruise-game image | `openkruise/kruise-game-manager` |
|
||||
| `image.tag` | Tag for kruise-game image | `v0.9.0` |
|
||||
| `image.pullPolicy` | ImagePullPolicy for kruise-game container | `Always` |
|
||||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-game | ` ` |
|
||||
| `service.port` | Port of kruise-game service | `8443` |
|
||||
| `resources.limits.cpu` | CPU resource limit of kruise-game container | `500m` |
|
||||
| `resources.limits.memory` | Memory resource limit of kruise-game container | `1Gi` |
|
||||
| `resources.requests.cpu` | CPU resource request of kruise-game container | `10m` |
|
||||
| `resources.requests.memory` | Memory resource request of kruise-game container | `64Mi` |
|
||||
| `prometheus.enabled` | Whether to bind metric endpoint | `true` |
|
||||
| `prometheus.monitorService.port` | Port of the monitorservice bind to | `8080` |
|
||||
| `scale.service.port` | Port of the external scaler server binds to | `6000` |
|
||||
| `scale.service.targetPort` | TargetPort of the external scaler server binds to | `6000` |
|
||||
| `network.totalWaitTime` | Maximum time to wait for network ready, the unit is seconds | `60` |
|
||||
| `network.probeIntervalTime` | Time interval for detecting network status, the unit is seconds | `5` |
|
||||
| `cloudProvider.installCRD` | Whether to install CloudProvider CRD | `true` |
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
### Optional: the local image for China
|
||||
|
||||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:
|
||||
|
||||
```bash
|
||||
$ helm install kruise-game https://... --set image.repository=registry.cn-hangzhou.aliyuncs.com/acs/kruise-game-manager
|
||||
...
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kruise-game.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kruise-game.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kruise-game.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kruise-game.labels" -}}
|
||||
helm.sh/chart: {{ include "kruise-game.chart" . }}
|
||||
{{ include "kruise-game.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "kruise-game.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kruise-game.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "kruise-game.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "kruise-game.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,99 @@
|
|||
{{- if .Values.cloudProvider.installCRD }}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: poddnats.alibabacloud.com
|
||||
spec:
|
||||
group: alibabacloud.com
|
||||
names:
|
||||
kind: PodDNAT
|
||||
listKind: PodDNATList
|
||||
plural: poddnats
|
||||
singular: poddnat
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PodDNAT is the Schema for the poddnats API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PodDNATSpec defines the desired state of PodDNAT
|
||||
properties:
|
||||
eni:
|
||||
type: string
|
||||
entryId:
|
||||
type: string
|
||||
externalIP:
|
||||
type: string
|
||||
externalPort:
|
||||
type: string
|
||||
internalIP:
|
||||
type: string
|
||||
internalPort:
|
||||
type: string
|
||||
portMapping:
|
||||
items:
|
||||
properties:
|
||||
externalPort:
|
||||
type: string
|
||||
internalPort:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
protocol:
|
||||
type: string
|
||||
tableId:
|
||||
type: string
|
||||
vswitch:
|
||||
type: string
|
||||
zoneID:
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: PodDNATStatus defines the observed state of PodDNAT
|
||||
properties:
|
||||
created:
|
||||
description: created create status
|
||||
type: string
|
||||
entries:
|
||||
description: entries
|
||||
items:
|
||||
description: Entry record for forwardEntry
|
||||
properties:
|
||||
externalIP:
|
||||
type: string
|
||||
externalPort:
|
||||
type: string
|
||||
forwardEntryId:
|
||||
type: string
|
||||
internalIP:
|
||||
type: string
|
||||
internalPort:
|
||||
type: string
|
||||
ipProtocol:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
{{- end }}
|
|
@ -0,0 +1,57 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kruise-game-manager-config
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
data:
|
||||
config.toml: |
|
||||
[kubernetes]
|
||||
enable = true
|
||||
[kubernetes.hostPort]
|
||||
max_port = 9000
|
||||
min_port = 8000
|
||||
|
||||
[alibabacloud]
|
||||
enable = true
|
||||
[alibabacloud.slb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
[alibabacloud.nlb]
|
||||
max_port = 1500
|
||||
min_port = 1000
|
||||
|
||||
[volcengine]
|
||||
enable = true
|
||||
[volcengine.clb]
|
||||
max_port = 700
|
||||
min_port = 500
|
||||
|
||||
[aws]
|
||||
enable = false
|
||||
[aws.nlb]
|
||||
max_port = 30050
|
||||
min_port = 30001
|
||||
controller_manager_config.yaml: |
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :8081
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:8080
|
||||
webhook:
|
||||
port: 9443
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: c637bb1e.my.domain
|
||||
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||
# when the Manager ends. This requires the binary to immediately end when the
|
||||
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||
# speeds up voluntary leader transitions as the new leader don't have to wait
|
||||
# LeaseDuration time first.
|
||||
# In the default scaffold provided, the program ends immediately after
|
||||
# the manager stops, so would be fine to enable this option. However,
|
||||
# if you are doing or is intended to do any operation such as perform cleanups
|
||||
# after the manager stops then its usage might be unsafe.
|
||||
# leaderElectionReleaseOnCancel: true
|
||||
|
||||
|
|
@ -0,0 +1,928 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: gameservers.game.kruise.io
|
||||
spec:
|
||||
group: game.kruise.io
|
||||
names:
|
||||
kind: GameServer
|
||||
listKind: GameServerList
|
||||
plural: gameservers
|
||||
shortNames:
|
||||
- gs
|
||||
singular: gameserver
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The current state of GameServer
|
||||
jsonPath: .status.currentState
|
||||
name: STATE
|
||||
type: string
|
||||
- description: The operations state of GameServer
|
||||
jsonPath: .spec.opsState
|
||||
name: OPSSTATE
|
||||
type: string
|
||||
- description: The current deletionPriority of GameServer
|
||||
jsonPath: .status.deletionPriority
|
||||
name: DP
|
||||
type: string
|
||||
- description: The current updatePriority of GameServer
|
||||
jsonPath: .status.updatePriority
|
||||
name: UP
|
||||
type: string
|
||||
- description: The age of GameServer
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GameServer is the Schema for the gameservers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GameServerSpec defines the desired state of GameServer
|
||||
properties:
|
||||
containers:
|
||||
description: Containers can be used to make the corresponding GameServer
|
||||
container fields different from the fields defined by GameServerTemplate
|
||||
in GameServerSetSpec.
|
||||
items:
|
||||
properties:
|
||||
image:
|
||||
description: Image indicates the image of the container to update.
|
||||
When Image updated, pod.spec.containers[*].image will be updated
|
||||
immediately.
|
||||
type: string
|
||||
name:
|
||||
description: Name indicates the name of the container to update.
|
||||
type: string
|
||||
resources:
|
||||
description: Resources indicates the resources of the container
|
||||
to update. When Resources updated, pod.spec.containers[*].Resources
|
||||
will be not updated immediately, which will be updated when
|
||||
pod recreate.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount of compute
|
||||
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount of compute
|
||||
resources required. If Requests is omitted for a container,
|
||||
it defaults to Limits if that is explicitly specified,
|
||||
otherwise to an implementation-defined value. More info:
|
||||
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
networkDisabled:
|
||||
type: boolean
|
||||
opsState:
|
||||
type: string
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
status:
|
||||
description: GameServerStatus defines the observed state of GameServer
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions is an array of current observed GameServer
|
||||
conditions.
|
||||
items:
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: Last time we probed the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one status
|
||||
to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Human-readable message indicating details about
|
||||
last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: Unique, one-word, CamelCase reason for the condition's
|
||||
last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status is the status of the condition. Can be True,
|
||||
False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type is the type of the condition.
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
currentState:
|
||||
type: string
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
desiredState:
|
||||
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
|
||||
of cluster Important: Run "make" to regenerate code after modifying
|
||||
this file'
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
networkStatus:
|
||||
properties:
|
||||
createTime:
|
||||
format: date-time
|
||||
type: string
|
||||
currentNetworkState:
|
||||
type: string
|
||||
desiredNetworkState:
|
||||
type: string
|
||||
externalAddresses:
|
||||
items:
|
||||
properties:
|
||||
endPoint:
|
||||
type: string
|
||||
ip:
|
||||
type: string
|
||||
portRange:
|
||||
properties:
|
||||
portRange:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
type: object
|
||||
ports:
|
||||
description: TODO add IPv6
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- ip
|
||||
type: object
|
||||
type: array
|
||||
internalAddresses:
|
||||
items:
|
||||
properties:
|
||||
endPoint:
|
||||
type: string
|
||||
ip:
|
||||
type: string
|
||||
portRange:
|
||||
properties:
|
||||
portRange:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
type: object
|
||||
ports:
|
||||
description: TODO add IPv6
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- ip
|
||||
type: object
|
||||
type: array
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
networkType:
|
||||
type: string
|
||||
type: object
|
||||
podStatus:
|
||||
description: PodStatus represents information about the status of
|
||||
a pod. Status may trail the actual state of a system, especially
|
||||
if the node that hosts the pod cannot contact the control plane.
|
||||
properties:
|
||||
conditions:
|
||||
description: 'Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
items:
|
||||
description: PodCondition contains details for the current condition
|
||||
of this pod.
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: Last time we probed the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one
|
||||
status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Human-readable message indicating details about
|
||||
last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: Unique, one-word, CamelCase reason for the
|
||||
condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: 'Status is the status of the condition. Can
|
||||
be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
type: string
|
||||
type:
|
||||
description: 'Type is the type of the condition. More info:
|
||||
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions'
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
containerStatuses:
|
||||
description: 'The list has one entry per container in the manifest.
|
||||
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status'
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
ephemeralContainerStatuses:
|
||||
description: Status for any ephemeral containers that have run
|
||||
in this pod. This field is beta-level and available on clusters
|
||||
that haven't disabled the EphemeralContainers feature gate.
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
hostIP:
|
||||
description: IP address of the host to which the pod is assigned.
|
||||
Empty if not yet scheduled.
|
||||
type: string
|
||||
initContainerStatuses:
|
||||
description: 'The list has one entry per init container in the
|
||||
manifest. The most recent successful init container will have
|
||||
ready = true, the most recently started container will have
|
||||
startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status'
|
||||
items:
|
||||
description: ContainerStatus contains details for the current
|
||||
status of this container.
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'.
|
||||
type: string
|
||||
image:
|
||||
description: 'The image the container is running. More info:
|
||||
https://kubernetes.io/docs/concepts/containers/images.'
|
||||
type: string
|
||||
imageID:
|
||||
description: ImageID of the container's image.
|
||||
type: string
|
||||
lastState:
|
||||
description: Details about the container's last termination
|
||||
condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
name:
|
||||
description: This must be a DNS_LABEL. Each container in
|
||||
a pod must have a unique name. Cannot be updated.
|
||||
type: string
|
||||
ready:
|
||||
description: Specifies whether the container has passed
|
||||
its readiness probe.
|
||||
type: boolean
|
||||
restartCount:
|
||||
description: The number of times the container has been
|
||||
restarted.
|
||||
format: int32
|
||||
type: integer
|
||||
started:
|
||||
description: Specifies whether the container has passed
|
||||
its startup probe. Initialized as false, becomes true
|
||||
after startupProbe is considered successful. Resets to
|
||||
false when the container is restarted, or if kubelet loses
|
||||
state temporarily. Is always true when no startupProbe
|
||||
is defined.
|
||||
type: boolean
|
||||
state:
|
||||
description: Details about the container's current condition.
|
||||
properties:
|
||||
running:
|
||||
description: Details about a running container
|
||||
properties:
|
||||
startedAt:
|
||||
description: Time at which the container was last
|
||||
(re-)started
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
terminated:
|
||||
description: Details about a terminated container
|
||||
properties:
|
||||
containerID:
|
||||
description: Container's ID in the format '<type>://<container_id>'
|
||||
type: string
|
||||
exitCode:
|
||||
description: Exit status from the last termination
|
||||
of the container
|
||||
format: int32
|
||||
type: integer
|
||||
finishedAt:
|
||||
description: Time at which the container last terminated
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message regarding the last termination
|
||||
of the container
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason from the last termination
|
||||
of the container
|
||||
type: string
|
||||
signal:
|
||||
description: Signal from the last termination of
|
||||
the container
|
||||
format: int32
|
||||
type: integer
|
||||
startedAt:
|
||||
description: Time at which previous execution of
|
||||
the container started
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- exitCode
|
||||
type: object
|
||||
waiting:
|
||||
description: Details about a waiting container
|
||||
properties:
|
||||
message:
|
||||
description: Message regarding why the container
|
||||
is not yet running.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason the container is not
|
||||
yet running.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
- imageID
|
||||
- name
|
||||
- ready
|
||||
- restartCount
|
||||
type: object
|
||||
type: array
|
||||
message:
|
||||
description: A human readable message indicating details about
|
||||
why the pod is in this condition.
|
||||
type: string
|
||||
nominatedNodeName:
|
||||
description: nominatedNodeName is set only when this pod preempts
|
||||
other pods on the node, but it cannot be scheduled right away
|
||||
as preemption victims receive their graceful termination periods.
|
||||
This field does not guarantee that the pod will be scheduled
|
||||
on this node. Scheduler may decide to place the pod elsewhere
|
||||
if other nodes become available sooner. Scheduler may also decide
|
||||
to give the resources on this node to a higher priority pod
|
||||
that is created after preemption. As a result, this field may
|
||||
be different than PodSpec.nodeName when the pod is scheduled.
|
||||
type: string
|
||||
phase:
|
||||
description: "The phase of a Pod is a simple, high-level summary
|
||||
of where the Pod is in its lifecycle. The conditions array,
|
||||
the reason and message fields, and the individual container
|
||||
status arrays contain more detail about the pod's status. There
|
||||
are five possible phase values: \n Pending: The pod has been
|
||||
accepted by the Kubernetes system, but one or more of the container
|
||||
images has not been created. This includes time before being
|
||||
scheduled as well as time spent downloading images over the
|
||||
network, which could take a while. Running: The pod has been
|
||||
bound to a node, and all of the containers have been created.
|
||||
At least one container is still running, or is in the process
|
||||
of starting or restarting. Succeeded: All containers in the
|
||||
pod have terminated in success, and will not be restarted. Failed:
|
||||
All containers in the pod have terminated, and at least one
|
||||
container has terminated in failure. The container either exited
|
||||
with non-zero status or was terminated by the system. Unknown:
|
||||
For some reason the state of the pod could not be obtained,
|
||||
typically due to an error in communicating with the host of
|
||||
the pod. \n More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase"
|
||||
type: string
|
||||
podIP:
|
||||
description: IP address allocated to the pod. Routable at least
|
||||
within the cluster. Empty if not yet allocated.
|
||||
type: string
|
||||
podIPs:
|
||||
description: podIPs holds the IP addresses allocated to the pod.
|
||||
If this field is specified, the 0th entry must match the podIP
|
||||
field. Pods may be allocated at most 1 value for each of IPv4
|
||||
and IPv6. This list is empty if no IPs have been allocated yet.
|
||||
items:
|
||||
description: 'IP address information for entries in the (plural)
|
||||
PodIPs field. Each entry includes: IP: An IP address allocated
|
||||
to the pod. Routable at least within the cluster.'
|
||||
properties:
|
||||
ip:
|
||||
description: ip is an IP address (IPv4 or IPv6) assigned
|
||||
to the pod
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
qosClass:
|
||||
description: 'The Quality of Service (QOS) classification assigned
|
||||
to the pod based on resource requirements See PodQOSClass type
|
||||
for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md'
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about
|
||||
why the pod is in this state. e.g. 'Evicted'
|
||||
type: string
|
||||
startTime:
|
||||
description: RFC 3339 date and time at which the object was acknowledged
|
||||
by the Kubelet. This is before the Kubelet pulled the container
|
||||
image(s) for the pod.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
serviceQualitiesConditions:
|
||||
items:
|
||||
properties:
|
||||
lastActionTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
lastProbeTime:
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
format: date-time
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
result:
|
||||
description: Result indicate the probe message returned by the
|
||||
script
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Lifecycle defines the lifecycle hooks for Pods pre-delete,
|
||||
in-place update.
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
|
@ -0,0 +1,838 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.0
|
||||
creationTimestamp: null
|
||||
name: gameserversets.game.kruise.io
|
||||
spec:
|
||||
group: game.kruise.io
|
||||
names:
|
||||
kind: GameServerSet
|
||||
listKind: GameServerSetList
|
||||
plural: gameserversets
|
||||
shortNames:
|
||||
- gss
|
||||
singular: gameserverset
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The desired number of GameServers.
|
||||
jsonPath: .spec.replicas
|
||||
name: DESIRED
|
||||
type: integer
|
||||
- description: The number of currently all GameServers.
|
||||
jsonPath: .status.replicas
|
||||
name: CURRENT
|
||||
type: integer
|
||||
- description: The number of GameServers updated.
|
||||
jsonPath: .status.updatedReplicas
|
||||
name: UPDATED
|
||||
type: integer
|
||||
- description: The number of GameServers ready.
|
||||
jsonPath: .status.readyReplicas
|
||||
name: READY
|
||||
type: integer
|
||||
- description: The number of GameServers Maintaining.
|
||||
jsonPath: .status.maintainingReplicas
|
||||
name: Maintaining
|
||||
type: integer
|
||||
- description: The number of GameServers WaitToBeDeleted.
|
||||
jsonPath: .status.waitToBeDeletedReplicas
|
||||
name: WaitToBeDeleted
|
||||
type: integer
|
||||
- description: The age of GameServerSet.
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GameServerSet is the Schema for the gameserversets API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GameServerSetSpec defines the desired state of GameServerSet
|
||||
properties:
|
||||
gameServerTemplate:
|
||||
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file'
|
||||
properties:
|
||||
reclaimPolicy:
|
||||
description: ReclaimPolicy indicates the reclaim policy for GameServer.
|
||||
Default is Cascade.
|
||||
type: string
|
||||
volumeClaimTemplates:
|
||||
items:
|
||||
description: PersistentVolumeClaim is a user's request for and
|
||||
claim to a persistent volume
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of
|
||||
this representation of an object. Servers should convert
|
||||
recognized schemas to the latest internal value, and may
|
||||
reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST
|
||||
resource this object represents. Servers may infer this
|
||||
from the endpoint the client submits requests to. Cannot
|
||||
be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: 'spec defines the desired characteristics of
|
||||
a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
|
||||
properties:
|
||||
accessModes:
|
||||
description: 'accessModes contains the desired access
|
||||
modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
dataSource:
|
||||
description: 'dataSource field can be used to specify
|
||||
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
|
||||
* An existing PVC (PersistentVolumeClaim) If the provisioner
|
||||
or an external controller can support the specified
|
||||
data source, it will create a new volume based on
|
||||
the contents of the specified data source. If the
|
||||
AnyVolumeDataSource feature gate is enabled, this
|
||||
field will always have the same contents as the DataSourceRef
|
||||
field.'
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup is the group for the resource
|
||||
being referenced. If APIGroup is not specified,
|
||||
the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being
|
||||
referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being
|
||||
referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
dataSourceRef:
|
||||
description: 'dataSourceRef specifies the object from
|
||||
which to populate the volume with data, if a non-empty
|
||||
volume is desired. This may be any local object from
|
||||
a non-empty API group (non core object) or a PersistentVolumeClaim
|
||||
object. When this field is specified, volume binding
|
||||
will only succeed if the type of the specified object
|
||||
matches some installed volume populator or dynamic
|
||||
provisioner. This field will replace the functionality
|
||||
of the DataSource field and as such if both fields
|
||||
are non-empty, they must have the same value. For
|
||||
backwards compatibility, both fields (DataSource and
|
||||
DataSourceRef) will be set to the same value automatically
|
||||
if one of them is empty and the other is non-empty.
|
||||
There are two important differences between DataSource
|
||||
and DataSourceRef: * While DataSource only allows
|
||||
two specific types of objects, DataSourceRef allows
|
||||
any non-core object, as well as PersistentVolumeClaim
|
||||
objects. * While DataSource ignores disallowed values
|
||||
(dropping them), DataSourceRef preserves all values,
|
||||
and generates an error if a disallowed value is specified.
|
||||
(Beta) Using this field requires the AnyVolumeDataSource
|
||||
feature gate to be enabled.'
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup is the group for the resource
|
||||
being referenced. If APIGroup is not specified,
|
||||
the specified Kind must be in the core API group.
|
||||
For any other third-party types, APIGroup is required.
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being
|
||||
referenced
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being
|
||||
referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
resources:
|
||||
description: 'resources represents the minimum resources
|
||||
the volume should have. If RecoverVolumeExpansionFailure
|
||||
feature is enabled users are allowed to specify resource
|
||||
requirements that are lower than previous value but
|
||||
must still be higher than capacity recorded in the
|
||||
status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount
|
||||
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount
|
||||
of compute resources required. If Requests is
|
||||
omitted for a container, it defaults to Limits
|
||||
if that is explicitly specified, otherwise to
|
||||
an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
selector:
|
||||
description: selector is a label query over volumes
|
||||
to consider for binding.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a
|
||||
selector that contains values, a key, and an
|
||||
operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the
|
||||
selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship
|
||||
to a set of values. Valid operators are
|
||||
In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist, the
|
||||
values array must be empty. This array is
|
||||
replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is "In",
|
||||
and the values array contains only "value". The
|
||||
requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
storageClassName:
|
||||
description: 'storageClassName is the name of the StorageClass
|
||||
required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
|
||||
type: string
|
||||
volumeMode:
|
||||
description: volumeMode defines what type of volume
|
||||
is required by the claim. Value of Filesystem is implied
|
||||
when not included in claim spec.
|
||||
type: string
|
||||
volumeName:
|
||||
description: volumeName is the binding reference to
|
||||
the PersistentVolume backing this claim.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: 'status represents the current information/status
|
||||
of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
|
||||
properties:
|
||||
accessModes:
|
||||
description: 'accessModes contains the actual access
|
||||
modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
allocatedResources:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: allocatedResources is the storage resource
|
||||
within AllocatedResources tracks the capacity allocated
|
||||
to a PVC. It may be larger than the actual capacity
|
||||
when a volume expansion operation is requested. For
|
||||
storage quota, the larger value from allocatedResources
|
||||
and PVC.spec.resources is used. If allocatedResources
|
||||
is not set, PVC.spec.resources alone is used for quota
|
||||
calculation. If a volume expansion capacity request
|
||||
is lowered, allocatedResources is only lowered if
|
||||
there are no expansion operations in progress and
|
||||
if the actual volume capacity is equal or lower than
|
||||
the requested capacity. This is an alpha field and
|
||||
requires enabling RecoverVolumeExpansionFailure feature.
|
||||
type: object
|
||||
capacity:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: capacity represents the actual resources
|
||||
of the underlying volume.
|
||||
type: object
|
||||
conditions:
|
||||
description: conditions is the current Condition of
|
||||
persistent volume claim. If underlying persistent
|
||||
volume is being resized then the Condition will be
|
||||
set to 'ResizeStarted'.
|
||||
items:
|
||||
description: PersistentVolumeClaimCondition contails
|
||||
details about state of pvc
|
||||
properties:
|
||||
lastProbeTime:
|
||||
description: lastProbeTime is the time we probed
|
||||
the condition.
|
||||
format: date-time
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the time the
|
||||
condition transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is the human-readable message
|
||||
indicating details about last transition.
|
||||
type: string
|
||||
reason:
|
||||
description: reason is a unique, this should be
|
||||
a short, machine understandable string that
|
||||
gives the reason for condition's last transition.
|
||||
If it reports "ResizeStarted" that means the
|
||||
underlying persistent volume is being resized.
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
description: PersistentVolumeClaimConditionType
|
||||
is a valid value of PersistentVolumeClaimCondition.Type
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
phase:
|
||||
description: phase represents the current phase of PersistentVolumeClaim.
|
||||
type: string
|
||||
resizeStatus:
|
||||
description: resizeStatus stores status of resize operation.
|
||||
ResizeStatus is not set by default but when expansion
|
||||
is complete resizeStatus is set to empty string by
|
||||
resize controller or kubelet. This is an alpha field
|
||||
and requires enabling RecoverVolumeExpansionFailure
|
||||
feature.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
lifecycle:
|
||||
description: Lifecycle contains the hooks for Pod lifecycle.
|
||||
properties:
|
||||
inPlaceUpdate:
|
||||
description: InPlaceUpdate is the hook before Pod to update and
|
||||
after Pod has been updated.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Default
|
||||
to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
preDelete:
|
||||
description: PreDelete is the hook before Pod to be deleted.
|
||||
properties:
|
||||
finalizersHandler:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labelsHandler:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
markPodNotReady:
|
||||
description: 'MarkPodNotReady = true means: - Pod will be
|
||||
set to ''NotReady'' at preparingDelete/preparingUpdate state.
|
||||
- Pod will be restored to ''Ready'' at Updated state if
|
||||
it was set to ''NotReady'' at preparingUpdate state. Default
|
||||
to false.'
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
network:
|
||||
properties:
|
||||
networkConf:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
networkType:
|
||||
type: string
|
||||
type: object
|
||||
replicas:
|
||||
description: replicas is the desired number of replicas of the given
|
||||
Template. These are replicas in the sense that they are instantiations
|
||||
of the same Template, but individual replicas also have a consistent
|
||||
identity.
|
||||
format: int32
|
||||
minimum: 0
|
||||
type: integer
|
||||
reserveGameServerIds:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
scaleStrategy:
|
||||
properties:
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'The maximum number of pods that can be unavailable
|
||||
during scaling. Value can be an absolute number (ex: 5) or a
|
||||
percentage of desired pods (ex: 10%). Absolute number is calculated
|
||||
from percentage by rounding down. It can just be allowed to
|
||||
work with Parallel podManagementPolicy.'
|
||||
x-kubernetes-int-or-string: true
|
||||
scaleDownStrategyType:
|
||||
description: ScaleDownStrategyType indicates the scaling down
|
||||
strategy. Default is GeneralScaleDownStrategyType
|
||||
type: string
|
||||
type: object
|
||||
serviceName:
|
||||
type: string
|
||||
serviceQualities:
|
||||
items:
|
||||
properties:
|
||||
containerName:
|
||||
type: string
|
||||
exec:
|
||||
description: Exec specifies the action to take.
|
||||
properties:
|
||||
command:
|
||||
description: Command is the command line to execute inside
|
||||
the container, the working directory for the command is
|
||||
root ('/') in the container's filesystem. The command
|
||||
is simply exec'd, it is not run inside a shell, so traditional
|
||||
shell instructions ('|', etc) won't work. To use a shell,
|
||||
you need to explicitly call out to that shell. Exit status
|
||||
of 0 is treated as live/healthy and non-zero is unhealthy.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
failureThreshold:
|
||||
description: Minimum consecutive failures for the probe to be
|
||||
considered failed after having succeeded. Defaults to 3. Minimum
|
||||
value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
grpc:
|
||||
description: GRPC specifies an action involving a GRPC port.
|
||||
This is a beta field and requires enabling GRPCContainerProbe
|
||||
feature gate.
|
||||
properties:
|
||||
port:
|
||||
description: Port number of the gRPC service. Number must
|
||||
be in the range 1 to 65535.
|
||||
format: int32
|
||||
type: integer
|
||||
service:
|
||||
description: "Service is the name of the service to place
|
||||
in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
||||
\n If this is not specified, the default behavior is defined
|
||||
by gRPC."
|
||||
type: string
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
httpGet:
|
||||
description: HTTPGet specifies the http request to perform.
|
||||
properties:
|
||||
host:
|
||||
description: Host name to connect to, defaults to the pod
|
||||
IP. You probably want to set "Host" in httpHeaders instead.
|
||||
type: string
|
||||
httpHeaders:
|
||||
description: Custom headers to set in the request. HTTP
|
||||
allows repeated headers.
|
||||
items:
|
||||
description: HTTPHeader describes a custom header to be
|
||||
used in HTTP probes
|
||||
properties:
|
||||
name:
|
||||
description: The header field name
|
||||
type: string
|
||||
value:
|
||||
description: The header field value
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
path:
|
||||
description: Path to access on the HTTP server.
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Name or number of the port to access on the
|
||||
container. Number must be in the range 1 to 65535. Name
|
||||
must be an IANA_SVC_NAME.
|
||||
x-kubernetes-int-or-string: true
|
||||
scheme:
|
||||
description: Scheme to use for connecting to the host. Defaults
|
||||
to HTTP.
|
||||
type: string
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
initialDelaySeconds:
|
||||
description: 'Number of seconds after the container has started
|
||||
before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
|
||||
format: int32
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
periodSeconds:
|
||||
description: How often (in seconds) to perform the probe. Default
|
||||
to 10 seconds. Minimum value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
permanent:
|
||||
description: Whether to make GameServerSpec not change after
|
||||
the ServiceQualityAction is executed. When Permanent is true,
|
||||
regardless of the detection results, ServiceQualityAction
|
||||
will only be executed once. When Permanent is false, ServiceQualityAction
|
||||
can be executed again even though ServiceQualityAction has
|
||||
been executed.
|
||||
type: boolean
|
||||
serviceQualityAction:
|
||||
items:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
containers:
|
||||
description: Containers can be used to make the corresponding
|
||||
GameServer container fields different from the fields
|
||||
defined by GameServerTemplate in GameServerSetSpec.
|
||||
items:
|
||||
properties:
|
||||
image:
|
||||
description: Image indicates the image of the container
|
||||
to update. When Image updated, pod.spec.containers[*].image
|
||||
will be updated immediately.
|
||||
type: string
|
||||
name:
|
||||
description: Name indicates the name of the container
|
||||
to update.
|
||||
type: string
|
||||
resources:
|
||||
description: Resources indicates the resources of
|
||||
the container to update. When Resources updated,
|
||||
pod.spec.containers[*].Resources will be not updated
|
||||
immediately, which will be updated when pod recreate.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount
|
||||
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum
|
||||
amount of compute resources required. If Requests
|
||||
is omitted for a container, it defaults to
|
||||
Limits if that is explicitly specified, otherwise
|
||||
to an implementation-defined value. More info:
|
||||
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
deletionPriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
networkDisabled:
|
||||
type: boolean
|
||||
opsState:
|
||||
type: string
|
||||
result:
|
||||
description: Result indicate the probe message returned
|
||||
by the script. When Result is defined, it would exec
|
||||
action only when the according Result is actually returns.
|
||||
type: string
|
||||
state:
|
||||
type: boolean
|
||||
updatePriority:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- state
|
||||
type: object
|
||||
type: array
|
||||
successThreshold:
|
||||
description: Minimum consecutive successes for the probe to
|
||||
be considered successful after having failed. Defaults to
|
||||
1. Must be 1 for liveness and startup. Minimum value is 1.
|
||||
format: int32
|
||||
type: integer
|
||||
tcpSocket:
|
||||
description: TCPSocket specifies an action involving a TCP port.
|
||||
properties:
|
||||
host:
|
||||
description: 'Optional: Host name to connect to, defaults
|
||||
to the pod IP.'
|
||||
type: string
|
||||
port:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Number or name of the port to access on the
|
||||
container. Number must be in the range 1 to 65535. Name
|
||||
must be an IANA_SVC_NAME.
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- port
|
||||
type: object
|
||||
terminationGracePeriodSeconds:
|
||||
description: Optional duration in seconds the pod needs to terminate
|
||||
gracefully upon probe failure. The grace period is the duration
|
||||
in seconds after the processes running in the pod are sent
|
||||
a termination signal and the time when the processes are forcibly
|
||||
halted with a kill signal. Set this value longer than the
|
||||
expected cleanup time for your process. If this value is nil,
|
||||
the pod's terminationGracePeriodSeconds will be used. Otherwise,
|
||||
this value overrides the value provided by the pod spec. Value
|
||||
must be non-negative integer. The value zero indicates stop
|
||||
immediately via the kill signal (no opportunity to shut down).
|
||||
This is a beta field and requires enabling ProbeTerminationGracePeriod
|
||||
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
|
||||
is used if unset.
|
||||
format: int64
|
||||
type: integer
|
||||
timeoutSeconds:
|
||||
description: 'Number of seconds after which the probe times
|
||||
out. Defaults to 1 second. Minimum value is 1. More info:
|
||||
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
- permanent
|
||||
type: object
|
||||
type: array
|
||||
updateStrategy:
|
||||
properties:
|
||||
rollingUpdate:
|
||||
description: RollingUpdate is used to communicate parameters when
|
||||
Type is RollingUpdateStatefulSetStrategyType.
|
||||
properties:
|
||||
inPlaceUpdateStrategy:
|
||||
description: UnorderedUpdate contains strategies for non-ordered
|
||||
update. If it is not nil, pods will be updated with non-ordered
|
||||
sequence. Noted that UnorderedUpdate can only be allowed
|
||||
to work with Parallel podManagementPolicy UnorderedUpdate
|
||||
*kruiseV1beta1.UnorderedUpdateStrategy `json:"unorderedUpdate,omitempty"`
|
||||
InPlaceUpdateStrategy contains strategies for in-place update.
|
||||
properties:
|
||||
gracePeriodSeconds:
|
||||
description: GracePeriodSeconds is the timespan between
|
||||
set Pod status to not-ready and update images in Pod
|
||||
spec when in-place update a Pod.
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
maxUnavailable:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'The maximum number of pods that can be unavailable
|
||||
during the update. Value can be an absolute number (ex:
|
||||
5) or a percentage of desired pods (ex: 10%). Absolute number
|
||||
is calculated from percentage by rounding down. Also, maxUnavailable
|
||||
can just be allowed to work with Parallel podManagementPolicy.
|
||||
Defaults to 1.'
|
||||
x-kubernetes-int-or-string: true
|
||||
minReadySeconds:
|
||||
description: MinReadySeconds indicates how long will the pod
|
||||
be considered ready after it's updated. MinReadySeconds
|
||||
works with both OrderedReady and Parallel podManagementPolicy.
|
||||
It affects the pod scale up speed when the podManagementPolicy
|
||||
is set to be OrderedReady. Combined with MaxUnavailable,
|
||||
it affects the pod update speed regardless of podManagementPolicy.
|
||||
Default value is 0, max is 300.
|
||||
format: int32
|
||||
type: integer
|
||||
partition:
|
||||
description: 'Partition indicates the ordinal at which the
|
||||
StatefulSet should be partitioned by default. But if unorderedUpdate
|
||||
has been set: - Partition indicates the number of pods with
|
||||
non-updated revisions when rolling update. - It means controller
|
||||
will update $(replicas - partition) number of pod. Default
|
||||
value is 0.'
|
||||
format: int32
|
||||
type: integer
|
||||
paused:
|
||||
description: Paused indicates that the StatefulSet is paused.
|
||||
Default value is false
|
||||
type: boolean
|
||||
podUpdatePolicy:
|
||||
description: PodUpdatePolicy indicates how pods should be
|
||||
updated Default value is "ReCreate"
|
||||
type: string
|
||||
type: object
|
||||
type:
|
||||
description: Type indicates the type of the StatefulSetUpdateStrategy.
|
||||
Default is RollingUpdate.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- replicas
|
||||
type: object
|
||||
status:
|
||||
description: GameServerSetStatus defines the observed state of GameServerSet
|
||||
properties:
|
||||
availableReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
currentReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
labelSelector:
|
||||
description: LabelSelector is label selectors for query over pods
|
||||
that should match the replica count used by HPA.
|
||||
type: string
|
||||
maintainingReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
observedGeneration:
|
||||
description: The generation observed by the controller.
|
||||
format: int64
|
||||
type: integer
|
||||
readyReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
replicas:
|
||||
description: replicas from advancedStatefulSet
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReadyReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
waitToBeDeletedReplicas:
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- availableReplicas
|
||||
- currentReplicas
|
||||
- readyReplicas
|
||||
- replicas
|
||||
- updatedReplicas
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
scale:
|
||||
labelSelectorPath: .status.labelSelector
|
||||
specReplicasPath: .spec.replicas
|
||||
statusReplicasPath: .status.replicas
|
||||
status: {}
|
|
@ -0,0 +1,121 @@
|
|||
{{- if .Values.installation.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: {{ .Values.installation.namespace }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-controller-manager-metrics-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/default-container: manager
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
spec:
|
||||
# securityContext:
|
||||
# runAsNonRoot: true
|
||||
# TODO(user): For common cases that do not require escalating privileges
|
||||
# it is recommended to ensure that all your Pods/Containers are restrictive.
|
||||
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
|
||||
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
|
||||
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
|
||||
# seccompProfile:
|
||||
# type: RuntimeDefault
|
||||
containers:
|
||||
- command:
|
||||
- /manager
|
||||
args:
|
||||
- --leader-elect=false
|
||||
- --provider-config=/etc/kruise-game/config.toml
|
||||
- --api-server-qps={{ .Values.kruiseGame.apiServerQps }}
|
||||
- --api-server-qps-burst={{ .Values.kruiseGame.apiServerQpsBurst }}
|
||||
- --scale-server-bind-address=:{{ .Values.scale.service.targetPort }}
|
||||
{{- if .Values.prometheus.enabled }}
|
||||
- --metrics-bind-address=:{{ .Values.prometheus.monitorService.port }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
name: manager
|
||||
env:
|
||||
- name: "NETWORK_TOTAL_WAIT_TIME"
|
||||
value: {{ .Values.network.totalWaitTime | quote }}
|
||||
- name: "NETWORK_PROBE_INTERVAL_TIME"
|
||||
value: {{ .Values.network.probeIntervalTime | quote }}
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: {{ .Values.prometheus.monitorService.port }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- "ALL"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: {{ .Values.kruiseGame.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
# TODO(user): Configure the resources accordingly based on the project requirements.
|
||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kruise-game
|
||||
name: provider-config
|
||||
topologySpreadConstraints:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
|
||||
matchLabelKeys:
|
||||
- pod-template-hash
|
||||
{{- end }}
|
||||
maxSkew: 1
|
||||
topologyKey: topology.kubernetes.io/zone
|
||||
whenUnsatisfiable: ScheduleAnyway
|
||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: config.toml
|
||||
path: config.toml
|
||||
name: kruise-game-manager-config
|
||||
name: provider-config
|
|
@ -0,0 +1,17 @@
|
|||
{{- if .Values.prometheus.enabled }}
|
||||
# Prometheus Monitor Service (Metrics)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
name: kruise-game-controller-manager-metrics-monitor
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
endpoints:
|
||||
- path: /metrics
|
||||
port: https
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||
{{- end }}
|
|
@ -0,0 +1,404 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: kruise-game-leader-election-role
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kruise-game-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- poddnats/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- alibabacloud.com
|
||||
resources:
|
||||
- podeips/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- podprobemarkers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes/status
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- elbv2.k8s.aws
|
||||
resources:
|
||||
- targetgroupbindings
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- listeners
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- elbv2.services.k8s.aws
|
||||
resources:
|
||||
- targetgroups
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameservers/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- game.kruise.io
|
||||
resources:
|
||||
- gameserversets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- "/metrics"
|
||||
verbs:
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kruise-game-proxy-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kruise-game-leader-election-rolebinding
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: kruise-game-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kruise-game-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kruise-game-proxy-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: proxy-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.kruiseGame.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-external-scaler
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.scale.service.port }}
|
||||
targetPort: {{ .Values.scale.service.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-game-webhook-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.kruiseGame.webhook.port }}
|
||||
targetPort: {{ .Values.kruiseGame.webhook.targetPort }}
|
||||
selector:
|
||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
|
@ -0,0 +1,66 @@
|
|||
# Default values for kruise-game.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# values for kruise-game installation
|
||||
installation:
|
||||
namespace: kruise-game-system
|
||||
createNamespace: true
|
||||
|
||||
kruiseGame:
|
||||
fullname: kruise-game-controller-manager
|
||||
healthBindPort: "8082"
|
||||
webhook:
|
||||
port: 443
|
||||
targetPort: 9876
|
||||
apiServerQps: 5
|
||||
apiServerQpsBurst: 10
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: openkruise/kruise-game-manager
|
||||
tag: v0.9.0
|
||||
pullPolicy: Always
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
|
||||
serviceAccount:
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
|
||||
service:
|
||||
port: 8443
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
monitorService:
|
||||
port: 8080
|
||||
scale:
|
||||
service:
|
||||
port: 6000
|
||||
targetPort: 6000
|
||||
|
||||
network:
|
||||
totalWaitTime: 60
|
||||
probeIntervalTime: 5
|
||||
|
||||
cloudProvider:
|
||||
installCRD: true
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1
|
||||
name: kruise-rollout
|
||||
description: Helm chart for kruise-rollout components
|
||||
version: 0.4.3
|
||||
appVersion: 0.4.3
|
||||
kubeVersion: ">= 1.19.0-0"
|
||||
icon: https://openkruise.io/img/openkruise-logo-bg.jpg
|
||||
keywords:
|
||||
- rollout
|
||||
home: https://openkruise.io
|
||||
sources:
|
||||
- https://github.com/openkruise/rollouts
|
|
@ -0,0 +1,47 @@
|
|||
# Kruise Rollout v0.4.3
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the kruise chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------------|-------------------------------------------------------------------|-------------------------------------|
|
||||
| `installation.namespace` | Namespace for kruise-rollout operation installation | `kruise-rollout` |
|
||||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
|
||||
| `rollout.fullname` | Nick name for kruise-rollout deployment and other configurations | `kruise-rollout-controller-manager` |
|
||||
| `rollout.featureGates` | Feature gates for kruise-rollout, empty string means all disabled | `AdvancedDeployment=true` |
|
||||
| `rollout.healthBindPort` | Port for checking health of kruise-rollout container | `8081` |
|
||||
| `rollout.metricsBindAddr` | Port of metrics served by kruise-rollout container | `127.0.0.1:8080` |
|
||||
| `rollout.log.level` | Log level that kruise-rollout printed | `4` |
|
||||
| `rollout.webhook.port` | Port of webhook served by kruise-rollout container | `9876` |
|
||||
| `rollout.webhook.objectSelector` | ObjectSelector for workloads in MutatingWebhookConfigurations | ` ` |
|
||||
| `image.repository` | Repository for kruise-rollout image | `openkruise/kruise-rollout` |
|
||||
| `image.tag` | Tag for kruise-rollout image | `v0.4.3` |
|
||||
| `image.pullPolicy` | ImagePullPolicy for kruise-rollout container | `Always` |
|
||||
| `imagePullSecrets` | The list of image pull secrets for kruise-rollout image | ` ` |
|
||||
| `resources.limits.cpu` | CPU resource limit of kruise-rollout container | `500m` |
|
||||
| `resources.limits.memory` | Memory resource limit of kruise-rollout container | `1Gi` |
|
||||
| `resources.requests.cpu` | CPU resource request of kruise-rollout container | `100m` |
|
||||
| `resources.requests.memory` | Memory resource request of kruise-rollout container | `256Mi` |
|
||||
| `replicaCount` | Replicas of kruise-rollout deployment | `2` |
|
||||
| `service.port` | Port of webhook served by kruise-rollout webhook service | `443` |
|
||||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-rollout | ` ` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
### Optional: feature-gate
|
||||
|
||||
Feature-gate controls some influential features in Kruise:
|
||||
|
||||
| Name | Description | Default | Effect (if closed) |
|
||||
|-----------------------|--------------------------------------------------------------------------------------------------------|----------|-----------------------------------------|
|
||||
| `AdvancedDeployment` | Whether to enable the ability to rolling update deployment in batches without extra canary deployment | `true` | advanced deployment controller disabled |
|
||||
|
||||
### Optional: the local image for China
|
||||
|
||||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:
|
||||
|
||||
```bash
|
||||
$ helm install kruise https://... --set image.repository=openkruise-registry.cn-shanghai.cr.aliyuncs.com/openkruise/kruise-rollout
|
||||
...
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "rollout.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "rollout.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "rollout.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "rollout.labels" -}}
|
||||
helm.sh/chart: {{ include "rollout.chart" . }}
|
||||
{{ include "rollout.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "rollout.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "rollout.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "rollout.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "rollout.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,102 @@
|
|||
{{- if .Values.installation.createNamespace }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.rollout.fullname }}
|
||||
name: {{ .Values.installation.namespace }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kruise-rollout-webhook-service
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.rollout.webhook.port }}
|
||||
selector:
|
||||
control-plane: {{ .Values.rollout.fullname }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.rollout.fullname }}
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
labels:
|
||||
control-plane: {{ .Values.rollout.fullname }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: {{ .Values.rollout.fullname }}
|
||||
minReadySeconds: 3
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0
|
||||
maxSurge: 100%
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: {{ .Values.rollout.fullname }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ .Values.rollout.fullname }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
args:
|
||||
- --leader-elect
|
||||
- --health-probe-bind-address=:{{ .Values.rollout.healthBindPort }}
|
||||
- --metrics-bind-address={{ .Values.rollout.metricsBindAddr }}
|
||||
- --v={{ .Values.rollout.log.level }}
|
||||
{{- if .Values.rollout.featureGates }}
|
||||
- --feature-gates={{ .Values.rollout.featureGates }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /manager
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
ports:
|
||||
- containerPort: {{ .Values.rollout.webhook.port }}
|
||||
name: webhook-server
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.rollout.healthBindPort }}
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: {{ .Values.rollout.healthBindPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: control-plane
|
||||
operator: In
|
||||
values:
|
||||
- {{ .Values.rollout.fullname }}
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
|
@ -0,0 +1,438 @@
|
|||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "rollout.name" . }}-controller-manager
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "rollout.name" . }}-leader-election-role
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kruise-rollout-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- replicasets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- clonesets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- clonesets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- daemonsets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- daemonsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps.kruise.io
|
||||
resources:
|
||||
- statefulsets/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- httproutes
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- httproutes/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- batchreleases
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- batchreleases/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- rollouthistories
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- rollouthistories/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- rollouthistories/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- rollouts
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- rollouts/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- rollouts/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- trafficroutings
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- trafficroutings/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- rollouts.kruise.io
|
||||
resources:
|
||||
- trafficroutings/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "rollout.name" . }}-leader-election-rolebinding
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "rollout.name" . }}-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "rollout.name" . }}-controller-manager
|
||||
namespace: {{ .Values.installation.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ template "rollout.name" . }}-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "rollout.name" . }}-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "rollout.name" . }}-controller-manager
|
||||
namespace: {{ .Values.installation.namespace }}
|
|
@ -0,0 +1,281 @@
|
|||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.7.0
|
||||
creationTimestamp: null
|
||||
name: batchreleases.rollouts.kruise.io
|
||||
spec:
|
||||
group: rollouts.kruise.io
|
||||
names:
|
||||
kind: BatchRelease
|
||||
listKind: BatchReleaseList
|
||||
plural: batchreleases
|
||||
singular: batchrelease
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.targetReference.workloadRef.kind
|
||||
name: KIND
|
||||
type: string
|
||||
- jsonPath: .status.phase
|
||||
name: PHASE
|
||||
type: string
|
||||
- jsonPath: .status.canaryStatus.currentBatch
|
||||
name: BATCH
|
||||
type: integer
|
||||
- jsonPath: .status.canaryStatus.batchState
|
||||
name: BATCH-STATE
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: BatchReleaseSpec defines how to describe an update between
|
||||
different compRevision
|
||||
properties:
|
||||
releasePlan:
|
||||
description: ReleasePlan is the details on how to rollout the resources
|
||||
properties:
|
||||
batchPartition:
|
||||
description: All pods in the batches up to the batchPartition
|
||||
(included) will have the target resource specification while
|
||||
the rest still is the stable revision. This is designed for
|
||||
the operators to manually rollout. Default is nil, which means
|
||||
no partition and will release all batches. BatchPartition start
|
||||
from 0.
|
||||
format: int32
|
||||
type: integer
|
||||
batches:
|
||||
description: 'Batches is the details on each batch of the ReleasePlan.
|
||||
Users can specify their batch plan in this field, such as: batches:
|
||||
- canaryReplicas: 1 # batches 0 - canaryReplicas: 2 # batches
|
||||
1 - canaryReplicas: 5 # batches 2 Not that these canaryReplicas
|
||||
should be a non-decreasing sequence.'
|
||||
items:
|
||||
description: ReleaseBatch is used to describe how each batch
|
||||
release should be
|
||||
properties:
|
||||
canaryReplicas:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'CanaryReplicas is the number of upgraded pods
|
||||
that should have in this batch. it can be an absolute
|
||||
number (ex: 5) or a percentage of workload replicas. batches[i].canaryReplicas
|
||||
should less than or equal to batches[j].canaryReplicas
|
||||
if i < j.'
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- canaryReplicas
|
||||
type: object
|
||||
type: array
|
||||
failureThreshold:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: FailureThreshold indicates how many failed pods can
|
||||
be tolerated in all upgraded pods. Only when FailureThreshold
|
||||
are satisfied, Rollout can enter ready state. If FailureThreshold
|
||||
is nil, Rollout will use the MaxUnavailable of workload as its
|
||||
FailureThreshold. Defaults to nil.
|
||||
x-kubernetes-int-or-string: true
|
||||
finalizingPolicy:
|
||||
description: FinalizingPolicy define the behavior of controller
|
||||
when phase enter Finalizing Defaults to "Immediate"
|
||||
type: string
|
||||
patchPodTemplateMetadata:
|
||||
description: PatchPodTemplateMetadata indicates patch configuration(e.g.
|
||||
labels, annotations) to the canary deployment podTemplateSpec.metadata
|
||||
only support for canary deployment
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: annotations
|
||||
type: object
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: labels
|
||||
type: object
|
||||
type: object
|
||||
rolloutID:
|
||||
description: RolloutID indicates an id for each rollout progress
|
||||
type: string
|
||||
type: object
|
||||
targetReference:
|
||||
description: TargetRef contains the GVK and name of the workload that
|
||||
we need to upgrade to.
|
||||
properties:
|
||||
workloadRef:
|
||||
description: WorkloadRef contains enough information to let you
|
||||
identify a workload for Rollout Batch release of the bypass
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API Version of the referent
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the referent
|
||||
type: string
|
||||
name:
|
||||
description: Name of the referent
|
||||
type: string
|
||||
required:
|
||||
- apiVersion
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- releasePlan
|
||||
- targetReference
|
||||
type: object
|
||||
status:
|
||||
description: BatchReleaseStatus defines the observed state of a release
|
||||
plan
|
||||
properties:
|
||||
canaryStatus:
|
||||
description: CanaryStatus describes the state of the canary rollout.
|
||||
properties:
|
||||
batchReadyTime:
|
||||
description: BatchReadyTime is the ready timestamp of the current
|
||||
batch or the last batch. This field is updated once a batch
|
||||
ready, and the batches[x].pausedSeconds relies on this field
|
||||
to calculate the real-time duration.
|
||||
format: date-time
|
||||
type: string
|
||||
batchState:
|
||||
description: CurrentBatchState indicates the release state of
|
||||
the current batch.
|
||||
type: string
|
||||
currentBatch:
|
||||
description: The current batch the rollout is working on/blocked,
|
||||
it starts from 0
|
||||
format: int32
|
||||
type: integer
|
||||
noNeedUpdateReplicas:
|
||||
description: the number of pods that no need to rollback in rollback
|
||||
scene.
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReadyReplicas:
|
||||
description: UpdatedReadyReplicas is the number upgraded Pods
|
||||
that have a Ready Condition.
|
||||
format: int32
|
||||
type: integer
|
||||
updatedReplicas:
|
||||
description: UpdatedReplicas is the number of upgraded Pods.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- currentBatch
|
||||
type: object
|
||||
collisionCount:
|
||||
description: Count of hash collisions for creating canary Deployment.
|
||||
The controller uses this field as a collision avoidance mechanism
|
||||
when it needs to create the name for the newest canary Deployment.
|
||||
format: int32
|
||||
type: integer
|
||||
conditions:
|
||||
description: Conditions represents the observed process state of each
|
||||
phase during executing the release plan.
|
||||
items:
|
||||
description: RolloutCondition describes the state of a rollout at
|
||||
a certain point.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one status
|
||||
to another.
|
||||
format: date-time
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: The last time this condition was updated.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about
|
||||
the transition.
|
||||
type: string
|
||||
reason:
|
||||
description: The reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Phase of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of rollout condition.
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
description: ObservedGeneration is the most recent generation observed
|
||||
for this BatchRelease. It corresponds to this BatchRelease's generation,
|
||||
which is updated on mutation by the API Server, and only if BatchRelease
|
||||
Spec was changed, its generation will increase 1.
|
||||
format: int64
|
||||
type: integer
|
||||
observedReleasePlanHash:
|
||||
description: ObservedReleasePlanHash is a hash code of observed itself
|
||||
spec.releasePlan.
|
||||
type: string
|
||||
observedRolloutID:
|
||||
description: ObservedRolloutID is the most recent rollout-id observed
|
||||
for this BatchRelease. If RolloutID was changed, we will restart
|
||||
to roll out from batch 0, to ensure the batch-id and rollout-id
|
||||
labels of Pods are correct.
|
||||
type: string
|
||||
observedWorkloadReplicas:
|
||||
description: ObservedWorkloadReplicas is observed replicas of target
|
||||
referenced workload. This field is designed to deal with scaling
|
||||
event during rollout, if this field changed, it means that the workload
|
||||
is scaling during rollout.
|
||||
format: int32
|
||||
type: integer
|
||||
phase:
|
||||
description: Phase is the release plan phase, which indicates the
|
||||
current state of release plan state machine in BatchRelease controller.
|
||||
type: string
|
||||
stableRevision:
|
||||
description: StableRevision is the pod-template-hash of stable revision
|
||||
pod template.
|
||||
type: string
|
||||
updateRevision:
|
||||
description: UpdateRevision is the pod-template-hash of update revision
|
||||
pod template.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue