From 2176ee3be9077ad614f7a069f388f76f262bff24 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Thu, 7 Sep 2023 03:07:30 -0400 Subject: [PATCH] fix(anonaddy) fix anonaddy APP_KEY and set SMTP configuration (#12299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Fixes the base64 by prepending base64: to the app key. set SMTP configuration ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [X] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 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 - [X] ⬆️ 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: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: David CM --- charts/stable/anonaddy/Chart.yaml | 2 +- charts/stable/anonaddy/questions.yaml | 50 ++++++++++++++++++- charts/stable/anonaddy/templates/_secrets.tpl | 2 +- charts/stable/anonaddy/values.yaml | 16 +++++- 4 files changed, 64 insertions(+), 6 deletions(-) diff --git a/charts/stable/anonaddy/Chart.yaml b/charts/stable/anonaddy/Chart.yaml index 6dce73db306..bf474e3c5a9 100644 --- a/charts/stable/anonaddy/Chart.yaml +++ b/charts/stable/anonaddy/Chart.yaml @@ -26,7 +26,7 @@ name: anonaddy sources: - https://github.com/truecharts/charts/tree/master/charts/stable/anonaddy - https://github.com/anonaddy/docker -version: 15.0.3 +version: 15.0.4 annotations: truecharts.org/catagories: | - email diff --git a/charts/stable/anonaddy/questions.yaml b/charts/stable/anonaddy/questions.yaml index e15180e3084..bfe8ea273fa 100644 --- a/charts/stable/anonaddy/questions.yaml +++ b/charts/stable/anonaddy/questions.yaml @@ -19,11 +19,57 @@ questions: type: dict attrs: - variable: ANONADDY_DOMAIN - label: "ANONADDY_DOMAIN" + label: "Anonaddy Domain" + schema: + type: string + required: true + default: "" + - variable: APP_URL + label: "App Url" schema: type: string default: "" - required: true + - variable: MAIL_FROM_NAME + label: "Mail From Name" + schema: + type: string + default: "" + - variable: MAIL_FROM_ADDRESS + label: "Mail From Address" + schema: + type: string + default: "" + - variable: MAIL_FROM_ADDRESS + label: "Mail From Address" + schema: + type: string + default: "" + - variable: MAIL_HOST + label: "Mail Host" + schema: + type: string + default: "" + - variable: MAIL_PORT + label: "Mail Port" + schema: + type: int + default: 587 + - variable: MAIL_ENCRYPTION + label: "Mail Encryption" + schema: + type: string + default: "tls" + - variable: MAIL_EHLO_DOMAIN + label: "Mail Ehlo Domain" + schema: + type: string + default: "" + - variable: MAIL_VERIFY_PEER + label: "Mail Verify Peer" + schema: + type: boolean + default: false + # Include{containerBasic} # Include{containerAdvanced} # Include{containerConfig} diff --git a/charts/stable/anonaddy/templates/_secrets.tpl b/charts/stable/anonaddy/templates/_secrets.tpl index 636f5014742..3d55859df05 100644 --- a/charts/stable/anonaddy/templates/_secrets.tpl +++ b/charts/stable/anonaddy/templates/_secrets.tpl @@ -13,7 +13,7 @@ enabled: true data: # Anonaddy requires APP_KEY to be in base 64 format presented in the container, so this b64enc here is intentional # https://github.com/anonaddy/docker/blob/master/README.md#app - APP_KEY: {{ $appKey | b64enc }} + APP_KEY: {{ printf "base64:%v" ($appKey | b64enc) }} # Anonaddy requires ANONADDY_SECRET to be a long string ANONADDY_SECRET: {{ $secretKey }} {{- end -}} diff --git a/charts/stable/anonaddy/values.yaml b/charts/stable/anonaddy/values.yaml index a48bbc669bf..bd61d10be96 100644 --- a/charts/stable/anonaddy/values.yaml +++ b/charts/stable/anonaddy/values.yaml @@ -41,8 +41,20 @@ workload: type: tcp env: ANONADDY_DOMAIN: "chart-example.local" - DB_DATABASE: anonaddy - DB_USERNAME: anonaddy + APP_URL: "http://localhost:10110" + # The from name to be used for outgoing email notifications from AnonAddy + MAIL_FROM_NAME: Example + # The from address to be used for outgoing email notifications from AnonAddy + MAIL_FROM_ADDRESS: mailer@example.com + # just smtp is configurable + MAIL_DRIVER: smtp + MAIL_HOST: mail.example.com + MAIL_PORT: 25 + MAIL_ENCRYPTION: tls + MAIL_EHLO_DOMAIN: mail.example.com + MAIL_VERIFY_PEER: false + DB_DATABASE: "{{ .Values.mariadb.mariadbDatabase }}" + DB_USERNAME: "{{ .Values.mariadb.mariadbUsername }}" DB_HOST: secretKeyRef: expandObjectName: false