init
This commit is contained in:
parent
80c84300de
commit
8fe0815bb2
15
devspc/PersistentVolume.yaml
Normal file
15
devspc/PersistentVolume.yaml
Normal 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 # Создаст её, если нет
|
||||
@ -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:
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user