Split helmfile into components

This commit is contained in:
Grant
2025-05-19 14:09:30 -06:00
parent 12bcabf7b2
commit dca9e445c2
20 changed files with 246 additions and 491 deletions

View File

@@ -1,8 +0,0 @@
apiVersion: v2
name: matrix-registration
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: "0.9.1"

View File

@@ -1,52 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-matrix-registration" .Release.Name }}
data:
config.yaml: |
server_location: {{ .Values.serverLocation }}
server_name: {{ .Values.serverName }}
registration_shared_secret: {{ .Values.registrationSharedSecret }}
admin_api_shared_secret: {{ .Values.adminApiSharedSecret }}
base_url: {{ .Values.serverBaseUrl }}
client_redirect: 'https://app.element.io/#/login'
client_logo: 'static/images/element-logo.png' # use '{cwd}' for current working directory
db: 'sqlite:///{cwd}db.sqlite3'
host: '0.0.0.0'
port: 5000
rate_limit: ["100 per day", "10 per minute"]
allow_cors: false
ip_logging: false
logging:
disable_existing_loggers: false
version: 1
root:
level: DEBUG
handlers: [console]
formatters:
brief:
format: '%(name)s - %(levelname)s - %(message)s'
precise:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: brief
stream: ext://sys.stdout
file:
class: logging.handlers.RotatingFileHandler
formatter: precise
level: INFO
filename: m_reg.log
maxBytes: 10485760 # 10MB
backupCount: 3
encoding: utf8
# password requirements
password:
min_length: 8
# username requirements
username:
validation_regex: [] #list of regexes that the selected username must match. Example: '[a-zA-Z]\.[a-zA-Z]'
invalidation_regex: ['(admin|support|password)'] #list of regexes that the selected username must NOT match. Example: '(admin|support)'

View File

@@ -1,44 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ printf "%s-matrix-registration" .Release.Name }}
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
name: matrix-registration
app: matrix-registration
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
name: matrix-registration
app: matrix-registration
spec:
securityContext: {}
containers:
- image: zeratax/matrix-registration:{{ printf "v%s" .Chart.AppVersion }}
imagePullPolicy: IfNotPresent
name: matrix-registration
args: ["serve"]
ports:
- containerPort: 5000
name: web
protocol: TCP
volumeMounts:
- mountPath: /data/config
name: matrix-registration
restartPolicy: Always
volumes:
- name: matrix-registration
configMap:
name: {{ printf "%s-matrix-registration" .Release.Name }}
- name: data
persistentVolumeClaim:
claimName: {{ printf "%s-matrix-registration" .Release.Name }}

View File

@@ -1,10 +0,0 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ printf "%s-matrix-registration" .Release.Name }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M

View File

@@ -1,16 +0,0 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: {{ printf "%s-matrix-registration" .Release.Name }}
spec:
entryPoints:
- websecure
routes:
- match: Host(`goatchat.ca`) && PathPrefix(`/gate/`)
kind: Rule
services:
- kind: Service
name: {{ printf "%s-matrix-registration" .Release.Name }}
port: 5000
tls:
certResolver: letsencrypt

View File

@@ -1,11 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-matrix-registration" .Release.Name }}
spec:
selector:
app: matrix-registration
ports:
- name: web
protocol: TCP
port: 5000

View File

@@ -1,5 +0,0 @@
serverLocation: http://goatchat-matrix-synapse:8008
serverName: goatchat.ca
serverBaseUrl: /gate
registrationSharedSecret: # set through cli
adminApiSharedSecret: # set through cli

View File

@@ -1,5 +1,5 @@
# serverLocation:
# serverName:
# serverBaseUrl:
# registrationSharedSecret:
# adminApiSharedSecret:
serverLocation: http://goatchat-matrix-synapse:8008
serverName: goatchat.ca
serverBaseUrl: /gate
registrationSharedSecret: # set through cli
adminApiSharedSecret: # set through cli