-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support appset in any namespace ArgoCD feature #1209
Conversation
Thanks a lot @svghadi ! Is a clusterrolebinding really necessary? That would allow the appset controller to exercise its privileges in all namespaces, even the ones that are not included in the whitelist Do you think we could follow that method here? |
I also wonder if we will need a separate role for the server to be able to access appsets in all these new namespaces, since the CLI interacts with the server |
There is no upstream RBAC documentation for appsets in any namespace. Through trial and error, I found that the appset-controller requires atleast
Good catch. I will include this. |
Right now the implementation expects user to enable app in any ns on the target namespace inorder for appsets in any ns to function properly. Therefore a working ArgoCD CR config of appset in any ns would like spec:
applicationSet:
sourceNamespaces:
- apps
# appset in any ns requires apps in any ns to function properly
sourceNamespaces:
- apps If we change the implementation to enable it implicitly, it would improve the UX. The ArgoCD CR config would look like spec:
applicationSet:
sourceNamespaces:
- apps WDYT? @jaideepr97 . Should be enable app in any ns implicitly or let user set it explicitly so that they are aware of it? |
That sounds good! since the list of required permissions is quite big lets try to restrict it as much as possible
There will actually already be an existing server role for the server to access apps in that namespace, so we can probably use that to give it access to appsets in that namespace as well, instead of creating a new role just for appsets
All appset source namespaces must be app source namespaces, but not all app source namespaces need to be appset source namespaces |
I didn't mean to introduce a break change. Let the users who want apps-in-any-namespaces continue using |
4a0bf42
to
6b6ee66
Compare
@jaideepr97 - PR is ready for a second look. New Changes:
|
6b6ee66
to
85e8586
Compare
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
This reverts commit 08e136c. Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
85e8586
to
8e2cdac
Compare
Latest changes:
|
…reconcile_enabled_set_false test When test are ran in parallel, same namespace name in 1-034_validate_applicationset_reconcile_enabled_set_false & 1-035_validate_applicationset_reconcile_enabled_set_true casuse flakiness in test results Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @svghadi
Thanks!
What type of PR is this?
What does this PR do / why we need it:
ApplicationSet in any namespace feature allows users to mange
ApplicationSet
resources in namespaces other than the ArgoCD/control plane's namespace This PR adds support to configure this Argo CD feature via operator.Two new fields are introduced in ArgoCD CR to support ApplicationSet in any namespace.
.spec.applicationSet.sourceNamespaces
- list of namespaces to allow users to create appset resources.spec.applicationSet.scmProviders
- optional list of scm providersChanges:
.spec.applicationSet
in ArgoCD CRImportant Note:
foo
won't be created if App in any namespace forfoo
is not configured. How it would look in ArgoCD CR isHave you updated the necessary documentation?
How to test changes / Special notes to the reviewer:
Automated kuttl test:
Manual test:
kubectl create ns test kubectl create ns apps kubectl create ns dev kubectl create ns prod kubectl label namespace dev argocd.argoproj.io/managed-by=test kubectl label namespace prod argocd.argoproj.io/managed-by=test
test
to make it cluster-scopedapps
namespaceapplicationset
andapplications
are generated in allowedapps
namespace