Skip to content

Commit

Permalink
feat(feedbackssystem): add collab service (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zitrone44 authored Jan 15, 2025
1 parent 1cb2580 commit 4f893a4
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/feedbacksystem/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ sources:
- https://github.com/thm-mni-ii/feedbacksystem
home: https://github.com/thm-mni-ii/feedbacksystem
type: application
version: 0.38.0
version: 0.39.0
# renovate: image=thmmniii/fbs-core
appVersion: v1.16.0
appVersion: v1.22.2
dependencies:
- name: mysql
version: 9.16.1
Expand Down
4 changes: 4 additions & 0 deletions charts/feedbacksystem/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
{{ print .Values.eat.image.registry "/" .Values.eat.image.name ":" (default .Chart.AppVersion .Values.eat.image.tag) }}
{{- end -}}

{{- define "fbs-collab-image" -}}
{{ print .Values.collab.image.registry "/" .Values.collab.image.name ":" (default .Chart.AppVersion .Values.collab.image.tag) }}
{{- end -}}

{{- define "digital-classroom-url" -}}
{{- if .Values.digitalClassroom.enabled -}}
{{ print (include "host" .) .Values.digitalClassroom.config.path }}
Expand Down
76 changes: 76 additions & 0 deletions charts/feedbacksystem/templates/collab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{{ if .Values.collab.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-collab
labels:
app: {{ .Release.Name }}-collab
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-collab
template:
metadata:
labels:
app: {{ .Release.Name }}-collab
spec:
containers:
- name: {{ .Release.Name }}-collab
image: {{ include "fbs-collab-image" . }}
imagePullPolicy: {{ .Values.collab.image.pullPolicy }}
ports:
- containerPort: 8050
name: http
env:
- name: FBS_ROOT_URL
value: {{ include "host" . }}
resources:
requests:
cpu: {{ .Values.collab.resources.cpu.request }}
memory: {{ .Values.collab.resources.memory.request }}
limits:
cpu: {{ .Values.collab.resources.cpu.limit }}
memory: {{ .Values.collab.resources.memory.limit }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-collab
labels:
app: {{ .Release.Name }}-collab
spec:
selector:
app: {{ .Release.Name }}-collab
ports:
- name: http
protocol: TCP
port: 1234
targetPort: 1234
{{ if .Values.collab.ingressRoute.enabled }}
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ .Release.Name }}-collab-strip-prefix
spec:
stripPrefix:
prefixes:
- /collab
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: {{ .Release.Name }}-collab
spec:
entryPoints:
- websecure
routes:
- match: Host(`{{ .Values.common.config.hostname }}`) && Path(`/collab`)
kind: Rule
services:
- name: {{ .Release.Name }}-collab
port: 1234
middlewares:
- name: {{ .Release.Name }}-collab-strip-prefix
{{ end }}
{{ end }}
17 changes: 17 additions & 0 deletions charts/feedbacksystem/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,23 @@ eat:
ingressRoute:
enabled: false

collab:
enabled: true
image:
registry: docker.io
name: thmmniii/fbs-collab
tag: ""
pullPolicy: "IfNotPresent"
resources:
cpu:
request: 0.1
limit: 2
memory:
request: "50Mi"
limit: "1Gi"
ingressRoute:
enabled: false

mysql:
auth:
database: fbs
Expand Down

0 comments on commit 4f893a4

Please sign in to comment.