|
| 1 | +# UpdateController Helm Chart |
| 2 | + |
| 3 | +This Helm chart deploys the UpdateController for managing TF2 game server updates in a Kubernetes cluster. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Kubernetes 1.19+ |
| 8 | +- Helm 3.0+ |
| 9 | +- A PersistentVolume provisioner (if using persistence) |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +### Install from OCI Registry |
| 14 | + |
| 15 | +The chart is published to GitHub Container Registry as an OCI artifact: |
| 16 | + |
| 17 | +```bash |
| 18 | +helm install update-controller oci://ghcr.io/udl-tf/charts/update-controller --version 0.1.0 |
| 19 | +``` |
| 20 | + |
| 21 | +### Install from local chart |
| 22 | + |
| 23 | +```bash |
| 24 | +# From the repository root |
| 25 | +helm install update-controller ./helm |
| 26 | + |
| 27 | +# Or from the helm directory |
| 28 | +cd helm |
| 29 | +helm install update-controller . |
| 30 | +``` |
| 31 | + |
| 32 | +### Install with custom values |
| 33 | + |
| 34 | +```bash |
| 35 | +helm install update-controller ./helm -f custom-values.yaml |
| 36 | +``` |
| 37 | + |
| 38 | +### Install with specific parameters |
| 39 | + |
| 40 | +```bash |
| 41 | +helm install update-controller ./helm \ |
| 42 | + --set image.tag=v1.0.0 \ |
| 43 | + --set config.checkInterval=15m \ |
| 44 | + --set persistence.size=100Gi |
| 45 | +``` |
| 46 | + |
| 47 | +## Configuration |
| 48 | + |
| 49 | +The following table lists the configurable parameters of the UpdateController chart and their default values. |
| 50 | + |
| 51 | +| Parameter | Description | Default | |
| 52 | +| ------------------------------ | ---------------------------------- | ---------------------------------- | |
| 53 | +| `replicaCount` | Number of controller replicas | `1` | |
| 54 | +| `image.repository` | Container image repository | `ghcr.io/udl-tf/update-controller` | |
| 55 | +| `image.pullPolicy` | Image pull policy | `Always` | |
| 56 | +| `image.tag` | Image tag (overrides appVersion) | `""` | |
| 57 | +| `serviceAccount.create` | Create service account | `true` | |
| 58 | +| `serviceAccount.name` | Service account name | `""` (generated) | |
| 59 | +| `rbac.create` | Create RBAC resources | `true` | |
| 60 | +| `config.checkInterval` | Interval to check for updates | `30m` | |
| 61 | +| `config.steamAppId` | Steam app ID | `232250` | |
| 62 | +| `config.gameMountPath` | Path where game files are mounted | `/tf` | |
| 63 | +| `config.podSelector` | Label selector for pods to restart | `app=tf2-server` | |
| 64 | +| `config.maxRetries` | Maximum number of retries | `3` | |
| 65 | +| `config.namespace` | Namespace where game servers run | `game-servers` | |
| 66 | +| `resources.limits.cpu` | CPU limit | `500m` | |
| 67 | +| `resources.limits.memory` | Memory limit | `512Mi` | |
| 68 | +| `resources.requests.cpu` | CPU request | `100m` | |
| 69 | +| `resources.requests.memory` | Memory request | `128Mi` | |
| 70 | +| `persistence.enabled` | Enable persistent storage | `true` | |
| 71 | +| `persistence.existingClaim` | Use existing PVC | `""` | |
| 72 | +| `persistence.size` | PVC size | `50Gi` | |
| 73 | +| `persistence.storageClassName` | Storage class name | `standard` | |
| 74 | +| `namespace.create` | Create namespace | `true` | |
| 75 | +| `namespace.name` | Namespace name | `game-servers` | |
| 76 | + |
| 77 | +## Examples |
| 78 | + |
| 79 | +### Using an existing PVC |
| 80 | + |
| 81 | +```yaml |
| 82 | +# custom-values.yaml |
| 83 | +persistence: |
| 84 | + enabled: true |
| 85 | + existingClaim: my-existing-game-files-pvc |
| 86 | +``` |
| 87 | +
|
| 88 | +```bash |
| 89 | +helm install update-controller ./helm -f custom-values.yaml |
| 90 | +``` |
| 91 | + |
| 92 | +### Deploying to a different namespace |
| 93 | + |
| 94 | +```yaml |
| 95 | +# custom-values.yaml |
| 96 | +namespace: |
| 97 | + create: false |
| 98 | + name: my-custom-namespace |
| 99 | +``` |
| 100 | +
|
| 101 | +### Custom update interval and retry settings |
| 102 | +
|
| 103 | +```yaml |
| 104 | +# custom-values.yaml |
| 105 | +config: |
| 106 | + checkInterval: '15m' |
| 107 | + maxRetries: '5' |
| 108 | + retryDelay: '10m' |
| 109 | +``` |
| 110 | +
|
| 111 | +### Using a specific image version |
| 112 | +
|
| 113 | +```bash |
| 114 | +helm install update-controller ./helm --set image.tag=v1.0.0 |
| 115 | +``` |
| 116 | + |
| 117 | +## Upgrading |
| 118 | + |
| 119 | +### Upgrade from OCI Registry |
| 120 | + |
| 121 | +```bash |
| 122 | +helm upgrade update-controller oci://ghcr.io/udl-tf/charts/update-controller --version 0.1.0 |
| 123 | +``` |
| 124 | + |
| 125 | +### Upgrade from local chart |
| 126 | + |
| 127 | +```bash |
| 128 | +helm upgrade update-controller ./helm |
| 129 | +``` |
| 130 | + |
| 131 | +With custom values: |
| 132 | + |
| 133 | +```bash |
| 134 | +helm upgrade update-controller ./helm -f custom-values.yaml |
| 135 | +``` |
| 136 | + |
| 137 | +## Uninstallation |
| 138 | + |
| 139 | +```bash |
| 140 | +helm uninstall update-controller |
| 141 | +``` |
| 142 | + |
| 143 | +**Note:** This will not delete the PVC by default. To delete it: |
| 144 | + |
| 145 | +```bash |
| 146 | +kubectl delete pvc -n game-servers update-controller-game-files |
| 147 | +``` |
| 148 | + |
| 149 | +## Troubleshooting |
| 150 | + |
| 151 | +### Check controller status |
| 152 | + |
| 153 | +```bash |
| 154 | +kubectl get pods -n game-servers -l app.kubernetes.io/name=update-controller |
| 155 | +``` |
| 156 | + |
| 157 | +### View controller logs |
| 158 | + |
| 159 | +```bash |
| 160 | +kubectl logs -n game-servers -l app.kubernetes.io/name=update-controller -f |
| 161 | +``` |
| 162 | + |
| 163 | +### Verify RBAC permissions |
| 164 | + |
| 165 | +```bash |
| 166 | +kubectl describe clusterrole update-controller |
| 167 | +kubectl describe clusterrolebinding update-controller |
| 168 | +``` |
| 169 | + |
| 170 | +### Check configuration |
| 171 | + |
| 172 | +```bash |
| 173 | +kubectl get configmap -n game-servers update-controller-config -o yaml |
| 174 | +``` |
| 175 | + |
| 176 | +## License |
| 177 | + |
| 178 | +MIT |
0 commit comments