Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #16 from snorwin/namespace-to-cluster-scope-issue
Browse files Browse the repository at this point in the history
Explicitly set an empty slice for cluster scoped instances
  • Loading branch information
snorwin committed Jun 18, 2021
2 parents 6fd2020 + 581a132 commit e4f4d0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions controllers/argocd/argocd_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
sort.Strings(slice)

values["namespaces"] = slice
} else {
values["namespaces"] = []string{}
}

// only run helm upgrade if changes are needed
Expand Down
2 changes: 1 addition & 1 deletion controllers/argocd/argocd_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ var _ = Describe("Reconciler", func() {

mockHelm.
EXPECT().
Upgrade(argocd.Name, gomock.Any(), Values("namespaces", nil), true).
Upgrade(argocd.Name, gomock.Any(), Values("namespaces", []string{}), true).
Return(nil)

testReconcile(mockHelm, argocd)
Expand Down

0 comments on commit e4f4d0b

Please sign in to comment.