argoproj-labs / argocd-agent

Redefining the multi cluster story of Argo CD
Apache License 2.0
73 stars 14 forks source link

Add default destination server override in spoke Application with option to disable #207

Open mikeshng opened 3 weeks ago

mikeshng commented 3 weeks ago

Currently, when an Argo CD Application is created on a spoke cluster, there is no default behavior for setting the destination.server field to https://kubernetes.default.svc.

I propose adding a default behavior where the destination.server is automatically set to https://kubernetes.default.svc.

Additionally, an option should be provided to disable this defaulting behavior to enable more flexible deployment scenarios. Such as the fan-out model.

Reason: The pull model is primarily designed for spoke clusters to reconcile their own state and perform in-cluster processing independently. When the destination.server is not explicitly set to the https://kubernetes.default.svc, it introduces the possibility of users picking any destinations. This can lead to inconsistencies and management complexity.

However, for experts and complex scenarios, this option should still be available. So a configuration should be provided to disable the default behavior (or enable the fan-out mode) as needed.

mikeshng commented 3 weeks ago

/assign @mikeshng

@jannfis if you agree with this approach. I would like to hack at it. Thanks.

jannfis commented 3 weeks ago

@mikeshng Thank you, appreciate your offer! I agree with the approach, feel free to proceed with the implementation :)