fix(discordgsm) fix discordgsm questions **BREAKING CHANGES** (#10151)

**Description**
Fix questions to match secrets/custom variables.

⚒️ Fixes  #9997

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [X] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [X] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [X] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Xstar97TheNoob
2023-07-04 15:37:37 +03:00
committed by GitHub
parent 3a5161b2af
commit 38ce226fc4
4 changed files with 131 additions and 101 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ name: discordgsm
sources: sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/discordgsm - https://github.com/truecharts/charts/tree/master/charts/stable/discordgsm
- https://github.com/DiscordGSM/GameServerMonitor - https://github.com/DiscordGSM/GameServerMonitor
version: 2.0.24 version: 3.0.0
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- monitor - monitor
+38 -16
View File
@@ -10,9 +10,13 @@ questions:
# Include{replicas1} # Include{replicas1}
# Include{podSpec} # Include{podSpec}
# Include{containerMain} # Include{containerMain}
- variable: env
group: "App Configuration" # Include{containerBasic}
label: "Image Environment" # Include{containerAdvanced}
- variable: gsm
group: App Configuration
label: GSM Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -22,14 +26,12 @@ questions:
description: Discord Bot Token. description: Discord Bot Token.
schema: schema:
type: string type: string
required: true private: true
default: "" default: ""
- variable: whitelist_guilds - variable: whitelist_guilds
label: Whitelist Guilds label: Whitelist Guilds
description: Discord Guild ID
schema: schema:
type: list type: list
required: true
default: [] default: []
items: items:
- variable: whitelist_guild_entry - variable: whitelist_guild_entry
@@ -40,10 +42,9 @@ questions:
default: "" default: ""
- variable: app_activity_type - variable: app_activity_type
label: App Activity Type label: App Activity Type
description: Presence activity type override. description: How you want to get your WAN IP
schema: schema:
type: string type: string
required: true
default: "3" default: "3"
enum: enum:
- value: "0" - value: "0"
@@ -92,27 +93,48 @@ questions:
schema: schema:
type: boolean type: boolean
default: false default: false
# Include{containerBasic} - variable: factorio
# Include{containerAdvanced} label: Show Factorio Auth Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: factorio_username
label: Factorio Username
schema:
type: string
default: ""
- variable: factorio_auth_token
label: Factorio Auth Token
schema:
type: string
private: true
default: ""
# Include{containerConfig} # Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot} # Include{serviceRoot}
# Include{serviceMain} - variable: main
label: "Main Service"
description: "The Primary service on which the healthcheck runs, often the webUI"
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: main - variable: main
label: Main Service Port Configuration label: "Main Service Port Configuration"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: Port label: "Port"
description: This port exposes the container port on the service description: "This port exposes the container port on the service"
schema: schema:
type: int type: int
default: 10589 default: 10230
required: true required: true
# Include{serviceExpertRoot} # Include{serviceExpertRoot}
# Include{serviceExpert} # Include{serviceExpert}
+17 -11
View File
@@ -1,22 +1,28 @@
{{/* Define the secret */}} {{/* Define the secret */}}
{{- define "gsm.secret" -}} {{- define "gsm.secret" -}}
{{- $gsm := .Values.gsm -}}
enabled: true enabled: true
data: data:
DATABASE_URL: {{ .Values.cnpg.main.creds.std | trimAll "\"" }} DATABASE_URL: {{ .Values.cnpg.main.creds.std | trimAll "\"" }}
DB_CONNECTION: {{ print "postgres" }} DB_CONNECTION: {{ print "postgres" }}
APP_TOKEN: {{ .Values.gsm.app_token | quote }} APP_TOKEN: {{ $gsm.app_token | quote }}
{{- with .Values.gsm.whitelist_guilds }} {{- with $gsm.whitelist_guilds }}
WHITELIST_GUILDS: {{ join ";" . | quote }} WHITELIST_GUILDS: {{ join ";" . | quote }}
{{- end }} {{- end }}
APP_ACTIVITY_TYPE: {{ .Values.gsm.app_activity_type | quote }} APP_ACTIVITY_TYPE: {{ $gsm.app_activity_type | quote }}
{{- with .Values.gsm.app_activity_name }} {{- with $gsm.app_activity_name }}
APP_ACTIVITY_NAME: {{ . | quote }} APP_ACTIVITY_NAME: {{ . | quote }}
{{- end }} {{- end }}
APP_PRESENCE_ADVERTISE: {{ .Values.gsm.app_presence_advertise | quote }} APP_PRESENCE_ADVERTISE: {{ $gsm.app_presence_advertise | quote }}
POSTGRES_SSL_MODE: {{ .Values.gsm.postgres_ssl_mode | quote }} POSTGRES_SSL_MODE: {{ $gsm.postgres_ssl_mode | quote }}
TASK_QUERY_SERVER: {{ .Values.gsm.task_query_server | quote }} TASK_QUERY_SERVER: {{ $gsm.task_query_server | quote }}
COMMAND_QUERY_PUBLIC: {{ .Values.gsm.command_query_public | quote }} COMMAND_QUERY_PUBLIC: {{ $gsm.command_query_public | quote }}
COMMAND_QUERY_COOLDOWN: {{ .Values.gsm.command_query_cooldown | quote }} COMMAND_QUERY_COOLDOWN: {{ $gsm.command_query_cooldown | quote }}
WEB_API_ENABLE: {{ .Values.gsm.web_api_enable | quote }} WEB_API_ENABLE: {{ $gsm.web_api_enable | quote }}
{{- with $gsm.factorio_username }}
FACTORIO_USERNAME: {{ . | quote }}
{{- end }}
{{- with $gsm.factorio_auth_token }}
FACTORIO_TOKEN: {{ . | quote }}
{{- end }}
{{- end }} {{- end }}
+3 -1
View File
@@ -22,7 +22,6 @@ gsm:
workers: 2 workers: 2
timeout: 90 timeout: 90
# Bot Config # Bot Config
app_token: "" app_token: ""
whitelist_guilds: [] whitelist_guilds: []
app_activity_type: 3 app_activity_type: 3
@@ -33,6 +32,9 @@ gsm:
command_query_cooldown: 5 command_query_cooldown: 5
web_api_enable: false web_api_enable: false
postgres_ssl_mode: disable postgres_ssl_mode: disable
# factorio
factorio_username: ""
factorio_auth_token: ""
workload: workload:
main: main: