Skip to content
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

Fix status operation value to allow less than 10 #1198

Conversation

anandrkskd
Copy link
Contributor

What type of PR is this?
/kind bug

What does this PR do / why we need it:
Currently, when we set application-controller 'status/operation processor' values below 10, it set it to default value of 10.
This PR allows the value to be less than the default value, but is the value is less or equals to 0 it sets it back to the default value.

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes GITOPS-3770

How to test changes / Special notes to the reviewer:

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
…rocessors logic

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
@anandrkskd anandrkskd marked this pull request as ready for review January 29, 2024 18:41
jaideepr97

This comment was marked as outdated.

Copy link
Collaborator

@jaideepr97 jaideepr97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test case between 0 and the default

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Copy link
Collaborator

@svghadi svghadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@jaideepr97 jaideepr97 merged commit 0556c7d into argoproj-labs:master Feb 1, 2024
7 checks passed
Mangaal pushed a commit to Mangaal/argocd-operator that referenced this pull request Feb 5, 2024
* fix logic to allow processor operation to be less than default

---------

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
Mangaal pushed a commit to Mangaal/argocd-operator that referenced this pull request Feb 12, 2024
* fix logic to allow processor operation to be less than default

---------

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
Mangaal pushed a commit to Mangaal/argocd-operator that referenced this pull request Feb 13, 2024
* fix logic to allow processor operation to be less than default

---------

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
jaideepr97 pushed a commit to jaideepr97/argocd-operator that referenced this pull request Feb 13, 2024
* fix logic to allow processor operation to be less than default

---------

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
anandf pushed a commit that referenced this pull request Feb 21, 2024
…perator (#1218)

* adding a new variable in ReconcileArgoCD struct call SourceNamespaces which store all the  SourceNamespaces defined in Argocd Spec. sourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* range r.SourceNamespaces instead of  cr.Spec.SourceNamespaces,  cr.Spec.SourceNamespaces might contain wildcard which will lead to error i.e. Namespace * not found

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* range r.SourceNamespaces instead of  cr.Spec.SourceNamespaces,  cr.Spec.SourceNamespaces might contain wildcard which will lead to error i.e. Namespace * not found

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding func containsWildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding func setManagedNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* range r.SourceNamespaces instead of  cr.Spec.SourceNamespaces,  cr.Spec.SourceNamespaces might contain wildcard which will lead to error i.e. Namespace * not found

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding unit test for func setSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding unit test for func sourceNamespacemapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update  unit test for func reconcileRoleForApplicationSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update  func SetupWithManager to watch newly created ns

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding  func sourceNamespacemapper which filter newly created ns

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update  func setResourceWatches to watch newly created ns. added func sourceNamespaceFilterPredicate

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* go.mod/go.sum

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* unit tests func update

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding func getSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding unit test for func getSourceNamespaces. TestGetSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove SourceNamespaces from ReconcileArgoCD struct and use  func getSourceNamespaces to get SourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* add to reviewers (#1196)

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* fix: Operator doesn't reflect deletion of SA from repo setting (#1169)

Signed-off-by: Jayendra Parsai <jparsai@jparsai-thinkpadp1gen4i.remote.csb>
Co-authored-by: Jayendra Parsai <jparsai@jparsai-thinkpadp1gen4i.remote.csb>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* feat: Notification service monitor (#1187)

* feat: Expose notifications controller metrics to prometheus monitoring

---------

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Fix status operation value to allow less than 10 (#1198)

* fix logic to allow processor operation to be less than default

---------

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* comment remove

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* fix  goimports

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* undo changes in generated codes

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Revert "comment remove"

This reverts commit c5d2f57.

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove comments and rename sourceNamespacemapper function to sourceNamespaceMapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for source namespace without wildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for source namespace with wildcard pattern

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for source namespace with wildcard '*'

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for sourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update with master branch and remove verbs from role in e2e test assert and errors

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* comment for sourceNamespaceMapper function

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Change the variable name sourceNamespacemapper to sourceNamespaceMapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Removed unwanted blank lines in this function.

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adeed comment for sourceNamespaceFilterPredicate and getSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding a new variable in ReconcileArgoCD struct call SourceNamespaces which store all the  SourceNamespaces defined in Argocd Spec. sourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* range r.SourceNamespaces instead of  cr.Spec.SourceNamespaces,  cr.Spec.SourceNamespaces might contain wildcard which will lead to error i.e. Namespace * not found

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* range r.SourceNamespaces instead of  cr.Spec.SourceNamespaces,  cr.Spec.SourceNamespaces might contain wildcard which will lead to error i.e. Namespace * not found

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding func containsWildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding func setManagedNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* range r.SourceNamespaces instead of  cr.Spec.SourceNamespaces,  cr.Spec.SourceNamespaces might contain wildcard which will lead to error i.e. Namespace * not found

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding unit test for func setSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding unit test for func sourceNamespacemapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update  unit test for func reconcileRoleForApplicationSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update  func SetupWithManager to watch newly created ns

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding  func sourceNamespacemapper which filter newly created ns

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update  func setResourceWatches to watch newly created ns. added func sourceNamespaceFilterPredicate

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* go.mod/go.sum

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* unit tests func update

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding func getSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adding unit test for func getSourceNamespaces. TestGetSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove SourceNamespaces from ReconcileArgoCD struct and use  func getSourceNamespaces to get SourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Fix status operation value to allow less than 10 (#1198)

* fix logic to allow processor operation to be less than default

---------

Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* comment remove

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* fix  goimports

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* undo changes in generated codes

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Revert "comment remove"

This reverts commit c5d2f57.

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove comments and rename sourceNamespacemapper function to sourceNamespaceMapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for source namespace without wildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for source namespace with wildcard pattern

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for source namespace with wildcard '*'

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* e2e  test to valitade role and rolebinding for sourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update with master branch and remove verbs from role in e2e test assert and errors

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* comment for sourceNamespaceMapper function

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Change the variable name sourceNamespacemapper to sourceNamespaceMapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* Removed unwanted blank lines in this function.

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* adeed comment for sourceNamespaceFilterPredicate and getSourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* resolve merge conficts

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* resolve merge conficts

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* removed  unwanted blank lines

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* removed  unwanted blank lines

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* added unit test cases for getSourceNamespaces and sourceNamespaceMapper func

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* added unit test for multiple sourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* added e2e  test for multiple sourceNamespaces

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* eremoved extra lines from sourceNamespaceMapper

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* documentation for supporting wildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* documentation for supporting wildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* documentation for supporting wildcard

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* documentation for supporting wildcard and Link for Allowing additional namespaces in an AppProject

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove placeholder code

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* removed additional lines

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remote extra watch on namespace resource

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remote sourceNamespaceFilterPredicate func

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update TestReconcileApplicationSet_Deployments_Command func. getSourceNamespaces expect ns  must  exist

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove extra lines

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* small update on documentation

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove extra lines

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* remove extra lines

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* add e2e test to validate labels,role and rolebinding,after removing namespace from sourcenamespace

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* update e2e test to check for labels in ns which is in sourceNamespace

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

---------

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: Jayendra Parsai <jparsai@jparsai-thinkpadp1gen4i.remote.csb>
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: Anand Kumar Singh <anandrkskd@gmail.com>
Co-authored-by: Saumeya Katyal <saumeyakatyal@gmail.com>
Co-authored-by: Jayendra Parsai <jparsai@redhat.com>
Co-authored-by: Jayendra Parsai <jparsai@jparsai-thinkpadp1gen4i.remote.csb>
Co-authored-by: Abhishek Veeramalla <abhishek.veeramalla@gmail.com>
Co-authored-by: Anand Kumar Singh <anandrkskd@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants