ensure nextcloud cronjobs are scheduled on the same node as the running pod

This commit is contained in:
2023-10-09 16:07:37 -04:00
parent b16f948571
commit 35ec3d94f9

View File

@@ -10,6 +10,21 @@ spec:
spec:
template:
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- nextcloud
# This is the selector for the node
# So when you find a valid node - schedule the pod to the
# node that matches hostname
# needed for iscsi mounts
topologyKey: kubernetes.io/hostname
securityContext:
runAsUser: 33
runAsGroup: 33