This commit is contained in:
subochev 2026-02-20 16:53:45 +03:00
parent 80c84300de
commit 8fe0815bb2
3 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: local-storage-pv
spec:
capacity:
storage: 30Gi # Размер (логический, не резервируется)
volumeMode: Filesystem
accessModes:
# - ReadWriteOnce # Для одного пода
- ReadWriteMany # Можно указать, но hostPath не гарантирует многоподовый доступ на разных нодах
persistentVolumeReclaimPolicy: Retain # При удалении PVC данные не удалять
hostPath:
path: /devx/dependencies # Папка на узле, где работает Kubernetes
type: DirectoryOrCreate # Создаст её, если нет

View File

@ -55,6 +55,9 @@ spec:
items:
- key: application.yaml
path: application.yaml
- name: dependencies-data
persistentVolumeClaim:
claimName: "{{$.Release.Name}}-{{$.Values.name}}-dependencies"
securityContext:
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
containers:
@ -69,6 +72,8 @@ spec:
volumeMounts:
- mountPath: '/opt/app/config'
name: application-properties-volume
- name: dependencies-data
mountPath: /storage
ports:
- name: http
containerPort: {{ $.Values.port }}
@ -86,7 +91,7 @@ spec:
httpGet:
path: '/actuator/health/readiness'
port: management
initialDelaySeconds: 25
initialDelaySeconds: 10
periodSeconds: 10
{{- if $.Values.resources}}
resources:

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "{{$.Release.Name}}-{{$.Values.name}}-dependencies"
spec:
accessModes:
- ReadWriteMany # Должно совпадать с PV
volumeMode: Filesystem
resources:
requests:
storage: 30Gi