From e4a888328d8b3ec9745b7d899d0057f3a2d7f3b7 Mon Sep 17 00:00:00 2001 From: Matts Date: Sun, 4 Sep 2022 18:03:29 +0200 Subject: [PATCH] Add K8s files, simplify .example files --- .env.example | 4 +-- clanbotjas/data/.env.example | 4 +-- clanbotjas/data/menu.json.example | 52 ++++----------------------- kubernetes/clanbotjas-deployment.yaml | 29 +++++++++++++++ kubernetes/clanbotjas-env.yaml | 21 +++++++++++ kubernetes/clanbotjas-pv.yaml | 14 ++++++++ kubernetes/clanbotjas-pvc.yaml | 11 ++++++ 7 files changed, 85 insertions(+), 50 deletions(-) create mode 100644 kubernetes/clanbotjas-deployment.yaml create mode 100644 kubernetes/clanbotjas-env.yaml create mode 100644 kubernetes/clanbotjas-pv.yaml create mode 100644 kubernetes/clanbotjas-pvc.yaml diff --git a/.env.example b/.env.example index e0b4a6d..9eebf86 100644 --- a/.env.example +++ b/.env.example @@ -37,8 +37,8 @@ AUTO_ROLES = Role1,Role2,etc # Poll settings # Enable or Disable Polls, true/false -POLL_ENABLE = false -# We are not allowed to redistribute fonts, please provide your own in the data folder. (TrueType/.ttf only!) +POLL_ENABLE = true +# We have supplied the Helvetica font, please provide your own in the data folder if you wish. (TrueType/.ttf only!) # Font Regular (default = Helvetica.ttf) POLL_FONT_REGULAR = Helvetica.ttf # Font Bold (default = Helvetica-Bold-Font.ttf) diff --git a/clanbotjas/data/.env.example b/clanbotjas/data/.env.example index e0b4a6d..9eebf86 100755 --- a/clanbotjas/data/.env.example +++ b/clanbotjas/data/.env.example @@ -37,8 +37,8 @@ AUTO_ROLES = Role1,Role2,etc # Poll settings # Enable or Disable Polls, true/false -POLL_ENABLE = false -# We are not allowed to redistribute fonts, please provide your own in the data folder. (TrueType/.ttf only!) +POLL_ENABLE = true +# We have supplied the Helvetica font, please provide your own in the data folder if you wish. (TrueType/.ttf only!) # Font Regular (default = Helvetica.ttf) POLL_FONT_REGULAR = Helvetica.ttf # Font Bold (default = Helvetica-Bold-Font.ttf) diff --git a/clanbotjas/data/menu.json.example b/clanbotjas/data/menu.json.example index ab897c1..75bbcd6 100755 --- a/clanbotjas/data/menu.json.example +++ b/clanbotjas/data/menu.json.example @@ -9,18 +9,6 @@ { "title": "pubg", "role": "pubg" - }, - { - "title": "rainbow-siege", - "role": "rainbowsiege" - }, - { - "title": "fallguys", - "role": "fallguys" - }, - { - "title": "cod4", - "role": "cod4" } ] }, @@ -28,44 +16,16 @@ "title": "Chatrooms", "channels": [ { - "title": "mededelingen", - "role": "mededelingen" - }, - { - "title": "clanbadjas", - "role": "clanbadjaschannel" - }, - { - "title": "cbj-lan", - "role": "cbj-lan" - }, - { - "title": "campzone", - "role": "campzone" - }, - { - "title": "technische-dienst", - "role": "technische-dienst" - }, - { - "title": "tinkering", - "role": "tinkering" - }, - { - "title": "marktplaats", - "role": "marktplaats" - }, - { - "title": "formule1", - "role": "formule1" + "title": "announcements", + "role": "announcements" }, { - "title": "barbecue", - "role": "barbecue" + "title": "general", + "role": "general" }, { - "title": "jukebox", - "role": "jukebox" + "title": "offtopic", + "role": "offtopic" } ] } diff --git a/kubernetes/clanbotjas-deployment.yaml b/kubernetes/clanbotjas-deployment.yaml new file mode 100644 index 0000000..620d5c8 --- /dev/null +++ b/kubernetes/clanbotjas-deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: clanbotjas + name: clanbotjas +spec: + replicas: 1 + selector: + matchLabels: + app: clanbotjas + template: + metadata: + labels: + app: clanbotjas + spec: + containers: + - name: clanbotjas + image: clanbadjas/clanbotjas:latest + envFrom: + - configMapRef: + name: clanbotjas-env + volumeMounts: + - name: clanbotjas-storage + mountPath: /clanbotjas/data + volumes: + - name: clanbotjas-storage + persistentVolumeClaim: + claimName: clanbotjas-pvc \ No newline at end of file diff --git a/kubernetes/clanbotjas-env.yaml b/kubernetes/clanbotjas-env.yaml new file mode 100644 index 0000000..e1c1cbb --- /dev/null +++ b/kubernetes/clanbotjas-env.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: clanbotjas-env +data: + BOT_TOKEN: + GUILD_ID: "" + LOG_CHANNEL: "" + COMMAND_PERMISSION_ROLE: "" + VOICE_SCALER_ENABLE: "true" + VOICE_CHANNEL_CATEGORY: "" + VOICE_CHANNEL_DEFAULT_NAME: "Voice Channel" + ROLEBOT_ENABLE: "true" + ROLEBOT_SETTINGS_CHANNEL: "" + AUTO_ROLE_ENABLE: "true" + AUTO_ROLES: Role1,role-2,test3 + POLL_ENABLE: "true" + POLL_FONT_REGULAR: Helvetica.ttf + POLL_FONT_BOLD: Helvetica-Bold-Font.ttf + POLL_FONT_SCALE: "10" \ No newline at end of file diff --git a/kubernetes/clanbotjas-pv.yaml b/kubernetes/clanbotjas-pv.yaml new file mode 100644 index 0000000..ad26d93 --- /dev/null +++ b/kubernetes/clanbotjas-pv.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: clanbotjas-pv +spec: + accessModes: + - ReadWriteMany + capacity: + storage: 10Mi + nfs: + path: /mnt/path/to/clanbotjas + server: "" + persistentVolumeReclaimPolicy: Retain \ No newline at end of file diff --git a/kubernetes/clanbotjas-pvc.yaml b/kubernetes/clanbotjas-pvc.yaml new file mode 100644 index 0000000..17c098a --- /dev/null +++ b/kubernetes/clanbotjas-pvc.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: clanbotjas-pvc +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Mi \ No newline at end of file