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
pivot back to single PVC yet again
x032205c904db84ca60
diff --git a/helm-charts/infisical-gateway/templates/deployment.yaml b/helm-charts/infisical-gateway/templates/deployment.yamlindex 1201799e89..6f615c5fa9 100644--- a/helm-charts/infisical-gateway/templates/deployment.yaml+++ b/helm-charts/infisical-gateway/templates/deployment.yaml@@ -1,6 +1,5 @@{{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}-{{- $persistCredentials := and .Values.persistence.enabled .Values.gateway.enrollment.method }}-{{- $persistSessionRecordings := and .Values.persistence.enabled (or .Values.gateway.enrollment.method .Values.persistence.sessionRecording.existingClaim) }}+{{- $usePVC := and .Values.persistence.enabled (or .Values.gateway.enrollment.method .Values.persistence.existingClaim) }}{{- 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." }}@@ -19,7 +18,7 @@ spec:{{- if .Values.gateway.enrollment.method }}replicas: 1{{- end }}- {{- if or $persistCredentials $persistSessionRecordings }}+ {{- if $usePVC }}strategy:type: Recreate{{- end }}@@ -48,22 +47,17 @@ spec:{{- toYaml . | nindent 8 }}{{- end }}volumes:- {{- if .Values.gateway.enrollment.method }}- - name: gateway-credentials- {{- if $persistCredentials }}+ {{- if $usePVC }}+ - name: gateway-datapersistentVolumeClaim:- claimName: {{ .Values.persistence.existingClaim | default (printf "%s-credentials" (include "infisical-gateway.fullname" .)) }}- {{- else }}+ claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" (include "infisical-gateway.fullname" .)) }}+ {{- else if .Values.gateway.enrollment.method }}+ - name: gateway-credentialsemptyDir: {}- {{- end }}{{- end }}- name: infisical-cacheemptyDir: {}- {{- if $persistSessionRecordings }}- - name: session-recordings- persistentVolumeClaim:- claimName: {{ .Values.persistence.sessionRecording.existingClaim | default (printf "%s-session-recordings" (include "infisical-gateway.fullname" .)) }}- {{- else if not (hasPrefix "/var/lib/infisical" $sessionPath) }}+ {{- if and (not $usePVC) (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}- name: session-recordingsemptyDir: {}{{- end }}@@ -108,11 +102,21 @@ spec:{{- end }}- --pam-session-recording-path={{ $sessionPath }}volumeMounts:+ {{- if $usePVC }}+ - name: gateway-data+ mountPath: /home/infisical+ subPath: credentials+ {{- else }}- name: gateway-credentialsmountPath: /home/infisical+ {{- end }}- name: infisical-cachemountPath: /var/lib/infisical- {{- if or $persistSessionRecordings (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}+ {{- if $usePVC }}+ - name: gateway-data+ mountPath: {{ $sessionPath }}+ subPath: session-recordings+ {{- else if not (hasPrefix "/var/lib/infisical" $sessionPath) }}- name: session-recordingsmountPath: {{ $sessionPath }}{{- end }}@@ -131,7 +135,11 @@ spec:volumeMounts:- name: infisical-cachemountPath: /var/lib/infisical- {{- if or $persistSessionRecordings (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}+ {{- if $usePVC }}+ - name: gateway-data+ mountPath: {{ $sessionPath }}+ subPath: session-recordings+ {{- else if not (hasPrefix "/var/lib/infisical" $sessionPath) }}- name: session-recordingsmountPath: {{ $sessionPath }}{{- end }}diff --git a/helm-charts/infisical-gateway/templates/pvc.yaml b/helm-charts/infisical-gateway/templates/pvc.yamlindex 3eb1d86b37..01beff8c55 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" . }}-credentials+ name: {{ include "infisical-gateway.fullname" . }}-datalabels:{{- include "infisical-gateway.labels" . | nindent 4 }}spec:@@ -15,21 +15,3 @@ spec:requests:storage: {{ .Values.persistence.size | quote }}{{- end }}-----{{- if and .Values.gateway.enrollment.method .Values.persistence.enabled (not .Values.persistence.sessionRecording.existingClaim) }}-apiVersion: v1-kind: PersistentVolumeClaim-metadata:- name: {{ include "infisical-gateway.fullname" . }}-session-recordings- labels:- {{- include "infisical-gateway.labels" . | nindent 4 }}-spec:- accessModes:- {{- toYaml .Values.persistence.sessionRecording.accessModes | nindent 4 }}- {{- if .Values.persistence.sessionRecording.storageClass }}- storageClassName: {{ .Values.persistence.sessionRecording.storageClass | quote }}- {{- end }}- resources:- requests:- storage: {{ .Values.persistence.sessionRecording.size | quote }}-{{- end }}diff --git a/helm-charts/infisical-gateway/values.yaml b/helm-charts/infisical-gateway/values.yamlindex fc776fe67f..3515f71d1d 100644--- a/helm-charts/infisical-gateway/values.yaml+++ b/helm-charts/infisical-gateway/values.yaml@@ -44,25 +44,18 @@ gateway:pamSessionRecordingsDirectory: /var/lib/infisical/session_recordings-# Persistent storage for the gateway.-# Controls both credential storage (enrollment flow) and session recordings.+# Persistent storage for the gateway (credentials and session recordings).# Required when enrollment.method=token so credentials survive pod restarts.# Optional when enrollment.method=aws since it re-authenticates via STS on every start.# For legacy machine-identity installs (no enrollment.method), persistence only takes effect-# for session recordings when sessionRecording.existingClaim is provided.+# when existingClaim is provided.persistence:enabled: truestorageClass: ""- size: 100Mi+ size: 5GiaccessModes:- ReadWriteOnceexistingClaim: ""- sessionRecording:- size: 5Gi- storageClass: ""- accessModes:- - ReadWriteOnce- existingClaim: ""resources:limits: