aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/namespaces/default/king-arthur
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-08-13 20:01:42 +0100
committerGravatar Chris Lovering <[email protected]>2023-08-14 11:44:03 +0100
commit661f49409e69f5cfafbef4cd41411a72ebc5418d (patch)
tree9ddd7f2a2ab09cadc5b716be00628e19d839ad4d /kubernetes/namespaces/default/king-arthur
parentAllow multiple documents within yaml files (diff)
Copy all files from kubernetes repo into this one
This commit is a like-for-like copy of the [kubernetes repo](https://github.com/python-discord/kubernetes) check that repo for comit history prioir to this commit. Co-authored-by: Amrou Bellalouna <[email protected]> Co-authored-by: Bradley Reynolds <[email protected]> Co-authored-by: Chris <[email protected]> Co-authored-by: Chris Lovering <[email protected]> Co-authored-by: ChrisJL <[email protected]> Co-authored-by: Den4200 <[email protected]> Co-authored-by: GDWR <[email protected]> Co-authored-by: Hassan Abouelela <[email protected]> Co-authored-by: Hassan Abouelela <[email protected]> Co-authored-by: jchristgit <[email protected]> Co-authored-by: Joe Banks <[email protected]> Co-authored-by: Joe Banks <[email protected]> Co-authored-by: Joe Banks <[email protected]> Co-authored-by: Johannes Christ <[email protected]> Co-authored-by: Kieran Siek <[email protected]> Co-authored-by: kosayoda <[email protected]> Co-authored-by: ks129 <[email protected]> Co-authored-by: Leon Sand├©y <[email protected]> Co-authored-by: Leon Sand├©y <[email protected]> Co-authored-by: MarkKoz <[email protected]> Co-authored-by: Matteo Bertucci <[email protected]> Co-authored-by: Sebastiaan Zeeff <[email protected]> Co-authored-by: Sebastiaan Zeeff <[email protected]> Co-authored-by: vcokltfre <[email protected]>
Diffstat (limited to 'kubernetes/namespaces/default/king-arthur')
-rw-r--r--kubernetes/namespaces/default/king-arthur/README.md12
-rw-r--r--kubernetes/namespaces/default/king-arthur/deployment.yaml35
-rw-r--r--kubernetes/namespaces/default/king-arthur/secrets.yamlbin0 -> 398 bytes
-rw-r--r--kubernetes/namespaces/default/king-arthur/service-account.yaml27
4 files changed, 74 insertions, 0 deletions
diff --git a/kubernetes/namespaces/default/king-arthur/README.md b/kubernetes/namespaces/default/king-arthur/README.md
new file mode 100644
index 0000000..704d45b
--- /dev/null
+++ b/kubernetes/namespaces/default/king-arthur/README.md
@@ -0,0 +1,12 @@
+# King Arthur
+
+Deployment file for @King Arthur, our DevOps helper bot.
+
+## Secrets
+This deployment expects a number of secrets and environment variables to exist in a secret called `king-arthur-env`.
+
+| Environment | Description |
+| ---------------------------- | ------------------------------------------------------------------------- |
+| KING_ARTHUR_TOKEN | The token to authorize with Discord |
+| KING_ARTHUR_NOTION_API_TOKEN | The API token to the notion API |
+| KING_ARTHUR_CLOUDFLARE_TOKEN | A token for the Cloudflare API used for the Cloudflare commands in Arthur |
diff --git a/kubernetes/namespaces/default/king-arthur/deployment.yaml b/kubernetes/namespaces/default/king-arthur/deployment.yaml
new file mode 100644
index 0000000..cbc3874
--- /dev/null
+++ b/kubernetes/namespaces/default/king-arthur/deployment.yaml
@@ -0,0 +1,35 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: king-arthur
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: king-arthur
+ template:
+ metadata:
+ labels:
+ app: king-arthur
+ spec:
+ serviceAccountName: king-arthur
+ containers:
+ - name: king-arthur
+ image: ghcr.io/python-discord/king-arthur:latest
+ imagePullPolicy: Always
+ resources:
+ requests:
+ cpu: 400m
+ memory: 100Mi
+ limits:
+ cpu: 500m
+ memory: 200Mi
+ envFrom:
+ - secretRef:
+ name: king-arthur-env
+ securityContext:
+ readOnlyRootFilesystem: true
+ securityContext:
+ fsGroup: 2000
+ runAsUser: 1000
+ runAsNonRoot: true
diff --git a/kubernetes/namespaces/default/king-arthur/secrets.yaml b/kubernetes/namespaces/default/king-arthur/secrets.yaml
new file mode 100644
index 0000000..a410013
--- /dev/null
+++ b/kubernetes/namespaces/default/king-arthur/secrets.yaml
Binary files differ
diff --git a/kubernetes/namespaces/default/king-arthur/service-account.yaml b/kubernetes/namespaces/default/king-arthur/service-account.yaml
new file mode 100644
index 0000000..a63a88e
--- /dev/null
+++ b/kubernetes/namespaces/default/king-arthur/service-account.yaml
@@ -0,0 +1,27 @@
+---
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: king-arthur
+rules:
+- apiGroups: ["", "extensions", "apps", "batch", "rbac.authorization.k8s.io", "cert-manager.io"]
+ resources: ["*"]
+ verbs: ["*"]
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: king-arthur
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: king-arthur
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: king-arthur
+subjects:
+ - kind: ServiceAccount
+ name: king-arthur
+ namespace: default