deployment.yaml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. {{- if hasKey .Values "global" }}
  12. {{- if hasKey .Values.global "ixChartContext" }}
  13. {{- if .Values.global.ixChartContext.addNvidiaRuntimeClass }}
  14. runtimeClassName: {{ .Values.global.ixChartContext.nvidiaRuntimeClassName }}
  15. {{- end }}
  16. {{- end }}
  17. {{- end }}
  18. containers:
  19. - name: {{ .Chart.Name }}
  20. {{ include "common.resources.limitation" . | nindent 10 }}
  21. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  22. volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
  23. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  24. - name: extrappvolume-{{ $index }}
  25. mountPath: {{ $hostPathConfiguration.mountPath }}
  26. {{ if $hostPathConfiguration.readOnly }}
  27. readOnly: {{ $hostPathConfiguration.readOnly }}
  28. {{ end }}
  29. {{ end }}
  30. ports:
  31. - name: emby
  32. protocol: TCP
  33. containerPort: 8096
  34. - name: emby-dlna
  35. protocol: UDP
  36. containerPort: 1900
  37. - name: emby-lnd
  38. protocol: UDP
  39. containerPort: 7359
  40. env:
  41. - name: KUBE_NAMESPACE
  42. valueFrom:
  43. fieldRef:
  44. fieldPath: metadata.namespace
  45. - name: POD_IP
  46. valueFrom:
  47. fieldRef:
  48. fieldPath: status.podIP
  49. {{ $envList := (default list .Values.environmentVariables) }}
  50. {{ if and .Values.gpuConfiguration (hasKey .Values.gpuConfiguration "nvidia.com/gpu") (gt (get .Values.gpuConfiguration "nvidia.com/gpu" | toDecimal) 0) }}
  51. {{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
  52. {{ end }}
  53. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  54. readinessProbe:
  55. httpGet:
  56. path: /emby/System/Ping
  57. port: 8096
  58. initialDelaySeconds: 10
  59. periodSeconds: 10
  60. timeoutSeconds: 5
  61. failureThreshold: 5
  62. successThreshold: 2
  63. livenessProbe:
  64. httpGet:
  65. path: /emby/System/Ping
  66. port: 8096
  67. initialDelaySeconds: 10
  68. periodSeconds: 10
  69. timeoutSeconds: 5
  70. failureThreshold: 5
  71. successThreshold: 1
  72. startupProbe:
  73. httpGet:
  74. path: /emby/System/Ping
  75. port: 8096
  76. initialDelaySeconds: 10
  77. periodSeconds: 5
  78. timeoutSeconds: 2
  79. failureThreshold: 60
  80. successThreshold: 1
  81. volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
  82. {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
  83. - name: extrappvolume-{{ $index }}
  84. hostPath:
  85. path: {{ $hostPathConfiguration.hostPath }}
  86. {{ end }}