Skip to content

Commit 15c47b5

Browse files
feat: Add optional hostNetwork support for Pods to the helm chart (#159)
* feat: Add optional hostNetwork support for Pods * feat(network): Add configurable hostNetwork and dnsPolicy parameters * docs: update values reference * chore: prepare release v1.2.0 --------- Co-authored-by: Gaston Festari <cilindrox@gmail.com>
1 parent 95c439a commit 15c47b5

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

charts/plex-media-server/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type: application
2222
# This is the chart version. This version number should be incremented each time you make changes
2323
# to the chart and its templates, including the app version.
2424
# Versions are expected to follow Semantic Versioning (https://semver.org/)
25-
version: 1.1.3
25+
version: 1.2.0
2626

2727
# This is the version number of the application being deployed. This version number should be
2828
# incremented each time you make changes to the application. Versions are not expected to

charts/plex-media-server/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# plex-media-server
22

3-
![Version: 1.1.3](https://img.shields.io/badge/Version-1.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.42.2](https://img.shields.io/badge/AppVersion-1.42.2-informational?style=flat-square)
3+
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.42.2](https://img.shields.io/badge/AppVersion-1.42.2-informational?style=flat-square)
44

55
**Homepage:** <https://www.plex.tv>
66

@@ -102,13 +102,15 @@ Before contributing, please read the [Code of Conduct](../../CODE_OF_CONDUCT.md)
102102
| affinity | object | `{}` | |
103103
| commonLabels | object | `{}` | Common Labels for all resources created by this chart. |
104104
| dnsConfig | object | `{}` | Optional DNS configuration for the Pod |
105+
| dnsPolicy | string | `""` | Specifies the Pod's DNS policy. Default is typically 'ClusterFirst'. If 'hostNetwork: true' is used, you may need to set this to 'ClusterFirstWithHostNet'. Allowed values are ClusterFirst, Default, None, or ClusterFirstWithHostNet. |
105106
| extraContainers | list | `[]` | |
106107
| extraEnv | object | `{}` | |
107108
| extraInitContainers | object | `{}` | |
108109
| extraVolumeMounts | list | `[]` | Optionally specify additional volume mounts for the PMS and init containers. |
109110
| extraVolumes | list | `[]` | Optionally specify additional volumes for the pod. |
110111
| fullnameOverride | string | `""` | |
111112
| global.imageRegistry | string | `""` | Allow parent charts to override registry hostname |
113+
| hostNetwork | bool | `false` | Set to true to run the Pod in the host's network namespace. This may be required for specific networking setups or accessing local resources. |
112114
| image | object | `{"pullPolicy":"IfNotPresent","registry":"index.docker.io","repository":"plexinc/pms-docker","sha":"","tag":"1.42.2.10156-f737b826c"}` | The docker image information for the pms application |
113115
| image.registry | string | `"index.docker.io"` | The public dockerhub registry |
114116
| imagePullSecrets | list | `[]` | |

charts/plex-media-server/templates/statefulset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ spec:
2121
annotations:
2222
{{- toYaml .Values.statefulSet.podAnnotations | nindent 8 }}
2323
spec:
24+
{{- if .Values.hostNetwork }}
25+
hostNetwork: {{ .Values.hostNetwork }}
26+
{{- end }}
2427
{{- if .Values.dnsConfig }}
2528
dnsConfig:
2629
{{- toYaml .Values.dnsConfig | nindent 8 }}
2730
{{- end }}
31+
{{- if .Values.dnsPolicy }}
32+
dnsPolicy: {{ .Values.dnsPolicy | quote }}
33+
{{- end }}
2834
{{- if .Values.runtimeClassName }}
2935
runtimeClassName: {{ .Values.runtimeClassName | quote }}
3036
{{- end }}

charts/plex-media-server/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ global:
1515
# -- Optional DNS configuration for the Pod
1616
dnsConfig: {}
1717

18+
# -- Specifies the Pod's DNS policy. Default is typically 'ClusterFirst'.
19+
# If 'hostNetwork: true' is used, you may need to set this to 'ClusterFirstWithHostNet'.
20+
# Allowed values are ClusterFirst, Default, None, or ClusterFirstWithHostNet.
21+
dnsPolicy: ""
22+
23+
# -- Set to true to run the Pod in the host's network namespace.
24+
# This may be required for specific networking setups or accessing local resources.
25+
hostNetwork: false
26+
1827
ingress:
1928
# -- Specify if an ingress resource for the pms server should be created or not
2029
enabled: false

0 commit comments

Comments
 (0)