pvc and pv

This commit is contained in:
Tyrel Souza 2023-07-05 18:14:40 +00:00
parent ccfc9c4dce
commit ed3d00c04b
3 changed files with 35 additions and 14 deletions

View File

@ -1,9 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: shaarli
@ -17,9 +14,6 @@ spec:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: shaarli
@ -32,15 +26,14 @@ spec:
resources: {}
volumeMounts:
- mountPath: /var/www/shaarli/data
name: shaarli-data
name: shaarli-storage
subPath: data
- mountPath: /var/www/shaarli/cache
name: shaarli-cache
name: shaarli-storage
subPath: cache
restartPolicy: Always
volumes:
- name: shaarli-data
hostPath:
path: /kubernetes-volumes/shaarli/data
- name: shaarli-cache
hostPath:
path: /kubernetes-volumes/shaarli/cache
- name: shaarli-storage
persistentVolumeClaim:
claimName: shaarli-storage-claim
status: {}

13
shaarli/shaarli-pvc.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: shaarli-storage-claim
spec:
volumeName: shaarli-storage
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: shaarli-storage
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
nfs:
server: 192.168.1.20
path: "/kubernetes-volumes/shaarli"
claimRef:
namespace: default
name: shaarli-storage-claim