Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The charts are published to the OCI registry at `oci://us-west1-docker.pkg.dev/d
- [safe-transaction-service](./charts/safe-transaction-service/README.md) - Helm chart for deploying Celo Safe Transaction Service
- [socket-exporter](./charts/socket-exporter/README.md) - A Helm chart for socket-exporter
- [succinct-cost-estimator](./charts/succinct-cost-estimator/README.md) - A Helm chart for the succinct cost estimator
- [succinct-game-monitor](./charts/succinct-game-monitor/README.md) - A Helm chart for the succinct game monitor
- [team-trigger-workflow](./charts/team-trigger-workflow/README.md) - A Helm chart to run team-trigger-workflow at cLabs
- [testnet](./charts/testnet/README.md) - Private Celo network Helm chart for Kubernetes
- [ultragreen-dashboard](./charts/ultragreen-dashboard/README.md) - Celo Ultragreed Dashboard
Expand Down
24 changes: 24 additions & 0 deletions charts/succinct-game-monitor/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

13 changes: 13 additions & 0 deletions charts/succinct-game-monitor/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v2
name: succinct-game-monitor
description: A Helm chart for the succinct game monitor
type: application
version: 0.1.0
appVersion: "latest"
maintainers:
- name: cLabs
email: devops@clabs.co
url: https://clabs.co
sources:
- https://github.com/succinctlabs/op-succinct
57 changes: 57 additions & 0 deletions charts/succinct-game-monitor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# succinct-game-monitor

![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: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

A Helm chart for the succinct game monitor

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| cLabs | <devops@clabs.co> | <https://clabs.co> |

## Source Code

* <https://github.com/succinctlabs/op-succinct>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Kubernetes pod affinity |
| command | list | `[]` | Command to run in the container (overrides image ENTRYPOINT) |
| config.env | object | `{}` | Environment variables to pass to the container These will be created as a ConfigMap and mounted as env vars |
| config.secretEnv | object | `{}` | Secret environment variables to pass to the container These should be provided via a separate Secret resource |
| enableServiceLinks | bool | `false` | Kubernetes enableServiceLinks |
| extraArgs | list | `[]` | Extra arguments to pass to the binary |
| fullnameOverride | string | `""` | Chart full name override |
| image.pullPolicy | string | `"IfNotPresent"` | Image pullpolicy |
| image.repository | string | `"us-west1-docker.pkg.dev/devopsre/dev-images/op-succinct/game-monitor"` | Image repository |
| image.tag | string | `"latest"` | Image tag Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | Image pull secrets |
| livenessProbe | object | `{}` | Liveness probe configuration |
| nameOverride | string | `""` | Chart name override |
| nodeSelector | object | `{}` | Kubernetes node selector |
| persistence.enabled | bool | `false` | |
| persistence.mountPath | string | `"/data"` | Mount path for persistent volume |
| persistence.pvc.accessMode | string | `"ReadWriteOnce"` | |
| persistence.pvc.annotations | object | `{}` | |
| persistence.pvc.size | string | `"1Gi"` | |
| persistence.pvc.storageClass | string | `""` | |
| podAnnotations | object | `{}` | Custom pod annotations |
| podLabels | object | `{}` | Custom pod labels |
| podSecurityContext | object | `{}` | Custom pod security context |
| readinessProbe | object | `{}` | Readiness probe configuration |
| resources | object | `{}` | Container resources |
| securityContext | object | `{}` | Custom container security context |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| services.headless.annotations | object | `{}` | |
| services.headless.publishNotReadyAddresses | bool | `true` | |
| tolerations | list | `[]` | Kubernetes tolerations |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs). To regenerate run `helm-docs` command at this folder.

20 changes: 20 additions & 0 deletions charts/succinct-game-monitor/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs). To regenerate run `helm-docs` command at this folder.

236 changes: 236 additions & 0 deletions charts/succinct-game-monitor/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
# Succinct Game Monitor - Usage Guide

This Helm chart deploys the Succinct Game Monitor as a StatefulSet in Kubernetes.

## Installation

```bash
helm install my-game-monitor ./charts/succinct-game-monitor
```

## Configuration Options

The chart supports three main ways to configure environment variables:

### Option 1: Individual Environment Variables

Use this when you have a few environment variables to configure:

```yaml
config:
env:
GAME_MONITOR_URL: "https://example.com/api"
GAME_MONITOR_INTERVAL: "60"
LOG_LEVEL: "info"
```

Install with:
```bash
helm install my-game-monitor ./charts/succinct-game-monitor -f my-values.yaml
```

Or via command line:
```bash
helm install my-game-monitor ./charts/succinct-game-monitor \
--set config.env.GAME_MONITOR_URL="https://example.com/api" \
--set config.env.LOG_LEVEL="info"
```

### Option 2: Environment File

Use this when you want to mount a complete `.env` file into the container:

```yaml
config:
envFile:
enabled: true
mountPath: "/app/.env"
content: |
GAME_MONITOR_URL=https://example.com/api
GAME_MONITOR_INTERVAL=60
LOG_LEVEL=info
API_KEY=your-api-key-here
```

The env file will be mounted at the specified `mountPath` (default: `/app/.env`).

### Option 3: Secret Environment Variables

Use this for sensitive data like API keys and private keys:

```yaml
config:
env:
GAME_MONITOR_URL: "https://example.com/api"
secretEnv:
API_KEY: "your-secret-api-key"
PRIVATE_KEY: "your-private-key"
```

Secret environment variables are stored in a Kubernetes Secret and referenced in the pod.

**Note:** For production, it's recommended to manage secrets externally (e.g., using sealed-secrets, external-secrets, or vault) rather than storing them in values files.

## Persistence

Enable persistence to store data across pod restarts:

```yaml
persistence:
enabled: true
mountPath: /data
pvc:
size: 10Gi
storageClass: "fast-ssd"
accessMode: ReadWriteOnce
```

## Resource Management

Configure resource requests and limits:

```yaml
resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
```

## Monitoring

Add Prometheus annotations for metrics scraping:

```yaml
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
```

## Custom Image

Use a custom image repository or tag:

```yaml
image:
repository: my-registry.io/succinct-game-monitor
tag: "v1.0.0"
pullPolicy: Always

