From dcbbcf69dc1a44e6b2a4414d8d1fc5eab33cd8ea Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:11:20 +0300 Subject: [PATCH] fix(transmission,kms,sonarr,radarr): probe fixes (#7935) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes #7934 ⚒️ Fixes #7930 ⚒️ Fixes #7940 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/stable/kms/Chart.yaml | 2 +- charts/stable/kms/values.yaml | 22 +++++- charts/stable/plex/values.yaml | 1 + charts/stable/radarr/Chart.yaml | 2 +- charts/stable/radarr/ci/basicauth-values.yaml | 7 ++ charts/stable/radarr/values.yaml | 32 ++++----- charts/stable/sonarr/Chart.yaml | 2 +- charts/stable/sonarr/ci/basicauth-values.yaml | 7 ++ charts/stable/sonarr/values.yaml | 26 +++---- charts/stable/transmission/Chart.yaml | 2 +- .../stable/transmission/ci/auth-values.yaml | 9 +++ .../stable/transmission/templates/common.yaml | 7 ++ charts/stable/transmission/values.yaml | 71 ++++++++++++------- 13 files changed, 126 insertions(+), 64 deletions(-) create mode 100644 charts/stable/radarr/ci/basicauth-values.yaml create mode 100644 charts/stable/sonarr/ci/basicauth-values.yaml create mode 100644 charts/stable/transmission/ci/auth-values.yaml diff --git a/charts/stable/kms/Chart.yaml b/charts/stable/kms/Chart.yaml index 0876f8b8e7a..ab16e8d2b1d 100644 --- a/charts/stable/kms/Chart.yaml +++ b/charts/stable/kms/Chart.yaml @@ -20,7 +20,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/kms - https://github.com/Py-KMS-Organization/py-kms type: application -version: 14.0.1 +version: 14.0.2 annotations: truecharts.org/catagories: | - graywares diff --git a/charts/stable/kms/values.yaml b/charts/stable/kms/values.yaml index a24430386ca..0e5f06b22d5 100644 --- a/charts/stable/kms/values.yaml +++ b/charts/stable/kms/values.yaml @@ -2,18 +2,34 @@ image: repository: tccr.io/truecharts/kms pullPolicy: IfNotPresent tag: vminimal@sha256:fb868c6ad4b810d197941e10b1a004be72e0b839c9e0b8d13a6c934c17599b12 + +workload: + main: + podSpec: + containers: + main: + probes: + liveness: + type: tcp + startup: + type: tcp + readiness: + type: tcp + service: main: ports: main: port: 1688 targetPort: 1688 -portal: - open: - enabled: false + securityContext: container: readOnlyRootFilesystem: false runAsNonRoot: false runAsUser: 0 runAsGroup: 0 + +portal: + open: + enabled: false diff --git a/charts/stable/plex/values.yaml b/charts/stable/plex/values.yaml index e2e575c9894..cf4ffcb625c 100644 --- a/charts/stable/plex/values.yaml +++ b/charts/stable/plex/values.yaml @@ -18,6 +18,7 @@ plex: serverIP: "127.0.0.1" additionalAdvertiseURL: "" disableGDM: true + portal: open: enabled: true diff --git a/charts/stable/radarr/Chart.yaml b/charts/stable/radarr/Chart.yaml index 9210f3d7566..6cbc4e0bfaf 100644 --- a/charts/stable/radarr/Chart.yaml +++ b/charts/stable/radarr/Chart.yaml @@ -26,7 +26,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/radarr - https://github.com/Radarr/Radarr type: application -version: 15.0.1 +version: 15.0.2 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/radarr/ci/basicauth-values.yaml b/charts/stable/radarr/ci/basicauth-values.yaml new file mode 100644 index 00000000000..e2b3572eb23 --- /dev/null +++ b/charts/stable/radarr/ci/basicauth-values.yaml @@ -0,0 +1,7 @@ +workload: + main: + podSpec: + containers: + main: + env: + RADARR__AUTHENTICATION_METHOD: Basic diff --git a/charts/stable/radarr/values.yaml b/charts/stable/radarr/values.yaml index febecfc54fb..5084eafede6 100644 --- a/charts/stable/radarr/values.yaml +++ b/charts/stable/radarr/values.yaml @@ -31,22 +31,22 @@ workload: probes: liveness: enabled: true - ## Set this to true if you wish to specify your own livenessProbe - custom: true - ## The spec field contains the values for the default livenessProbe. - ## If you selected custom: true, this field holds the definition of the livenessProbe. - spec: - exec: - command: - - /usr/bin/env - - bash - - -c - - curl --fail localhost:7878/api/v3/system/status?apiKey=`IFS=\> && while read -d \< E C; do if [[ $E = "ApiKey" ]]; then echo $C; fi; done < /config/config.xml` - failureThreshold: 5 - initialDelaySeconds: 60 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 + type: tcp + # FIXME: https://github.com/Radarr/Radarr/pull/8055 + # Next release this will work + # type: http + # path: /ping + liveness: + enabled: true + type: tcp + # type: http + # path: /ping + liveness: + enabled: true + type: tcp + # type: http + # path: /ping + env: RADARR__PORT: "{{ .Values.service.main.ports.main.port }}" RADARR__AUTHENTICATION_METHOD: "" diff --git a/charts/stable/sonarr/Chart.yaml b/charts/stable/sonarr/Chart.yaml index d9f54d94459..8c872ee8a95 100644 --- a/charts/stable/sonarr/Chart.yaml +++ b/charts/stable/sonarr/Chart.yaml @@ -26,7 +26,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/sonarr - https://github.com/Sonarr/Sonarr type: application -version: 15.0.1 +version: 15.0.2 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/sonarr/ci/basicauth-values.yaml b/charts/stable/sonarr/ci/basicauth-values.yaml new file mode 100644 index 00000000000..ad8deeb751c --- /dev/null +++ b/charts/stable/sonarr/ci/basicauth-values.yaml @@ -0,0 +1,7 @@ +workload: + main: + podSpec: + containers: + main: + env: + SONARR__AUTHENTICATION_METHOD: Basic diff --git a/charts/stable/sonarr/values.yaml b/charts/stable/sonarr/values.yaml index 5ed113538c1..15480598614 100644 --- a/charts/stable/sonarr/values.yaml +++ b/charts/stable/sonarr/values.yaml @@ -30,22 +30,16 @@ workload: probes: liveness: enabled: true - ## Set this to true if you wish to specify your own livenessProbe - custom: true - ## The spec field contains the values for the default livenessProbe. - ## If you selected custom: true, this field holds the definition of the livenessProbe. - spec: - exec: - command: - - /usr/bin/env - - bash - - -c - - curl --fail localhost:8989/api/v3/system/status?apiKey=`IFS=\> && while read -d \< E C; do if [[ $E = "ApiKey" ]]; then echo $C; fi; done < /config/config.xml` - failureThreshold: 5 - initialDelaySeconds: 60 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 + type: http + path: /ping + readiness: + enabled: true + type: http + path: /ping + startup: + enabled: true + type: http + path: /ping env: SONARR__PORT: "{{ .Values.service.main.ports.main.port }}" SONARR__AUTHENTICATION_METHOD: "" diff --git a/charts/stable/transmission/Chart.yaml b/charts/stable/transmission/Chart.yaml index bf0a58be0c2..c2af1448591 100644 --- a/charts/stable/transmission/Chart.yaml +++ b/charts/stable/transmission/Chart.yaml @@ -22,7 +22,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/transmission - https://github.com/transmission/transmission type: application -version: 16.0.1 +version: 16.0.2 annotations: truecharts.org/catagories: | - download-tools diff --git a/charts/stable/transmission/ci/auth-values.yaml b/charts/stable/transmission/ci/auth-values.yaml new file mode 100644 index 00000000000..84d3f571ec7 --- /dev/null +++ b/charts/stable/transmission/ci/auth-values.yaml @@ -0,0 +1,9 @@ +workload: + main: + podSpec: + containers: + main: + env: + TRANSMISSION_RPC_USERNAME: "transmission" + TRANSMISSION_RPC_PASSWORD: "transmission" + TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: true diff --git a/charts/stable/transmission/templates/common.yaml b/charts/stable/transmission/templates/common.yaml index 449accc35d7..5e5e0d8c871 100644 --- a/charts/stable/transmission/templates/common.yaml +++ b/charts/stable/transmission/templates/common.yaml @@ -4,5 +4,12 @@ {{/* Set it to the same port as "torrent" service/port */}} {{- $_ := set $.Values.service.torrent.ports.torrentudp "port" .Values.service.torrent.ports.torrent.port -}} +{{- if .Values.workload.main.podSpec.containers.main.env.TRANSMISSION_RPC_AUTHENTICATION_REQUIRED -}} + {{- $headers := (dict "Authorization" (printf "Basic %s" (printf "%s:%s" .Values.workload.main.podSpec.containers.main.env.TRANSMISSION_RPC_USERNAME .Values.workload.main.podSpec.containers.main.env.TRANSMISSION_RPC_PASSWORD | b64enc))) -}} + {{- $_ := set $.Values.workload.main.podSpec.containers.main.probes.liveness "httpHeaders" $headers -}} + {{- $_ := set $.Values.workload.main.podSpec.containers.main.probes.readiness "httpHeaders" $headers -}} + {{- $_ := set $.Values.workload.main.podSpec.containers.main.probes.startup "httpHeaders" $headers -}} +{{- end -}} + {{/* Render the templates */}} {{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/stable/transmission/values.yaml b/charts/stable/transmission/values.yaml index c1d247ea5d5..9de5f3f3cfe 100644 --- a/charts/stable/transmission/values.yaml +++ b/charts/stable/transmission/values.yaml @@ -2,37 +2,30 @@ image: repository: tccr.io/truecharts/transmission pullPolicy: IfNotPresent tag: v3.00@sha256:cf61bde05f265653ce12b0ef42e25ac25abcc51ff84c9e5528ef75fea8330eda -service: - main: - ports: - main: - port: 10109 - targetPort: 9091 - torrent: - enabled: true - ports: - torrent: - enabled: true - port: 51414 - protocol: tcp - torrentudp: - enabled: true - port: 51414 - protocol: udp -persistence: - config: - enabled: true - mountPath: "/config" -portal: - open: - enabled: true + workload: main: podSpec: containers: main: + probes: + liveness: + type: http + path: "{{ .Values.workload.main.podSpec.containers.main.env.TRANSMISSION__RPC_URL }}" + startup: + type: http + path: "{{ .Values.workload.main.podSpec.containers.main.env.TRANSMISSION__RPC_URL }}" + readiness: + type: http + path: "{{ .Values.workload.main.podSpec.containers.main.env.TRANSMISSION__RPC_URL }}" env: # PUID: 1001 + # URL is set here so it wont be able to get overwritten by the user + # as this will break the probes, if the need arises we can expose it. + TRANSMISSION__RPC_URL: "/transmission" + # TRANSMISSION_RPC_USERNAME: "" + # TRANSMISSION_RPC_PASSWORD: "" + # TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: false # TRANSMISSION_ALT_SPEED_DOWN: 50 # TRANSMISSION_ALT_SPEED_ENABLED: false # TRANSMISSION_ALT_SPEED_TIME_BEGIN: 540 @@ -74,7 +67,6 @@ workload: # TRANSMISSION_RATIO_LIMIT: 2 # TRANSMISSION_RATIO_LIMIT_ENABLED: false # TRANSMISSION_RENAME_PARTIAL_FILES: true - # TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: false # TRANSMISSION_RPC_BIND_ADDRESS: "0.0.0.0" # TRANSMISSION_RPC_ENABLED: true # TRANSMISSION_RPC_HOST_WHITELIST: "" @@ -99,3 +91,32 @@ workload: # TRANSMISSION_UTP_ENABLED: true # TRANSMISSION_WATCH_DIR: "/watch" # TRANSMISSION_WATCH_DIR_ENABLED: false +persistence: + config: + enabled: true + mountPath: "/config" + +service: + main: + ports: + main: + port: 10109 + targetPort: 9091 + torrent: + enabled: true + ports: + torrent: + enabled: true + port: 51414 + protocol: tcp + torrentudp: + enabled: true + port: 51414 + protocol: udp + +portal: + open: + enabled: true + +manifestManager: + enabled: false