-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #127 from JuniorJPDJ/helm-chart
feat: initial version of kubernetes helm chart
- Loading branch information
Showing
7 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,9 @@ target/ | |
# PyCharm | ||
.idea | ||
|
||
# Helm resources | ||
chart/charts | ||
|
||
# Database file | ||
uno.sqlite3 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
# helm-docs templates | ||
*.gotmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: https://bjw-s.github.io/helm-charts | ||
version: 3.0.0-beta4 | ||
digest: sha256:7b1303fd68b34ce69f2b6eb8a72a1e74f77636f906f2c1499234fc8f32aa4aac | ||
generated: "2024-03-11T03:47:29.800675883+01:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v2 | ||
name: maumaubot | ||
description: Telegram Bot that allows you to play the popular card game UNO via inline queries. | ||
type: application | ||
version: 0.1.0 | ||
appVersion: latest | ||
kubeVersion: ">=1.22.0-0" | ||
keywords: | ||
- telegram | ||
- uno | ||
- telegram-bot | ||
dependencies: | ||
- name: common | ||
repository: https://bjw-s.github.io/helm-charts | ||
version: 3.0.0-beta4 | ||
sources: | ||
- https://github.com/jh0ker/mau_mau_bot | ||
annotations: | ||
artifacthub.io/links: |- | ||
- name: App Source | ||
url: https://github.com/jh0ker/mau_mau_bot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{/* Preprocess values and prepare config file */}} | ||
{{- define "maumaubot.preprocess" -}} | ||
secrets: | ||
envs: | ||
stringData: | ||
TOKEN: {{ required "Bot token is required. Please set config.token" .Values.config.token | quote }} | ||
|
||
configMaps: | ||
config: | ||
data: | ||
config.json: | | ||
{{- omit .Values.config "token" | mustToPrettyJson | nindent 8 }} | ||
{{- end -}} | ||
{{- $_ := merge .Values (include "maumaubot.preprocess" . | fromYaml) -}} | ||
|
||
{{/* Render the templates */}} | ||
{{- include "bjw-s.common.loader.all" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# | ||
# IMPORTANT NOTE | ||
# | ||
# This chart inherits from our common library chart. You can check the default values/options here: | ||
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml | ||
# | ||
|
||
config: | ||
# token: # THIS IS NECESSARY FOR BOT TO START, FILL THIS FIELD | ||
admin_list: | ||
- 0 | ||
open_lobby: true | ||
enable_translations: false | ||
workers: 32 | ||
default_gamemode: fast | ||
waiting_time: 120 | ||
time_removal_after_skip: 20 | ||
min_fast_turn_time: 15 | ||
min_players: 2 | ||
|
||
defaultPodOptions: | ||
securityContext: | ||
fsGroup: 65534 | ||
fsGroupChangePolicy: Always | ||
|
||
configMaps: | ||
config: | ||
enabled: true | ||
data: {} | ||
# config.json is autogenerated from config object above | ||
|
||
secrets: | ||
envs: | ||
stringData: {} | ||
# TOKEN is got from config.token value | ||
|
||
controllers: | ||
main: | ||
type: statefulset | ||
containers: | ||
main: | ||
image: | ||
repository: ghcr.io/jh0ker/mau_mau_bot | ||
pullPolicy: Always | ||
tag: latest | ||
envFrom: | ||
- secret: envs | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- ALL | ||
|
||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
|
||
persistence: | ||
config: | ||
type: configMap | ||
identifier: config | ||
globalMounts: | ||
- path: /app/config.json | ||
readOnly: true | ||
subPath: config.json | ||
data: | ||
type: persistentVolumeClaim | ||
accessMode: ReadWriteOnce | ||
retain: true | ||
globalMounts: | ||
- path: /app/data/ | ||
readOnly: false | ||
size: 100Mi |