From 7e6206b3de15f38481fa23519407fd3a666cdc3a Mon Sep 17 00:00:00 2001 From: "M. Rehan" Date: Sat, 8 Jan 2022 01:47:49 +0500 Subject: [PATCH 1/3] Ability to mount extras in read-only mode --- charts/plex/{1.6.16 => 1.6.17}/.helmignore | 0 charts/plex/{1.6.16 => 1.6.17}/Chart.lock | 0 charts/plex/{1.6.16 => 1.6.17}/Chart.yaml | 2 +- charts/plex/{1.6.16 => 1.6.17}/README.md | 0 charts/plex/{1.6.16 => 1.6.17}/app-readme.md | 0 .../{1.6.16 => 1.6.17}/charts/common-2112.0.0.tgz | Bin charts/plex/{1.6.16 => 1.6.17}/default_values.yaml | 0 charts/plex/{1.6.16 => 1.6.17}/ix_values.yaml | 0 .../migrations/migrate_from_1.0.0 | 0 .../1.6.16 => charts/plex/1.6.17}/questions.yaml | 7 +++++++ charts/plex/{1.6.16 => 1.6.17}/templates/NOTES.txt | 0 .../plex/1.6.17}/templates/deployment.yaml | 1 + .../{1.6.16 => 1.6.17}/templates/probe_config.yaml | 0 .../{1.6.16 => 1.6.17}/templates/service-tcp.yaml | 0 .../{1.6.16 => 1.6.17}/templates/service-udp.yaml | 0 .../1.6.16 => charts/plex/1.6.17}/test_values.yaml | 4 ++++ charts/plex/{1.6.16 => 1.6.17}/values.yaml | 0 test/plex/{1.6.16 => 1.6.17}/.helmignore | 0 test/plex/{1.6.16 => 1.6.17}/Chart.lock | 0 test/plex/{1.6.16 => 1.6.17}/Chart.yaml | 2 +- test/plex/{1.6.16 => 1.6.17}/README.md | 0 test/plex/{1.6.16 => 1.6.17}/app-readme.md | 0 .../{1.6.16 => 1.6.17}/charts/common-2112.0.0.tgz | Bin test/plex/{1.6.16 => 1.6.17}/default_values.yaml | 0 test/plex/{1.6.16 => 1.6.17}/ix_values.yaml | 0 .../migrations/migrate_from_1.0.0 | 0 .../plex/1.6.16 => test/plex/1.6.17}/questions.yaml | 7 +++++++ test/plex/{1.6.16 => 1.6.17}/templates/NOTES.txt | 0 .../plex/1.6.17}/templates/deployment.yaml | 1 + .../{1.6.16 => 1.6.17}/templates/probe_config.yaml | 0 .../{1.6.16 => 1.6.17}/templates/service-tcp.yaml | 0 .../{1.6.16 => 1.6.17}/templates/service-udp.yaml | 0 .../1.6.16 => test/plex/1.6.17}/test_values.yaml | 4 ++++ test/plex/{1.6.16 => 1.6.17}/values.yaml | 0 34 files changed, 26 insertions(+), 2 deletions(-) rename charts/plex/{1.6.16 => 1.6.17}/.helmignore (100%) rename charts/plex/{1.6.16 => 1.6.17}/Chart.lock (100%) rename charts/plex/{1.6.16 => 1.6.17}/Chart.yaml (96%) rename charts/plex/{1.6.16 => 1.6.17}/README.md (100%) rename charts/plex/{1.6.16 => 1.6.17}/app-readme.md (100%) rename charts/plex/{1.6.16 => 1.6.17}/charts/common-2112.0.0.tgz (100%) rename charts/plex/{1.6.16 => 1.6.17}/default_values.yaml (100%) rename charts/plex/{1.6.16 => 1.6.17}/ix_values.yaml (100%) rename charts/plex/{1.6.16 => 1.6.17}/migrations/migrate_from_1.0.0 (100%) rename {test/plex/1.6.16 => charts/plex/1.6.17}/questions.yaml (97%) rename charts/plex/{1.6.16 => 1.6.17}/templates/NOTES.txt (100%) rename {test/plex/1.6.16 => charts/plex/1.6.17}/templates/deployment.yaml (98%) rename charts/plex/{1.6.16 => 1.6.17}/templates/probe_config.yaml (100%) rename charts/plex/{1.6.16 => 1.6.17}/templates/service-tcp.yaml (100%) rename charts/plex/{1.6.16 => 1.6.17}/templates/service-udp.yaml (100%) rename {test/plex/1.6.16 => charts/plex/1.6.17}/test_values.yaml (87%) rename charts/plex/{1.6.16 => 1.6.17}/values.yaml (100%) rename test/plex/{1.6.16 => 1.6.17}/.helmignore (100%) rename test/plex/{1.6.16 => 1.6.17}/Chart.lock (100%) rename test/plex/{1.6.16 => 1.6.17}/Chart.yaml (96%) rename test/plex/{1.6.16 => 1.6.17}/README.md (100%) rename test/plex/{1.6.16 => 1.6.17}/app-readme.md (100%) rename test/plex/{1.6.16 => 1.6.17}/charts/common-2112.0.0.tgz (100%) rename test/plex/{1.6.16 => 1.6.17}/default_values.yaml (100%) rename test/plex/{1.6.16 => 1.6.17}/ix_values.yaml (100%) rename test/plex/{1.6.16 => 1.6.17}/migrations/migrate_from_1.0.0 (100%) rename {charts/plex/1.6.16 => test/plex/1.6.17}/questions.yaml (97%) rename test/plex/{1.6.16 => 1.6.17}/templates/NOTES.txt (100%) rename {charts/plex/1.6.16 => test/plex/1.6.17}/templates/deployment.yaml (98%) rename test/plex/{1.6.16 => 1.6.17}/templates/probe_config.yaml (100%) rename test/plex/{1.6.16 => 1.6.17}/templates/service-tcp.yaml (100%) rename test/plex/{1.6.16 => 1.6.17}/templates/service-udp.yaml (100%) rename {charts/plex/1.6.16 => test/plex/1.6.17}/test_values.yaml (87%) rename test/plex/{1.6.16 => 1.6.17}/values.yaml (100%) diff --git a/charts/plex/1.6.16/.helmignore b/charts/plex/1.6.17/.helmignore similarity index 100% rename from charts/plex/1.6.16/.helmignore rename to charts/plex/1.6.17/.helmignore diff --git a/charts/plex/1.6.16/Chart.lock b/charts/plex/1.6.17/Chart.lock similarity index 100% rename from charts/plex/1.6.16/Chart.lock rename to charts/plex/1.6.17/Chart.lock diff --git a/charts/plex/1.6.16/Chart.yaml b/charts/plex/1.6.17/Chart.yaml similarity index 96% rename from charts/plex/1.6.16/Chart.yaml rename to charts/plex/1.6.17/Chart.yaml index c7fb0a5c6e..7c05c78393 100644 --- a/charts/plex/1.6.16/Chart.yaml +++ b/charts/plex/1.6.17/Chart.yaml @@ -14,4 +14,4 @@ sources: - https://hub.docker.com/r/plexinc/pms-docker/ - https://github.com/k8s-at-home/charts/tree/master/charts/plex upstream_version: 2.1.0 -version: 1.6.16 +version: 1.6.17 diff --git a/charts/plex/1.6.16/README.md b/charts/plex/1.6.17/README.md similarity index 100% rename from charts/plex/1.6.16/README.md rename to charts/plex/1.6.17/README.md diff --git a/charts/plex/1.6.16/app-readme.md b/charts/plex/1.6.17/app-readme.md similarity index 100% rename from charts/plex/1.6.16/app-readme.md rename to charts/plex/1.6.17/app-readme.md diff --git a/charts/plex/1.6.16/charts/common-2112.0.0.tgz b/charts/plex/1.6.17/charts/common-2112.0.0.tgz similarity index 100% rename from charts/plex/1.6.16/charts/common-2112.0.0.tgz rename to charts/plex/1.6.17/charts/common-2112.0.0.tgz diff --git a/charts/plex/1.6.16/default_values.yaml b/charts/plex/1.6.17/default_values.yaml similarity index 100% rename from charts/plex/1.6.16/default_values.yaml rename to charts/plex/1.6.17/default_values.yaml diff --git a/charts/plex/1.6.16/ix_values.yaml b/charts/plex/1.6.17/ix_values.yaml similarity index 100% rename from charts/plex/1.6.16/ix_values.yaml rename to charts/plex/1.6.17/ix_values.yaml diff --git a/charts/plex/1.6.16/migrations/migrate_from_1.0.0 b/charts/plex/1.6.17/migrations/migrate_from_1.0.0 similarity index 100% rename from charts/plex/1.6.16/migrations/migrate_from_1.0.0 rename to charts/plex/1.6.17/migrations/migrate_from_1.0.0 diff --git a/test/plex/1.6.16/questions.yaml b/charts/plex/1.6.17/questions.yaml similarity index 97% rename from test/plex/1.6.16/questions.yaml rename to charts/plex/1.6.17/questions.yaml index 038cbb0b60..8a3aa928d1 100644 --- a/test/plex/1.6.16/questions.yaml +++ b/charts/plex/1.6.17/questions.yaml @@ -318,3 +318,10 @@ questions: schema: type: hostpath required: true + - variable: readOnly + label: "Read Only" + description: "Mount hostpath in read-only mode" + schema: + type: boolean + required: true + default: false diff --git a/charts/plex/1.6.16/templates/NOTES.txt b/charts/plex/1.6.17/templates/NOTES.txt similarity index 100% rename from charts/plex/1.6.16/templates/NOTES.txt rename to charts/plex/1.6.17/templates/NOTES.txt diff --git a/test/plex/1.6.16/templates/deployment.yaml b/charts/plex/1.6.17/templates/deployment.yaml similarity index 98% rename from test/plex/1.6.16/templates/deployment.yaml rename to charts/plex/1.6.17/templates/deployment.yaml index 20b2140b29..caf952f3e1 100644 --- a/test/plex/1.6.16/templates/deployment.yaml +++ b/charts/plex/1.6.17/templates/deployment.yaml @@ -22,6 +22,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} - name: extrappvolume-{{ $index }} mountPath: {{ $hostPathConfiguration.mountPath }} + readOnly: {{ $hostPathConfiguration.readOnly }} {{ end }} ports: - name: pms diff --git a/charts/plex/1.6.16/templates/probe_config.yaml b/charts/plex/1.6.17/templates/probe_config.yaml similarity index 100% rename from charts/plex/1.6.16/templates/probe_config.yaml rename to charts/plex/1.6.17/templates/probe_config.yaml diff --git a/charts/plex/1.6.16/templates/service-tcp.yaml b/charts/plex/1.6.17/templates/service-tcp.yaml similarity index 100% rename from charts/plex/1.6.16/templates/service-tcp.yaml rename to charts/plex/1.6.17/templates/service-tcp.yaml diff --git a/charts/plex/1.6.16/templates/service-udp.yaml b/charts/plex/1.6.17/templates/service-udp.yaml similarity index 100% rename from charts/plex/1.6.16/templates/service-udp.yaml rename to charts/plex/1.6.17/templates/service-udp.yaml diff --git a/test/plex/1.6.16/test_values.yaml b/charts/plex/1.6.17/test_values.yaml similarity index 87% rename from test/plex/1.6.16/test_values.yaml rename to charts/plex/1.6.17/test_values.yaml index d8e83aa2bc..675d8f056e 100644 --- a/test/plex/1.6.16/test_values.yaml +++ b/charts/plex/1.6.17/test_values.yaml @@ -19,6 +19,10 @@ dnsConfig: options: [] emptyDirVolumes: true environmentVariables: [] +extraAppVolumeMounts: + - mountPath: /mnt/extras + hostPath: /mnt/extras + readOnly: true gpuConfiguration: {} hostNetwork: false image: diff --git a/charts/plex/1.6.16/values.yaml b/charts/plex/1.6.17/values.yaml similarity index 100% rename from charts/plex/1.6.16/values.yaml rename to charts/plex/1.6.17/values.yaml diff --git a/test/plex/1.6.16/.helmignore b/test/plex/1.6.17/.helmignore similarity index 100% rename from test/plex/1.6.16/.helmignore rename to test/plex/1.6.17/.helmignore diff --git a/test/plex/1.6.16/Chart.lock b/test/plex/1.6.17/Chart.lock similarity index 100% rename from test/plex/1.6.16/Chart.lock rename to test/plex/1.6.17/Chart.lock diff --git a/test/plex/1.6.16/Chart.yaml b/test/plex/1.6.17/Chart.yaml similarity index 96% rename from test/plex/1.6.16/Chart.yaml rename to test/plex/1.6.17/Chart.yaml index c7fb0a5c6e..7c05c78393 100644 --- a/test/plex/1.6.16/Chart.yaml +++ b/test/plex/1.6.17/Chart.yaml @@ -14,4 +14,4 @@ sources: - https://hub.docker.com/r/plexinc/pms-docker/ - https://github.com/k8s-at-home/charts/tree/master/charts/plex upstream_version: 2.1.0 -version: 1.6.16 +version: 1.6.17 diff --git a/test/plex/1.6.16/README.md b/test/plex/1.6.17/README.md similarity index 100% rename from test/plex/1.6.16/README.md rename to test/plex/1.6.17/README.md diff --git a/test/plex/1.6.16/app-readme.md b/test/plex/1.6.17/app-readme.md similarity index 100% rename from test/plex/1.6.16/app-readme.md rename to test/plex/1.6.17/app-readme.md diff --git a/test/plex/1.6.16/charts/common-2112.0.0.tgz b/test/plex/1.6.17/charts/common-2112.0.0.tgz similarity index 100% rename from test/plex/1.6.16/charts/common-2112.0.0.tgz rename to test/plex/1.6.17/charts/common-2112.0.0.tgz diff --git a/test/plex/1.6.16/default_values.yaml b/test/plex/1.6.17/default_values.yaml similarity index 100% rename from test/plex/1.6.16/default_values.yaml rename to test/plex/1.6.17/default_values.yaml diff --git a/test/plex/1.6.16/ix_values.yaml b/test/plex/1.6.17/ix_values.yaml similarity index 100% rename from test/plex/1.6.16/ix_values.yaml rename to test/plex/1.6.17/ix_values.yaml diff --git a/test/plex/1.6.16/migrations/migrate_from_1.0.0 b/test/plex/1.6.17/migrations/migrate_from_1.0.0 similarity index 100% rename from test/plex/1.6.16/migrations/migrate_from_1.0.0 rename to test/plex/1.6.17/migrations/migrate_from_1.0.0 diff --git a/charts/plex/1.6.16/questions.yaml b/test/plex/1.6.17/questions.yaml similarity index 97% rename from charts/plex/1.6.16/questions.yaml rename to test/plex/1.6.17/questions.yaml index 038cbb0b60..8a3aa928d1 100644 --- a/charts/plex/1.6.16/questions.yaml +++ b/test/plex/1.6.17/questions.yaml @@ -318,3 +318,10 @@ questions: schema: type: hostpath required: true + - variable: readOnly + label: "Read Only" + description: "Mount hostpath in read-only mode" + schema: + type: boolean + required: true + default: false diff --git a/test/plex/1.6.16/templates/NOTES.txt b/test/plex/1.6.17/templates/NOTES.txt similarity index 100% rename from test/plex/1.6.16/templates/NOTES.txt rename to test/plex/1.6.17/templates/NOTES.txt diff --git a/charts/plex/1.6.16/templates/deployment.yaml b/test/plex/1.6.17/templates/deployment.yaml similarity index 98% rename from charts/plex/1.6.16/templates/deployment.yaml rename to test/plex/1.6.17/templates/deployment.yaml index 20b2140b29..caf952f3e1 100644 --- a/charts/plex/1.6.16/templates/deployment.yaml +++ b/test/plex/1.6.17/templates/deployment.yaml @@ -22,6 +22,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} - name: extrappvolume-{{ $index }} mountPath: {{ $hostPathConfiguration.mountPath }} + readOnly: {{ $hostPathConfiguration.readOnly }} {{ end }} ports: - name: pms diff --git a/test/plex/1.6.16/templates/probe_config.yaml b/test/plex/1.6.17/templates/probe_config.yaml similarity index 100% rename from test/plex/1.6.16/templates/probe_config.yaml rename to test/plex/1.6.17/templates/probe_config.yaml diff --git a/test/plex/1.6.16/templates/service-tcp.yaml b/test/plex/1.6.17/templates/service-tcp.yaml similarity index 100% rename from test/plex/1.6.16/templates/service-tcp.yaml rename to test/plex/1.6.17/templates/service-tcp.yaml diff --git a/test/plex/1.6.16/templates/service-udp.yaml b/test/plex/1.6.17/templates/service-udp.yaml similarity index 100% rename from test/plex/1.6.16/templates/service-udp.yaml rename to test/plex/1.6.17/templates/service-udp.yaml diff --git a/charts/plex/1.6.16/test_values.yaml b/test/plex/1.6.17/test_values.yaml similarity index 87% rename from charts/plex/1.6.16/test_values.yaml rename to test/plex/1.6.17/test_values.yaml index d8e83aa2bc..675d8f056e 100644 --- a/charts/plex/1.6.16/test_values.yaml +++ b/test/plex/1.6.17/test_values.yaml @@ -19,6 +19,10 @@ dnsConfig: options: [] emptyDirVolumes: true environmentVariables: [] +extraAppVolumeMounts: + - mountPath: /mnt/extras + hostPath: /mnt/extras + readOnly: true gpuConfiguration: {} hostNetwork: false image: diff --git a/test/plex/1.6.16/values.yaml b/test/plex/1.6.17/values.yaml similarity index 100% rename from test/plex/1.6.16/values.yaml rename to test/plex/1.6.17/values.yaml From 4cf17000dd90567a5c0a81a9fff930d4299b13c5 Mon Sep 17 00:00:00 2001 From: "M. Rehan" Date: Sat, 8 Jan 2022 01:58:34 +0500 Subject: [PATCH 2/3] minorfix --- charts/plex/1.6.17/templates/deployment.yaml | 2 ++ test/plex/1.6.17/templates/deployment.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/plex/1.6.17/templates/deployment.yaml b/charts/plex/1.6.17/templates/deployment.yaml index caf952f3e1..1297b53cf5 100644 --- a/charts/plex/1.6.17/templates/deployment.yaml +++ b/charts/plex/1.6.17/templates/deployment.yaml @@ -22,7 +22,9 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} - name: extrappvolume-{{ $index }} mountPath: {{ $hostPathConfiguration.mountPath }} + {{ if $hostPathConfiguration.readOnly }} readOnly: {{ $hostPathConfiguration.readOnly }} + {{ end }} {{ end }} ports: - name: pms diff --git a/test/plex/1.6.17/templates/deployment.yaml b/test/plex/1.6.17/templates/deployment.yaml index caf952f3e1..1297b53cf5 100644 --- a/test/plex/1.6.17/templates/deployment.yaml +++ b/test/plex/1.6.17/templates/deployment.yaml @@ -22,7 +22,9 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} - name: extrappvolume-{{ $index }} mountPath: {{ $hostPathConfiguration.mountPath }} + {{ if $hostPathConfiguration.readOnly }} readOnly: {{ $hostPathConfiguration.readOnly }} + {{ end }} {{ end }} ports: - name: pms From 21ed0b33312aa7bd6506f35585a958347f9f89cc Mon Sep 17 00:00:00 2001 From: "M. Rehan" Date: Mon, 10 Jan 2022 19:31:53 +0500 Subject: [PATCH 3/3] make ro flag optional --- charts/plex/1.6.17/questions.yaml | 1 - test/plex/1.6.17/questions.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/charts/plex/1.6.17/questions.yaml b/charts/plex/1.6.17/questions.yaml index 8a3aa928d1..4d8c383aad 100644 --- a/charts/plex/1.6.17/questions.yaml +++ b/charts/plex/1.6.17/questions.yaml @@ -323,5 +323,4 @@ questions: description: "Mount hostpath in read-only mode" schema: type: boolean - required: true default: false diff --git a/test/plex/1.6.17/questions.yaml b/test/plex/1.6.17/questions.yaml index 8a3aa928d1..4d8c383aad 100644 --- a/test/plex/1.6.17/questions.yaml +++ b/test/plex/1.6.17/questions.yaml @@ -323,5 +323,4 @@ questions: description: "Mount hostpath in read-only mode" schema: type: boolean - required: true default: false