Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

merged gateway PVCs into one

x03220550aba6583db9
diff --git a/helm-charts/infisical-gateway/templates/deployment.yaml b/helm-charts/infisical-gateway/templates/deployment.yaml
index f08446a548..382a444bc8 100644
--- a/helm-charts/infisical-gateway/templates/deployment.yaml
+++ b/helm-charts/infisical-gateway/templates/deployment.yaml
@@ -45,39 +45,20 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- {{- if .Values.gateway.enrollment.method }}
- - name: gateway-credentials
- {{- if .Values.persistence.enabled }}
+ {{- if .Values.persistence.enabled }}
+ - name: gateway-data
persistentVolumeClaim:
- 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-credentials
emptyDir: {}
- {{- end }}
+ {{- end }}
- name: infisical-cache
emptyDir: {}
{{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}
- {{- if or .Values.persistence.enabled (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}
+ {{- if and (not .Values.persistence.enabled) (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}
- name: session-recordings
- {{- if .Values.persistence.enabled }}
- persistentVolumeClaim:
- claimName: {{ .Values.persistence.sessionRecording.existingClaim | default (printf "%s-session-recordings" (include "infisical-gateway.fullname" .)) }}
- {{- else }}
- emptyDir: {}
- {{- end }}
- {{- end }}
- {{- else }}
- - name: infisical-gateway-cached-relay-data
- emptyDir: {}
- {{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}
- {{- if or .Values.persistence.enabled (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}
- - name: infisical-gateway-session-recordings-data
- {{- if .Values.persistence.enabled }}
- persistentVolumeClaim:
- claimName: {{ .Values.persistence.sessionRecording.existingClaim | default (printf "%s-session-recordings" (include "infisical-gateway.fullname" .)) }}
- {{- else }}
emptyDir: {}
- {{- end }}
- {{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
@@ -120,12 +101,22 @@ spec:
{{- end }}
- --pam-session-recording-path={{ .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}
volumeMounts:
+ {{- if .Values.persistence.enabled }}
+ - name: gateway-data
+ mountPath: /home/infisical
+ subPath: credentials
+ {{- else }}
- name: gateway-credentials
mountPath: /home/infisical
+ {{- end }}
- name: infisical-cache
mountPath: /var/lib/infisical
{{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}
- {{- if or .Values.persistence.enabled (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}
+ {{- if .Values.persistence.enabled }}
+ - name: gateway-data
+ mountPath: {{ $sessionPath }}
+ subPath: session-recordings
+ {{- else if not (hasPrefix "/var/lib/infisical" $sessionPath) }}
- name: session-recordings
mountPath: {{ $sessionPath }}
{{- end }}
@@ -142,11 +133,15 @@ spec:
containerPort: {{ .Values.service.port }}
protocol: TCP
volumeMounts:
- - name: infisical-gateway-cached-relay-data
+ - name: infisical-cache
mountPath: /var/lib/infisical
{{- $sessionPath := .Values.gateway.pamSessionRecordingsDirectory | default "/var/lib/infisical/session_recordings" }}
- {{- if or .Values.persistence.enabled (not (hasPrefix "/var/lib/infisical" $sessionPath)) }}
- - name: infisical-gateway-session-recordings-data
+ {{- if .Values.persistence.enabled }}
+ - name: gateway-data
+ mountPath: {{ $sessionPath }}
+ subPath: session-recordings
+ {{- else if not (hasPrefix "/var/lib/infisical" $sessionPath) }}
+ - name: session-recordings
mountPath: {{ $sessionPath }}
{{- end }}
{{- end }}
diff --git a/helm-charts/infisical-gateway/templates/pvc.yaml b/helm-charts/infisical-gateway/templates/pvc.yaml
index b817b6c2e8..4c781ac5ee 100644
--- a/helm-charts/infisical-gateway/templates/pvc.yaml
+++ b/helm-charts/infisical-gateway/templates/pvc.yaml
@@ -1,8 +1,8 @@
-{{- if and .Values.gateway.enrollment.method .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
- name: {{ include "infisical-gateway.fullname" . }}-credentials
+ name: {{ include "infisical-gateway.fullname" . }}-data
labels:
{{- include "infisical-gateway.labels" . | nindent 4 }}
spec:
@@ -15,21 +15,3 @@ spec:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- end }}
----
-{{- if and .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.yaml
index d59e43a70e..ecb1c99d5b 100644
--- a/helm-charts/infisical-gateway/values.yaml
+++ b/helm-charts/infisical-gateway/values.yaml
@@ -51,17 +51,10 @@ gateway:
persistence:
enabled: true
storageClass: ""
- size: 100Mi
+ size: 50Gi
accessModes:
- ReadWriteOnce
existingClaim: ""
- # Storage settings for PAM session recordings.
- sessionRecording:
- size: 50Gi
- storageClass: ""
- accessModes:
- - ReadWriteOnce
- existingClaim: ""
resources:
limits: