summaryrefslogtreecommitdiff
path: root/roles/apps/coturn/templates/pod-spec.yml.j2
blob: a084278471f18c3fca9898585b04a40f678ae10e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
securityContext:
  allowPrivilegeEscalation: false
  runAsUser: {{ coturn_uid }}
  runAsGroup: {{ coturn_gid }}
{# this does not work: https://github.com/kubernetes/kubernetes/issues/56374, https://github.com/moby/moby/issues/8460
{% if (coturn_listening_port < 1024) or (coturn_tls_listening_port < 1024) %}
  capabilities:
    add: ["NET_BIND_SERVICE"]
{% endif %}
#}
terminationGracePeriodSeconds: 0
hostNetwork: true
containers:
- name: coturn
{% if (coturn_listening_port < 1024) or (coturn_tls_listening_port < 1024) %}
  image: "instrumentisto/coturn/{{ coturn_realm }}:{{ coturn_version }}"
{% else %}
  image: "instrumentisto/coturn:{{ coturn_version }}"
{% endif %}
  args:
    - --log-file=stdout
  resources:
    limits:
      memory: "1Gi"
  volumeMounts:
  - name: config
    mountPath: /etc/coturn/
    readOnly: true
  - name: run
    mountPath: /var/run
  - name: lib
    mountPath: /var/lib/coturn
volumes:
- name: config
  hostPath:
    path: "{{ coturn_base_path }}/{{ coturn_realm }}/config/"
    type: Directory
- name: run
  emptyDir:
    medium: Memory
- name: lib
  emptyDir:
    medium: Memory