fix(anonaddy) fix anonaddy APP_KEY and set SMTP configuration (#12299)

**Description**
Fixes the base64 by prepending base64: to the app key.
set SMTP configuration
⚒️ Fixes  # <!--(issue)-->

**⚙️ 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?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ 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 <blastik@users.noreply.github.com>
This commit is contained in:
Xstar97TheNoob 2023-09-07 03:07:30 -04:00 committed by GitHub
parent 56655e680f
commit 2176ee3be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 6 deletions

View File

@ -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

View File

@ -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}

View File

@ -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 -}}

View File

@ -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