From e7855acf60666d239814216a01fb796759fee134 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sat, 15 Jul 2023 20:28:57 +0300 Subject: [PATCH] feat(vaultwarden): remove redundant websocket service (#10491) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ 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 - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [x] ⚠️ 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._ --- charts/enterprise/vaultwarden/Chart.yaml | 2 +- charts/enterprise/vaultwarden/questions.yaml | 22 --------------- .../vaultwarden/templates/_configmap.tpl | 1 - .../vaultwarden/templates/common.yaml | 28 ------------------- charts/enterprise/vaultwarden/values.yaml | 12 +------- 5 files changed, 2 insertions(+), 63 deletions(-) diff --git a/charts/enterprise/vaultwarden/Chart.yaml b/charts/enterprise/vaultwarden/Chart.yaml index 5845888b1ee..5bee4a04abb 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.0.34 +version: 20.1.0 annotations: truecharts.org/catagories: | - security diff --git a/charts/enterprise/vaultwarden/questions.yaml b/charts/enterprise/vaultwarden/questions.yaml index c7e9fb8837f..8979630b20a 100644 --- a/charts/enterprise/vaultwarden/questions.yaml +++ b/charts/enterprise/vaultwarden/questions.yaml @@ -331,28 +331,6 @@ questions: type: int default: 10102 required: true - - variable: ws - label: "WebSocket Service" - description: "WebSocket Service" - schema: - additional_attrs: true - type: dict - attrs: -# Include{serviceSelectorLoadBalancer} -# Include{serviceSelectorExtras} - - variable: ws - label: "WebSocket Service Port Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: "Port" - description: "This port exposes the container port on the service" - schema: - type: int - default: 3012 - required: true # Include{serviceExpertRoot} # Include{serviceExpert} # Include{serviceList} diff --git a/charts/enterprise/vaultwarden/templates/_configmap.tpl b/charts/enterprise/vaultwarden/templates/_configmap.tpl index c21ff158df0..a396837e5a4 100644 --- a/charts/enterprise/vaultwarden/templates/_configmap.tpl +++ b/charts/enterprise/vaultwarden/templates/_configmap.tpl @@ -22,7 +22,6 @@ data: INVITATION_ORG_NAME: {{ .Values.vaultwarden.defaultInviteName | quote }} {{- end }} SHOW_PASSWORD_HINT: {{ .Values.vaultwarden.showPasswordHint | quote }} - WEBSOCKET_ENABLED: {{ .Values.vaultwarden.enableWebsockets | quote }} WEB_VAULT_ENABLED: {{ .Values.vaultwarden.enableWebVault | quote }} ORG_CREATION_USERS: {{ .Values.vaultwarden.orgCreationUsers | quote }} {{- if .Values.vaultwarden.attachmentLimitOrg }} diff --git a/charts/enterprise/vaultwarden/templates/common.yaml b/charts/enterprise/vaultwarden/templates/common.yaml index 00565a16a7a..66c6adab5db 100644 --- a/charts/enterprise/vaultwarden/templates/common.yaml +++ b/charts/enterprise/vaultwarden/templates/common.yaml @@ -1,7 +1,6 @@ {{/* Make sure all variables are set properly */}} {{- include "tc.v1.common.loader.init" . }} - {{/* Render configmap for vaultwarden */}} {{- $configmapFile := include "vaultwarden.configmap" . | fromYaml -}} {{- if $configmapFile -}} @@ -14,32 +13,5 @@ {{- $_ := set .Values.secret "vaultwardensecret" $secret -}} {{- end -}} -{{/* Define path for websocket */}} -{{- define "vaultwarden.websocket" -}} -{{- $fullname := include "tc.v1.common.lib.chart.names.fullname" . -}} -path: "/notifications/hub" -# -- Ignored if not kubeVersion >= 1.14-0 -pathType: Prefix -service: - # -- Overrides the service name reference for this path - name: {{ printf "%s-ws" $fullname }} - port: {{ .Values.service.ws.ports.ws.port }} -{{- end -}} - -{{/* inject websocket path to all main ingress hosts*/}} -{{- define "vaultwarden.websocketinjector" -}} -{{- $path := list (include "vaultwarden.websocket" . | fromYaml) -}} -{{- if .Values.ingress.main.enabled }} -{{- range .Values.ingress.main.hosts }} -{{- $newpaths := list }} -{{- $newpaths := concat .paths $path }} -{{- $_ := set . "paths" ( deepCopy $newpaths ) -}} -{{- end }} -{{- end }} -{{- end -}} - -{{/* inject websocket paths in ingress */}} -{{- include "vaultwarden.websocketinjector" . }} - {{/* Render the templates */}} {{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/enterprise/vaultwarden/values.yaml b/charts/enterprise/vaultwarden/values.yaml index a0495d6e16f..2cbabc11bbd 100644 --- a/charts/enterprise/vaultwarden/values.yaml +++ b/charts/enterprise/vaultwarden/values.yaml @@ -1,7 +1,7 @@ image: repository: tccr.io/truecharts/vaultwarden pullPolicy: IfNotPresent - tag: 1.28.1@sha256:b8e2476d869797abb514848b256e9e4a8591bffac44cf6574c061ec56aea6dbd + tag: 1.29.0@sha256:df6f1c44282c46dfc276a0628000344100b41c0e4fcbdd2e904caeb24a057e71 manifestManager: enabled: true service: @@ -10,13 +10,6 @@ service: main: port: 10102 targetPort: 8080 - ws: - enabled: true - ports: - ws: - enabled: true - port: 3012 - targetPort: 3012 workload: main: @@ -73,9 +66,6 @@ vaultwarden: ## Default organization name in invitation e-mails that are not coming from a specific organization. # defaultInviteName: "" showPasswordHint: true - # Enable Websockets for notification. https://github.com/dani-garcia/bitwarden_rs/wiki/Enabling-WebSocket-notifications - # Redirect HTTP path "/notifications/hub" to port 3012. Ingress/IngressRoute controllers are automatically configured. - enableWebsockets: true # Enable Web Vault (static content). https://github.com/dani-garcia/bitwarden_rs/wiki/Disabling-or-overriding-the-Vault-interface-hosting enableWebVault: true # Restrict creation of orgs. Options are: 'all', 'none' or a comma-separated list of users.