diff --git a/charts/stable/discordgsm/Chart.yaml b/charts/stable/discordgsm/Chart.yaml index df0ea7c13ea..2593912bbd5 100644 --- a/charts/stable/discordgsm/Chart.yaml +++ b/charts/stable/discordgsm/Chart.yaml @@ -20,7 +20,7 @@ name: discordgsm sources: - https://github.com/truecharts/charts/tree/master/charts/stable/discordgsm - https://github.com/DiscordGSM/GameServerMonitor -version: 2.0.24 +version: 3.0.0 annotations: truecharts.org/catagories: | - monitor diff --git a/charts/stable/discordgsm/questions.yaml b/charts/stable/discordgsm/questions.yaml index 5a000edef92..c8ad4a52a64 100644 --- a/charts/stable/discordgsm/questions.yaml +++ b/charts/stable/discordgsm/questions.yaml @@ -10,109 +10,131 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} - - variable: env - group: "App Configuration" - label: "Image Environment" - schema: - additional_attrs: true - type: dict - attrs: - - variable: app_token - label: App Token - description: Discord Bot Token. - schema: - type: string - required: true - default: "" - - variable: whitelist_guilds - label: Whitelist Guilds - description: Discord Guild ID - schema: - type: list - required: true - default: [] - items: - - variable: whitelist_guild_entry - label: Whitelist Guild Entry - schema: - type: string - required: true - default: "" - - variable: app_activity_type - label: App Activity Type - description: Presence activity type override. - schema: - type: string - required: true - default: "3" - enum: - - value: "0" - description: Playing - - value: "1" - description: Streaming - - value: "2" - description: Listening - - value: "3" - description: Watching - - value: "5" - description: Competing - - variable: app_activity_name - label: App Activity Name - description: Presence activity name override. - schema: - type: string - default: "" - - variable: app_presence_advertise - label: App Presence Advertise - description: Enable advertisement feature on presence - schema: - type: boolean - default: false - - variable: task_query_server - label: Task Query Server - description: Query servers task scheduled time in seconds. - schema: - type: int - default: 60 - - variable: command_query_public - label: Command Query Public - description: Whether the /queryserver command should be available to all users. - schema: - type: boolean - default: false - - variable: command_query_cooldown - label: Command Query Cooldown - description: The /queryserver command cooldown in seconds. (Administrator will not be affected) - schema: - type: int - default: 5 - - variable: web_api_enable - label: Web API Enable - description: Enable Web API feature. - schema: - type: boolean - default: false + # Include{containerBasic} # Include{containerAdvanced} + - variable: gsm + group: App Configuration + label: GSM Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: app_token + label: App Token + description: Discord Bot Token. + schema: + type: string + private: true + default: "" + - variable: whitelist_guilds + label: Whitelist Guilds + schema: + type: list + default: [] + items: + - variable: whitelist_guild_entry + label: Whitelist Guild Entry + schema: + type: string + required: true + default: "" + - variable: app_activity_type + label: App Activity Type + description: How you want to get your WAN IP + schema: + type: string + default: "3" + enum: + - value: "0" + description: Playing + - value: "1" + description: Streaming + - value: "2" + description: Listening + - value: "3" + description: Watching + - value: "5" + description: Competing + - variable: app_activity_name + label: App Activity Name + description: Presence activity name override. + schema: + type: string + default: "" + - variable: app_presence_advertise + label: App Presence Advertise + description: Enable advertisement feature on presence + schema: + type: boolean + default: false + - variable: task_query_server + label: Task Query Server + description: Query servers task scheduled time in seconds. + schema: + type: int + default: 60 + - variable: command_query_public + label: Command Query Public + description: Whether the /queryserver command should be available to all users. + schema: + type: boolean + default: false + - variable: command_query_cooldown + label: Command Query Cooldown + description: The /queryserver command cooldown in seconds. (Administrator will not be affected) + schema: + type: int + default: 5 + - variable: web_api_enable + label: Web API Enable + description: Enable Web API feature. + schema: + type: boolean + default: false + - variable: factorio + 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{podOptions} # 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{serviceSelectorExtras} - variable: main - label: Main Service Port Configuration + label: "Main Service Port Configuration" schema: additional_attrs: true type: dict attrs: - variable: port - label: Port - description: This port exposes the container port on the service + label: "Port" + description: "This port exposes the container port on the service" schema: type: int - default: 10589 + default: 10230 required: true # Include{serviceExpertRoot} # Include{serviceExpert} diff --git a/charts/stable/discordgsm/templates/_secret.tpl b/charts/stable/discordgsm/templates/_secret.tpl index 3992b76128c..f8487fc2d6b 100644 --- a/charts/stable/discordgsm/templates/_secret.tpl +++ b/charts/stable/discordgsm/templates/_secret.tpl @@ -1,22 +1,28 @@ {{/* Define the secret */}} {{- define "gsm.secret" -}} - +{{- $gsm := .Values.gsm -}} enabled: true data: DATABASE_URL: {{ .Values.cnpg.main.creds.std | trimAll "\"" }} DB_CONNECTION: {{ print "postgres" }} - APP_TOKEN: {{ .Values.gsm.app_token | quote }} - {{- with .Values.gsm.whitelist_guilds }} + APP_TOKEN: {{ $gsm.app_token | quote }} + {{- with $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_TYPE: {{ $gsm.app_activity_type | quote }} + {{- with $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 }} + APP_PRESENCE_ADVERTISE: {{ $gsm.app_presence_advertise | quote }} + POSTGRES_SSL_MODE: {{ $gsm.postgres_ssl_mode | quote }} + TASK_QUERY_SERVER: {{ $gsm.task_query_server | quote }} + COMMAND_QUERY_PUBLIC: {{ $gsm.command_query_public | quote }} + COMMAND_QUERY_COOLDOWN: {{ $gsm.command_query_cooldown | 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 }} diff --git a/charts/stable/discordgsm/values.yaml b/charts/stable/discordgsm/values.yaml index c3174ef9d79..4a7c415d335 100644 --- a/charts/stable/discordgsm/values.yaml +++ b/charts/stable/discordgsm/values.yaml @@ -22,7 +22,6 @@ gsm: workers: 2 timeout: 90 # Bot Config - app_token: "" whitelist_guilds: [] app_activity_type: 3 @@ -33,6 +32,9 @@ gsm: command_query_cooldown: 5 web_api_enable: false postgres_ssl_mode: disable + # factorio + factorio_username: "" + factorio_auth_token: "" workload: main: