-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Description:
There is a conflict in the open-webui-10.2.0.tgz Helm chart between the websocket.url value and the custom environment variable WEBSOCKET_REDIS_URL, which contains a secret and cannot be committed to the repository. The WEBSOCKET_REDIS_URL is sourced from a secret (valueFrom.secretKeyRef).
Explanation:
The issue arises in the following section of the Helm chart:
{{- if .Values.websocket.enabled }}
- name: "ENABLE_WEBSOCKET_SUPPORT"
value: "True"
- name: "WEBSOCKET_MANAGER"
value: {{ .Values.websocket.manager | default "redis" | quote }}
- name: "WEBSOCKET_REDIS_URL"
value: {{ .Values.websocket.url | quote }}
{{- end }}
The WEBSOCKET_REDIS_URL environment variable is hardcoded to use the websocket.url value, which does not allow for the use of secrets. This is problematic because WEBSOCKET_REDIS_URL should be able to pull its value from a secret, similar to how other sensitive environment variables are handled in the chart.
Proposal:
To resolve this issue, we should conditionally include either the websocket.url value or the WEBSOCKET_REDIS_URL environment variable from a secret. This approach ensures that the secret is properly managed and not exposed in the Helm values file.
Here's the proposed change:
{{- if .Values.websocket.enabled }}
- name: "ENABLE_WEBSOCKET_SUPPORT"
value: "True"
- name: "WEBSOCKET_MANAGER"
value: {{ .Values.websocket.manager | default "redis" | quote }}
{{- if .Values.websocket.url }}
- name: "WEBSOCKET_REDIS_URL"
value: {{ .Values.websocket.url | quote }}
{{- else }}
- name: "WEBSOCKET_REDIS_URL"
valueFrom:
secretKeyRef:
name: {{ .Values.websocket.existingSecret | default "websocket-secret" | quote }}
key: {{ .Values.websocket.secretKey | default "redis-url" | quote }}
{{- end }}
{{- end }}
This change will allow users to either specify the websocket.url directly in the values file or use a secret, providing flexibility and better security management.
Please review the proposed changes and let me know if you need any further adjustments or additional information.