deployment.yaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {{ include "common.storage.hostPathValidate" .Values }}
  2. {{ include "common.deployment.common_config" . | nindent 0 }}
  3. spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
  4. template: {{ include "common.deployment.pod.metadata" . | nindent 4 }}
  5. spec:
  6. {{- if .Values.hostNetwork }}
  7. hostNetwork: {{ .Values.hostNetwork }}
  8. dnsPolicy: ClusterFirstWithHostNet
  9. {{- end }}
  10. hostname: {{ template "common.names.fullname" . }}
  11. containers:
  12. - name: {{ .Chart.Name }}
  13. {{ include "common.resources.limitation" . | nindent 10 }}
  14. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  15. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  16. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  17. - name: extrappvolume-{{ $index }}
  18. mountPath: {{ $hostPathConfiguration.mountPath }}
  19. {{ if $hostPathConfiguration.readOnly }}
  20. readOnly: {{ $hostPathConfiguration.readOnly }}
  21. {{ end }}
  22. {{ end }}
  23. ports:
  24. - name: emby
  25. protocol: TCP
  26. containerPort: 8096
  27. {{- if .Values.hostNetwork }}
  28. hostPort: {{ .Values.embyServerHttp.port }}
  29. {{- end }}
  30. - name: emby-dlna
  31. protocol: UDP
  32. containerPort: 1900
  33. - name: emby-lnd
  34. protocol: UDP
  35. containerPort: 7359
  36. env:
  37. - name: KUBE_NAMESPACE
  38. valueFrom:
  39. fieldRef:
  40. fieldPath: metadata.namespace
  41. - name: POD_IP
  42. valueFrom:
  43. fieldRef:
  44. fieldPath: status.podIP
  45. {{ $envList := (default list .Values.environmentVariables) }}
  46. {{ if and .Values.gpuConfiguration (hasKey .Values.gpuConfiguration "nvidia.com/gpu") (gt (get .Values.gpuConfiguration "nvidia.com/gpu" | toDecimal) 0) }}
  47. {{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
  48. {{ end }}
  49. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  50. readinessProbe:
  51. httpGet:
  52. path: /emby/System/Ping
  53. port: 8096
  54. failureThreshold: 5
  55. periodSeconds: 15
  56. livenessProbe:
  57. httpGet:
  58. path: /emby/System/Ping
  59. port: 8096
  60. failureThreshold: 5
  61. periodSeconds: 15
  62. startupProbe:
  63. httpGet:
  64. path: /emby/System/Ping
  65. port: 8096
  66. initialDelaySeconds: 5
  67. failureThreshold: 40
  68. periodSeconds: 15
  69. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  70. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  71. - name: extrappvolume-{{ $index }}
  72. hostPath:
  73. path: {{ $hostPathConfiguration.hostPath }}
  74. {{ end }}