feat(money-balancer): add money-balancer (#3996)

* feat(money-balancer): add money-balancer

* update version

* Apply suggestions from code review

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* fix secret var

* update UI and add probes

* update ui

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Stavros Kois 2022-10-03 21:57:16 +03:00 committed by GitHub
parent c816183bb6
commit c98d113d5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 242 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,29 @@
apiVersion: v2
appVersion: "beta"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 10.6.8
deprecated: false
description: Money Balancer helps you to keep track of who paid for what and calculates your balance with all of your friends.
home: https://truecharts.org/docs/charts/stable/kitchenowl
icon: https://truecharts.org/img/hotlink-ok/chart-icons/kitchenowl.png
keywords:
- money
- balance
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: money-balancer
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/kitchenowl
- https://github.com/dorianim/money-balancer
type: application
version: 0.0.1
annotations:
truecharts.org/catagories: |
- finance
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,123 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{controller}
# Include{controllerDeployment}
# Include{replicas}
# Include{replica1}
# Include{strategy}
# Include{recreate}
# Include{controllerExpert}
# Include{controllerExpertExtraArgs}
# 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: 10302
required: true
# Include{advancedPortHTTP}
- variable: targetPort
label: Target Port
description: The internal(!) port on the container the Application runs on
schema:
type: int
default: 8000
# Include{serviceExpertRoot}
default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: data
label: App Data Storage
description: Stores the Application Data.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceAdvanced}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: Main Ingress
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressExpert}
# 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: true
- variable: allowPrivilegeEscalation
label: Allow Privilege Escalation
schema:
type: boolean
default: false
- variable: runAsNonRoot
label: runAsNonRoot
schema:
type: boolean
default: true
# Include{securityContextAdvanced}
# Include{podSecurityContextRoot}
- variable: runAsUser
label: runAsUser
description: The UserID of the user running the application
schema:
type: int
default: 568
- variable: runAsGroup
label: runAsGroup
description: The groupID this App of the user running the application
schema:
type: int
default: 568
- 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{promtail}
# Include{netshoot}
# Include{vpn}
# Include{documentation}

View File

@ -0,0 +1,20 @@
{{/* Define the secrets */}}
{{- define "moneybalancer.secrets" -}}
{{- $secretName := printf "%s-moneybalancer-secret" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ $secretName }}
data:
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
JWT_SECRET: {{ index .data "JWT_SECRET" }}
{{- else }}
JWT_SECRET: {{ randAlphaNum 32 | b64enc }}
{{- end }}
{{- end -}}

View File

@ -0,0 +1,5 @@
{{- include "tc.common.loader.init" . }}
{{ include "moneybalancer.secrets" . }}
{{ include "tc.common.loader.apply" . }}

View File

@ -0,0 +1,35 @@
image:
repository: tccr.io/truecharts/money-balancer
pullPolicy: IfNotPresent
tag: v1.1.0@sha256:f67f1290a4d717067dc765232ee43db1b49908ca6360901336b02202891f7386
envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-moneybalancer-secret'
probes:
liveness:
type: HTTP
path: /
readiness:
type: HTTP
path: /
startup:
type: HTTP
path: /
service:
main:
ports:
main:
port: 10302
protocol: HTTP
targetPort: 8000
persistence:
data:
enabled: true
mountPath: "/data"
portal:
enabled: true