Commit Graph
507 Commits
Author SHA1 Message Date
Eng Zer JunandGitHub 9807275c7b chore: use t.Setenv to set env vars in tests (#14377)
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv

Signed-off-by: Eng Zer Jun <[email protected]>
2023-07-06 19:50:08 -04:00
Alexandre GaudreaultandGitHub 877926526d fix(sharding): recurring info logs to debug (#14383)
Signed-off-by: Alexandre Gaudreault <[email protected]>
2023-07-06 19:39:18 -04:00
Alexandre GaudreaultandGitHub f7a6d93792 fix: deadlock in controller (#14304)
Signed-off-by: Alexandre Gaudreault <[email protected]>
2023-07-01 16:32:33 -04:00
bb25090d99 feat: add ignoreResourceUpdates to reduce controller CPU usage (#13534) (#13912)
* feat: ignore watched resource update

Signed-off-by: Alexandre Gaudreault <[email protected]>

* add doc and CLI

Signed-off-by: Alexandre Gaudreault <[email protected]>

* update doc index

Signed-off-by: Alexandre Gaudreault <[email protected]>

* add command

Signed-off-by: Alexandre Gaudreault <[email protected]>

* codegen

Signed-off-by: Alexandre Gaudreault <[email protected]>

* revert formatting

Signed-off-by: Alexandre Gaudreault <[email protected]>

* do not skip on health change

Signed-off-by: Alexandre Gaudreault <[email protected]>

* update doc

Signed-off-by: Alexandre Gaudreault <[email protected]>

* update logging to use context

Signed-off-by: Alexandre Gaudreault <[email protected]>

* fix typos. local build broken...

Signed-off-by: Alexandre Gaudreault <[email protected]>

* change after review

Signed-off-by: Alexandre Gaudreault <[email protected]>

* manifestHash to string

Signed-off-by: Alexandre Gaudreault <[email protected]>

* more doc

Signed-off-by: Alexandre Gaudreault <[email protected]>

* example for argoproj Application

Signed-off-by: Alexandre Gaudreault <[email protected]>

* add unit test for ignored logs

Signed-off-by: Alexandre Gaudreault <[email protected]>

* codegen

Signed-off-by: Alexandre Gaudreault <[email protected]>

* Update docs/operator-manual/reconcile.md

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>

* move hash and set log to debug

Signed-off-by: Alexandre Gaudreault <[email protected]>

* Update util/settings/settings.go

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>

* Update util/settings/settings.go

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>

* feature flag

Signed-off-by: Michael Crenshaw <[email protected]>

* fix

Signed-off-by: Michael Crenshaw <[email protected]>

* less aggressive managedFields ignore rule

Signed-off-by: Michael Crenshaw <[email protected]>

* Update docs/operator-manual/reconcile.md

Co-authored-by: Alexandre Gaudreault <[email protected]>

* use local settings

Signed-off-by: Michael Crenshaw <[email protected]>

* latest settings

Signed-off-by: Michael Crenshaw <[email protected]>

* safety first

Signed-off-by: Michael Crenshaw <[email protected]>

* since it's behind a feature flag, go aggressive on overrides

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-06-25 01:32:20 +00:00
Michael CrenshawandGitHub 55a0849ed6 chore: remove argocd-cm plugin support (#13755) 2023-06-21 23:30:46 +03:00
fc31863e47 fix: retain count and order of revisions for multi source apps (#14108) (#14113)
* fix: retain order of revisions for multi source apps (#14108)

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: retain revision for multi source app with ref-repos

Signed-off-by: Lukas Wöhrl <[email protected]>

* calculate commitSHA before quitting manifest generation

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: Lukas Wöhrl <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-06-20 12:08:21 -04:00
Jorge Turrado FerreroandGitHub 7b2db7c44f fix: Multi source apps resolve revision in .status field (#14081)
Signed-off-by: Jorge Turrado <[email protected]>
2023-06-15 17:43:25 -04:00
a4e32b2cef fix: Fixes sharding placement algorithm and allows development of alternative algorithms (#13018)
* fix: Extraction of DistributionFunction to allow passing different type of functions to filter clusters by shard
- Adding unit tests for sharding
- Refresh clusters list on DistributionFunction call

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

* fix: Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint32 without an upper bound check.

Signed-off-by: Akram Ben Aissi <[email protected]>

* Added config to switch to round-robin sharding

Signed-off-by: Raghavi Shirur <[email protected]>
Signed-off-by: Akram Ben Aissi <[email protected]>

* Documenting sharding more, adding shuffling tests (skipped), re-enable sharding algo env var

Signed-off-by: Akram Ben Aissi <[email protected]>

* Allow configuration through argocd-cmd-params-cm configMap and key: controller.sharding.algorithm

Signed-off-by: Akram Ben Aissi <[email protected]>

* De-duplicate code, remove reflection for default case, shorten distribution methods name, ran codegen on manifests
Signed-off-by: Akram Ben Aissi <[email protected]>

Signed-off-by: Akram Ben Aissi <[email protected]>

---------

Signed-off-by: Akram Ben Aissi <[email protected]>
Signed-off-by: ishitasequeira <[email protected]>
Signed-off-by: Raghavi Shirur <[email protected]>
Co-authored-by: Raghavi Shirur <[email protected]>
2023-06-05 09:19:14 -04:00
Fish-proandGitHub 22b83a61aa chore: Clean up repeated package import (#13821)
Signed-off-by: Zechun Chen <[email protected]>
2023-06-01 10:48:09 -06:00
4a9b59cb89 feat: Add controllerNamespace to .status of an application (#13081)
Signed-off-by: Kevin Huber <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-05-27 22:08:59 +00:00
Blake PetterssonandGitHub 432cf9aecd fix: surface source not permitted errors (#12255)
* chore: surface source not permitted errors

For Git and Helm repositories, we filter out non-permitted urls before
submitting a `ManifestRequest` to the repo-server. While that works
fine, this also leads to very hard to debug issues in particular when
using Helm dependencies.

This (very) WIP PR adds `ProjectSourceRepos` as a parameter to
`ManifestRequest`, so we can verify that a source is in fact
permitted in order to distinguish between actual 40x errors (caused
by e.g misconfiguration) and "source not permitted" caused by not
adding the relevant sources to the AppProject config.

This still needs documentation, tests and some basic sanity checking
before proceeding further, as well as resolving whatever is causing
`make codegen` to not properly work.

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

* chore: propagate project values to repo-server

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

* test: fix failing unit tests

now onto the e2e tests...

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

* test: fix failing e2e test(s)

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

* fix: add project params

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

* test: add e2e test

Add Helm dependency check test.

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

* chore: remove git source check

Discussed over Slack and deemed this to not be necessary at this time.

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

* make codegen

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

* chore: cr tweaks

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

* chore: code review tweaks

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

* test: fix

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

* test: wip

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

* test: wip

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

* chore: wip

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

* chore: typo

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

* fix: typo

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

* chore: rebase fixes

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

* test: oci:// is not prefixed

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

---------

Signed-off-by: Blake Pettersson <[email protected]>
2023-05-27 11:26:34 -04:00
Blake PetterssonandGitHub 0d52a16b14 fix: update managed namespace metadata (#13074)
* fix: update managed namespace metadata

This commit fixes an issue where a namespace does not get updated
unless a sync is performed. Since the `managedNamespaceMetadata` is not
a part of the Application Git state, we need a way to force a sync once
the metadata has changed. In order to do that, we need to add state
to compare with.

Once a sync is performed, the `ManagedNamespaceMetadata` gets copied
to `SyncResult`, which will then be compared with on subsequent syncs.
If there's a mismatch between
`app.Spec.SyncPolicy.ManagedNamespaceMetadata` and
`app.Status.OperationState.SyncResult.ManagedNamespaceMetadata` we mark
the Application as `OutOfSync`.

Fixes #12661.

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

* fix: nil check

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

* fix: allow empty apps to be updated

If an app is empty but still differs in terms of
`managedNamespaceMetadata`, it should still be kept up to date.

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

* test: add unit tests in appcontroller

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

* fix: rebase

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

* refactor: extract method

Consolidate checks to `app.HasChangedManagedNamespaceMetadata()`

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

* chore: make codegen

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

---------

Signed-off-by: Blake Pettersson <[email protected]>
2023-05-19 09:55:08 -04:00
Alexander MatyushentsevandGitHub 78e2f7b65c fix: avoid acquiring lock on two mutexes at the same time to prevent deadlock (#13636)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2023-05-18 19:20:13 +00:00
Eng Zer JunandGitHub d8fade27d2 chore: replace github.com/ghodss/yaml with sigs.k8s.io/yaml (#13292)
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <[email protected]>
2023-05-04 18:06:56 -04:00
Alexander MatyushentsevandGitHub cdc470cacb feat: support 'helm.sh/resource-policy: keep' helm annotation (#13157)
* feat: support 'helm.sh/resource-policy: keep' helm annotation

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

* document  annotation

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

---------

Signed-off-by: Alexander Matyushentsev <[email protected]>
2023-04-24 13:41:21 -07:00
62e95ceb0b fix: Add more context to the sync failed message when resource kind doesn't exist (#12980)
* fix: add more context to k8s message

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

* fix: add more context to k8s message

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

* fix: add more context to k8s message

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

* fix: add more context to k8s message

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

* fix: add more context to k8s message

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

* fix: add more context to k8s message

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

* Update util/argo/argo.go

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: asingh <[email protected]>

* Update util/argo/argo.go

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: asingh <[email protected]>

* improvements, maybe

Signed-off-by: Michael Crenshaw <[email protected]>

* remove unnecessary end quote

Signed-off-by: Michael Crenshaw <[email protected]>

* avoid conflicts with other tests

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: ashutosh16 <[email protected]>
Signed-off-by: asingh <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-04-03 15:48:50 +00:00
f98ca55a94 chore: Comment format (#12399)
* feat: Comment format

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

* Apply suggestions from code review

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: fengshunli <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-03-29 19:41:22 +00:00
9f631a19e2 chore: Reused argo define api Kind and Group (#11844)
Signed-off-by: yanggang <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-03-24 14:43:43 +00:00
487e28229d feat(kustomize): support envsubst in commonAnnotations and commonLabels (#11345)
* support envsubst in kustomize commonAnnotations and commonLabels

Signed-off-by: Andrii Chubatiuk <[email protected]>

* added description for new parameter

Signed-off-by: Andrii Chubatiuk <[email protected]>

---------

Signed-off-by: Andrii Chubatiuk <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Andrii Chubatiuk <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-03-22 19:54:30 +00:00
e80659dfab feat: UI write support CMP (#11754) (#12137)
* #11602 fix : Object options menu truncated when selected in ApplicationListView.

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

* CMP parameter changes

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

* fix: pointers to param values

Signed-off-by: Michael Crenshaw <[email protected]>

better?

Signed-off-by: Michael Crenshaw <[email protected]>

fix silliness

Signed-off-by: Michael Crenshaw <[email protected]>

terrible hacks

Signed-off-by: Michael Crenshaw <[email protected]>

maybe better codegen

Signed-off-by: Michael Crenshaw <[email protected]>

fix tests

Signed-off-by: Michael Crenshaw <[email protected]>

* same prefix issue fixed

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

* fix for delete param name

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

* lint changes

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

* lint fix

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

* lint fix

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

* finalChanges

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

* Delete application-resource-list.tsx

Not needed for this PR.

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

* added file which was deleted as it was not the change needed for this feature.

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

* refactored MapValuField and added fix for some edge cases

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

* Update application-resource-list.tsx

Reverting the change as this is not related to this PR.

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

* Reverting the change in application-resource-list

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

* Showing application parameter values irrespective of parameter present or not in plugin.yaml

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

* fix for lint errors

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

* fix false source mismatch

Signed-off-by: Michael Crenshaw <[email protected]>

* fix equals

Signed-off-by: Michael Crenshaw <[email protected]>

* fix swagger doc

Signed-off-by: Michael Crenshaw <[email protected]>

* Tooltip description change.

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

* fixed lint

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

* CMP fix for empty array.

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

---------

Signed-off-by: schakradari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: schakrad <[email protected]>
Signed-off-by: schakrad <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-03-21 14:39:10 -04:00
Michael CrenshawandGitHub 5d752908f9 feat: add 'user' field to audit logs (#12644)
Signed-off-by: Michael Crenshaw <[email protected]>
2023-03-16 22:20:10 +02:00
Tsubasa NagasawaandGitHub 0add57d255 fix: suppress Kubernetes API deprecation warnings from application controller (#12067)
Completely suppress warning logs only for log levels that are less than Debug.

Signed-off-by: toVersus <[email protected]>
2023-03-06 16:48:06 -05:00
Michael CrenshawandGitHub 2f25df2904 fix: evaluate all possible refresh reasons for multi-source apps (#12379) (#12576)
* fix: evaluate all possible refresh reasons for multi-source apps (#12379)

Signed-off-by: Michael Crenshaw <[email protected]>

* remove redundant parentheses

Signed-off-by: Michael Crenshaw <[email protected]>

* tests

Signed-off-by: Michael Crenshaw <[email protected]>

* don't auto-sync, it makes tests flaky

Signed-off-by: Michael Crenshaw <[email protected]>

* auto-sync because sync CLI doesn't work for multi-source apps

Signed-off-by: Michael Crenshaw <[email protected]>

* don't require out-of-sync - app may sync quickly

Signed-off-by: Michael Crenshaw <[email protected]>

* timeout 60

Signed-off-by: Michael Crenshaw <[email protected]>

* fix timeout

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: Michael Crenshaw <[email protected]>
2023-02-24 13:30:18 -05:00
Michael CrenshawandGitHub e788b402a4 fix: produce better logs for health check errors (#12350)
* fix: produce better logs for health check errors

Signed-off-by: Michael Crenshaw <[email protected]>

* also log

Signed-off-by: Michael Crenshaw <[email protected]>

* fixes

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: Michael Crenshaw <[email protected]>
2023-02-24 10:24:06 -05:00
Mike NgandGitHub ec8ab77884 feat: add app skip reconcile annotation to optionally bypass application controller processing (#11879)
Signed-off-by: Mike Ng <[email protected]>
2023-02-23 12:02:50 -05:00
Fish-proandGitHub b019c2fdb5 chore: use http constants instead of string (#12334)
Signed-off-by: Fish-pro <[email protected]>
2023-02-17 14:04:10 -05:00
Soumya Ghosh DastidarandGitHub 5daa92c22b feat: add sync delete option (#12448)
feat: add sync delete option (#12448)
2023-02-14 19:51:53 +00:00
c7db9cee41 Merge pull request from GHSA-6p4m-hw2h-6gmw
Signed-off-by: ChangZhuo Chen (陳昌倬) <[email protected]>

add test

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

better comment

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

Signed-off-by: CI <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-01-25 09:14:29 -05:00
e84ab9f36b fix: populate parentRefs correctly with multiple owners (#3910) (#11715)
* fix: populate parentRefs correctly with multiple owners

It previously simply wrote to key 0, instead of appending all owners

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

* test multiple resource owners

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: Jellyfrog <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2023-01-19 11:57:45 -05:00
Michael CrenshawandGitHub d070fccaf0 chore: better error messages (#11738)
* chore: better error messages

Signed-off-by: Michael Crenshaw <[email protected]>

* Update util/db/cluster.go

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: Michael Crenshaw <[email protected]>
2023-01-09 16:32:27 -05:00
2cd7949613 fix: Application's own link in UI (#11123) (#11124)
Signed-off-by: Alex Eftimie <[email protected]>
Co-authored-by: Remington Breeze <[email protected]>
2023-01-04 10:40:51 -08:00
f6c1a78677 feat: Multiple sources for applications (#2789) (#10432)
* feat: support multiple sources for application

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

remove debug logging and unwanted code

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

fix lint and unit test errors

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

fix lint and unit test errors

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

* fix bug introduced after rebase

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

executed make codegen

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

* rebase with master

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

remove unwanted logging

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

fix ci failures

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

* fix index out of bounds error

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

* ui fixes

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

* add revisions to SyncOperation for rollback

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

* change Source to *ApplicationSource in ApplicationSpec

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

* fix env variable read logic for ValueFiles

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

* update multiple sources doc

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

* add repository lock and checkout target revision

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

fix codegen

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

* checkout all sources before generating manifest

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

generate mock reposerverclient

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

* update logic for returning ManifestResponse to avoid nil pointer issues

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

* fix nil reference and key mismatch bugs; add more logs (#6)

* fix nil reference and key mismatch bugs; add more logs
* remove temporary comment
* addressed the lint failure and added chart to RefTargeRevisionMapping
* normalize git repo (#7)
* do not leak lock releases
* prevent deadlock
* allow spec update
* move settings fetch outside loop
* cache busing
* return err instead of logging it
* no caching in test
* fix cache key marshaling

Signed-off-by: Michael Crenshaw <[email protected]>

Rebase with master

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

* update grpc field numbers

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

* path resolution tests (#12)

Signed-off-by: Michael Crenshaw <[email protected]>

do things in better ways

Signed-off-by: Michael Crenshaw <[email protected]>

consolidate

Signed-off-by: Michael Crenshaw <[email protected]>

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

* add regex check for value of source.ref

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

* add webhook tests

Signed-off-by: Michael Crenshaw <[email protected]>

change Source to *ApplicationSource in ApplicationSpec

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

address PR comments

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

rebase with master

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

Retrigger CI pipeline

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

rebased with master

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

* fix env variable read logic for ValueFiles

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

Address PR comments

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

* add repository lock and checkout target revision

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

fix codegen

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

* checkout all sources before generating manifest

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

* generate mock reposerverclient

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

* address comments

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

* update logic for returning ManifestResponse to avoid nil pointer issues

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

* fix nil reference and key mismatch bugs; add more logs (#6)

* fix nil reference and key mismatch bugs; add more logs
* remove temporary comment
* addressed the lint failure and added chart to RefTargeRevisionMapping
* normalize git repo (#7)
* do not leak lock releases
* prevent deadlock
* allow spec update
* move settings fetch outside loop
* cache busing
* return err instead of logging it
* no caching in test
* fix cache key marshaling

Signed-off-by: Michael Crenshaw <[email protected]>

Rebase with master

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

* update grpc field numbers

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

* add regex check for value of source.ref

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

* Rebase with master

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

* Added unit tests (#15)

* add unit tests 1
* fix lint

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

* fix application parameters tab, rebased UI changes, tests

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

* More tests (#16)

* more tests

Signed-off-by: Michael Crenshaw <[email protected]>

fix lint error

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

Test get ref sources (#17)

* test GetRefSources

Signed-off-by: Michael Crenshaw <[email protected]>

* fix lint

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: ishitasequeira <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: ishitasequeira <[email protected]>

GenerateManifests test (#18)

* GenerateManifests test

Signed-off-by: Michael Crenshaw <[email protected]>

Fix broken tests (#19)

* fix broken tests

Signed-off-by: Michael Crenshaw <[email protected]>

Symlink test (#20)

* check referenced sources for out-of-bounds symlinks

Signed-off-by: Michael Crenshaw <[email protected]>

* unlock the values file repo before doing a symlink check (#22)

Signed-off-by: Michael Crenshaw <[email protected]>

* multi source docs (#21)

* multi source docs

Signed-off-by: Michael Crenshaw <[email protected]>

* fix warning title

Signed-off-by: Michael Crenshaw <[email protected]>

* clarify

Signed-off-by: Michael Crenshaw <[email protected]>

* clarify

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: Michael Crenshaw <[email protected]>

* add e2e tests for multiple sources and fix UI lint (#23)

* add e2e tests for multiple sources and fix UI lint

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

* add auto-sync and hard refresh to e2e tests

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

* change refresh type to RefreshTypeNormal for e2e

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

* update e2e testcase with helm data

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

* add TestMultiSourceAppWithSourceOverride

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

* add missing yaml file

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

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

* rebase with master

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

* rebase with master

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

* fix lint

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

Signed-off-by: ishitasequeira <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
2022-12-16 15:47:08 -05:00
Roger RumaoandGitHub 5c4dd2d086 includeKinds for APIVersions in cluster info cache (#11241)
Signed-off-by: Roger Rumao <[email protected]>

Signed-off-by: Roger Rumao <[email protected]>
2022-12-09 12:56:18 -05:00
Alexander MatyushentsevandGitHub e845aeb7d5 fix: application stuck in infinite reconciliation loop if using wrong project (#11246)
* fix: application stuck in infinite reconciliation loop if using wrong project

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

* add missing unit test

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

Signed-off-by: Alexander Matyushentsev <[email protected]>
2022-11-18 20:57:34 -05:00
Alex EftimieandGitHub 11e1243560 feature: allow a custom labels on any resource to surface in the UI (tree view node tags) (#11153)
* feature: allow a custom label on any resource to surface the UI

Signed-off-by: Alex Eftimie <[email protected]>
2022-11-18 22:29:22 +00:00
Leonardo Luz AlmeidaandGitHub 83e7d8d14d fix: do not mutate live when managed namespace enabled (#11197)
* fix: do not mutate live when managed namespace enabled

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

* fix unit-test

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

* fix unit-test

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

* Fix lint

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

* remove trackingID from e2e test validation

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

* fix e2e

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

* remove unnecessary config

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

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2022-11-08 16:06:05 -05:00
cf61c74192 feat: enable metadata to be set on namespaces (#10672)
* namespace labels

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

* create namespace should support annotations

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

* handle also modification hook

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

* regenerate entity on modify hook

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

* manifests

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

* feat: enable metadata to be set on namespaces

This builds upon the work that @pasha-codefresh did in #10288.

The main differences between this PR and the previous one is that we use
SSA to diff between different versions of the namespace, as well as
having a slightly different API in gitops-engine for setting the
namespace modifier.

We now also set the ownership of the namespace in ArgoCD.

Closes #4628
Closes #6215
Closes #7799

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

* fix: don't always track namespaces

For now, only allow namespaces managed with `managedNamespaceMetadata`
to have tracking set by Argo. Ideally we'd like new namespaces to also
be tracked by Argo, but there's currently an issue with a failing
integration test.

Also wrap error message if setting the app instance errors on the
namespace.

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

* fix: always return true with `hasManagedMetadata`

If `hasManagedMetadata` is set, `true` should always be returned.

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

* docs: add clarifying docs on resource tracking

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

* style: pr tweaks

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

* fix: re-add label unsetting

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

* Update gitops-engine to current master

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

Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>
Signed-off-by: Leonardo Luz Almeida <[email protected]>
Co-authored-by: pashavictorovich <[email protected]>
Co-authored-by: Leonardo Luz Almeida <[email protected]>
2022-11-04 08:59:16 -04:00
Leonardo Luz AlmeidaandGitHub 64389b8e39 fix: handle apiGroup updates in resource-tracking (#11012)
* fix: handle apiGroup updates in resource-tracking

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

* Fix test

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

* change the fix approach by inspecting tracking id from the config

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

* add unit-test to validate the scenario

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

* fix test lint

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

* review fixes

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

* Reword godocs for clarity

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

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2022-11-03 15:02:13 -04:00
cdc33f62d8 chore: wrap errors with message (#10592) (#10986)
* issue-10592 Wrap errors with message

Signed-off-by: Apoorva Mahabaleshwara <[email protected]>
Signed-off-by: Apoorva Mahabaleshwara <[email protected]>

* issue-10592 remove unwanted error  wrappers

Signed-off-by: Apoorva Mahabaleshwara <[email protected]>
Signed-off-by: Apoorva Mahabaleshwara <[email protected]>

* chore: fix  error wrapper messages

Signed-off-by: Apoorva Mahabaleshwara <[email protected]>

Signed-off-by: Apoorva Mahabaleshwara <[email protected]>
Signed-off-by: Apoorva Mahabaleshwara <[email protected]>
Co-authored-by: Apoorva Mahabaleshwara <[email protected]>
2022-10-19 19:21:32 +00:00
Mikhail FesenkoandGitHub 7ab36350b7 chore: decreased indent level in setApplicationHealth (#10980)
Signed-off-by: Mikhail Fesenko <[email protected]>

Signed-off-by: Mikhail Fesenko <[email protected]>
2022-10-19 10:19:57 -04:00
+6 5a539c8d13 chore: improve error logs (#10944)
* fix: Resource list loading slowly due to Sync Wave sorting (#10932)

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

* chore: fix wrong annotation in function (#10923)

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

Signed-off-by: wujunwei <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* feat: add bcrypt support for argocd CLI (#10934)

* Adding bcrypt support for argocd CLI

Signed-off-by: Amey Totawar <[email protected]>

* Fixing linter issues

Signed-off-by: Amey Totawar <[email protected]>

* Nesting bcrypt under account instead of admin

Signed-off-by: Amey Totawar <[email protected]>

* Removing admin bcrypt docs

Signed-off-by: Amey Totawar <[email protected]>

* Update docs/faq.md

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Amey Totawar <[email protected]>

Signed-off-by: Amey Totawar <[email protected]>
Signed-off-by: Amey Totawar <[email protected]>
Co-authored-by: Amey Totawar <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* chore: improve error logs

Signed-off-by: Smriti Prakash <[email protected]>

* chore: improve error logs

Signed-off-by: Smriti Prakash <[email protected]>

* chore: implement signed images (#10925)

* consolidate checksums into one file

Signed-off-by: Justin Marquis <[email protected]>

* sign container images

Signed-off-by: Justin Marquis <[email protected]>

* sign container images

Signed-off-by: Justin Marquis <[email protected]>

* remove id-token permissions

Signed-off-by: Justin Marquis <[email protected]>

Signed-off-by: Justin Marquis <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* chore: delete old snyk reports (#10938)

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* chore: rewording of misleading message (#10407)

Signed-off-by: Ryan Talbot <[email protected]>

Signed-off-by: Ryan Talbot <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* chore: delete old snyk reports, 2nd attempt (#10950)

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* chore: wrap error objects to include context (#10592) (#10940)

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

Signed-off-by: Niharika <[email protected]>
Signed-off-by: Niharika <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
Signed-off-by: Smriti Prakash <[email protected]>

* chore: improve error logs

Signed-off-by: Smriti Prakash <[email protected]>

* chore: covered error log in controllers

 Signed-off-by: Smriti Prakash <[email protected]>

Signed-off-by: Smriti Prakash <[email protected]>

* chore: sign checksums file for release binaries (#10963)

Signed-off-by: Justin Marquis <[email protected]>

Signed-off-by: Justin Marquis <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* [Bot] Update Snyk reports (#10953)

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

Signed-off-by: CI <[email protected]>
Co-authored-by: CI <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* feat: make applicationset controller configurable in argocd-cmd-params (#10961)

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

Signed-off-by: toVersus <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* docs: message is no longer truncated (#10962)

Signed-off-by: Shawn Toffel <[email protected]>

Signed-off-by: Shawn Toffel <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>

* fix: addressed review comments

Signed-off-by: Smriti Prakash <[email protected]>

Signed-off-by: Alexander Matyushentsev <[email protected]>
Signed-off-by: Smriti Prakash <[email protected]>
Signed-off-by: wujunwei <[email protected]>
Signed-off-by: Amey Totawar <[email protected]>
Signed-off-by: Amey Totawar <[email protected]>
Signed-off-by: Justin Marquis <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Ryan Talbot <[email protected]>
Signed-off-by: Niharika <[email protected]>
Signed-off-by: Niharika <[email protected]>
Signed-off-by: CI <[email protected]>
Signed-off-by: toVersus <[email protected]>
Signed-off-by: Shawn Toffel <[email protected]>
Co-authored-by: Alexander Matyushentsev <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: Amey Totawar <[email protected]>
Co-authored-by: Amey Totawar <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Co-authored-by: Smriti Prakash <[email protected]>
Co-authored-by: 34FathomBelow <[email protected]>
Co-authored-by: Ryan Talbot <[email protected]>
Co-authored-by: nsahai8 <[email protected]>
Co-authored-by: Chris Davis <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CI <[email protected]>
Co-authored-by: Tsubasa Nagasawa <[email protected]>
Co-authored-by: Shawn Toffel <[email protected]>
2022-10-18 11:16:20 -04:00
Alexander MatyushentsevandGitHub 308eb16c8c fix: Resource list loading slowly due to Sync Wave sorting (#10932)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2022-10-13 22:13:04 +00:00
Prajilesh NandGitHub eeae87f157 chore: improve error logs (#10933)
Signed-off-by: Prajilesh <[email protected]>

Signed-off-by: Prajilesh <[email protected]>
2022-10-13 17:53:06 -04:00
Mitsuo HeijoandGitHub c69497112e chore: update robfig/cron to v3 (#10588)
* chore: update robfig/cron to v3

Signed-off-by: Mitsuo Heijo <[email protected]>

* fix parser option to keep old non-standard behavior

Signed-off-by: Mitsuo Heijo <[email protected]>

* fix parser option to keep old non-standard behavior

Signed-off-by: Mitsuo Heijo <[email protected]>

* Revert "fix parser option to keep old non-standard behavior"

This reverts commit f3d75b68f43851ecbb0a0ac2ebf8c0159a4d41ac.

Signed-off-by: Mitsuo Heijo <[email protected]>

* Revert "fix parser option to keep old non-standard behavior"

This reverts commit 49ec9ef7ec976e4225afcd268dd250347575ad26.

Signed-off-by: Mitsuo Heijo <[email protected]>

* add chain to recover from panic

Signed-off-by: Mitsuo Heijo <[email protected]>

Signed-off-by: Mitsuo Heijo <[email protected]>
2022-10-07 17:01:49 -04:00
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
jannfisandGitHub f373204105 fix: Correctly assume cluster-scoped resources to be self-referenced (#10390)
Signed-off-by: jannfis <[email protected]>

Signed-off-by: jannfis <[email protected]>
2022-08-18 20:15:38 +00: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
jannfisandGitHub 6928397473 fix: Ignore non-self-referencing resources while pruning (#10198)
* fix: Ignore non-self-referencing resources while pruning

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

* Pull in latest gitops-engine code

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

* Revert a replace in go.mod

Signed-off-by: jannfis <[email protected]>
2022-08-08 19:37:45 +02:00
Leonardo Luz AlmeidaandGitHub a6a133d80f feat: Introduces Server-Side Apply as sync option (#9711)
* feat: Introduces Server-Side Apply as sync option

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

* add docs

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

* Implement the structured-merge diff when ssa is enabled

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

* update gitops-engine

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

* update gitops-engine

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

* go mod tidy

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

* Add server-side apply option to the UI

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

* update gitops-engine to master

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

* fix live default values

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2022-08-05 19:16:35 -04:00