munnerz / kube-plex

Scalable Plex Media Server on Kubernetes -- dispatch transcode jobs as pods on your cluster!
Apache License 2.0
1.22k stars 191 forks source link

Extra Data mounts are not also mounted in transcoder pod, transcoding fails #94

Open runecalico opened 4 years ago

runecalico commented 4 years ago

Having the persistence.extraData mount options in the helm chart is super awesome as I don't have all of my media under a single share .. Unfortunately it looks like when the transcoder pod is created, it doesn't pass any of the extraData mounts to the transcoder, so attempts to transcode any file contained in one of those extraData mounts fails. The transcoder pod deployment yaml doesn't show those extraData mounts ..

    volumeMounts:
    - mountPath: /data
      name: data
      readOnly: true
    - mountPath: /config
      name: config
      readOnly: true
    - mountPath: /transcode
      name: transcode
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-9shvd
      readOnly: true
    workingDir: /transcode/Transcode/Sessions/plex-transcode-d48pgie0z4f612e7g3ih5qhs-d18c2e9c-f4dc-49a7-9362-ecad21e9dc04

Unfortunately I'm a total noob with Go, so while I think the relevant code is in kube-plex\main.go, I don't really know how to ADD support for those extraData mounts (especially since there could be 0 or more of them).

Please Advise.

onedr0p commented 4 years ago

From the amount of reports I think we can gather kube-plex is broken. We're out of luck until a maintainer steps in or @munnerz comes back. Use the flag --set kubePlex.enabled=false until it's fixed

simplyzee commented 4 years ago

I will take a look at it to see what the issue is with the transcoder pods and see if I can push a fix out to get this working again.

runecalico commented 4 years ago

Understood. I was submitting the report under the concept of "I might get lucky and someone knows how to do this and is willing to do it too" :)

runecalico commented 4 years ago

We might be able to try using a PodPreset to expose certain ENV and Volumes to the transcoder instead of having to modify the go .. however that would still require the transcoder pods be created with a label or something that could be used to target them. https://kubernetes.io/docs/tasks/inject-data-application/podpreset/