ROX-27980: Support argocd reconciliation for routes #2197
Conversation
1e9d35d to
f69a0f9
Compare
| if apiErrors.IsNotFound(err) { | ||
| centralTLSSecretFound = false // pragma: allowlist secret | ||
| } | ||
| return centralTLSSecretFound, err |
There was a problem hiding this comment.
Seems there is something wrong here. If the secret doesn't exist, it will never call ensureSecretExists. Or am I missing something?
| if apiErrors.IsNotFound(err) { | |
| centralTLSSecretFound = false // pragma: allowlist secret | |
| } | |
| return centralTLSSecretFound, err | |
| if apiErrors.IsNotFound(err) { | |
| centralTLSSecretFound = false // pragma: allowlist secret | |
| } else { | |
| return false, err | |
| } |
There was a problem hiding this comment.
The purpose of centralTLSSecretFound is to skip the further reconciliation instead of returning the error
There was a problem hiding this comment.
But we'll return the error in any case, so the code was correct. I simplified it a bit.
bed3f39 to
0807965
Compare
0807965 to
13baa61
Compare
| func (r *CentralReconciler) ensureCentralCASecretExists(ctx context.Context, centralNamespace string) (centralTLSSecretFound bool, err error) { | ||
| centralTLSSecret, err := r.getSecret(centralNamespace, k8s.CentralTLSSecretName) | ||
| if err != nil { | ||
| return !apiErrors.IsNotFound(err), err |
There was a problem hiding this comment.
| return !apiErrors.IsNotFound(err), err | |
| return false, err |
ludydoo
left a comment
There was a problem hiding this comment.
Just this one last comment mentioned above, otherwise 🔥
96906c1 to
9b475f6
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kovayur, ludydoo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Add support for the routes reconciliation on ArgoCD.
The feature can be now enabled by setting the value
centralIngressEnabledtotruein the gitops config.If disabled (default), reconciliation should be performed in fleetshard-sync mode as before.
If enabled, the routes created by fleetshard-sync are deleted and the reconciliation will be performed by tenant-resources (ArgoCD).
Next steps:
centralIngressEnabledto true by default intenant-resourcesChecklist (Definition of Done)
Test manualROX-12345: ...Test manual
TODO: Add manual testing efforts