Commit Graph
31 Commits
Author SHA1 Message Date
Matthieu MORELandGitHub 6f367b0edf chore(lint): enable emptyStringTest rule from go-critic (#23400)
Signed-off-by: Matthieu MOREL <[email protected]>
2025-06-15 20:25:12 +00:00
Michael CrenshawandGitHub 5e9ec0992a chore: embed trivial rand string function (#22177)
Signed-off-by: Michael Crenshaw <[email protected]>
2025-03-05 16:34:16 -05:00
Michael CrenshawandGitHub fb0fde4837 feat(cmp): pass empty env vars to plugins (#18720) (#22096)
Signed-off-by: Michael Crenshaw <[email protected]>
2025-03-02 18:01:50 -05:00
8334da36f2 Bump major version to 3 (#21410)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: crenshaw-dev <[email protected]>
2025-01-10 16:14:00 -05:00
Matthieu MORELandGitHub eec6f8526a chore: enable unused-parameter from revive (#21365)
* chore: enable unused-parameter from revive

Signed-off-by: Matthieu MOREL <[email protected]>

* apply recommandations

Signed-off-by: Matthieu MOREL <[email protected]>

---------

Signed-off-by: Matthieu MOREL <[email protected]>
2025-01-07 10:12:56 -05:00
Matthieu MORELandGitHub 7a212a833c chore: enable use-any from revive (#21282)
Signed-off-by: Matthieu MOREL <[email protected]>
2025-01-02 18:26:59 -05:00
Matthieu MORELandGitHub c85bb38a83 chore: enable errorf of perfsprint linter (#21280)
Signed-off-by: Matthieu MOREL <[email protected]>
2024-12-30 10:56:41 +02:00
James McShaneandGitHub ca9a4b6601 feat(cmp): parameter to enable git creds to be shared from repo server to the plugin (#15107)
Signed-off-by: jmcshane <[email protected]>
2024-10-31 13:35:08 -04:00
Michael CrenshawandGitHub b71bcd6127 chore(refactor): move util function to util package (#19192)
Signed-off-by: Michael Crenshaw <[email protected]>
2024-07-25 10:33:16 -04:00
9d2c3826e2 feat: Allow return the client without performing a matchRepository (#18053)
* return the client without performing a matchRepository operation when the application'plugin be configured by its name

Signed-off-by: Javier Solana <[email protected]>

* add CheckPluginConfiguration pre-flight operation

Signed-off-by: Javier Solana <[email protected]>

* fix lint

Signed-off-by: Javier Solana <[email protected]>

* Missing comment

Signed-off-by: Javier Solana <[email protected]>

* remove WithFields
Signed-off-by: Javier Solana <[email protected]>

* fix captLocal
Signed-off-by: Javier Solana <[email protected]>

---------

Signed-off-by: Javier Solana <[email protected]>
Co-authored-by: Javier Solana <[email protected]>
2024-07-15 09:02:25 -04:00
pasha-codefreshandGitHub 039a8056e3 feat: support log level in cmp plugin, possibility to trace generated manifest (#18851)
* feat: support log level in cmp plugin, and add possibility to trace generated manifest

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

* feat: support log level in cmp plugin, and add possibility to trace generated manifest

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

---------

Signed-off-by: pashakostohrys <[email protected]>
2024-06-30 15:49:07 -04:00
Matthieu MORELandGitHub 417ff7b19e chore: enable gofumpt and whitespace linters (#18567)
Signed-off-by: Matthieu MOREL <[email protected]>
2024-06-11 15:41:55 +00:00
Matthieu MORELandGitHub eb14360d0b chore: enable goimports linter (#18564)
Signed-off-by: Matthieu MOREL <[email protected]>
2024-06-10 09:18:12 -04:00
Matthieu MORELandGitHub db300bad11 fix: enable misspell linter (#18412)
Signed-off-by: Matthieu MOREL <[email protected]>
2024-05-28 12:51:04 +03:00
Mathias PetermannandGitHub d9edeeb8dc feat(cmp): Print stderr output from command even on success (#15921) (#15973)
* feat(cmp): Print stderr output from command even on success

Signed-off-by: Mathias Petermann <[email protected]>

* docs(cmp): Document logging from cmp sidecard for development purposes

Signed-off-by: Mathias Petermann <[email protected]>

---------

Signed-off-by: Mathias Petermann <[email protected]>
2023-10-23 09:59:56 -04:00
Ashin SabuandGitHub c39e1fbbd7 fix(cmp): send sigterm to cmp commands before sigkill to allow for potential cleanup (#9180) (#14955)
* fix: send sigterm to cmp commands before sigkill to allow for potential cleanup

Signed-off-by: Ashin Sabu <[email protected]>

* fix: unit test for runCommand in cmpserver to test cleanup modified

Signed-off-by: Ashin Sabu <[email protected]>

* fix: change unit test for plugin/runCommand to avoid bad trap along with lint fix

Signed-off-by: Ashin Sabu <[email protected]>

---------

Signed-off-by: Ashin Sabu <[email protected]>
2023-08-08 15:30:41 +00:00
Michael CrenshawandGitHub 0e402645c6 fix(cmp): discover plugins relative to app path (#13940) (#13946)
* fix(cmp): discover plugins relative to app path (#13940)

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

* securejoin

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

* intuitive constant names

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

* comments

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

* add missing import

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

---------

Signed-off-by: Michael Crenshaw <[email protected]>
2023-06-15 21:17:04 +00:00
Michael CrenshawandGitHub a850418098 fix: remove false positive for no-discovery cmp; log string, not bytes (#13251)
Signed-off-by: Michael Crenshaw <[email protected]>
2023-04-24 13:58:48 -04:00
Michael CrenshawandGitHub 19ad0634c4 fix: pass env when getting param announcement (#11812) (#11815)
* fix: pass env when getting param announcement (#11812)

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

* use same method as other methods

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

* better tests

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

* make sure env var tests are meaningful

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

---------

Signed-off-by: Michael Crenshaw <[email protected]>
2023-03-22 14:55:09 -04:00
Alexander MatyushentsevandGitHub fd7619ed03 feat: allow CMP plugins to preserve repo files mode (#12940)
* feat: allow CMP plugins to preserve repo files mode

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

* implement missing e2e test

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

---------

Signed-off-by: Alexander Matyushentsev <[email protected]>
2023-03-22 12:15:19 -04:00
Michael CrenshawandGitHub 872c42dbac fix: log plugin commands in a better format (#12260)
* fix: log plugin commands in a better format

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

* comments

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

---------

Signed-off-by: Michael Crenshaw <[email protected]>
2023-03-15 09:29:33 -04:00
Gergely CzuczyandGitHub bac2a36e76 feat: Added warning on plugin command returning zero output (#12698)
Signed-off-by: Gergely Czuczy <[email protected]>
2023-03-02 11:36:23 -05:00
Soumya Ghosh DastidarandGitHub 1abeec087b feat: make discovery field optional in plugins (#12073)
* feat: make discovery field optional in plugins

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* docs: updated plugin docs

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* docs: updated plugin docs

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* feat: updated discovery check for named plugins

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* fix: fixed unit tests

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* feat: simplified code

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* fix: close connection on error

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* feat: simplify code

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

* feat: add named return values

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>

---------

Signed-off-by: Soumya Ghosh Dastidar <[email protected]>
2023-02-02 12:07:58 -05:00
5918367282 feat: parameterized config management plugins (#9135) (#9216)
* feat: parameterized CMPs

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

* values types for parameters

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

* Add types for CMP announcement

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

* Reorg

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

* finish type

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

* First pass at working GetParametersAnnouncement

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

* Typos

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

* Make all fields optional

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

* Make sure response makes it to repo server

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

* Refactor for testing

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

* lint

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

* send build env to param announcement gen

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

* test parameter announcement

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

* tests

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

* environ tests

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

* Rename workdir to app dir

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

* handle empty command, start ui work (#11)

* Add types for CMP announcement

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

* Reorg

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

* finish type

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

* First pass at working GetParametersAnnouncement

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

* Typos

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

* Make all fields optional

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

* Make sure response makes it to repo server

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

* Refactor for testing

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

* values types for parameters

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

* lint

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

* send build env to param announcement gen

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

* test parameter announcement

* tests

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

* environ tests

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

* Rename workdir to app dir

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

* handle empty command, start ui work

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

* fix order

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

* fix map merging, make params read-only

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

Co-authored-by: zachaller <[email protected]>

* Add helm PoC example plugin

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

* example as kustomize overlay

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

* Parameterized cmps docs (#12)

* use printf instead of echo

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

* docs

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

* test for temp dir cleanup

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

* handle empty params

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

* handle empty values

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

* consolidate types

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

* fix tests

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

* docs

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

* docs

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

* remove duplicate info

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

* add warning about param announcements vs param values

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

* tests (#13)

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

* tests

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

* fix types

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

* fix test

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

* fix codegen

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

* fix codegen

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

* revert test hack

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

* docs correction

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

* fix indentation

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

* fix spacing

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

* move util function to util file and add test

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

* wrap error

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

* correct version number

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

* document necessity of collectionType param

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

* remove part of error message that's not useful (dir name is now randomized)

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

* fix things so that they are not broken

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

* don't close file before caller gets a chance to use it

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

* codegen

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

* fix test

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

* comments

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

* fix test

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

* DON'T PANIC

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

Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: CI <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: zachaller <[email protected]>
2022-11-29 13:08:32 -05:00
Artur RodriguesandGitHub c1c1816710 chore: add debug logs around CMP manifest generation (#11185)
* docs: note one single CMP per app

Signed-off-by: Artur Rodrigues <[email protected]>

* cmp: debug logs around manifest handling

Signed-off-by: Artur Rodrigues <[email protected]>

Signed-off-by: Artur Rodrigues <[email protected]>
2022-11-03 20:30:50 -04:00
Pierre CrégutandGitHub 05a93cc9d0 feat: Add plugin call variables to sidecar plugin discovery (#9273) (#9319)
* fix: do not export repo-server environment to sidecar (#9393)

getPluginEnvs is both used for local plugins and sidecar plugins. For the later
do not include the environement variables of the repo-server in the supplied
variables.

Fixes: #9393
Signed-off-by: Pierre Crégut <[email protected]>

* feat: Add plugin call variables to sidecar plugin discovery (#9273)

Gives access to variables declared in the call of the plugin in the application
manifest to the discover command run on the CMP server.

Variables are prefixed with ARGOCD_ENV_ to avoid security issues (plugin call
overiding important variables).

Fixes #9273

Signed-off-by: Pierre Crégut <[email protected]>
2022-05-31 16:19:54 -04:00
Leonardo Luz AlmeidaandGitHub 5dee23fb72 feat: remove shared repo volume between repo-server and cmp-server (#8600)
feat: remove shared repo volume between repo-server and cmp-server (#8600)

Signed-off-by: Leonardo Luz Almeida <[email protected]>
2022-03-15 12:06:21 -07:00
Alexander MatyushentsevandGitHub 7a25c5a7dd fix: argocd build fails on windows (#8319)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2022-01-30 13:01:13 -08:00
Michael CrenshawandGitHub 647b7b3e75 Use gRPC timeout for sidecar CMPs (#8131) (#8236)
Use gRPC timeout for sidecar CMPs (#8131) (#8236)

Signed-off-by: Michael Crenshaw <[email protected]>
2022-01-25 15:45:37 -08:00
Alexander MatyushentsevandGitHub 225c84f4ce refactor: allow using own config maps to register the cmp plugins instead of 'argocd-cmp-cm' (#7677)
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-11-10 14:57:14 -08:00
May ZhangandGitHub dc20a5e312 Feat: cmp server (#6585)
* feat: config management plugin enhancement (#6585)

Signed-off-by: kshamajain99 <[email protected]>
Signed-off-by: May Zhang <[email protected]>
Signed-off-by: Alexander Matyushentsev <[email protected]>
2021-11-08 09:47:10 -08:00