feat(discordgsm) move to stable (#6380)
* feat(discordgsm) move to stable * dont try to install Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
# helm-docs templates
|
||||
*.gotmpl
|
||||
# docs folder
|
||||
/docs
|
||||
# icon
|
||||
icon.png
|
||||
@@ -0,0 +1 @@
|
||||
#
|
||||
@@ -0,0 +1,33 @@
|
||||
apiVersion: v2
|
||||
appVersion: "2.10.0"
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.truecharts.org
|
||||
version: 11.1.2
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://charts.truecharts.org/
|
||||
version: 11.0.18
|
||||
description: A discord bot that monitors your game server and tracks the live data of your game servers.
|
||||
home: https://truecharts.org/charts/stable/discordgsm
|
||||
icon: https://truecharts.org/img/hotlink-ok/chart-icons/discordgsm.png
|
||||
keywords:
|
||||
- discordgsm
|
||||
- game-server
|
||||
- monitor
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
maintainers:
|
||||
- email: info@truecharts.org
|
||||
name: TrueCharts
|
||||
url: https://truecharts.org
|
||||
name: discordgsm
|
||||
sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/stable/discordgsm
|
||||
- https://github.com/DiscordGSM/GameServerMonitor
|
||||
version: 1.0.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- monitor
|
||||
- discord
|
||||
truecharts.org/SCALE-support: "true"
|
||||
truecharts.org/grade: U
|
||||
@@ -0,0 +1,27 @@
|
||||
# README
|
||||
|
||||
## General Info
|
||||
|
||||
TrueCharts can be installed as both *normal* Helm Charts or as Apps on TrueNAS SCALE.
|
||||
However only installations using the TrueNAS SCALE Apps system are supported.
|
||||
|
||||
For more information about this App, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incubator/)
|
||||
|
||||
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/manual/SCALE%20Apps/Important-MUST-READ).
|
||||
- See the [Website](https://truecharts.org)
|
||||
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
|
||||
- Open a [issue](https://github.com/truecharts/charts/issues/new/choose)
|
||||
|
||||
---
|
||||
|
||||
## Sponsor TrueCharts
|
||||
|
||||
TrueCharts can only exist due to the incredible effort of our staff.
|
||||
Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can!
|
||||
|
||||
*All Rights Reserved - The TrueCharts Project*
|
||||
@@ -0,0 +1,12 @@
|
||||
# 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).
|
||||
- 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.
|
||||
|
||||
:::info
|
||||
|
||||
Checkout discordGSM supported list of game servers [here](https://discordgsm.com/guide/supported-games).
|
||||
|
||||
:::
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,189 @@
|
||||
# Include{groups}
|
||||
portals:
|
||||
open:
|
||||
# Include{portalLink}
|
||||
questions:
|
||||
# Include{global}
|
||||
# Include{controller}
|
||||
# Include{replicas}
|
||||
# Include{replica1}
|
||||
# Include{controllerExpertExtraArgs}
|
||||
- variable: gsm
|
||||
group: App Configuration
|
||||
label: Discord GSM Configuration
|
||||
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{containerConfig}
|
||||
# Include{serviceRoot}
|
||||
- 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
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: port
|
||||
label: Port
|
||||
description: This port exposes the container port on the service
|
||||
schema:
|
||||
type: int
|
||||
default: 10589
|
||||
required: true
|
||||
# Include{serviceExpertRoot}
|
||||
default: false
|
||||
# Include{serviceExpert}
|
||||
# Include{serviceList}
|
||||
# Include{persistenceRoot}
|
||||
- variable: config
|
||||
label: App Config Storage
|
||||
description: Stores the Application Configuration.
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
# Include{persistenceBasic}
|
||||
# Include{persistenceList}
|
||||
# Include{ingressRoot}
|
||||
- variable: main
|
||||
label: Main Ingress
|
||||
schema:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
# Include{ingressDefault}
|
||||
# Include{ingressTLS}
|
||||
# Include{ingressTraefik}
|
||||
# Include{ingressList}
|
||||
# Include{security}
|
||||
# Include{securityContextAdvancedRoot}
|
||||
- variable: privileged
|
||||
label: Privileged mode
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: readOnlyRootFilesystem
|
||||
label: ReadOnly Root Filesystem
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: allowPrivilegeEscalation
|
||||
label: Allow Privilege Escalation
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: runAsNonRoot
|
||||
label: runAsNonRoot
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
# Include{podSecurityContextRoot}
|
||||
- variable: runAsUser
|
||||
label: runAsUser
|
||||
description: The UserID of the user running the application
|
||||
schema:
|
||||
type: int
|
||||
default: 0
|
||||
- variable: runAsGroup
|
||||
label: runAsGroup
|
||||
description: The groupID this App of the user running the application
|
||||
schema:
|
||||
type: int
|
||||
default: 0
|
||||
- variable: fsGroup
|
||||
label: fsGroup
|
||||
description: The group that should own ALL storage.
|
||||
schema:
|
||||
type: int
|
||||
default: 568
|
||||
# Include{podSecurityContextAdvanced}
|
||||
# Include{resources}
|
||||
# Include{advanced}
|
||||
# Include{addons}
|
||||
# Include{codeserver}
|
||||
# Include{vpn}
|
||||
# Include{documentation}
|
||||
@@ -0,0 +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 ";" . | 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 }}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "tc.common.loader.init" . }}
|
||||
|
||||
{{- include "gsm.secret" . -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "tc.common.loader.apply" . }}
|
||||
@@ -0,0 +1,72 @@
|
||||
image:
|
||||
repository: tccr.io/truecharts/game-server-monitor
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 2.10.0@sha256:b80cfe317edae74ec0fcbb664de260ab16565c26b4eb640968c7574709c17386
|
||||
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
readOnlyRootFilesystem: false
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
gunicorn \
|
||||
--bind 0.0.0.0:{{ .Values.service.main.ports.main.port }} \
|
||||
--workers={{ .Values.gsm.workers }} \
|
||||
--worker-class=gthread app:app \
|
||||
--timeout {{ .Values.gsm.timeout }} & \
|
||||
python -u main.py
|
||||
|
||||
gsm:
|
||||
# Server Config
|
||||
workers: 2
|
||||
timeout: 90
|
||||
# Bot Config
|
||||
app_token: ""
|
||||
whitelist_guilds: []
|
||||
app_activity_type: 3
|
||||
app_activity_name: ""
|
||||
app_presence_advertise: false
|
||||
task_query_server: 60
|
||||
command_query_public: false
|
||||
command_query_cooldown: 5
|
||||
web_api_enable: false
|
||||
postgres_ssl_mode: disable
|
||||
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: '{{ include "tc.common.names.fullname" . }}-gsm-secret'
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
main:
|
||||
port: 10230
|
||||
protocol: HTTP
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
type: HTTP
|
||||
readiness:
|
||||
type: HTTP
|
||||
startup:
|
||||
type: HTTP
|
||||
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
mountPath: /app/data
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
existingSecret: dbcreds
|
||||
postgresqlDatabase: discord_gsm
|
||||
postgresqlUsername: discord_gsm
|
||||
|
||||
portal:
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user