Skip to content

Commit

Permalink
Add ergochat
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed May 1, 2024
1 parent 745c1f0 commit bb55e0d
Show file tree
Hide file tree
Showing 9 changed files with 1,193 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apps/ergochat/Chart.yaml
@@ -0,0 +1,3 @@
apiVersion: v2
name: ergochat
version: 1.0.0
1,058 changes: 1,058 additions & 0 deletions apps/ergochat/config/ircd.yaml

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions apps/ergochat/templates/config.yaml
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ergochat
labels:
app: ergochat
data:
"auth.sh": |-
#!/bin/sh
read input
wget --header='CONTENT-TYPE:application/json' --post-data "$input" -O - -q $1 && printf '\n' # This assume no endline ohne the API response
#For testing:
#printf '{"success": true, "accountName": "Brutus5000", "error": null}\n'
"ircd.yaml": |-
{{ tpl ( .Files.Get "config/ircd.yaml") . | indent 4}}
42 changes: 42 additions & 0 deletions apps/ergochat/templates/deployment.yaml
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ergochat
labels:
app: ergochat
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: ergochat
template:
metadata:
labels:
app: ergochat
spec:
containers:
- image: ghcr.io/ergochat/ergo:v2.13.0
imagePullPolicy: Always
name: ergochat
ports:
- name: irc-plain
containerPort: 6667
- name: irc-tls
containerPort: 6697
- name: websocket
containerPort: 8097
volumeMounts:
# Also contains the tls certificates for simplicity.
- name: ergochat-data
mountPath: /data
- name: config
mountPath: /ircd
restartPolicy: Always
volumes:
- name: ergochat-data
persistentVolumeClaim:
claimName: ergochat-pvc
- name: config
configMap:
name: ergochat
44 changes: 44 additions & 0 deletions apps/ergochat/templates/ingress.yaml
@@ -0,0 +1,44 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: ergochat-webirc
spec:
entryPoints:
- websecure
routes:
- match: Host(`chat.{{.Values.baseDomain}}`)
kind: Rule
services:
- name: ergochat
port: 8097

---

apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: ergochat-irc-plain
spec:
entryPoints:
- irc-plain
routes:
- match: HostSNI(`*`)
services:
- name: ergochat
port: 6667
---

apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: ergochat-irc-tls
spec:
entryPoints:
- irc-plain
routes:
- match: HostSNI(`*`)
services:
- name: ergochat
port: 6697
tls:
passthrough: true
19 changes: 19 additions & 0 deletions apps/ergochat/templates/service.yaml
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: ergochat
labels:
app: ergochat
spec:
selector:
app: ergochat
ports:
- name: irc-plain
port: 6667
targetPort: 6667
- name: irc-tls
port: 6697
targetPort: 6697
- name: websocket
port: 8097
targetPort: 8097
2 changes: 1 addition & 1 deletion cluster/storage/templates/persistent-volume.yaml
Expand Up @@ -12,7 +12,7 @@ spec:
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
local:
path: {{ printf "%s/%s" $.Values.dataPath coalesce ( .pv.folderName .pv.name ) }}
path: {{ printf "%s/%s" $.Values.dataPath ( coalesce .pv.folderName .pv.name ) }}
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
5 changes: 5 additions & 0 deletions cluster/storage/values.yaml
Expand Up @@ -43,6 +43,11 @@ managedStorages:
size: 2Gi
pvc:
namespace: faf-apps
- pv:
name: ergochat
size: 1Gi
pvc:
namespace: faf-apps
# - name: mariadb
# namespace: faf-apps
# size: 20Gi
Expand Down
4 changes: 4 additions & 0 deletions cluster/traefik/values.yaml
Expand Up @@ -62,6 +62,10 @@ traefik:
- "104.24.0.0/14"
- "172.64.0.0/13"
- "131.0.72.0/22"
irc-plain:
port: 6667
irc-tls:
port: 6697

# HostNetwork
service:
Expand Down

0 comments on commit bb55e0d

Please sign in to comment.