imagePullSecrets:
- name: my-registry-secret
```

## Extra Arguments

Pass additional command-line arguments to the binary:

```yaml
extraArgs:
- "--verbose"
- "--debug"
```

## Custom Command

Override the default container command (ENTRYPOINT from the image):

### Simple Command

```yaml
command:
- /usr/local/bin/game-monitor

extraArgs:
- "--config=/app/.env"
- "--log-level=info"
```

### Shell Wrapper for Complex Startup

For more complex startup logic, use a shell wrapper:

```yaml
command:
- /bin/sh
- -c

extraArgs:
- |
echo "Starting game monitor..."
echo "Environment: ${ENVIRONMENT}"

# Run any pre-start checks or setup
if [ ! -f /app/.env ]; then
echo "Error: Config file not found"
exit 1
fi

# Start the application
exec /usr/local/bin/game-monitor \
start \
--config=/app/.env \
--log-level=${LOG_LEVEL:-info}
```

**Note:** Using `exec` in shell wrappers ensures the process replaces the shell and receives signals properly for graceful shutdowns.

## Complete Example

Here's a complete example combining multiple features:

```yaml
image:
repository: succinctlabs/op-succinct-game-monitor
tag: "v1.0.0"

config:
env:
LOG_LEVEL: "info"
MONITOR_INTERVAL: "30"
secretEnv:
API_KEY: "your-secret-key"

persistence:
enabled: true
mountPath: /data
pvc:
size: 5Gi

resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi

podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"

nodeSelector:
workload: monitoring
```

## Upgrade

```bash
helm upgrade my-game-monitor ./charts/succinct-game-monitor -f my-values.yaml
```

## Uninstall

```bash
helm uninstall my-game-monitor
```

**Note:** If persistence is enabled, you may need to manually delete the PVC:

```bash
kubectl delete pvc data-my-game-monitor-0
```

Loading
Loading