Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
review fixes
x03220517c46ed08ff6
diff --git a/helm-charts/infisical-gateway/templates/deployment.yaml b/helm-charts/infisical-gateway/templates/deployment.yamlindex f9409d987e..7e8f50afe8 100644--- a/helm-charts/infisical-gateway/templates/deployment.yaml+++ b/helm-charts/infisical-gateway/templates/deployment.yaml@@ -1,3 +1,5 @@+{{- $usePVC := and .Values.persistence.enabled (or .Values.gateway.enrollment.method .Values.persistence.existingClaim) }}+{{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}{{- if eq .Values.gateway.enrollment.method "token" }}{{- if not .Values.persistence.enabled }}{{- fail "persistence.enabled must be true when gateway.enrollment.method is 'token'. The enrollment token is single-use and credentials must persist across pod restarts." }}@@ -16,7 +18,7 @@ spec:{{- if .Values.gateway.enrollment.method }}replicas: 1{{- end }}- {{- if .Values.persistence.enabled }}+ {{- if $usePVC }}strategy:type: Recreate{{- end }}@@ -45,18 +47,17 @@ spec:{{- toYaml . | nindent 8 }}{{- end }}volumes:- {{- if .Values.persistence.enabled }}+ {{- if $usePVC }}- name: gateway-datapersistentVolumeClaim:- claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" (include "infisical-gateway.fullname" .)) }}+ claimName: {{ .Values.persistence.existingClaim | default (printf "%s-credentials" (include "infisical-gateway.fullname" .)) }}{{- else if .Values.gateway.enrollment.method }}- name: gateway-credentialsemptyDir: {}{{- end }}- name: infisical-cacheemptyDir: {}- {{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}- {{- if and (not .Values.persistence.enabled) (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}+ {{- if and (not $usePVC) (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}- name: session-recordingsemptyDir: {}{{- end }}@@ -101,7 +102,7 @@ spec:{{- end }}- --pam-session-recording-path={{ .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}volumeMounts:- {{- if .Values.persistence.enabled }}+ {{- if $usePVC }}- name: gateway-datamountPath: /home/infisicalsubPath: credentials@@ -111,8 +112,7 @@ spec:{{- end }}- name: infisical-cachemountPath: /var/lib/infisical- {{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}- {{- if .Values.persistence.enabled }}+ {{- if $usePVC }}- name: gateway-datamountPath: {{ $sessionPath }}subPath: session-recordings@@ -135,8 +135,7 @@ spec:volumeMounts:- name: infisical-cachemountPath: /var/lib/infisical- {{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}- {{- if .Values.persistence.enabled }}+ {{- if $usePVC }}- name: gateway-datamountPath: {{ $sessionPath }}subPath: session-recordingsdiff --git a/helm-charts/infisical-gateway/templates/pvc.yaml b/helm-charts/infisical-gateway/templates/pvc.yamlindex 01beff8c55..a425354b83 100644--- a/helm-charts/infisical-gateway/templates/pvc.yaml+++ b/helm-charts/infisical-gateway/templates/pvc.yaml@@ -2,7 +2,7 @@apiVersion: v1kind: PersistentVolumeClaimmetadata:- name: {{ include "infisical-gateway.fullname" . }}-data+ name: {{ include "infisical-gateway.fullname" . }}-credentialslabels:{{- include "infisical-gateway.labels" . | nindent 4 }}spec: