Skip to content

Commit e54c002

Browse files
Merge pull request #507 from vshn/fix/nextcloud-cronjob
Fixed affinity for nextcloud cronjob to be scheduled on the same node
2 parents c6a4cc7 + 297e160 commit e54c002

File tree

1 file changed

+27
-0
lines changed
  • pkg/comp-functions/functions/vshnnextcloud

1 file changed

+27
-0
lines changed

pkg/comp-functions/functions/vshnnextcloud/deploy.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,33 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
624624
"cronjob": map[string]any{
625625
"enabled": true,
626626
"type": "cronjob",
627+
"affinity": map[string]any{
628+
"podAffinity": map[string]any{
629+
"requiredDuringSchedulingIgnoredDuringExecution": []map[string]any{
630+
{
631+
"labelSelector": map[string]any{
632+
"matchExpressions": []map[string]any{
633+
{
634+
"key": "app.kubernetes.io/name",
635+
"operator": "In",
636+
"values": []string{
637+
"nextcloud",
638+
},
639+
},
640+
{
641+
"key": "app.kubernetes.io/component",
642+
"operator": "In",
643+
"values": []string{
644+
"app",
645+
},
646+
},
647+
},
648+
},
649+
"topologyKey": "kubernetes.io/hostname",
650+
},
651+
},
652+
},
653+
},
627654
},
628655
}
629656

0 commit comments

Comments
 (0)