diff --git a/chart/templates/mattermost/secret-database.yaml b/chart/templates/mattermost/secret-database.yaml
index 3f8f1afa739cba17f4c983bfaf47e17a5d57992d..c6271d55b4837ceccfcb5fee37a72a6e0047e4c4 100644
--- a/chart/templates/mattermost/secret-database.yaml
+++ b/chart/templates/mattermost/secret-database.yaml
@@ -14,6 +14,8 @@ metadata:
 stringData:
   DB_CONNECTION_CHECK_URL: "postgres://{{ .username }}:{{ .password }}@{{ .host }}:{{ .port }}/{{ .database }}?connect_timeout=10&sslmode={{ .ssl_mode | default "disable" }}"
   DB_CONNECTION_STRING: "postgres://{{ .username }}:{{ .password }}@{{ .host }}:{{ .port }}/{{ .database }}?connect_timeout=10&sslmode={{ .ssl_mode | default "disable" }}"
+  username: "{{ .username }}"
+  password: "{{ .password }}"
 {{- end }}
 {{- end }}
 {{- end }}
\ No newline at end of file
diff --git a/chart/templates/mattermost/values.yaml b/chart/templates/mattermost/values.yaml
index c6ec54529ad97f06c7eccad6aac690b6b4ed5c8d..7820710977500db8f0a77fee4b64838fe5995539 100644
--- a/chart/templates/mattermost/values.yaml
+++ b/chart/templates/mattermost/values.yaml
@@ -88,16 +88,42 @@ enterprise:
 {{- if and .username .password .host .port .database }}
 database:
   secret: "mattermost-database-secret"
+postgresql:
+  secret: "mattermost-database-secret"
 {{- else }}
 postgresql:
   image:
     pullSecrets:
       - private-registry
+  {{- if and .username .password .host .port .database }}
+  secret: "mattermost-database-secret"
+  {{- else }}
+  secret: "mattermost-dbcreds"
+  {{- end }}
   install: true
   {{- if $istioInjection }}
   primary:
     podAnnotations:
       {{ include "istioAnnotation" $ }}
+    podSecurityContext:
+      enabled: true
+      fsGroup: 1001
+      runAsUser: 1001
+      runAsGroup: 1001
+    containerSecurityContext:
+      enabled: true
+      runAsUser: 1001
+      runAsGroup: 1001
+      runAsNonRoot: true
+      capabilities:
+        drop:
+          - ALL
+    #permissions for initContainers
+    volumePermissions:
+      securityContext:
+        capabilities:
+          drop:
+            - ALL
   readReplicas:
     podAnnotations:
       {{ include "istioAnnotation" $ }}
diff --git a/chart/values.yaml b/chart/values.yaml
index a704c4526099dd256b9ad5f78b42d37149bae26a..f07a422e0dd6069df724abd9aa07c4a6f8885a5c 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -1648,11 +1648,11 @@ addons:
     git:
       repo: https://repo1.dso.mil/big-bang/product/packages/mattermost.git
       path: "./chart"
-      tag: "9.10.1-bb.1"
+      tag: "9.10.1-bb.2"
     helmRepo:
       repoName: "registry1"
       chartName: "mattermost"
-      tag: "9.10.1-bb.1"
+      tag: "9.10.1-bb.2"
 
     # -- Flux reconciliation overrides specifically for the Mattermost Package
     flux: {}