我无法限制kuberntes中HOST路径上的PV量。
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "go-log.fullname" . }}
namespace: {{ default "test" .Values.namespace }}
spec:
storageClassName: v1
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Mi
apiVersion: v1
kind: LimitRange
metadata:
name: {{ include "go-log.fullname" . }}
namespace: {{ default "test" .Values.namespace }}
spec:
limits:
- type: PersistentVolumeClaim
max:
storage: 100Mi
min:
storage: 20Mi
kind: PersistentVolume
apiVersion: v1
metadata:
name: {{ include "go-log.fullname" . }}
namespace: {{ default "test" .Values.namespace }}
labels:
type: local
spec:
storageClassName: v1
persistentVolumeReclaimPolicy: Recycle
capacity:
storage: 50Mi
accessModes:
- ReadWriteOnce
hostPath:
path: {{ default "/home/app_data" .Values.go_pv.path }}
但是我需要在Runtime Like期间限制pv(如果POD超过一定限制或在HOSTPATH中存储在PV或PVC中,则POD应该Evit
我已经编写了go-application,它将写入日志文件以挂载dir / home / app_data。我无法在运行时控制kubernetes中的卷存储