From 00ae6703ad1ed029b3e8c036b88043247b36864e Mon Sep 17 00:00:00 2001 From: kqmaverick <121722567+kqmaverick@users.noreply.github.com> Date: Sat, 15 Jul 2023 15:07:18 -0700 Subject: [PATCH] feat(vaultwarden): push notification variables (#10503) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Adding variables for mobile push notifications. ⚒️ Fixes # **⚙️ Type of change** - [X] ⚙️ 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:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [X] #️⃣ 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: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/enterprise/vaultwarden/Chart.yaml | 2 +- charts/enterprise/vaultwarden/questions.yaml | 26 +++++++++++++++++++ .../vaultwarden/templates/_secrets.tpl | 5 ++++ charts/enterprise/vaultwarden/values.yaml | 6 +++++ 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/charts/enterprise/vaultwarden/Chart.yaml b/charts/enterprise/vaultwarden/Chart.yaml index 5bee4a04abb..e9998b6d219 100644 --- a/charts/enterprise/vaultwarden/Chart.yaml +++ b/charts/enterprise/vaultwarden/Chart.yaml @@ -25,7 +25,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/enterprise/vaultwarden - https://github.com/dani-garcia/vaultwarden type: application -version: 20.1.0 +version: 20.2.0 annotations: truecharts.org/catagories: | - security diff --git a/charts/enterprise/vaultwarden/questions.yaml b/charts/enterprise/vaultwarden/questions.yaml index 8979630b20a..26a0b50ccb7 100644 --- a/charts/enterprise/vaultwarden/questions.yaml +++ b/charts/enterprise/vaultwarden/questions.yaml @@ -53,6 +53,32 @@ questions: schema: type: string default: "" + - variable: push + label: "Mobile Push Notifications" + schema: + additional_attrs: true + type: dict + attrs: + - variable: enabled + label: "Enable Mobile Push Notifications" + description: "You must obtain and ID and Key here: https://bitwarden.com/host" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: installationId + label: "Installation ID" + schema: + type: string + default: "" + required: true + - variable: installationKey + label: "Installation Key" + schema: + type: string + default: "" + required: true - variable: admin label: "Admin Portal" schema: diff --git a/charts/enterprise/vaultwarden/templates/_secrets.tpl b/charts/enterprise/vaultwarden/templates/_secrets.tpl index a33f037cf71..262fcffa1b4 100644 --- a/charts/enterprise/vaultwarden/templates/_secrets.tpl +++ b/charts/enterprise/vaultwarden/templates/_secrets.tpl @@ -29,4 +29,9 @@ data: YUBICO_CLIENT_ID: {{ $yubicoClientId }} YUBICO_SECRET_KEY: {{ required "Yubico Secret Key required" .Values.vaultwarden.yubico.secretKey | quote }} {{- end }} + {{- if .Values.vaultwarden.push.enabled }} + PUSH_ENABLED: {{ .Values.vaultwarden.push.enabled | quote }} + PUSH_INSTALLATION_ID: {{ required "Installation ID required" .Values.vaultwarden.push.installationId | quote }} + PUSH_INSTALLATION_KEY: {{ required "Installation Key required" .Values.vaultwarden.push.installationKey | quote }} + {{- end }} {{- end -}} diff --git a/charts/enterprise/vaultwarden/values.yaml b/charts/enterprise/vaultwarden/values.yaml index 2cbabc11bbd..bb6b98ac660 100644 --- a/charts/enterprise/vaultwarden/values.yaml +++ b/charts/enterprise/vaultwarden/values.yaml @@ -122,6 +122,12 @@ vaultwarden: # clientId: # secretKey: + ## Enable Mobile Push Notifications. You must obtain and ID and Key here: https://bitwarden.com/host + push: + enabled: false + # installationId: + # installationKey: + ## Logging options. https://github.com/dani-garcia/bitwarden_rs/wiki/Logging log: # Log to file.