Skip to content

Commit 220ad3b

Browse files
committed
move values to charts
1 parent aaef414 commit 220ad3b

File tree

5 files changed

+75
-33
lines changed

5 files changed

+75
-33
lines changed

charts/coturn/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
name: coturn
3-
version: 0.0.1
3+
version: 0.0.2

charts/coturn/templates/configmap.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ metadata:
77
app: coturn
88
data:
99
turnserver.conf: |
10-
server-name={{ .Values.server_name }}
11-
realm={{ .Values.server_name }}
12-
static-auth-secret={{ .Values.coturn.sharedSecret }}
10+
server-name={{ ..Values.serverName }}
11+
realm={{ ..Values.serverName }}
12+
static-auth-secret={{ .Values.sharedSecret }}
1313
use-auth-secret
14-
cli-password={{ .Values.coturn.cliPassword }}
15-
psql-userdb="host=coturn-pgbouncer dbname={{ .Values.coturn.postgres.dbname }} user={{ .Values.coturn.postgres.user }} password={{ .Values.coturn.postgres.password }} connect_timeout=30"
14+
cli-password={{ .Values.cliPassword }}
15+
psql-userdb="host=coturn-pgbouncer dbname={{ .Values.postgres.dbname }} user={{ .Values.postgres.user }} password={{ .Values.postgres.password }} connect_timeout=30"
1616
cert=/etc/tls/tls.crt
1717
pkey=/etc/tls/tls.key
1818
no-loopback-peers

charts/coturn/templates/deployment.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ spec:
1919
spec:
2020
containers:
2121
- name: coturn
22-
image: {{ .Values.coturn.image.repository }}:{{ .Values.coturn.image.tag }}
23-
imagePullPolicy: {{ .Values.coturn.image.pullPolicy }}
22+
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
23+
imagePullPolicy: {{ .Values.image.pullPolicy }}
2424
resources:
25-
{{ toYaml .Values.coturn.resources | nindent 10 }}
25+
{{ toYaml .Values.resources | nindent 10 }}
2626
args:
2727
- --external-ip='$(detect-external-ip)'
2828
ports:
@@ -39,17 +39,17 @@ spec:
3939
- name: coturn-tls
4040
mountPath: /etc/tls
4141
terminationGracePeriodSeconds: 10
42-
{{- if .Values.coturn.nodeSelector }}
42+
{{- if .Values.nodeSelector }}
4343
nodeSelector:
44-
{{ toYaml .Values.coturn.nodeSelector | nindent 8 }}
44+
{{ toYaml .Values.nodeSelector | nindent 8 }}
4545
{{- end }}
46-
{{- if .Values.coturn.tolerations }}
46+
{{- if .Values.tolerations }}
4747
tolerations:
48-
{{ toYaml .Values.coturn.tolerations | nindent 8 }}
48+
{{ toYaml .Values.tolerations | nindent 8 }}
4949
{{- end }}
50-
{{- if .Values.coturn.affinity }}
50+
{{- if .Values.affinity }}
5151
affinity:
52-
{{ toYaml .Values.coturn.affinity | nindent 8 }}
52+
{{ toYaml .Values.affinity | nindent 8 }}
5353
{{- end }}
5454
volumes:
5555
- name: coturn-config

