Skip to content

Commit 1dda457

Browse files
authored
Element call (#17)
* elemet-call
1 parent f71c587 commit 1dda457

File tree

8 files changed

+199
-0
lines changed

8 files changed

+199
-0
lines changed

charts/element-call/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: element-call
3+
version: 0.0.1
4+
sources:
5+
- https://github.com/element-hq/element-call
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{/*
2+
Selector labels
3+
*/}}
4+
{{- define "element-call.selectorLabels" -}}
5+
app: element-call
6+
component: element-call
7+
{{- end }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: element-call
6+
labels:
7+
{{- include "element-call.selectorLabels" . | nindent 4 }}
8+
data:
9+
"config.json": |
10+
{{- toJson .Values.config | nindent 4 }}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: element-call
5+
labels:
6+
{{- include "element-call.selectorLabels" . | nindent 4 }}
7+
spec:
8+
{{- if not .Values.autoscaling.enabled }}
9+
replicas: {{ .Values.replicaCount }}
10+
{{- end }}
11+
selector:
12+
matchLabels:
13+
{{- include "element-call.selectorLabels" . | nindent 4 }}
14+
template:
15+
metadata:
16+
{{- if .Values.podAnnotations }}
17+
annotations:
18+
{{- toYaml .Values.podAnnotations | nindent 8 }}
19+
{{- end }}
20+
labels:
21+
{{- include "element-call.selectorLabels" . | nindent 8 }}
22+
{{- if .Values.podLabels }}
23+
{{- toYaml .Values.podLabels | nindent 8 }}
24+
{{- end }}
25+
spec:
26+
containers:
27+
- name: element-call
28+
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
29+
imagePullPolicy: {{ .Values.image.pullPolicy }}
30+
ports:
31+
- name: http
32+
containerPort: 8080
33+
protocol: TCP
34+
livenessProbe:
35+
{{- toYaml .Values.livenessProbe | nindent 12 }}
36+
readinessProbe:
37+
{{- toYaml .Values.readinessProbe | nindent 12 }}
38+
resources:
39+
{{- toYaml .Values.resources | nindent 12 }}
40+
volumeMounts:
41+
- mountPath: /app/config.json
42+
name: config
43+
subPath: config.json
44+
volumes:
45+
- name: config
46+
configMap:
47+
name: element-call
48+
{{- if .Values.nodeSelector }}
49+
nodeSelector:
50+
{{ toYaml .Values.nodeSelector | nindent 8 }}
51+
{{- end }}
52+
{{- if .Values.tolerations }}
53+
tolerations:
54+
{{ toYaml .Values.tolerations | nindent 8 }}
55+
{{- end }}
56+
{{- if .Values.affinity }}
57+
affinity:
58+
{{ toYaml .Values.affinity | nindent 8 }}
59+
{{- end }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- if .Values.autoscaling.enabled }}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: element-call
6+
labels:
7+
{{- include "element-call.selectorLabels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: element-call
13+
minReplicas: {{ .Values.autoscaling.minReplicas }}
14+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15+
metrics:
16+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17+
- type: Resource
18+
resource:
19+
name: cpu
20+
target:
21+
type: Utilization
22+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
23+
{{- end }}
24+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
25+
- type: Resource
26+
resource:
27+
name: memory
28+
target:
29+
type: Utilization
30+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
31+
{{- end }}
32+
{{- end }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{- if .Values.ingress.enabled -}}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: element-call
6+
labels:
7+
{{- include "element-call.labels" . | nindent 4 }}
8+
{{- if .Values.ingress.annotations }}
9+
annotations:
10+
{{- toYaml .Values.ingress.annotations | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
{{- if .Values.ingress.className }}
14+
ingressClassName: {{ .Values.ingress.className }}
15+
{{- end }}
16+
tls:
17+
- hosts:
18+
- {{ .Values.ingress.serverName }}
19+
{{- if .Values.ingress.secretName }}
20+
secretName: {{ .Values.ingress.secretName }}
21+
{{- end }}
22+
rules:
23+
- host: {{ .Values.ingress.serverName }}
24+
http:
25+
paths:
26+
- path: /
27+
pathType: Prefix
28+
backend:
29+
service:
30+
name: element-call
31+
port:
32+
name: http
33+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: element-call
5+
labels:
6+
{{- include "element-call.selectorLabels" . | nindent 4 }}
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- port: 80
11+
targetPort: http
12+
protocol: TCP
13+
name: http
14+
selector:
15+
{{- include "element-call.selectorLabels" . | nindent 4 }}

charts/element-call/values.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
image:
2+
registry: ghcr.io
3+
repository: element-hq/element-call
4+
pullPolicy: IfNotPresent
5+
tag: 0.16.1
6+
7+
ingress:
8+
enabled: false
9+
className: ""
10+
serverName: ""
11+
secretName: ""
12+
annotations: {}
13+
14+
replicaCount: 1
15+
autoscaling:
16+
enabled: false
17+
minReplicas: 1
18+
maxReplicas: 10
19+
targetCPUUtilizationPercentage: 80
20+
# targetMemoryUtilizationPercentage: 80
21+
22+
livenessProbe:
23+
httpGet:
24+
path: /
25+
port: http
26+
readinessProbe:
27+
httpGet:
28+
path: /
29+
port: http
30+
31+
podAnnotations: {}
32+
podLabels: {}
33+
nodeSelector: {}
34+
tolerations: []
35+
affinity: {}
36+
resources: {}
37+
38+
config: {}

0 commit comments

Comments
 (0)