From 24ff2f90350a46bec741add7fba3d354de6360e6 Mon Sep 17 00:00:00 2001 From: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com> Date: Sat, 14 Oct 2023 16:29:38 -0400 Subject: [PATCH] migrate(anki-sync-server): Migrate to new common (#13617) 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._ --------- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/incubator/anki-sync-server/Chart.yaml | 4 +- .../incubator/anki-sync-server/questions.yaml | 46 +++++++++++++------ .../anki-sync-server/templates/NOTES.txt | 1 + .../anki-sync-server/templates/common.yaml | 3 +- charts/incubator/anki-sync-server/values.yaml | 31 ++++++++++++- 5 files changed, 66 insertions(+), 19 deletions(-) create mode 100644 charts/incubator/anki-sync-server/templates/NOTES.txt diff --git a/charts/incubator/anki-sync-server/Chart.yaml b/charts/incubator/anki-sync-server/Chart.yaml index 704ed14acb0..5818f03922f 100644 --- a/charts/incubator/anki-sync-server/Chart.yaml +++ b/charts/incubator/anki-sync-server/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "20220516" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 14.0.9 description: A cross-platform Anki sync server. home: https://truecharts.org/charts/incubator/anki-sync-server icon: https://truecharts.org/img/hotlink-ok/chart-icons/anki-sync-server.png @@ -18,7 +18,7 @@ name: anki-sync-server sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/anki-sync-server - https://github.com/ankicommunity/anki-devops-services -version: 2.0.9 +version: 3.0.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/incubator/anki-sync-server/questions.yaml b/charts/incubator/anki-sync-server/questions.yaml index 1fc7e666d45..9ba2e08772f 100644 --- a/charts/incubator/anki-sync-server/questions.yaml +++ b/charts/incubator/anki-sync-server/questions.yaml @@ -10,18 +10,36 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} + + - variable: env + group: "App Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: ANKISYNCD_USERNAME + label: "Default Username" + description: "Create your default username here" + schema: + type: string + required: true + default: "" + - variable: ANKISYNCD_PASSWORD + label: "Default Passowrd" + description: "Enter default password here" + schema: + type: string + private: true + required: true + default: "" # Include{containerBasic} # Include{containerAdvanced} # Include{containerConfig} +# Include{podOptions} # Include{serviceRoot} - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: +# Include{serviceMain} # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main @@ -68,13 +86,13 @@ questions: description: "The UserID of the user running the application" schema: type: int - default: 568 - - variable: runAsGroup - label: "runAsGroup" - description: "The groupID this App of the user running the application" - schema: - type: int - default: 568 + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID of the user running the application" + schema: + type: int + default: 0 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} diff --git a/charts/incubator/anki-sync-server/templates/NOTES.txt b/charts/incubator/anki-sync-server/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/anki-sync-server/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/anki-sync-server/templates/common.yaml b/charts/incubator/anki-sync-server/templates/common.yaml index c1a366e1cf0..78d963fb168 100644 --- a/charts/incubator/anki-sync-server/templates/common.yaml +++ b/charts/incubator/anki-sync-server/templates/common.yaml @@ -1 +1,2 @@ -{{ include "tc.common.loader.all" . }} +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/anki-sync-server/values.yaml b/charts/incubator/anki-sync-server/values.yaml index 3d69c76697c..f8e507b5672 100644 --- a/charts/incubator/anki-sync-server/values.yaml +++ b/charts/incubator/anki-sync-server/values.yaml @@ -1,8 +1,34 @@ image: repository: tccr.io/truecharts/anki-sync-server - tag: v20220516@sha256:444a0ae7b60a08128f3a2f02516ce60c4ca0879c13a6c27fe85db35b1ce4cef6 + tag: v1.1.14@sha256:3951d969ee43c9a0e69394e49111c55a69d4b5784b1cfe121a0151c29dccd811 pullPolicy: IfNotPresent +securityContext: + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsGroup: 0 + runAsUser: 0 + +workload: + main: + podSpec: + containers: + main: + probes: + liveness: + type: http + path: / + readiness: + type: http + path: / + startup: + type: http + path: / + env: + ANKISYNCD_USERNAME: "test" + ANKISYNCD_PASSWORD: "123456" + service: main: ports: @@ -16,4 +42,5 @@ persistence: mountPath: /app/data portal: - enabled: true + open: + enabled: true