# Active cluster arbitrator (aka Judge)

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| file://../hopsworkslib | hopsworkslib | 0.1.0 |

Judge is a service we use in HA multiregion clusters to which advertises a JSON object for which region is active is which region is standby

```json
{
    "active": "eu",
    "secondary": "us"
}
```

Other services in Hopsworks poll the Judge to decide if they are Active or Standby.

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| enabled | bool | `false` |  |
| hopsworkslib | object | `{}` | override hopsworkslib values |
| image.name | string | `"/hopsworks/nginx"` |  |
| image.pullPolicy | string | `"IfNotPresent"` |  |
| image.registry | string | `"test-registry:6000"` |  |
| image.tag | string | `"stable-bookworm"` |  |
| ingress.annotations | object | `{}` | ingress annotations |
| ingress.className | string | `"nginx"` | Name of the class implementing the Ingress controller |
| ingress.host | string | `"judge.hopsworks.ai"` | Rule for host based routing |
| nodeSelector | object | `{}` | This ensures that Kubernetes schedules pods only onto nodes that match all the specified labels. |
| port | int | `8080` | Port Judge will be listening on internally |
| regions.active | string | `"eu"` | Active region identifier |
| regions.replica | string | `"us"` | Replica region identifier |
| replicaCount | int | `1` |  |
| resources.limits.cpu | string | `"10m"` |  |
| resources.limits.memory | string | `"70M"` |  |
| resources.requests.cpu | string | `"5m"` |  |
| resources.requests.memory | string | `"50M"` |  |
| serviceAccount.name | string | `"hopsworks-judge"` |  |
| serviceName | string | `"hopsworks-judge"` |  |
| tolerations | list | `[]` | These tolerations allow Kubernetes to schedule pods on nodes with matching taints, ensuring proper placement based on cluster policies. |
| topologySpreadConstraint | object | `{}` | The default topology spread constraint. If not defined the global topology spread constraint would be used instead. |