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