Merge pull request #135 from andyzhangx/fast-format
fix: make disk format faster in local volume example
This commit is contained in:
Коммит
7a46980384
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
name: deployment-localdisk
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
name: deployment-localdisk
|
||||
spec:
|
||||
containers:
|
||||
- name: deployment-localdisk
|
||||
image: nginx
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
- while true; do echo $(date) >> /mnt/localdisk/outfile; sleep 1; done
|
||||
volumeMounts:
|
||||
- name: localdisk
|
||||
mountPath: "/mnt/localdisk"
|
||||
volumes:
|
||||
- name: localdisk
|
||||
ephemeral:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: local-disk
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 0
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
|
@ -11,8 +11,7 @@ data:
|
|||
hostDir: /dev
|
||||
mountDir: /dev
|
||||
blockCleanerCommand:
|
||||
- "/scripts/shred.sh"
|
||||
- "2"
|
||||
- "/scripts/quick_reset.sh"
|
||||
volumeMode: Filesystem
|
||||
fsType: ext4
|
||||
namePattern: nvme*
|
||||
|
|
|
@ -11,8 +11,7 @@ data:
|
|||
hostDir: /dev/disk/cloud/
|
||||
mountDir: /dev/disk/cloud/
|
||||
blockCleanerCommand:
|
||||
- "/scripts/shred.sh"
|
||||
- "2"
|
||||
- "/scripts/quick_reset.sh"
|
||||
volumeMode: Filesystem
|
||||
fsType: ext4
|
||||
namePattern: azure_resource-part1
|
||||
|
|
Загрузка…
Ссылка в новой задаче