diff --git a/charts/incubator/jellystat/.helmignore b/charts/incubator/jellystat/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/jellystat/.helmignore @@ -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 diff --git a/charts/incubator/jellystat/CHANGELOG.md b/charts/incubator/jellystat/CHANGELOG.md new file mode 100644 index 00000000000..825c32f0d03 --- /dev/null +++ b/charts/incubator/jellystat/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/charts/incubator/jellystat/Chart.yaml b/charts/incubator/jellystat/Chart.yaml new file mode 100644 index 00000000000..327a0ef981c --- /dev/null +++ b/charts/incubator/jellystat/Chart.yaml @@ -0,0 +1,28 @@ +apiVersion: v2 +appVersion: "latest" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 14.0.1 +deprecated: false +description: A free and open source Statistics App for Jellyfin. +home: https://truecharts.org/charts/incubator/jellystat +icon: https://truecharts.org/img/hotlink-ok/chart-icons/jellystat.png +keywords: + - jellystat + - jellyfin +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: jellystat +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/jellystat + - https://github.com/CyferShepard/Jellystat +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - statistics + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/jellystat/README.md b/charts/incubator/jellystat/README.md new file mode 100644 index 00000000000..7e59600739c --- /dev/null +++ b/charts/incubator/jellystat/README.md @@ -0,0 +1 @@ +# README diff --git a/charts/incubator/jellystat/icon.png b/charts/incubator/jellystat/icon.png new file mode 100644 index 00000000000..d6857ed12c6 Binary files /dev/null and b/charts/incubator/jellystat/icon.png differ diff --git a/charts/incubator/jellystat/questions.yaml b/charts/incubator/jellystat/questions.yaml new file mode 100644 index 00000000000..84e4c4e0fa8 --- /dev/null +++ b/charts/incubator/jellystat/questions.yaml @@ -0,0 +1,110 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} + +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + + +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} +# Include{serviceRoot} + - variable: main + label: Main Service + description: The Primary service on which the Minecraft Server runs on + 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: 10681 + required: true + - variable: ws + label: WebSocket 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: 10682 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: backup + label: App Backup Storage + description: Stores the Application Backup. + 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{ingressAdvanced} +# Include{ingressList} +# Include{securityContextRoot} + + - 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 of the user running the application" + schema: + type: int + default: 0 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 + +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/jellystat/templates/NOTES.txt b/charts/incubator/jellystat/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/jellystat/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/jellystat/templates/_secrets.tpl b/charts/incubator/jellystat/templates/_secrets.tpl new file mode 100644 index 00000000000..23553494955 --- /dev/null +++ b/charts/incubator/jellystat/templates/_secrets.tpl @@ -0,0 +1,12 @@ +{{/* Define the secrets */}} +{{- define "jellystat.secrets" -}} +{{- $secretName := (printf "%s-jellystat-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} + +{{- $jwtSecret := randAlphaNum 32 -}} + {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} + {{- $jwtSecret = index .data "JWT_SECRET" | b64dec -}} + {{- end }} +enabled: true +data: + JWT_SECRET: {{ $jwtSecret }} +{{- end -}} diff --git a/charts/incubator/jellystat/templates/common.yaml b/charts/incubator/jellystat/templates/common.yaml new file mode 100644 index 00000000000..73560297224 --- /dev/null +++ b/charts/incubator/jellystat/templates/common.yaml @@ -0,0 +1,11 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . -}} + +{{/* Render secrets for jellystat */}} +{{- $secrets := include "jellystat.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "jellystat-secrets" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/incubator/jellystat/values.yaml b/charts/incubator/jellystat/values.yaml new file mode 100644 index 00000000000..28627840366 --- /dev/null +++ b/charts/incubator/jellystat/values.yaml @@ -0,0 +1,73 @@ +image: + repository: tccr.io/truecharts/jellystat + pullPolicy: IfNotPresent + tag: vlatest@sha256:80949c980cf6c4da6e6b57630ff137df2db7ecc6a19f56e1517b7aec8533ab46 + +securityContext: + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 + +service: + main: + enabled: true + ports: + main: + enabled: true + protocol: http + port: 10681 + targetPort: 3000 + ws: + enabled: true + protocol: tcp + port: 10682 + targetPort: 3004 + +workload: + main: + podSpec: + containers: + main: + probes: + liveness: + path: "/" + readiness: + path: "/" + startup: + path: "/" + env: + # PORT variables do not work. + # PORT: "{{ .Values.service.main.ports.main.port }}" + # WS_PORT: "{{ .Values.service.main.ports.ws.port }}" + POSTGRES_USER: "{{ .Values.cnpg.main.user }}" + POSTGRES_PASSWORD: + secretKeyRef: + name: cnpg-main-user + key: password + POSTGRES_IP: + secretKeyRef: + name: cnpg-main-urls + key: host + POSTGRES_PORT: 5432 + JWT_SECRET: + secretKeyRef: + name: jellystat-secrets + key: JWT_SECRET + +persistence: + backup: + enabled: true + mountPath: "/app/backend/backup-data" + +cnpg: + main: + enabled: true + # static name + user: jfstat + database: jfstat + +portal: + open: + enabled: true