Added scripts for adding and removing static PVs using nfs-csi

Altered values-override to use nfs-csi for static PVs
This commit is contained in:
2025-11-14 18:36:05 +08:00
parent 900b9ca1f3
commit 87db1a9aab
7 changed files with 69 additions and 5 deletions

4
create-pv.sh Executable file
View File

@@ -0,0 +1,4 @@
kubectl apply -f pv-apim-audit.yaml
kubectl apply -f pv-apim-events.yaml
kubectl apply -f pv-apim-opentraffic.yaml
kubectl apply -f pv-apim-payloads.yaml

4
delete-pv.sh Executable file
View File

@@ -0,0 +1,4 @@
kubectl delete -f pv-apim-audit.yaml
kubectl delete -f pv-apim-events.yaml
kubectl delete -f pv-apim-opentraffic.yaml
kubectl delete -f pv-apim-payloads.yaml

13
pv-apim-audit.yaml Normal file
View File

@@ -0,0 +1,13 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: apim-audit
spec:
capacity:
storage: 1Gi
nfs:
server: 192.168.0.105
path: /nfs/NFS/ocp/apim-audit
storageClassName: nfs-csi
accessModes:
- ReadWriteMany

13
pv-apim-events.yaml Normal file
View File

@@ -0,0 +1,13 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: apim-events
spec:
capacity:
storage: 1Gi
nfs:
server: 192.168.0.105
path: /nfs/NFS/ocp/apim-events
storageClassName: nfs-csi
accessModes:
- ReadWriteMany

13
pv-apim-opentraffic.yaml Normal file
View File

@@ -0,0 +1,13 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: apim-opentraffic
spec:
capacity:
storage: 8Gi
nfs:
server: 192.168.0.105
path: /nfs/NFS/ocp/apim-opentraffic
storageClassName: nfs-csi
accessModes:
- ReadWriteOnce

13
pv-apim-payloads.yaml Normal file
View File

@@ -0,0 +1,13 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: apim-payloads
spec:
capacity:
storage: 16Gi
nfs:
server: 192.168.0.105
path: /nfs/NFS/ocp/apim-payloads
storageClassName: nfs-csi
accessModes:
- ReadWriteOnce

View File

@@ -19,10 +19,12 @@ global:
- ReadWriteMany
capacity: 1Gi
volumeName: apim-events
storageClassName: nfs-csi
- name: payloads
enabled: true
usedBy:
- traffic
storageClassName: nfs-csi
accessModes:
- ReadWriteOnce
capacity: 16Gi
@@ -33,6 +35,7 @@ global:
- anm
- apimgr
- traffic
storageClassName: nfs-csi
accessModes:
- ReadWriteMany
capacity: 1Gi
@@ -71,13 +74,14 @@ global:
- traffic
- anm
- apimgr
storageClassName: nfs-csi
accessModes:
- ReadWriteOnce
capacity: 8Gi
volumeName: apim-opentraffic
initContainers:
securityContext:
runAsNonRoot: false
runAsNonRoot: true
database:
host: mysql.metrics.svc.cluster.local
metrics:
@@ -110,7 +114,7 @@ anm:
memory: "1Gi"
cpu: "250m"
securityContext:
runAsNonRoot: false
runAsNonRoot: true
route:
enabled: true
annotations:
@@ -181,7 +185,7 @@ apimgr:
memory: "0.5Gi"
cpu: 0.5
securityContext:
runAsNonRoot: false
runAsNonRoot: true
route:
enabled: true
annotations:
@@ -294,7 +298,7 @@ apitraffic:
targetCPUUtilizationPercentage: 80
replicaCount: 2
securityContext:
runAsNonRoot: false
runAsNonRoot: true
oauth:
enabled: true
type: ClusterIP
@@ -573,7 +577,7 @@ aga:
allowPrivilegeEscalation: false
#NOTE readOnlyRootFilesystem should be left to false
# readOnlyRootFilesystem: false
runAsNonRoot: false
runAsNonRoot: true
service:
type: ClusterIP
ports: