-
Story
-
Resolution: Done
-
Major
-
None
-
None
-
None
Story (Required)
The goal of this story is rewrite the `setManagedSourceNamespaces` function present in argocd_controller in order to account for architectural changes in the operator conducted as part of other stories in this epic
Background (Required)
The `setManagedSourceNamesapces` function is responsible for setting the list of managed source namespaces for a given Argo CD instance. However, there are some problems with the current implementation of it.
At the beginning of the reconciliation cycle, the current logic only pulls the list of all labeled namespaces currently on the cluster and defers syncing the actual list of labelled namespaces vs what is expressed in .spec.sourceNamespaces during role reconciliation. There is also some namespace manipulation with deletion/addition of labels to namespaces etc happening during role reconciliation, which goes against the package responsibility philosophy we are trying to implement with the redesign.
The operator also does not check if a given argo-cd instance is cluster scoped or not before enabling apps-in-any-namespaces
Out of scope
any changes to how the feature works externally
Approach (Required)
Change logic in setSourceNamespaces such that existing and desired source namespace lists are reconciled and brought in sync entirely within the scope of this function. Also add a check to see if the instance is cluster scoped before setting the final list of source namespaces
Add kuttl tests to verify that no external changes in behavior occur as a result of this internal code shuffle
Dependencies
none
Acceptance Criteria (Mandatory)
- unit tests added to verify function behaviour
INVEST Checklist
Dependencies identified
Blockers noted and expected delivery timelines set
Design is implementable
Acceptance criteria agreed upon
Story estimated
Legend
Unknown
Verified
Unsatisfied
Done Checklist
- Code is completed, reviewed, documented and checked in
- Unit and integration test automation have been delivered and running cleanly in continuous integration/staging/canary environment
- Continuous Delivery pipeline(s) is able to proceed with new code included
- Customer facing documentation, API docs etc. are produced/updated, reviewed and published
- Acceptance criteria are met
- is blocked by
-
GITOPS-3121 Create cluster package
-
- Closed
-