Skip to content

Commit

Permalink
Revert "Merge branch 'master' into simple-game-server-example"
Browse files Browse the repository at this point in the history
This reverts commit cda2966, reversing
changes made to 1faaa39.
  • Loading branch information
Bmandk committed Sep 5, 2020
1 parent cda2966 commit 06c841d
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 844 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ bin
tmp
terraform.tfvars
terraform.tfstate*
kubeconfig
build/local-includes/*
!build/local-includes/README.md
/release
debug.test
obj
obj
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ output:

linters:
enable:
- exportloopref
- deadcode
- megacheck
- govet
Expand Down Expand Up @@ -78,7 +77,6 @@ linters-settings:
disabled-checks:
- paramTypeCombine
- unnamedResult
- unnecessaryDefer
settings: # settings passed to gocritic
hugeParam:
sizeThreshold: 512
Expand Down
8 changes: 0 additions & 8 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,6 @@ Run `terraform destroy` on your cluster.
#### `make terraform-clean`
Remove .terraform directory with configs as well as tfstate files.

#### `make terraform-test GCP_PROJECT="<YOUR_PROJECT_ID>"`
Run Golang test which emulates and verifies successful execution of next two steps:
```
make gcloud-terraform-cluster
make gcloud-terraform-destroy-cluster
```
Singleton, could not be executed in parallel with itself. As it uses the one terraform tfstate file.

### Minikube

A set of utilities for setting up and running a [Minikube](https://github.com/kubernetes/minikube) instance,
Expand Down
2 changes: 1 addition & 1 deletion build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN curl -L ${HELM_URL} > /tmp/helm.tar.gz \
RUN echo "source <(helm completion bash)" >> /root/.bashrc

# install golang-ci linter
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.30.0
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.27.0

#
# \ \ / /__| |__ ___(_) |_ ___
Expand Down
2 changes: 1 addition & 1 deletion build/includes/kind.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kind-test-cluster: DOCKER_RUN_ARGS+=--network=host
kind-test-cluster: $(ensure-build-image)
@if [ -z $$(kind get clusters | grep $(KIND_PROFILE)) ]; then\
echo "Could not find $(KIND_PROFILE) cluster. Creating...";\
kind create cluster --name $(KIND_PROFILE) --image kindest/node:v1.16.9 --wait 5m;\
kind create cluster --name $(KIND_PROFILE) --image kindest/node:v1.15.7 --wait 5m;\
fi

# deletes the kind agones cluster
Expand Down
2 changes: 1 addition & 1 deletion build/includes/minikube.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# (defaults virtualbox for Linux and macOS, hyperv for windows) if you so desire.
minikube-test-cluster: DOCKER_RUN_ARGS+=--network=host -v $(minikube_cert_mount)
minikube-test-cluster: $(ensure-build-image) minikube-agones-profile
$(MINIKUBE) start --kubernetes-version v1.16.13 --vm-driver $(MINIKUBE_DRIVER)
$(MINIKUBE) start --kubernetes-version v1.15.11 --vm-driver $(MINIKUBE_DRIVER)
# wait until the master is up
until docker run --rm $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) kubectl cluster-info; \
do \
Expand Down
27 changes: 4 additions & 23 deletions build/includes/terraform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ GCP_TF_CLUSTER_NAME ?= agones-tf-cluster
# the current project
current_project := $(shell $(DOCKER_RUN) bash -c "gcloud config get-value project 2> /dev/null")

### Deploy cluster with Terraform
terraform-init: TERRAFORM_BUILD_DIR ?= $(mount_path)/build/terraform/gke
### Init Terraform with subdirectory of DIRECTORY in ./build/terraform
terraform-init: $(ensure-build-image)
terraform-init:
docker run --rm -it $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c '\
cd $(TERRAFORM_BUILD_DIR) && terraform init && gcloud auth application-default login'
cd $(mount_path)/build/terraform/$(DIRECTORY) && terraform init && gcloud auth application-default login'

terraform-clean: TERRAFORM_BUILD_DIR ?= $(mount_path)/build/terraform/gke
terraform-clean:
$(DOCKER_RUN) bash -c ' \
cd $(TERRAFORM_BUILD_DIR) && rm -r ./.terraform || true && \
rm ./terraform.tfstate* || true && \
rm ./kubeconfig || true'
rm -r ../build/terraform/gke/.terraform || true
rm ../build/terraform/gke/terraform.tfstate* || true

# Creates a cluster and install release version of Agones controller
# Version could be specified by AGONES_VERSION
Expand Down Expand Up @@ -89,17 +84,3 @@ gcloud-terraform-destroy-cluster: GCP_PROJECT ?= $(current_project)
gcloud-terraform-destroy-cluster:
$(DOCKER_RUN) bash -c 'cd $(mount_path)/build/terraform/gke && terraform destroy -var project=$(GCP_PROJECT) -auto-approve'

terraform-test: $(ensure-build-image)
terraform-test: GCP_PROJECT ?= $(current_project)
terraform-test:
$(MAKE) terraform-init TERRAFORM_BUILD_DIR=$(mount_path)/test/terraform
$(MAKE) run-terraform-test GCP_PROJECT=$(GCP_PROJECT)
$(MAKE) terraform-test-clean

terraform-test-clean: $(ensure-build-image)
$(MAKE) terraform-clean TERRAFORM_BUILD_DIR=$(mount_path)/test/terraform

# run terratest which verifies GKE and Helm Terraform modules
run-terraform-test:
$(DOCKER_RUN) bash -c 'cd $(mount_path)/test/terraform && go test -v -run TestTerraformGKEInstallConfig \
-timeout 1h -project $(GCP_PROJECT) $(ARGS)'
4 changes: 2 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ func parseEnvFlags() config {
viper.SetDefault(sidecarMemoryLimitFlag, "0")
viper.SetDefault(pullSidecarFlag, false)
viper.SetDefault(sdkServerAccountFlag, "agones-sdk")
viper.SetDefault(certFileFlag, filepath.Join(base, "certs", "server.crt"))
viper.SetDefault(keyFileFlag, filepath.Join(base, "certs", "server.key"))
viper.SetDefault(certFileFlag, filepath.Join(base, "certs/server.crt"))
viper.SetDefault(keyFileFlag, filepath.Join(base, "certs/server.key"))
viper.SetDefault(enablePrometheusMetricsFlag, true)
viper.SetDefault(enableStackdriverMetricsFlag, false)
viper.SetDefault(stackdriverLabels, "")
Expand Down
4 changes: 0 additions & 4 deletions site/content/en/docs/Advanced/allocator-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ agones-allocator LoadBalancer 10.55.251.73 <b>34.82.195.204</b>

## Server TLS certificate

{{% feature publishVersion="1.9.0" %}}
If the `agones-allocator` service is installed as a `LoadBalancer` [using a static IP]({{< relref "/docs/Installation/Install Agones/helm.md#reserved-allocator-load-balancer-ip" >}}), a valid self-signed server TLS certificate is generated using the IP provided. Otherwise, the server TLS certificate should be replaced.
{{% /feature %}}

Replace the default server TLS certificate with a certificate with CN and subjectAltName. There are multiple approaches to generate a certificate. Agones recommends using [cert-manager.io](https://cert-manager.io/) solution for cluster level certificate management.

In order to use cert-manager solution, first, [install cert-manager](https://cert-manager.io/docs/installation/kubernetes/) on the cluster. Then, [configure](https://cert-manager.io/docs/configuration/) an `Issuer`/`ClusterIssuer` resource and last configure a `Certificate` resource to manage allocator-tls `Secret`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,9 @@ minikube profile agones
The following command starts a local minikube cluster via virtualbox - but this can be
replaced by a [vm-driver](https://github.com/kubernetes/minikube#requirements) of your choice.

{{% feature expiryVersion="1.9.0" %}}
```bash
minikube start --kubernetes-version v1.15.10 --vm-driver virtualbox
```
{{% /feature %}}
{{% feature publishVersion="1.9.0" %}}
```bash
minikube start --kubernetes-version v1.16.13 --vm-driver virtualbox
```
{{% /feature %}}

## Next Steps

Expand Down
13 changes: 1 addition & 12 deletions site/content/en/docs/Installation/Install Agones/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ The following tables lists the configurable parameters of the Agones chart and t
| Parameter | Description | Default |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------- |
| `agones.allocator.http.loadBalancerIP` | The [Load Balancer IP][loadBalancerIP] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | "" |
| `agones.allocator.disableMTLS` | Turns off client cert authentication for incoming connections to the allocator. | `false` |
| `agones.allocator.disableTLS` | Turns off TLS security for incoming connections to the allocator. | `false` |

{{% /feature %}}

Expand Down Expand Up @@ -285,7 +283,7 @@ RUNNING: agones-test
ERROR: pods "agones-test" already exists
Error: 1 test(s) failed
```
That means that you skipped the `--cleanup` flag and you should either delete the `agones-test` pod manually or run with the same test `helm test my-release --cleanup` two more times.
That mean that you skiped `--cleanup` flag and you should either delete `agones-test` pod manually or run with the same test `helm test my-release --cleanup` two more times.
{{< /alert >}}

## TLS Certificates
Expand All @@ -297,15 +295,6 @@ For most use cases the controller would have required a restart anyway (eg: cont
You can use our script located at {{< ghlink href="install/helm/agones/certs/cert.sh" >}}cert.sh{{< /ghlink >}} to generate them.
{{< /alert >}}

{{% feature publishVersion="1.9.0" %}}
## Reserved Allocator Load Balancer IP

In order to reuse the existing load balancer IP on upgrade or install the `agones-allocator` service as a `LoadBalancer` using a reserved static IP, a user can specify the load balancer's IP with the `agones.allocator.http.loadBalancerIP` helm configuration parameter value. By setting the `loadBalancerIP` value:

1. The `LoadBalancer` is created with the specified IP, if supported by the cloud provider.
2. A self-signed server TLS certificate is generated for the IP, used by the `agones-allocator` service.
{{% /feature %}}

## Next Steps

- [Confirm Agones is up and running]({{< relref "../confirm.md" >}})
14 changes: 0 additions & 14 deletions site/content/en/docs/Installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ description: >

## Usage Requirements

{{% feature expiryVersion="1.9.0" %}}
- **Kubernetes cluster version 1.15**
{{% /feature %}}
{{% feature publishVersion="1.9.0" %}}
- **Kubernetes cluster version 1.16**
{{% /feature %}}
- [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/),
[Azure Kubernetes Service](https://azure.microsoft.com/en-us/services/kubernetes-service/),
[Amazon EKS](https://aws.amazon.com/eks/) and [Minikube](https://github.com/kubernetes/minikube) have been tested
Expand All @@ -26,20 +21,11 @@ description: >
- Firewall access for the range of ports that Game Servers can be connected to in the cluster.
- Game Servers must have the [game server SDK]({{< ref "/docs/Guides/Client SDKs/_index.md" >}}) integrated, to manage Game Server state, health checking, etc.

{{% feature expiryVersion="1.9.0" %}}
{{< alert title="Warning" color="warning">}}
Later versions of Kubernetes may work, but this project is tested against 1.15, and is therefore the supported version.
Agones will update its support to n-1 version of what is available across the majority of major cloud providers - GKE, EKS and
AKS, while also ensuring that all Cloud providers can support that version.
{{< /alert >}}
{{% /feature %}}
{{% feature publishVersion="1.9.0" %}}
{{< alert title="Warning" color="warning">}}
Later versions of Kubernetes may work, but this project is tested against 1.16, and is therefore the supported version.
Agones will update its support to n-1 version of what is available across the majority of major cloud providers - GKE, EKS and
AKS, while also ensuring that all Cloud providers can support that version.
{{< /alert >}}
{{% /feature %}}

{{< alert title="Note" color="info">}}
When running in production, Agones should be scheduled on a dedicated pool of nodes, distinct from where Game Servers
Expand Down
2 changes: 1 addition & 1 deletion test/load/allocation/allocationload.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
if err != nil {
logrus.Fatalf("Unable to determine the current user: %v", err)
}
kubeconfig := flag.String("kubeconfig", filepath.Join(usr.HomeDir, ".kube", "config"),
kubeconfig := flag.String("kubeconfig", filepath.Join(usr.HomeDir, "/.kube/config"),
"kube config path, e.g. $HOME/.kube/config")
fleetName := flag.String("fleet_name", "simple-udp", "The fleet name that the tests will run against")
qps := flag.Int("qps", 1000, "The QPS value that will overwrite the default value")
Expand Down
58 changes: 0 additions & 58 deletions test/terraform/cluster.tf

This file was deleted.

109 changes: 0 additions & 109 deletions test/terraform/gke_test.go

This file was deleted.

Loading

0 comments on commit 06c841d

Please sign in to comment.