Open keyolk opened 3 weeks ago
Actually the example above should work due to using different durations. If kind + schedule + duration is the same, why not just merge applications lists and have one rule? We might want to add timeZone to the key tho.
@andrii-korotkov-verkada just updated the example, we holds per app sync windows cause it is much easy to maintain sync window for the apps. if a sync window is shared from multiple apps, it would need much work to push and pull the apps from the sync windows.
I mean, what's the difference between the updated example and this?
{
"kind": "allow",
"schedule": "0 0 * * *",
"duration": "6h",
"applications": [
"one*",
"two*"
],
"timeZone": "Asia/Seoul"
}
There are wildcards used anyways.
in the case above, when the sync window of one*
should be updated, we can't just update its schedule. It is just about thinking it by application or schedule.
If you need a partial update, then you can split the configuration into multiple. But until then I think it's not necessary.
Currently, I split it with minutes. Just hope someday I can remove the minute parts later. If the # of applications goes thousands and more it would make more contention. Yes, we can split it again with updating duration as well, but would better make people think in simple way.
We can add an additional optional field like name
and use it as a part of a key, but that'd increase the complexity and I'm not sure it's worth it - you'd have to specify a lot of extra fields.
I see, but hope to have the optional field. I think it is not that huge change.
Checklist:
argocd version
.Describe the bug
Currently, it does not allow having multiple sync windows which have same kind+schedule+duration combination Let's say I want to have sync windows like the below
It would stuck at project validation step at https://github.com/argoproj/argo-cd/blob/master/pkg/apis/application/v1alpha1/app_project_types.go#L261
We can mitigate this by just splits it by minutes, but hope it been resolved to make it simple to manage.
To Reproduce
Just create multiple sync windows having the same kind+schedule+duration
Expected behavior
Allow to have multiple time duplicated sync windows
Version