From a7af5b04c06113e0ea26822b751c3128afcb7907 Mon Sep 17 00:00:00 2001 From: Xstar97 Date: Thu, 1 Dec 2022 17:31:09 -0500 Subject: [PATCH] fix(discordgsm) activity type | Whitelist Guilds (#5036) --- charts/incubator/discordgsm/Chart.yaml | 2 +- .../discordgsm/docs/installation_notes.md | 2 +- charts/incubator/discordgsm/questions.yaml | 6 +- .../discordgsm/templates/_secret.tpl | 64 +++++++++---------- charts/incubator/discordgsm/values.yaml | 1 - 5 files changed, 38 insertions(+), 37 deletions(-) diff --git a/charts/incubator/discordgsm/Chart.yaml b/charts/incubator/discordgsm/Chart.yaml index 54e17df333e..58583176631 100644 --- a/charts/incubator/discordgsm/Chart.yaml +++ b/charts/incubator/discordgsm/Chart.yaml @@ -24,7 +24,7 @@ name: discordgsm sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/discordgsm - https://github.com/DiscordGSM/GameServerMonitor -version: 0.0.4 +version: 0.0.5 annotations: truecharts.org/catagories: | - monitor diff --git a/charts/incubator/discordgsm/docs/installation_notes.md b/charts/incubator/discordgsm/docs/installation_notes.md index efcb5f2dece..512069da0fa 100644 --- a/charts/incubator/discordgsm/docs/installation_notes.md +++ b/charts/incubator/discordgsm/docs/installation_notes.md @@ -1,7 +1,7 @@ # Installation Notes - Set `App Token` to your discord bot token. Here's a basic guide from [discordGSM](https://discordgsm.com/guide/how-to-get-a-discord-bot-token). -- Set `Whitelist Guilds` to the server guild Ids if adding multiple Ids separate with `;`. +- Add your discord server's ID to the `Whitelist Guilds` list, single ID per box. Add your discord bot if you haven't done so and run initial commands to get started with discordGSM. diff --git a/charts/incubator/discordgsm/questions.yaml b/charts/incubator/discordgsm/questions.yaml index 42d761d6473..f373c5ee23d 100644 --- a/charts/incubator/discordgsm/questions.yaml +++ b/charts/incubator/discordgsm/questions.yaml @@ -46,12 +46,14 @@ questions: enum: - value: "0" description: Playing + - value: "1" + description: Streaming - value: "2" description: Listening - value: "3" description: Watching - value: "5" - description: Playing + description: Competing - variable: app_activity_name label: App Activity Name description: Presence activity name override. @@ -59,7 +61,7 @@ questions: type: string default: "" - variable: app_presence_advertise - label: App Presense Advertise + label: App Presence Advertise description: Enable advertisement feature on presence schema: type: boolean diff --git a/charts/incubator/discordgsm/templates/_secret.tpl b/charts/incubator/discordgsm/templates/_secret.tpl index 8a7da83b281..00cf3cbfc8e 100644 --- a/charts/incubator/discordgsm/templates/_secret.tpl +++ b/charts/incubator/discordgsm/templates/_secret.tpl @@ -1,32 +1,32 @@ -{{/* Define the secret */}} -{{- define "gsm.secret" -}} - -{{- $secretName := printf "%s-gsm-secret" (include "tc.common.names.fullname" .) }} - ---- - -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -stringData: - DATABASE_URL: {{ .Values.postgresql.url.complete | trimAll "\"" }} - DB_CONNECTION: {{ print "postgres" }} - APP_TOKEN: {{ .Values.gsm.app_token | quote }} - {{- with .Values.gsm.whitelist_guilds }} - WHITELIST_GUILDS: {{ join ";" . }} - {{- end }} - APP_ACTIVITY_TYPE: {{ .Values.gsm.app_activity_type | quote }} - {{- with .Values.gsm.app_activity_name }} - APP_ACTIVITY_NAME: {{ . | quote }} - {{- end }} - APP_PRESENCE_ADVERTISE: {{ .Values.gsm.app_presence_advertise | quote }} - POSTGRES_SSL_MODE: {{ .Values.gsm.postgres_ssl_mode | quote }} - TASK_QUERY_SERVER: {{ .Values.gsm.task_query_server | quote }} - COMMAND_QUERY_PUBLIC: {{ .Values.gsm.command_query_public | quote }} - COMMAND_QUERY_COOLDOWN: {{ .Values.gsm.command_query_cooldown | quote }} - WEB_API_ENABLE: {{ .Values.gsm.web_api_enable | quote }} -{{- end }} +{{/* Define the secret */}} +{{- define "gsm.secret" -}} + +{{- $secretName := printf "%s-gsm-secret" (include "tc.common.names.fullname" .) }} + +--- + +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $secretName }} + labels: + {{- include "tc.common.labels" . | nindent 4 }} +stringData: + DATABASE_URL: {{ .Values.postgresql.url.complete | trimAll "\"" }} + DB_CONNECTION: {{ print "postgres" }} + APP_TOKEN: {{ .Values.gsm.app_token | quote }} + {{- with .Values.gsm.whitelist_guilds }} + WHITELIST_GUILDS: {{ join ";" . | quote }} + {{- end }} + APP_ACTIVITY_TYPE: {{ .Values.gsm.app_activity_type | quote }} + {{- with .Values.gsm.app_activity_name }} + APP_ACTIVITY_NAME: {{ . | quote }} + {{- end }} + APP_PRESENCE_ADVERTISE: {{ .Values.gsm.app_presence_advertise | quote }} + POSTGRES_SSL_MODE: {{ .Values.gsm.postgres_ssl_mode | quote }} + TASK_QUERY_SERVER: {{ .Values.gsm.task_query_server | quote }} + COMMAND_QUERY_PUBLIC: {{ .Values.gsm.command_query_public | quote }} + COMMAND_QUERY_COOLDOWN: {{ .Values.gsm.command_query_cooldown | quote }} + WEB_API_ENABLE: {{ .Values.gsm.web_api_enable | quote }} +{{- end }} diff --git a/charts/incubator/discordgsm/values.yaml b/charts/incubator/discordgsm/values.yaml index 46e2418718e..3c23d531a97 100644 --- a/charts/incubator/discordgsm/values.yaml +++ b/charts/incubator/discordgsm/values.yaml @@ -27,7 +27,6 @@ gsm: workers: 2 timeout: 90 # Bot Config - # Fake Token for CI app_token: "" whitelist_guilds: [] app_activity_type: 3