Skip to content

Commit

Permalink
Add external hostname for sql server
Browse files Browse the repository at this point in the history
Adds ability to point chart at a MSSQL Server that is either externally hosted
or hosted in a separate namespace.

Fixes mcfedr#12
  • Loading branch information
estenrye committed Feb 17, 2022
1 parent 9567416 commit 6220be8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/bitwarden/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: bitwarden
version: 0.1.0
version: 0.1.3
3 changes: 2 additions & 1 deletion charts/bitwarden/templates/mssql/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- if or .Values.mssql.enabled .Values.attachments.enabled .Values.api.enabled .Values.admin.enabled .Values.identity.enabled .Values.notifications.enabled }}
{{ $fullName := include "bitwarden.fullname" . }}
{{ $connectionString := (printf "\"Data Source=tcp:%s-mssql,1433;Initial Catalog=vault;Persist Security Info=False;User ID=sa;Password=%s;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=True\"" $fullName .Values.mssql.saPassword) }}
{{ $serviceName := printf "%s-mssql" (include "bitwarden.fullname" .) }}
{{ $connectionString := (printf "\"Data Source=tcp:%s,1433;Initial Catalog=vault;Persist Security Info=False;User ID=sa;Password=%s;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=True\"" (.Values.mssql.externalHostname | default $serviceName ) .Values.mssql.saPassword) }}
apiVersion: v1
kind: Secret
metadata:
Expand Down

0 comments on commit 6220be8

Please sign in to comment.