coturn helm chart init container failure

84 views Asked by At

we are trying to use this HELM Chart jessebot/coturn-chart. The Chart starts the replicaset und tries to run the init container for the coturn pod but fails.

We tried to debug the issue by adding commands to the init container and found the following:

+ whoami
yq

+ ls -lah /
  total 80K
  drwxr-xr-x    1 root     root        4.0K Nov 20 12:13 .
  drwxr-xr-x    1 root     root        4.0K Nov 20 12:13 ..
  drwxr-xr-x    2 root     root        4.0K Sep 28 11:18 bin
  drwxr-xr-x    3 root     root        4.0K Nov 20 12:02 data
  drwxr-xr-x    5 root     root         360 Nov 20 12:13 dev
  drwxr-xr-x    1 root     root        4.0K Nov 20 12:13 etc
  drwxrwxrwx    3 root     root        4.0K Nov 20 12:02 extra
  drwxr-xr-x    1 root     root        4.0K Nov 19 23:54 home
  drwxrwxrwx    3 root     root        4.0K Nov 20 12:02 initial
  drwxr-xr-x    7 root     root        4.0K Sep 28 11:18 lib
  drwxr-xr-x    5 root     root        4.0K Sep 28 11:18 media
  drwxr-xr-x    2 root     root        4.0K Sep 28 11:18 mnt
  drwxr-xr-x    2 root     root        4.0K Sep 28 11:18 opt
  dr-xr-xr-x  643 root     root           0 Nov 20 12:13 proc
  drwx------    2 root     root        4.0K Sep 28 11:18 root
  drwxr-xr-x    1 root     root        4.0K Nov 20 12:13 run
  drwxr-xr-x    2 root     root        4.0K Sep 28 11:18 sbin
  drwxr-xr-x    2 root     root        4.0K Sep 28 11:18 srv
  dr-xr-xr-x   13 root     root           0 Nov 20 12:02 sys
  drwxrwxrwt    2 root     root        4.0K Sep 28 11:18 tmp
  drwxr-xr-x    1 root     root        4.0K Sep 28 11:18 usr
  drwxr-xr-x   12 root     root        4.0K Sep 28 11:18 var
  drwxr-xr-x    1 yq       yq          4.0K Nov 19 23:54 workdir

+ ls -lah /data
  total 24K
  drwxr-xr-x    3 root     root        4.0K Nov 20 12:02 .
  drwxr-xr-x    1 root     root        4.0K Nov 20 12:13 ..
  drwx------    2 root     root       16.0K Nov 20 12:02 lost+found

+ cp /initial/turnserver.conf /data/turnserver.yaml
  cp: can't create '/data/turnserver.yaml': Permission denied

The init container runs as user yq and tries to copy the turnserver.yaml to /data which is only write accessible by root and gets a permission denied.

Anybody else experiencing this? Thanks!

Tried to deploy the helm chart. coturn init container fails with permission denied while copying initial config

1

There are 1 answers

0
Andrew Summer On

We solved the issue by giving the init container root permissions.

In the coturn/templates/deployments.yaml add the securityContext to the init container it will be able do its job.

    - name: add-secret-values-to-config
      image: "mikefarah/yq:latest"
      imagePullPolicy: Always
      securityContext:
        runAsUser: 0
        fsGroup: 0

This is not ideal but maybe it helps someone else down the line.