netbox pvc
This commit is contained in:
@@ -4,3 +4,5 @@ kind: Kustomization
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- main.yaml
|
- main.yaml
|
||||||
|
- pv.yaml
|
||||||
|
- pvc.yaml
|
||||||
|
|||||||
@@ -294,25 +294,6 @@ spec:
|
|||||||
sessionAffinity: None
|
sessionAffinity: None
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/instance: netbox
|
|
||||||
app.kubernetes.io/managed-by: Helm
|
|
||||||
app.kubernetes.io/name: netbox
|
|
||||||
app.kubernetes.io/version: v4.4.5
|
|
||||||
helm.sh/chart: netbox-7.2.1
|
|
||||||
name: netbox-media
|
|
||||||
namespace: netbox
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
storageClassName: openebs-3-replicas
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -442,7 +423,7 @@ spec:
|
|||||||
name: netbox-tmp
|
name: netbox-tmp
|
||||||
- mountPath: /opt/netbox/netbox/media
|
- mountPath: /opt/netbox/netbox/media
|
||||||
name: media
|
name: media
|
||||||
subPath: ""
|
subPath: media
|
||||||
- mountPath: /opt/unit
|
- mountPath: /opt/unit
|
||||||
name: optunit
|
name: optunit
|
||||||
- mountPath: /run/secrets/superuser_password
|
- mountPath: /run/secrets/superuser_password
|
||||||
@@ -622,7 +603,7 @@ spec:
|
|||||||
- mountPath: /opt/netbox/netbox/media
|
- mountPath: /opt/netbox/netbox/media
|
||||||
name: media
|
name: media
|
||||||
readOnly: false
|
readOnly: false
|
||||||
subPath: ""
|
subPath: media
|
||||||
initContainers:
|
initContainers:
|
||||||
- args:
|
- args:
|
||||||
- rollout
|
- rollout
|
||||||
@@ -794,7 +775,7 @@ spec:
|
|||||||
- mountPath: /opt/netbox/netbox/media
|
- mountPath: /opt/netbox/netbox/media
|
||||||
name: media
|
name: media
|
||||||
readOnly: false
|
readOnly: false
|
||||||
subPath: ""
|
subPath: media
|
||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
|
|||||||
17
netbox/pv.yaml
Normal file
17
netbox/pv.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: nfs-netbox-media
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-storage
|
||||||
|
capacity:
|
||||||
|
storage: 1Gi # Beachte: NFS ist dynamisch, die Größe ist nur ein Label
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany # Mehrere Pods können es gleichzeitig nutzen
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
nfs:
|
||||||
|
path: /mnt/volume1/container/netbox # Der Pfad der NFS-Freigabe auf der NAS
|
||||||
|
server: 192.168.10.1 # Die IP-Adresse deiner NAS
|
||||||
|
mountOptions:
|
||||||
|
- nfsvers=4 # Passe ggf. an (nfsvers=3 falls nötig)
|
||||||
14
netbox/pvc.yaml
Normal file
14
netbox/pvc.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: netbox-media
|
||||||
|
namespace: netbox
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
storageClassName: nfs-storage
|
||||||
|
volumeName: nfs-netbox-media
|
||||||
@@ -561,10 +561,10 @@ persistence:
|
|||||||
## GKE, AWS & OpenStack)
|
## GKE, AWS & OpenStack)
|
||||||
##
|
##
|
||||||
storageClass: ""
|
storageClass: ""
|
||||||
subPath: ""
|
subPath: "media"
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 1Gi
|
size: 1Gi
|
||||||
existingClaim: ""
|
existingClaim: "netbox-media"
|
||||||
annotations: {}
|
annotations: {}
|
||||||
## Enable reports persistence using Persistent Volume Claims
|
## Enable reports persistence using Persistent Volume Claims
|
||||||
## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
|
## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
|
||||||
|
|||||||
Reference in New Issue
Block a user