-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating a Fleet creates a GameServerSet
All this commit is doing is create a GameServerSet when a Fleet is created. Also, if the Replicas in a Fleet are updated, then the owned GameServerSet's Replicas are also updated. For this commit, we are not worrying about handling updates to the Spec (e.g. new image) to the Fleet, and doing updates to a live Fleet, we are just concerned with scaling up and down. Parent ticket: #70
- Loading branch information
1 parent
4a6e774
commit 26c9365
Showing
30 changed files
with
1,642 additions
and
51 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2017 Google Inc. All Rights Reserved. | ||
# | ||
# 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. | ||
|
||
apiVersion: "stable.agones.dev/v1alpha1" | ||
kind: Fleet | ||
metadata: | ||
# generate a unique name | ||
# will need to be created with `kubectl create` | ||
generateName: cpp-simple- | ||
spec: | ||
containerPort: 7654 | ||
template: | ||
spec: | ||
containers: | ||
- name: cpp-simple | ||
image: gcr.io/agones-images/cpp-simple-server:0.1 | ||
# imagePullPolicy: Always # add for development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018 Google Inc. All Rights Reserved. | ||
# | ||
# 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. | ||
|
||
# Usually you would define a Fleet rather than a GameServerSet | ||
# directly. This is here mostly for testing purposes | ||
|
||
apiVersion: "stable.agones.dev/v1alpha1" | ||
kind: Fleet | ||
metadata: | ||
name: simple-udp | ||
spec: | ||
replicas: 2 | ||
template: | ||
spec: | ||
containerPort: 7654 | ||
template: | ||
spec: | ||
containers: | ||
- name: simple-udp | ||
image: gcr.io/agones-images/udp-server:0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2018 Google Inc. All Rights Reserved. | ||
# | ||
# 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. | ||
|
||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: fleets.stable.agones.dev | ||
spec: | ||
group: stable.agones.dev | ||
version: v1alpha1 | ||
scope: Namespaced | ||
names: | ||
kind: Fleet | ||
plural: fleets | ||
shortNames: | ||
- flt | ||
singular: fleet | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
required: | ||
- replicas | ||
- template | ||
properties: | ||
replicas: | ||
type: integer | ||
minimum: 0 | ||
template: | ||
{{- include "gameserver.validation" . | indent 14 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.