scheduling: keep apps off longhorn storage nodes

This commit is contained in:
jenkins 2026-05-22 13:38:29 -03:00
parent f383818f93
commit 155d7d020e
11 changed files with 75 additions and 4 deletions

View File

@ -43,6 +43,11 @@ spec:
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -18,6 +18,13 @@ spec:
nodeSelector: nodeSelector:
kubernetes.io/arch: arm64 kubernetes.io/arch: arm64
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: longhorn-host
operator: DoesNotExist
imagePullSecrets: imagePullSecrets:
- name: harbor-regcred - name: harbor-regcred
containers: containers:

View File

@ -64,6 +64,11 @@ spec:
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -53,6 +53,8 @@ spec:
- key: kubernetes.io/arch - key: kubernetes.io/arch
operator: In operator: In
values: ["amd64","arm64"] values: ["amd64","arm64"]
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -53,6 +53,11 @@ spec:
spec: spec:
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -351,6 +351,14 @@ spec:
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: NotIn
values: ["titan-13", "titan-15", "titan-17", "titan-19"]
serviceAccountName: mailu-vault-sync serviceAccountName: mailu-vault-sync
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
@ -427,7 +435,7 @@ spec:
- matchExpressions: - matchExpressions:
- key: kubernetes.io/hostname - key: kubernetes.io/hostname
operator: NotIn operator: NotIn
values: ["titan-14"] values: ["titan-13", "titan-15", "titan-17", "titan-19"]
serviceAccountName: mailu-vault-sync serviceAccountName: mailu-vault-sync
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
@ -499,6 +507,14 @@ spec:
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: NotIn
values: ["titan-13", "titan-15", "titan-17", "titan-19"]
serviceAccountName: mailu-vault-sync serviceAccountName: mailu-vault-sync
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
@ -568,6 +584,14 @@ spec:
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: NotIn
values: ["titan-13", "titan-15", "titan-17", "titan-19"]
serviceAccountName: mailu-vault-sync serviceAccountName: mailu-vault-sync
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
@ -637,6 +661,14 @@ spec:
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: NotIn
values: ["titan-13", "titan-15", "titan-17", "titan-19"]
serviceAccountName: mailu-vault-sync serviceAccountName: mailu-vault-sync
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
@ -713,7 +745,7 @@ spec:
- matchExpressions: - matchExpressions:
- key: kubernetes.io/hostname - key: kubernetes.io/hostname
operator: NotIn operator: NotIn
values: ["titan-14"] values: ["titan-13", "titan-15", "titan-17", "titan-19"]
serviceAccountName: mailu-vault-sync serviceAccountName: mailu-vault-sync
automountServiceAccountToken: true automountServiceAccountToken: true
containers: containers:
@ -787,7 +819,7 @@ spec:
- matchExpressions: - matchExpressions:
- key: kubernetes.io/hostname - key: kubernetes.io/hostname
operator: NotIn operator: NotIn
values: ["titan-14"] values: ["titan-13", "titan-15", "titan-17", "titan-19"]
- target: - target:
kind: Deployment kind: Deployment
name: mailu-tika name: mailu-tika
@ -806,7 +838,7 @@ spec:
- matchExpressions: - matchExpressions:
- key: kubernetes.io/hostname - key: kubernetes.io/hostname
operator: NotIn operator: NotIn
values: ["titan-14"] values: ["titan-13", "titan-15", "titan-17", "titan-19"]
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -18,6 +18,13 @@ spec:
spec: spec:
nodeSelector: nodeSelector:
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: longhorn-host
operator: DoesNotExist
serviceAccountName: maintenance-vault-sync serviceAccountName: maintenance-vault-sync
containers: containers:
- name: sync - name: sync

View File

@ -54,6 +54,8 @@ spec:
- key: kubernetes.io/arch - key: kubernetes.io/arch
operator: In operator: In
values: ["arm64"] values: ["arm64"]
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -88,6 +88,8 @@ spec:
- key: hardware - key: hardware
operator: In operator: In
values: ["rpi4", "rpi5"] values: ["rpi4", "rpi5"]
- key: longhorn-host
operator: DoesNotExist
containers: containers:
- name: outline - name: outline
image: outlinewiki/outline:1.2.0 image: outlinewiki/outline:1.2.0

View File

@ -61,6 +61,8 @@ spec:
operator: DoesNotExist operator: DoesNotExist
- key: node-role.kubernetes.io/master - key: node-role.kubernetes.io/master
operator: DoesNotExist operator: DoesNotExist
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference:

View File

@ -49,6 +49,8 @@ spec:
operator: DoesNotExist operator: DoesNotExist
- key: node-role.kubernetes.io/master - key: node-role.kubernetes.io/master
operator: DoesNotExist operator: DoesNotExist
- key: longhorn-host
operator: DoesNotExist
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
preference: preference: