Skip to content

Commit

Permalink
Add allocator readiness configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
chiayi committed May 9, 2023
1 parent d7a9e6a commit c1ba58d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ make test-e2e-integration ARGS='-run TestGameServerReserve'
#### `make test-e2e-failure`
Run controller failure portion of the end-to-end tests.

#### `make test-e2e-allocator-crash`
Run allocator failure portion of the end-to-end test.

#### `make setup-prometheus`

Install Prometheus server using [Prometheus Community](https://prometheus-community.github.io/helm-charts)
Expand Down
3 changes: 3 additions & 0 deletions site/content/en/docs/Installation/Install Agones/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ The following tables lists the configurable parameters of the Agones chart and t
| Parameter | Description | Default |
|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| `agones.allocator.labels` | [Labels][labels] Added to the Agones Allocator pods | `{}` |
| `agones.allocator.readiness.initialDelaySeconds` | Initial delay before performing the first probe (in seconds) | `3` |
| `agones.allocator.readiness.periodSeconds` | Seconds between every liveness probe (in seconds) | `3` |
| `agones.allocator.readiness.failureThreshold` | Number of times before giving up (in seconds) | `3` |

{{% /feature %}}

Expand Down
10 changes: 10 additions & 0 deletions test/e2e/allocator/pod_termination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import (
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/wait"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
Expand All @@ -40,13 +42,21 @@ func TestAllocatorAfterDeleteReplica(t *testing.T) {

var list *v1.PodList

dep, err := framework.KubeClient.AppsV1().Deployments("agones-system").Get(ctx, "agones-allocator", metav1.GetOptions{})
replicaCnt := int(*dep.Spec.Replicas)
logrus.Infof("Replica count config is %s", replicaCnt)

// poll and wait until all allocator pods are running
_ = wait.PollImmediate(retryInterval, retryTimeout, func() (done bool, err error) {
list, err = helper.GetAgonesAllocatorPods(ctx, framework)
if err != nil {
return true, err
}

if len(list.Items) != replicaCnt {

}

for _, allocpod := range list.Items {
podstatus := string(allocpod.Status.Phase)
logrus.Infof("Allocator Pod %s, has status of %s", allocpod.ObjectMeta.Name, podstatus)
Expand Down

0 comments on commit c1ba58d

Please sign in to comment.