Add quicker failover for nfs
Add tolerations so that nfs provisioner pod gets evicted from a failing node after 60 second + 30 grace period (relevant for va recovery policy). Add liveness + readyness probe, so that no traffic gets routed to a failed nfs server. Disable device based fsids (major:minor) since our block device mapping can change from node to node, which makes the id's unstable. Signed-off-by: Joshua Moody <joshua.moody@rancher.com>
This commit is contained in:
parent
51d693b42d
commit
8969d829f2
@ -102,6 +102,7 @@ spec:
|
|||||||
- SYS_RESOURCE
|
- SYS_RESOURCE
|
||||||
args:
|
args:
|
||||||
- "-provisioner=nfs.longhorn.io"
|
- "-provisioner=nfs.longhorn.io"
|
||||||
|
- "-device-based-fsids=false"
|
||||||
env:
|
env:
|
||||||
- name: POD_IP
|
- name: POD_IP
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@ -114,6 +115,20 @@ spec:
|
|||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- ls
|
||||||
|
- /export
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- ls
|
||||||
|
- /export
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: export-volume
|
- name: export-volume
|
||||||
mountPath: /export
|
mountPath: /export
|
||||||
@ -121,6 +136,17 @@ spec:
|
|||||||
- name: export-volume
|
- name: export-volume
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: longhorn-nfs-provisioner
|
claimName: longhorn-nfs-provisioner
|
||||||
|
# we want really quick failover
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
tolerations:
|
||||||
|
- effect: NoExecute
|
||||||
|
key: node.kubernetes.io/not-ready
|
||||||
|
operator: Exists
|
||||||
|
tolerationSeconds: 60
|
||||||
|
- effect: NoExecute
|
||||||
|
key: node.kubernetes.io/unreachable
|
||||||
|
operator: Exists
|
||||||
|
tolerationSeconds: 60
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@ -139,5 +165,5 @@ kind: StorageClass
|
|||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs # workload storage class
|
name: longhorn-nfs # workload storage class
|
||||||
provisioner: nfs.longhorn.io
|
provisioner: nfs.longhorn.io
|
||||||
parameters:
|
mountOptions:
|
||||||
mountOptions: "vers=4.1"
|
- "vers=4.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user