charts/coturn/templates/pgbouncer-deployment.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
app: coturn-pgbouncer
88
spec:
9-
replicas: {{ .Values.coturn.pgbouncer.replicas }}
9+
replicas: {{ .Values.pgbouncer.replicas }}
1010
selector:
1111
matchLabels:
1212
app: coturn-pgbouncer
@@ -17,43 +17,43 @@ spec:
1717
spec:
1818
containers:
1919
- name: pgbouncer
20-
mage: {{ .Values.coturn.pgbouncer.image.repository }}:{{ .Values.coturn.pgbouncer.image.tag }}
21-
imagePullPolicy: {{ .Values.coturn.pgbouncer.image.pullPolicy }}
20+
mage: {{ .Values.pgbouncer.image.repository }}:{{ .Values.pgbouncer.image.tag }}
21+
imagePullPolicy: {{ .Values.pgbouncer.image.pullPolicy }}
2222
resources:
23-
{{ toYaml .Values.coturn.pgbouncer.resources | nindent 10 }}
23+
{{ toYaml .Values.pgbouncer.resources | nindent 10 }}
2424
env:
2525
- name: PGBOUNCER_PORT
2626
value: "5432"
2727
- name: POSTGRESQL_HOST
28-
value: {{ .Values.coturn.postgres.host | quote }}
28+
value: {{ .Values.postgres.host | quote }}
2929
- name: PGBOUNCER_DATABASE
30-
value: {{ .Values.coturn.postgres.dbname | quote }}
30+
value: {{ .Values.postgres.dbname | quote }}
3131
- name: POSTGRESQL_USERNAME
32-
value: {{ .Values.coturn.postgres.user | quote }}
32+
value: {{ .Values.postgres.user | quote }}
3333
- name: POSTGRESQL_PASSWORD
34-
value: {{ .Values.coturn.postgres.password | quote }}
34+
value: {{ .Values.postgres.password | quote }}
3535
- name: PGBOUNCER_AUTH_TYPE
36-
value: {{ .Values.coturn.pgbouncer.authType | quote }}
36+
value: {{ .Values.pgbouncer.authType | quote }}
3737
- name: PGBOUNCER_MAX_CLIENT_CONN
38-
value: {{ .Values.coturn.pgbouncer.maxClientConn | quote }}
38+
value: {{ .Values.pgbouncer.maxClientConn | quote }}
3939
- name: PGBOUNCER_DEFAULT_POOL_SIZE
40-
value: {{ .Values.coturn.pgbouncer.poolSize | quote }}
40+
value: {{ .Values.pgbouncer.poolSize | quote }}
4141
- name: PGBOUNCER_POOL_MODE
42-
value: {{ .Values.coturn.pgbouncer.poolMode | quote }}
42+
value: {{ .Values.pgbouncer.poolMode | quote }}
4343
ports:
4444
- containerPort: 5432
4545
name: pgbouncer
4646
protocol: TCP
47-
{{- if .Values.coturn.pgbouncer.nodeSelector }}
47+
{{- if .Values.pgbouncer.nodeSelector }}
4848
nodeSelector:
49-
{{ toYaml .Values.coturn.pgbouncer.nodeSelector | nindent 8 }}
49+
{{ toYaml .Values.pgbouncer.nodeSelector | nindent 8 }}
5050
{{- end }}
51-
{{- if .Values.coturn.pgbouncer.tolerations }}
51+
{{- if .Values.pgbouncer.tolerations }}
5252
tolerations:
53-
{{ toYaml .Values.coturn.pgbouncer.tolerations | nindent 8 }}
53+
{{ toYaml .Values.pgbouncer.tolerations | nindent 8 }}
5454
{{- end }}
55-
{{- if .Values.coturn.pgbouncer.affinity }}
55+
{{- if .Values.pgbouncer.affinity }}
5656
affinity:
57-
{{ toYaml .Values.coturn.pgbouncer.affinity | nindent 8 }}
57+
{{ toYaml .Values.pgbouncer.affinity | nindent 8 }}
5858
{{- end }}
5959
terminationGracePeriodSeconds: 10

charts/coturn/values.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
image:
2+
repository: "instrumentisto/coturn"
3+
tag: "4.5.2"
4+
pullPolicy: IfNotPresent
5+
replicas: 1
6+
# shared between turn and synapse
7+
sharedSecret: ''
8+
cliPassword: ''
9+
resources:
10+
requests:
11+
memory: 5Gi
12+
cpu: 3
13+
limits:
14+
memory: 7Gi
15+
cpu: 4
16+
nodeSelector: {}
17+
tolerations: []
18+
affinity: {}
19+
postgres:
20+
host: ""
21+
dbname: "coturn"
22+
user: "coturn"
23+
password: ""
24+
25+
pgbouncer:
26+
image:
27+
repository: "bitnami/pgbouncer"
28+
tag: "1.21.0-debian-11-r5"
29+
pullPolicy: IfNotPresent
30+
replicas: 3
31+
authType: "md5"
32+
maxClientConn: "8192"
33+
poolSize: "20"
34+
poolMode: "transaction"
35+
resources:
36+
requests:
37+
memory: 2Gi
38+
cpu: 2
39+
nodeSelector: {}
40+
tolerations: []
41+
affinity: {}
42+
# TODO: add postgres section and move pgbouncer to separate chart

0 commit comments

Comments
 (0)