deployment.yaml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. - name: emby-dlna
  28. protocol: UDP
  29. containerPort: 1900
  30. - name: emby-lnd
  31. protocol: UDP
  32. containerPort: 7359
  33. env:
  34. - name: KUBE_NAMESPACE
  35. valueFrom:
  36. fieldRef:
  37. fieldPath: metadata.namespace
  38. - name: POD_IP
  39. valueFrom:
  40. fieldRef:
  41. fieldPath: status.podIP
  42. {{ $envList := (default list .Values.environmentVariables) }}
  43. {{ if and .Values.gpuConfiguration (hasKey .Values.gpuConfiguration "nvidia.com/gpu") (gt (get .Values.gpuConfiguration "nvidia.com/gpu" | toDecimal) 0) }}
  44. {{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
  45. {{ end }}
  46. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  47. readinessProbe:
  48. httpGet:
  49. path: /emby/System/Ping
  50. port: 8096
  51. initialDelaySeconds: 10
  52. periodSeconds: 10
  53. timeoutSeconds: 5
  54. failureThreshold: 5
  55. successThreshold: 2
  56. livenessProbe:
  57. httpGet:
  58. path: /emby/System/Ping
  59. port: 8096
  60. initialDelaySeconds: 10
  61. periodSeconds: 10
  62. timeoutSeconds: 5
  63. failureThreshold: 5
  64. successThreshold: 1
  65. startupProbe:
  66. httpGet:
  67. path: /emby/System/Ping
  68. port: 8096
  69. initialDelaySeconds: 10
  70. periodSeconds: 5
  71. timeoutSeconds: 2
  72. failureThreshold: 60
  73. successThreshold: 1
  74. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  75. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  76. - name: extrappvolume-{{ $index }}
  77. hostPath:
  78. path: {{ $hostPathConfiguration.hostPath }}
  79. {{ end }}