Commit Graph
202 Commits
Author SHA1 Message Date
Blake PetterssonandGitHub 839188e760 feat: add permitOnlyProjectScopedClusters flag (#10237)
This commit adds a new flag, `permitOnlyProjectScopedClusters`, which
prevents any application from syncing to clusters which are not a part
of the same project. Fixes #10220.

Signed-off-by: Blake Pettersson <[email protected]>

Signed-off-by: Blake Pettersson <[email protected]>
2022-09-08 07:33:10 -04:00
Alexander MatyushentsevandGitHub bedad4340d chore: infer managed resources health from redis instead of storing it in CRD (#10191)
* chore: infer managed resources health from redis instead of storing it in CRD

Signed-off-by: Alexander Matyushentsev <[email protected]>

* apply reviewer notes

Signed-off-by: Alexander Matyushentsev <[email protected]>

Signed-off-by: Alexander Matyushentsev <[email protected]>
2022-08-17 21:03:24 +00:00
jannfisandGitHub 75d334705a feat: Applications in any namespace (#9755)
* feat: Applications in any namespace

Signed-off-by: jannfis <[email protected]>

* Fix typo in CI

Signed-off-by: jannfis <[email protected]>

* Create argocd-e2e-external namespace

Signed-off-by: jannfis <[email protected]>

* Update from codegen

Signed-off-by: jannfis <[email protected]>

* Remove debug code

Signed-off-by: jannfis <[email protected]>

* Update help text for -N option to app create

Signed-off-by: jannfis <[email protected]>

* Wrap error when retrieving AppProject from cache

Signed-off-by: jannfis <[email protected]>

* Check for controller namespace first before matching on additional ns

Signed-off-by: jannfis <[email protected]>

* Improve TestAppProjectIsSourceNamespacePermitted unit test

Signed-off-by: jannfis <[email protected]>

* Get rid of some debug leftovers

Signed-off-by: jannfis <[email protected]>

* Better error wrapping; return IsNotFound as-is

Signed-off-by: jannfis <[email protected]>

* Updates from codegen

Signed-off-by: jannfis <[email protected]>

* We don't need AppShortName() anymore

Signed-off-by: jannfis <[email protected]>

* Update end-to-end tests to use annotation methods

Signed-off-by: jannfis <[email protected]>

* Add e2e tests to test for app creation in not permitted ns

Signed-off-by: jannfis <[email protected]>

* Remove deprecated code

Signed-off-by: jannfis <[email protected]>

* Remove dead code

Signed-off-by: jannfis <[email protected]>

* Add RBACName() method to application type

Signed-off-by: jannfis <[email protected]>

* Update from codegen

Signed-off-by: jannfis <[email protected]>

* Fix e2e test

Signed-off-by: jannfis <[email protected]>

* Update codegen

Signed-off-by: jannfis <[email protected]>

* Move RBAC name generation to an application receiver

Signed-off-by: jannfis <[email protected]>

* Fix sync window status in UI

Signed-off-by: jannfis <[email protected]>

* Fix pod logs viewer

Signed-off-by: jannfis <[email protected]>

* Fix application events in UI

Signed-off-by: jannfis <[email protected]>

* Fix application search in UI

Signed-off-by: jannfis <[email protected]>

* Fix yarn lint

Signed-off-by: jannfis <[email protected]>

* Only set up cluster-wide application informer when additional namespaces are specified

Signed-off-by: jannfis <[email protected]>

* Adapt e2e test to a changed error message

Signed-off-by: jannfis <[email protected]>

* Application namespace should be taken into account for create

Signed-off-by: jannfis <[email protected]>

* Use non-qualified application name as Helm release name

Signed-off-by: jannfis <[email protected]>

* Support --app-namespace in e2e tests

Signed-off-by: jannfis <[email protected]>

* Enable more e2e tests

Signed-off-by: jannfis <[email protected]>

* Increase e2e timeout for newly added tests

Signed-off-by: jannfis <[email protected]>
2022-08-10 11:39:10 +02:00
Leonardo Luz AlmeidaandGitHub 4cebcfc61e fix: Ignore diff with schema (#9170) 2022-05-31 13:21:22 -04:00
69e82828a3 feat: add --app-hard-resync flag to controller (#8928)
* feat: add --app-hard-resync flag to controller

Signed-off-by: darshanime <[email protected]>

* add to approvers

Signed-off-by: pashavictorovich <[email protected]>

* Merge branch 'master' of github.com:pasha-codefresh/argo-cd into hard-refresh

Signed-off-by: pashavictorovich <[email protected]>

# Conflicts:
#	cmd/argocd-application-controller/main.go
#	controller/appcontroller.go

* merge

Signed-off-by: pashavictorovich <[email protected]>

* merge

Signed-off-by: pashavictorovich <[email protected]>

* regenerate docs

Signed-off-by: pashavictorovich <[email protected]>

* regenerate docs

Signed-off-by: pashavictorovich <[email protected]>

* fix tests

Signed-off-by: pashavictorovich <[email protected]>

* read variable from cm

Signed-off-by: pashavictorovich <[email protected]>

* reconciliation variable

Signed-off-by: pashavictorovich <[email protected]>

* manifest

Signed-off-by: pashavictorovich <[email protected]>

Co-authored-by: darshanime <[email protected]>
2022-04-04 10:44:35 -04:00
a94795cdc4 Merge pull request from GHSA-2f5v-8r3f-8pww
* fix: application resource APIs must enforce project restrictions

Signed-off-by: Alexander Matyushentsev <[email protected]>

* Fix unit tests

Signed-off-by: jannfis <[email protected]>

Co-authored-by: jannfis <[email protected]>
2022-03-22 10:57:30 -07:00
Ben YeandGitHub b25e07d9e5 fix: register controller workqueue metrics correctly (#8318)
Signed-off-by: Ben Ye <[email protected]>
2022-02-01 10:57:20 -08:00
jannfisandGitHub c8d2d8f38d chore: Log out the resource triggering reconciliation (#8192)
* chore: Log out the resource triggering reconciliation

Signed-off-by: jannfis <[email protected]>

* chore: Log out the resource triggering reconciliation

Signed-off-by: jannfis <[email protected]>
2022-01-18 08:22:26 +01:00
Leonardo Luz AlmeidaandGitHub d2b9099d9e fix: Inconsistent normalization logic during diff (#7980)
fix: Inconsistent normalization logic during diff (#7980)

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2021-12-22 08:57:48 -08:00
jomenxiaoandGitHub 82c75fa3bc fix nil point (#7905)
Signed-off-by: jomenxiao <[email protected]>
2021-12-10 21:23:37 -08:00
Alexander MatyushentsevandGitHub 6bb96caea8 refactor: add indexes to secret informers to speedup settings parsing (#7882)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-12-07 14:15:11 -08:00
Alexander MatyushentsevandGitHub 73843bb01c refactor: avoid loading project in frequently executed controller methods (#7853)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-12-03 13:18:08 -08:00
Alexander MatyushentsevandGitHub 3449cbe9db refactor: use cached project while calculating resource tree (#7747)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-11-18 15:45:19 -08:00
Leonardo Luz AlmeidaandGitHub fcd30aa98f fix: Address issue during diff when secret data is nil (#7603)
* fix: update gitops-engine to latest + log improvements

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* run go mod tidy

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2021-11-03 12:46:05 -07:00
Alexander MatyushentsevandGitHub 9e2ccba385 fix: Invalid memory address or nil pointer dereference in processRequestedAppOperation (#7501)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-10-20 08:03:55 -07:00
Alexander MatyushentsevandGitHub eeb2b0fb79 fix: Operation has completed with phase: Running (#7482)
* fix: Operation has completed with phase: Running

Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-10-19 17:16:31 -07:00
pasha-codefreshandGitHub 74c7247f1e feat: Cluster name as part of sync (#7394)
feat: Cluster name as part of sync (#7394)

Signed-off-by: pashavictorovich <[email protected]>
2021-10-18 18:44:54 -07:00
Leonardo Luz AlmeidaandGitHub 0b8ca7d7d9 Expose Application labels in prometheus metric (#7374)
Expose Application labels in prometheus metric (#7374)

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2021-10-08 10:15:51 -07:00
pasha-codefreshandGitHub f9cc2cf2b8 fix: compare app state (#7341)
* fix compare app state

Signed-off-by: pashavictorovich <[email protected]>
2021-10-01 09:18:01 -07:00
pasha-codefreshandGitHub 38c8ba460b feat: rename app identifier (#7251)
feat: rename app identifier (#7251)

Signed-off-by: pashavictorovich <[email protected]>
2021-09-28 08:35:17 -07:00
Alexander MatyushentsevandGitHub 664e92ee5e refactor: cache virtual project calculation to improve performance (#7274)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-09-21 12:20:49 -07:00
pasha-codefreshandGitHub 7303e9c0a8 feat: Project scoped repo (#6943)
feat: Project scoped repo (#6943)

Signed-off-by: pashavictorovich <[email protected]>
2021-08-16 09:38:37 -07:00
6d39cfd098 chore: Spelling (#5373)
* spelling: across

Signed-off-by: Josh Soref <[email protected]>

* spelling: anyway

Signed-off-by: Josh Soref <[email protected]>

* spelling: assessment

Signed-off-by: Josh Soref <[email protected]>

* spelling: attribute

Signed-off-by: Josh Soref <[email protected]>

* spelling: crlf

Signed-off-by: Josh Soref <[email protected]>

* spelling: cmux

Signed-off-by: Josh Soref <[email protected]>

* spelling: committed

Signed-off-by: Josh Soref <[email protected]>

* spelling: convenience

Signed-off-by: Josh Soref <[email protected]>

* spelling: does-not

Signed-off-by: Josh Soref <[email protected]>

* spelling: e.g.

Signed-off-by: Josh Soref <[email protected]>

* spelling: fall back

Signed-off-by: Josh Soref <[email protected]>

* spelling: fall back to

Signed-off-by: Josh Soref <[email protected]>

* spelling: then ... falls back

Signed-off-by: Josh Soref <[email protected]>

* spelling: formatted

Signed-off-by: Josh Soref <[email protected]>

* spelling: github

Signed-off-by: Josh Soref <[email protected]>

* spelling: gitlab

Signed-off-by: Josh Soref <[email protected]>

* spelling: gitops

Signed-off-by: Josh Soref <[email protected]>

* spelling: health checks

Signed-off-by: Josh Soref <[email protected]>

* spelling: located

Signed-off-by: Josh Soref <[email protected]>

* spelling: logging

Signed-off-by: Josh Soref <[email protected]>

* spelling: oidc

Signed-off-by: Josh Soref <[email protected]>

* spelling: openshift

Signed-off-by: Josh Soref <[email protected]>

* spelling: os

Signed-off-by: Josh Soref <[email protected]>

* spelling: powershell

Signed-off-by: Josh Soref <[email protected]>

* spelling: preferred

Signed-off-by: Josh Soref <[email protected]>

* spelling: redact

Signed-off-by: Josh Soref <[email protected]>

* spelling: repo

Signed-off-by: Josh Soref <[email protected]>

* spelling: similarly

Signed-off-by: Josh Soref <[email protected]>

* spelling: staging

Signed-off-by: Josh Soref <[email protected]>

* spelling: statefulset

Signed-off-by: Josh Soref <[email protected]>

* spelling: stopped

Signed-off-by: Josh Soref <[email protected]>

* spelling: superseded

Signed-off-by: Josh Soref <[email protected]>

* spelling: synchronization

Signed-off-by: Josh Soref <[email protected]>

* spelling: to

Signed-off-by: Josh Soref <[email protected]>

* spelling: unified

Signed-off-by: Josh Soref <[email protected]>

* spelling: verification

Signed-off-by: Josh Soref <[email protected]>

* spelling: zookeeper

Signed-off-by: Josh Soref <[email protected]>

Co-authored-by: Josh Soref <[email protected]>
2021-07-13 19:02:03 +02:00
Jonathan WestandGitHub 3303c634be fix: unable to delete an Application if its target cluster is deleted, Argo CD enters infinite app deletion reconciliation loop (#6557)
Signed-off-by: Jonathan West <[email protected]>
2021-06-29 16:32:21 -04:00
Kshama JainandGitHub b6e563b8b4 feat: update app informer to avoid stale cache (#6372)
feat: update app informer to avoid stale cache (#6372)

Signed-off-by: kshamajain99 <[email protected]>
2021-06-03 15:40:35 -07:00
AikawaandGitHub ddca6da103 fix: use current logrus config when logrus is created internally (#6234) (#6301)
fix: use current logrus config when logrus is created internally (#6234) (#6301)
Signed-off-by: yu-croco <[email protected]>
2021-05-28 16:27:57 -07:00
Alexander MatyushentsevandGitHub 473a0ab3a4 fix: controller should refresh app before running sync operation (#6294)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-05-21 13:32:31 -07:00
Shoubhik BoseandGitHub 043f559fac chore: Organize Application-related defaults/constants in the Application API's package. (#5893)
chore: Organize Application-related defaults/constants in the Application API's package. (#5893)

Signed-off-by: Shoubhik Bose <[email protected]>
2021-05-19 12:43:04 -07:00
Alexander MatyushentsevandGitHub e6a4826232 feat: cache resolved git/helm repository revisions (#6102)
* feat: cache resolved git/helm repository revisions

Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-05-19 12:30:15 -07:00
Remington BreezeandGitHub 246600530b fix(ui): Don't count errored or completed neighbor pods toward resource consumption (#6259)
Signed-off-by: Remington Breeze <[email protected]>
2021-05-18 16:01:23 -07:00
yanclandGitHub 15958e5d83 fix: remove break for appsCount (#6115)
Signed-off-by: yancl <[email protected]>
2021-04-28 12:37:46 -07:00
1d472ba293 chore: Upgrade Go module to v2 (#5931)
* chore: Upgrade Go module to v2

Signed-off-by: jannfis <[email protected]>

* Restore import order

Signed-off-by: jannfis <[email protected]>

* fix knowntypes_normalizer codegen error

Signed-off-by: Alexander Matyushentsev <[email protected]>

* fix codegen

Signed-off-by: Alexander Matyushentsev <[email protected]>

* fix Procfile

Signed-off-by: Alexander Matyushentsev <[email protected]>

Co-authored-by: Alexander Matyushentsev <[email protected]>
2021-04-01 20:44:18 +02:00
Chetan BanavikalmuttandGitHub aa9ea1268a feat: support background propagation policy while deleting applications (#5216) (#5524)
* feat: support background propagation policy

Currently, Argo CD only supports foreground propagation policy ie. delete all the resources in the foreground and then delete the application in the end. This PR introduces a new flag `propagation-policy` to decide the type of policy when cascading is enabled. It also adds an annotation `propagation-policy.argocd.argoproj.io`, which is used by the application controller to decide the order of deletion.

Fixes: #5216
Signed-off-by: Chetan Banavikalmutt <[email protected]>

* fix lint and doc errors

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* update logs to display the application name

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* address review comments

* remove application name from logs since it's already present
* update the propagation policy annotation key

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* Add radio buttons in the UI to select propagation policy

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* inject finalizers instead of annotations for specifying propagation policy

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* rebase branch on master

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* update the controller to set the policy only for application's resources

Signed-off-by: Chetan Banavikalmutt <[email protected]>

* fix the label of policy radio button

Signed-off-by: Chetan Banavikalmutt <[email protected]>
2021-03-15 17:27:41 +01:00
Ishita SequeiraandGitHub 6409707729 feat: added cascade option to delete resources #5368 (#5538)
* feat: added cascade option to delete resources #5368

Signed-off-by: ishitasequeira <[email protected]>

* addressed PR comments related to cascade delete

Signed-off-by: ishitasequeira <[email protected]>

* feat: update gitops-engine version

Signed-off-by: ishitasequeira <[email protected]>

* Fix e2e tests

Signed-off-by: ishitasequeira <[email protected]>

* feat: update gitops-engine version

Signed-off-by: ishitasequeira <[email protected]>

* fix: Address PR comments

Signed-off-by: ishitasequeira <[email protected]>
2021-03-09 14:04:14 +01:00
Abhishek VeeramallaandGitHub d4aa950009 fix: Exclude kube-root-ca.crt ConfigMap from Orphaned Resources monitoring by default (#5490) (#5523)
Signed-off-by: iam-veeramalla <[email protected]>
2021-02-17 11:25:21 +01:00
Victor BoissiereandGitHub d0ac1e59e8 feat(prom): Add prometheus metrics reset support #5287 (#5304)
* feat(prom): Add prometheus metrics reset support

Signed-off-by: Victor Boissiere <[email protected]>
2021-02-09 17:27:08 -08:00
f9b19d1f30 feat: Prevent unnecessary controller diffing with caching (#5255)
Signed-off-by: Remington Breeze <[email protected]>
Co-authored-by: Alexander Matyushentsev <[email protected]>
2021-01-27 16:13:29 -08:00
Alexander MatyushentsevandGitHub 8e53175ee1 fix: controller should load application related nodes from target cluster (#5208)
* fix: controller should load application related nodes from target cluster

Signed-off-by: Alexander Matyushentsev <[email protected]>

* fix: make sure node capasity and pod requests are in same unit, improve unit formatting

Signed-off-by: Alexander Matyushentsev <[email protected]>

* fix: application hosts should include info about resources requested by app neighbors

Signed-off-by: Alexander Matyushentsev <[email protected]>

* apply reviewer notes

Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-01-11 12:35:47 -08:00
Alexander MatyushentsevandGitHub f6f4318bab fix: add api-server liveness probe that catches bad data in informer (#5026)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2020-12-10 11:48:27 -08:00
Alexander MatyushentsevandGitHub d82ad4fa25 fix: sync retry is broken for multi-phase syncs (#5017)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2020-12-09 18:05:34 -08:00
Alexander MatyushentsevandGitHub e6992acc3d fix: infer app destination server in indexer to prevent concurrent app object modification (#4993)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2020-12-08 08:45:37 -08:00
Josh SorefandGitHub 214b4c8995 Allow deny (#4293) (#4294)
* chore(ui): switch to using allow/deny (#4293)

Signed-off-by: Josh Soref <[email protected]>
2020-11-03 10:54:13 -08:00
Alexander MatyushentsevandGitHub 301d9bf4c9 refactor: upgrade gitops-engine version ( breaking API changes related to logr mirgation ) (#4652) 2020-10-27 14:10:24 -07:00
Jonathan WestandGitHub 5493e27694 fix: Data race between processAppRefreshQueueItem and processAppOperationQueueItem, in appcontroller.go (#4643) (#4644) 2020-10-23 12:05:41 -07:00
Josh SorefandGitHub 60c33d4de4 Spelling (#4596) 2020-10-19 18:21:06 -07:00
Chetan BanavikalmuttandGitHub f270d94e3b fix: Infer destination server when latest version of app is fetched (#4574) 2020-10-15 08:57:18 -07:00
Chetan BanavikalmuttandGitHub 700f6beb82 fix: Infer cluster URL while deleting app resource (#4559)
An application can be created by specifying only cluster name. Since cluster URL is used for queries, it should inferred. ValidateDestination() method will infer the cluster URL if cluster name is present.

Fixes: #4534
2020-10-14 10:32:41 -07:00
May ZhangandGitHub f943df98d8 feat: global project (#4506)
* feat: global project

* feat: revert back argocd-cm.yaml

* feat: remove commented code.

* feat: check err

* feat: corrected comments.

* feat: merge sync windows

* feat: getProject

* feat: fix lint error

* feat: update existing test case

* feat: minor comments

* feat: Fixed for sync window which is also called from API server.

* feat: fix application tests

* feat: block by sync window

* feat: test using sync window

* feat: updated based on code review

* feat: fixed comment
2020-10-13 15:12:05 -07:00
Alexander MatyushentsevandGitHub d351d134e3 feat: Support controller horizontal scaling (#4285) 2020-10-09 13:16:54 -07:00
May ZhangandGitHub 0c0cff0bf2 feat: autosync protection (#4475)
* feat: autosync protection

* feat: autosync protection - update doc

* feat: autosync protection - update doc with version
2020-10-06 21:10:50 -07:00