aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/namespaces/default/black-knight
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/namespaces/default/black-knight')
-rw-r--r--kubernetes/namespaces/default/black-knight/README.md16
-rw-r--r--kubernetes/namespaces/default/black-knight/deployment.yaml38
-rw-r--r--kubernetes/namespaces/default/black-knight/secrets.yamlbin0 -> 452 bytes
3 files changed, 54 insertions, 0 deletions
diff --git a/kubernetes/namespaces/default/black-knight/README.md b/kubernetes/namespaces/default/black-knight/README.md
new file mode 100644
index 0000000..d1f8d89
--- /dev/null
+++ b/kubernetes/namespaces/default/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/default/black-knight/deployment.yaml b/kubernetes/namespaces/default/black-knight/deployment.yaml
new file mode 100644
index 0000000..c61429a
--- /dev/null
+++ b/kubernetes/namespaces/default/black-knight/deployment.yaml
@@ -0,0 +1,38 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: black-knight
+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: 500Mi
+ envFrom:
+ - secretRef:
+ name: black-knight-env
+ - secretRef:
+ name: redis-credentials
+ securityContext:
+ readOnlyRootFilesystem: true
+ imagePullSecrets:
+ - name: ghcr-pull-secret
diff --git a/kubernetes/namespaces/default/black-knight/secrets.yaml b/kubernetes/namespaces/default/black-knight/secrets.yaml
new file mode 100644
index 0000000..40909c9
--- /dev/null
+++ b/kubernetes/namespaces/default/black-knight/secrets.yaml
Binary files differ