From 7a09a19d09fc7c6b3c071f91c7685e350ac527f1 Mon Sep 17 00:00:00 2001 From: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com> Date: Sat, 16 Sep 2023 04:33:20 -0400 Subject: [PATCH] migrate(icloudpd): Migrate to new common (#12471) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ 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._ --- charts/incubator/icloudpd/Chart.yaml | 4 +- charts/incubator/icloudpd/questions.yaml | 1 + charts/incubator/icloudpd/templates/NOTES.txt | 1 + .../incubator/icloudpd/templates/common.yaml | 3 +- charts/incubator/icloudpd/values.yaml | 102 +++++++++--------- 5 files changed, 58 insertions(+), 53 deletions(-) create mode 100644 charts/incubator/icloudpd/templates/NOTES.txt diff --git a/charts/incubator/icloudpd/Chart.yaml b/charts/incubator/icloudpd/Chart.yaml index 9d62e05f349..6fd5494ed1e 100644 --- a/charts/incubator/icloudpd/Chart.yaml +++ b/charts/incubator/icloudpd/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "latest" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 14.0.1 deprecated: false description: iCloudPD, syncs photos from iDevices to a single directory on TrueNAS. home: https://truecharts.org/charts/incubator/icloudpd @@ -23,7 +23,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/icloudpd - https://github.com/Womabre/-TrueNAS-docker-templates type: application -version: 2.0.16 +version: 3.0.0 annotations: truecharts.org/SCALE-support: "true" truecharts.org/catagories: | diff --git a/charts/incubator/icloudpd/questions.yaml b/charts/incubator/icloudpd/questions.yaml index b5e7c3fc927..029eb282c0f 100644 --- a/charts/incubator/icloudpd/questions.yaml +++ b/charts/incubator/icloudpd/questions.yaml @@ -212,6 +212,7 @@ questions: - value: Bark description: Bark # Include{containerConfig} +# Include{podOptions} # Include{serviceExpertRoot} # Include{serviceExpert} # Include{serviceList} diff --git a/charts/incubator/icloudpd/templates/NOTES.txt b/charts/incubator/icloudpd/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/icloudpd/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/icloudpd/templates/common.yaml b/charts/incubator/icloudpd/templates/common.yaml index cbf66c20818..b51394e00a4 100644 --- a/charts/incubator/icloudpd/templates/common.yaml +++ b/charts/incubator/icloudpd/templates/common.yaml @@ -1,2 +1 @@ -{{/* Render the templates */}} -{{ include "tc.common.loader.all" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/icloudpd/values.yaml b/charts/incubator/icloudpd/values.yaml index 5fe277b6ecc..29f4598ed86 100644 --- a/charts/incubator/icloudpd/values.yaml +++ b/charts/incubator/icloudpd/values.yaml @@ -3,13 +3,12 @@ image: repository: tccr.io/truecharts/icloudpd tag: latest@sha256:ab4b90c22a3bf93d6045cd26733447b143a66d5c9100a91c9bbea27f0443a838 -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 - securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsGroup: 0 + runAsUser: 0 icloudpd: apple_id: your@appleid.com @@ -35,7 +34,7 @@ icloudpd: delete_accompanying: false delete_empty_directories: false command_line_options: "" - notification_title: iCloud PD + notification_title: "iCloud PD" # https://github.com/boredazfcuk/docker-icloudpd/blob/master/NOTIFICATIONS.md notification_type: "" # prowl_api_key: "" @@ -70,47 +69,51 @@ icloudpd: # bark_device_key: "" # bark_server: "" -env: - user: apps - group: apps - user_id: "{{ .Values.security.PUID }}" - group_id: "{{ .Values.podSecurityContext.fsGroup }}" - download_path: /home/{{ .Values.env.user }}/iCloud - jpeg_path: /home/{{ .Values.env.user }}/iCloud - # User Defined - apple_id: "{{ .Values.icloudpd.apple_id }}" - synchronisation_interval: "{{ .Values.icloudpd.synchronisation_interval }}" - synchronisation_delay: "{{ .Values.icloudpd.synchronisation_delay }}" - notification_days: "{{ .Values.icloudpd.notification_days }}" - authentication_type: "{{ .Values.icloudpd.authentication_type }}" - skip_check: '{{ ternary "True" "False" .Values.icloudpd.skip_check }}' - download_notifications: '{{ ternary "True" "False" .Values.icloudpd.download_notifications }}' - delete_notifications: '{{ ternary "True" "False" .Values.icloudpd.delete_notifications }}' - delete_accompanying: '{{ ternary "True" "False" .Values.icloudpd.delete_accompanying }}' - delete_empty_directories: '{{ ternary "True" "False" .Values.icloudpd.delete_empty_directories }}' - set_exif_datetime: '{{ ternary "True" "False" .Values.icloudpd.set_exif_datetime }}' - auto_delete: '{{ ternary "True" "False" .Values.icloudpd.auto_delete }}' - photo_size: "{{ .Values.icloudpd.photo_size }}" - skip_live_photos: '{{ ternary "True" "False" .Values.icloudpd.skip_live_photos }}' - live_photo_size: "{{ .Values.icloudpd.live_photo_size }}" - skip_videos: '{{ ternary "True" "False" .Values.icloudpd.skip_videos }}' - recent_only: '{{ ternary "" .Values.icloudpd.recent_only (eq 0 (int .Values.icloudpd.recent_only)) }}' - until_found: '{{ ternary "" .Values.icloudpd.until_found (eq 0 (int .Values.icloudpd.until_found)) }}' - photo_album: "{{ .Values.icloudpd.photo_album }}" - convert_heic_to_jpeg: '{{ ternary "True" "False" .Values.icloudpd.convert_heic_to_jpeg }}' - jpeg_quality: "{{ .Values.icloudpd.jpeg_quality }}" - icloud_china: '{{ ternary "True" "" .Values.icloudpd.icloud_china }}' - command_line_options: "{{ .Values.icloudpd.command_line_options }}" - notification_title: "{{ .Values.icloudpd.notification_title }}" - notification_type: "{{ .Values.icloudpd.notification_type }}" - -probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false +workload: + main: + podSpec: + containers: + main: + env: + user: apps + group: apps + user_id: "{{ .Values.securityContext.container.runAsUser }}" + group_id: "{{ .Values.securityContext.container.runAsGroup }}" + download_path: /home/{{ .Values.workload.main.podSpec.containers.main.env.user }}/iCloud + jpeg_path: /home/{{ .Values.workload.main.podSpec.containers.main.env.user }}/iCloud + # User Defined + apple_id: "{{ .Values.icloudpd.apple_id }}" + synchronisation_interval: "{{ .Values.icloudpd.synchronisation_interval }}" + synchronisation_delay: "{{ .Values.icloudpd.synchronisation_delay }}" + notification_days: "{{ .Values.icloudpd.notification_days }}" + authentication_type: "{{ .Values.icloudpd.authentication_type }}" + skip_check: '{{ ternary "True" "False" .Values.icloudpd.skip_check }}' + download_notifications: '{{ ternary "True" "False" .Values.icloudpd.download_notifications }}' + delete_notifications: '{{ ternary "True" "False" .Values.icloudpd.delete_notifications }}' + delete_accompanying: '{{ ternary "True" "False" .Values.icloudpd.delete_accompanying }}' + delete_empty_directories: '{{ ternary "True" "False" .Values.icloudpd.delete_empty_directories }}' + set_exif_datetime: '{{ ternary "True" "False" .Values.icloudpd.set_exif_datetime }}' + auto_delete: '{{ ternary "True" "False" .Values.icloudpd.auto_delete }}' + photo_size: "{{ .Values.icloudpd.photo_size }}" + skip_live_photos: '{{ ternary "True" "False" .Values.icloudpd.skip_live_photos }}' + live_photo_size: "{{ .Values.icloudpd.live_photo_size }}" + skip_videos: '{{ ternary "True" "False" .Values.icloudpd.skip_videos }}' + recent_only: '{{ ternary "" .Values.icloudpd.recent_only (eq 0 (int .Values.icloudpd.recent_only)) }}' + until_found: '{{ ternary "" .Values.icloudpd.until_found (eq 0 (int .Values.icloudpd.until_found)) }}' + photo_album: "{{ .Values.icloudpd.photo_album }}" + convert_heic_to_jpeg: '{{ ternary "True" "False" .Values.icloudpd.convert_heic_to_jpeg }}' + jpeg_quality: "{{ .Values.icloudpd.jpeg_quality }}" + icloud_china: '{{ ternary "True" "" .Values.icloudpd.icloud_china }}' + command_line_options: "{{ .Values.icloudpd.command_line_options }}" + notification_title: "{{ .Values.icloudpd.notification_title }}" + notification_type: "{{ .Values.icloudpd.notification_type }}" + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false service: main: @@ -128,4 +131,5 @@ persistence: mountPath: /home/apps/iCloud portal: - enabled: false + open: + enabled: false