diff --git a/build/Makefile b/build/Makefile index 6f72e27212..3127909715 100644 --- a/build/Makefile +++ b/build/Makefile @@ -456,7 +456,7 @@ install: $(ensure-build-image) install-custom-pull-secret helm uninstall agones --namespace=agones-system --wait --timeout=20m; \ fi || true' $(DOCKER_RUN) \ - helm upgrade --install --atomic --wait --timeout 10m --namespace=agones-system \ + helm upgrade --install --rollback-on-failure --wait --timeout 10m --namespace=agones-system \ --create-namespace \ --set agones.image.tag=$(VERSION),agones.image.registry=$(REGISTRY) \ --set agones.image.controller.pullPolicy=$(IMAGE_PULL_POLICY),agones.image.controller.pullSecret=$(IMAGE_PULL_SECRET) \ diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index 12e81fcbd8..5b3ef0a4e7 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -65,7 +65,7 @@ RUN mkdir -p /go/src/k8s.io && cd /go/src/k8s.io && \ git clone -b kubernetes-${KUBERNETES_VER} --depth=3 https://github.com/kubernetes/code-generator.git # install Helm package manager -ENV HELM_VER=3.18.4 +ENV HELM_VER=4.1.3 ENV HELM_URL=https://get.helm.sh/helm-v${HELM_VER}-linux-amd64.tar.gz RUN curl -L ${HELM_URL} > /tmp/helm.tar.gz \ && tar -zxvf /tmp/helm.tar.gz -C /tmp \ diff --git a/build/e2e-image/Dockerfile b/build/e2e-image/Dockerfile index 0b7600c6c9..e1d353aa0e 100644 --- a/build/e2e-image/Dockerfile +++ b/build/e2e-image/Dockerfile @@ -28,7 +28,7 @@ RUN curl -LO https://dl.k8s.io/release/v${KUBECTL_VER}/bin/linux/amd64/kubectl & mv ./kubectl /usr/local/bin/kubectl # install Helm package manager -ENV HELM_VER 3.18.4 +ENV HELM_VER 4.1.3 ENV HELM_URL https://get.helm.sh/helm-v${HELM_VER}-linux-amd64.tar.gz RUN curl -L ${HELM_URL} > /tmp/helm.tar.gz \ && tar -zxvf /tmp/helm.tar.gz -C /tmp \ diff --git a/install/helm/agones/Chart.yaml b/install/helm/agones/Chart.yaml index 47a1f6be0b..b2738db4c1 100644 --- a/install/helm/agones/Chart.yaml +++ b/install/helm/agones/Chart.yaml @@ -32,6 +32,5 @@ maintainers: - name: agones email: agones-discuss@googlegroups.com url: https://groups.google.com/forum/#!forum/agones-discuss -engine: gotpl icon: https://github.com/agones-dev/agones/raw/main/docs/agones.png -tillerVersion: ">2.10.0" + diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index 8385e55d47..c75de84190 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -8,7 +8,7 @@ description: > ## Prerequisites -- [Helm](https://helm.sh/) package manager 3.2.3+ +- [Helm](https://helm.sh/) package manager 4.1.3+ - [Supported Kubernetes Cluster]({{< relref "../_index.md#usage-requirements" >}}) ## Helm 3 @@ -77,6 +77,72 @@ To uninstall/delete the `my-release` deployment: helm uninstall my-release --namespace=agones-system ``` +## Helm 4 + +### Installing the Chart + +To install the chart with the release name `my-release` using our stable helm repository: + +```bash +helm repo add agones https://agones.dev/chart/stable +helm repo update +helm install my-release --namespace agones-system --create-namespace agones/agones +``` + +_We recommend installing Agones in its own namespaces, such as `agones-system` as shown above. +If you want to use a different namespace, you can use the helm `--namespace` parameter to specify._ + +When running in production, Agones should be scheduled on a dedicated pool of nodes, distinct from +where Game Servers are scheduled for better isolation and resiliency. By default Agones prefers to +be scheduled on nodes labeled with `agones.dev/agones-system=true` and tolerates node taint +`agones.dev/agones-system=true:NoExecute`. If no dedicated nodes are available, Agones will +run on regular nodes, but that's not recommended for production use. For instructions on setting up +a dedicated node pool for Agones, see the [Agones installation instructions]({{< relref "../_index.md" >}}) +for your preferred environment. + +The command deploys Agones on the Kubernetes cluster with the default configuration. The +[configuration](#configuration) section lists the parameters that can be configured during installation. + +The Agones chart uses a [Helm Schema](https://helm.sh/docs/topics/charts/#schema-files) to validate +fields set by the user. In the event this validation schema marks a valid edge case as invalid, +please [file a bug](https://github.com/agones-dev/agones/issues), and you can still attempt a +Helm install or Helm upgrade with the Helm flag `--skip-schema-validation`. + +{{% alert title="Tip" color="info" %}} +List all releases using `helm list --all-namespaces` +{{% /alert %}} + +### Namespaces + +By default Agones is configured to work with game servers deployed in the `default` namespace. If +you are planning to use another namespace you can configure Agones via the parameter `gameservers.namespaces`. + +For example to use `default` **and** `xbox` namespaces: + +```bash +kubectl create namespace xbox +helm install my-release agones/agones --set "gameservers.namespaces={default,xbox}" --namespace agones-system +``` + +{{% alert title="Note" color="info" %}} +You need to create your namespaces before installing Agones. +{{% /alert %}} + +If you want to add a new namespace afterward upgrade your release: + +```bash +kubectl create namespace ps4 +helm upgrade my-release agones/agones --reuse-values --set "gameservers.namespaces={default,xbox,ps4}" --namespace agones-system +``` + +### Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +helm uninstall my-release --namespace=agones-system +``` + ## RBAC By default, `agones.rbacEnabled` is set to true. This enables RBAC support in Agones and must be true diff --git a/site/content/en/docs/Installation/upgrading.md b/site/content/en/docs/Installation/upgrading.md index 6f9abcfae3..a1f11eae82 100644 --- a/site/content/en/docs/Installation/upgrading.md +++ b/site/content/en/docs/Installation/upgrading.md @@ -83,7 +83,7 @@ Note: By “controller derived configuration” we mean the parts of the Game Se are not part of the Game Server spec template that are instead passed to the Game Server through the controller, such as the FEATURE_GATES or the Agones SDK Image. -1. Run `helm upgrade my-release agones/agones --install --atomic --wait --timeout 10m --namespace=agones-system` +1. Run `helm upgrade my-release agones/agones --install --rollback-on-failure --wait --timeout 10m --namespace=agones-system` with all the appropriate arguments, such a `--version`, for your specific upgrade. Keep in mind that `helm upgrade` overwrites all `--set agones.*` arguments, so these must be set for each upgrade. See the [Helm Upgrade](https://helm.sh/docs/helm/helm_upgrade/) documentaion for information on the Helm diff --git a/test/upgrade/Dockerfile b/test/upgrade/Dockerfile index d81d620b64..7fac84182d 100644 --- a/test/upgrade/Dockerfile +++ b/test/upgrade/Dockerfile @@ -28,7 +28,7 @@ RUN curl -LO https://dl.k8s.io/release/v${KUBECTL_VER}/bin/linux/amd64/kubectl & mv ./kubectl /usr/local/bin/kubectl # install Helm package manager -ENV HELM_VER=3.18.4 +ENV HELM_VER=4.1.3 ENV HELM_URL=https://get.helm.sh/helm-v${HELM_VER}-linux-amd64.tar.gz RUN curl -L ${HELM_URL} > /tmp/helm.tar.gz \ && tar -zxvf /tmp/helm.tar.gz -C /tmp \ diff --git a/test/upgrade/main.go b/test/upgrade/main.go index 59252e7d8f..9cbadf250b 100644 --- a/test/upgrade/main.go +++ b/test/upgrade/main.go @@ -325,7 +325,7 @@ func installAgonesRelease(version, registry, featureGates, imagePullPolicy, side log.Printf("Agones Version %s, FeatureGates %s", version, featureGates) helmString := fmt.Sprintf( - "upgrade --install --atomic --wait --timeout=10m --namespace=agones-system --create-namespace --version %s "+ + "upgrade --install --rollback-on-failure --wait --timeout=10m --namespace=agones-system --create-namespace --version %s "+ "--set agones.image.tag=%s "+ "--set agones.image.registry=%s "+ "--set agones.image.allocator.pullPolicy=%s "+