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