diff options
| author | 2024-04-14 23:12:48 +0100 | |
|---|---|---|
| committer | 2024-04-14 23:12:48 +0100 | |
| commit | 85afb3b8ca98db360c863cc56af18c411c6489e2 (patch) | |
| tree | c5adcf0fe35eeebc1eaaf0a20c44656ed36b018b /kubernetes/namespaces/bots/black-knight | |
| parent | Configure Ansible for user authentication (#213) (diff) | |
Move all bots to designated namespaces
Diffstat (limited to 'kubernetes/namespaces/bots/black-knight')
| -rw-r--r-- | kubernetes/namespaces/bots/black-knight/README.md | 16 | ||||
| -rw-r--r-- | kubernetes/namespaces/bots/black-knight/deployment.yaml | 39 | ||||
| -rw-r--r-- | kubernetes/namespaces/bots/black-knight/secrets.yaml | bin | 0 -> 449 bytes |
3 files changed, 55 insertions, 0 deletions
diff --git a/kubernetes/namespaces/bots/black-knight/README.md b/kubernetes/namespaces/bots/black-knight/README.md new file mode 100644 index 0000000..d1f8d89 --- /dev/null +++ b/kubernetes/namespaces/bots/black-knight/README.md @@ -0,0 +1,16 @@ +## Black Knight +Deployment file for @Black-Knight, our courageous and ever present anti-raid bot. + +## Secrets +This deployment expects a number of secrets/environment variables to exist in a secret called `black-knight-env`. + +| Environment | Description | +|-----------------------|-------------------------------------------------------------------| +| BOT_TOKEN | The Discord bot token for Black Knight to connect to Discord with | +| DATABASE_URL | A full PostgreSQL connection string to the postgres db | +| BOT_SENTRY_DSN | The DSN to connect send sentry reports to | + +Black knight also requires a redis password, which is pulled from the `redis-credentials` secret. +``` +REDIS_PASSWORD - The password to redis +``` diff --git a/kubernetes/namespaces/bots/black-knight/deployment.yaml b/kubernetes/namespaces/bots/black-knight/deployment.yaml new file mode 100644 index 0000000..9d27e07 --- /dev/null +++ b/kubernetes/namespaces/bots/black-knight/deployment.yaml @@ -0,0 +1,39 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: black-knight + namespace: bots +spec: + replicas: 1 + selector: + matchLabels: + app: black-knight + template: + metadata: + labels: + app: black-knight + spec: + securityContext: + fsGroup: 2000 + runAsUser: 1000 + runAsNonRoot: true + containers: + - name: black-knight + image: ghcr.io/python-discord/black-knight:latest + imagePullPolicy: Always + resources: + requests: + cpu: 500m + memory: 300Mi + limits: + cpu: 750m + memory: 600Mi + envFrom: + - secretRef: + name: black-knight-env + - secretRef: + name: redis-credentials + securityContext: + readOnlyRootFilesystem: true + imagePullSecrets: + - name: ghcr-pull-secret diff --git a/kubernetes/namespaces/bots/black-knight/secrets.yaml b/kubernetes/namespaces/bots/black-knight/secrets.yaml Binary files differnew file mode 100644 index 0000000..6b8ef8f --- /dev/null +++ b/kubernetes/namespaces/bots/black-knight/secrets.yaml |