1
0
Fork 0

longhorn: Run on dedicated nodes

I've created new worker nodes that are dedicated to running Longhorn
replicas.  These nodes are tainted with the
`node-role.kubernetes.io/longhorn` taint, so no regular pods will be
scheduled there by default.  Longhorn pods thus needs to be configured
to tolerate that taint, and to be scheduled on nodes with the
similarly-named label.
pull/37/head
Dustin 2024-11-21 22:50:07 -06:00
parent d6c83565ec
commit 0a6086eb2a
2 changed files with 36 additions and 3 deletions

View File

@ -3,4 +3,4 @@ kind: Setting
metadata: metadata:
name: taint-toleration name: taint-toleration
namespace: longhorn-system namespace: longhorn-system
value: du5t1n.me/machine=raspberrypi:NoExecute value: du5t1n.me/machine=raspberrypi:NoExecute;node-role.kubernetes.io/longhorn:NoSchedule

View File

@ -63,7 +63,7 @@ data:
reclaimPolicy: "Delete" reclaimPolicy: "Delete"
volumeBindingMode: Immediate volumeBindingMode: Immediate
parameters: parameters:
numberOfReplicas: "3" numberOfReplicas: "2"
staleReplicaTimeout: "30" staleReplicaTimeout: "30"
fromBackup: "" fromBackup: ""
fsType: "ext4" fsType: "ext4"
@ -3877,6 +3877,9 @@ spec:
- key: du5t1n.me/machine - key: du5t1n.me/machine
operator: Exists operator: Exists
effect: NoExecute effect: NoExecute
- key: node-role.kubernetes.io/longhorn
operator: Exists
effect: NoSchedule
initContainers: initContainers:
- name: wait-longhorn-admission-webhook - name: wait-longhorn-admission-webhook
image: longhornio/longhorn-manager:v1.4.1 image: longhornio/longhorn-manager:v1.4.1
@ -4017,9 +4020,15 @@ spec:
value: "longhornio/csi-snapshotter:v5.0.1" value: "longhornio/csi-snapshotter:v5.0.1"
- name: CSI_LIVENESS_PROBE_IMAGE - name: CSI_LIVENESS_PROBE_IMAGE
value: "longhornio/livenessprobe:v2.8.0" value: "longhornio/livenessprobe:v2.8.0"
nodeSelector:
node-role.kubernetes.io/longhorn: ''
serviceAccountName: longhorn-service-account serviceAccountName: longhorn-service-account
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
tolerations:
- key: node-role.kubernetes.io/longhorn
operator: Exists
effect: NoSchedule
--- ---
# Source: longhorn/templates/deployment-recovery-backend.yaml # Source: longhorn/templates/deployment-recovery-backend.yaml
apiVersion: apps/v1 apiVersion: apps/v1
@ -4085,7 +4094,13 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: spec.nodeName fieldPath: spec.nodeName
nodeSelector:
node-role.kubernetes.io/longhorn: ''
serviceAccountName: longhorn-service-account serviceAccountName: longhorn-service-account
tolerations:
- key: node-role.kubernetes.io/longhorn
operator: Exists
effect: NoSchedule
--- ---
# Source: longhorn/templates/deployment-ui.yaml # Source: longhorn/templates/deployment-ui.yaml
apiVersion: apps/v1 apiVersion: apps/v1
@ -4099,7 +4114,7 @@ metadata:
name: longhorn-ui name: longhorn-ui
namespace: longhorn-system namespace: longhorn-system
spec: spec:
replicas: 1 replicas: 2
selector: selector:
matchLabels: matchLabels:
app: longhorn-ui app: longhorn-ui
@ -4142,6 +4157,12 @@ spec:
value: "http://longhorn-backend:9500" value: "http://longhorn-backend:9500"
- name: LONGHORN_UI_PORT - name: LONGHORN_UI_PORT
value: "8000" value: "8000"
nodeSelector:
node-role.kubernetes.io/longhorn: ''
tolerations:
- key: node-role.kubernetes.io/longhorn
operator: Exists
effect: NoSchedule
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: nginx-cache name: nginx-cache
@ -4208,7 +4229,13 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
nodeSelector:
node-role.kubernetes.io/longhorn: ''
serviceAccountName: longhorn-service-account serviceAccountName: longhorn-service-account
tolerations:
- key: node-role.kubernetes.io/longhorn
operator: Exists
effect: NoSchedule
--- ---
# Source: longhorn/templates/deployment-webhook.yaml # Source: longhorn/templates/deployment-webhook.yaml
apiVersion: apps/v1 apiVersion: apps/v1
@ -4279,7 +4306,13 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: spec.nodeName fieldPath: spec.nodeName
nodeSelector:
node-role.kubernetes.io/longhorn: ''
serviceAccountName: longhorn-service-account serviceAccountName: longhorn-service-account
tolerations:
- key: node-role.kubernetes.io/longhorn
operator: Exists
effect: NoSchedule
--- ---
# Source: longhorn/templates/validate-psp-install.yaml # Source: longhorn/templates/validate-psp-install.yaml
# #