Compare commits

..

867 Commits

Author SHA1 Message Date
Michael Crenshaw
c7a0dff47e chore: add security section to generated release notes
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-06 13:46:33 -05:00
github-actions[bot]
22c83d3104 [Bot] docs: Update Snyk reports (#12290)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-02-06 13:42:04 -05:00
Michael Crenshaw
39c00f97ca docs: add 2.5->2.6 upgrade notes to list (#12283)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-06 13:19:50 -05:00
Michael Crenshaw
212029d8c2 fix: multi-source app refresh (#11772) (#12217)
* fix multi-source refresh

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* serialize nil and empty resolvedRevisions the same to avoid cache misses

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* more consistent naming

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* document duplication

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* add todo

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-06 13:02:02 -05:00
Karol Szymanowski
4a06cb2c74 chore: Add Omni to list of users (#12078)
Signed-off-by: Karol Szymanowski <39292284+karol-szymanowski@users.noreply.github.com>
2023-02-06 11:53:41 -05:00
Michael Crenshaw
2494657829 chore: rename 'progressive rollouts' to 'progressive syncs' (#12265)
* chore: rename 'progressive rollouts' to 'progressive syncs'

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* rename docs file

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update cmd/argocd-applicationset-controller/commands/applicationset_controller.go

Co-authored-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
2023-02-06 10:59:43 -05:00
Jake
031ecaf754 fix: don't dump SSG to server logs, change deprecation notice to v2.7 (#12285)
* fix: don't dump SSG to server logs, change deprecation notice to v2.7

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* Update server/server.go

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Jake <86763948+notfromstatefarm@users.noreply.github.com>

---------

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
Signed-off-by: Jake <86763948+notfromstatefarm@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-03 13:32:24 -05:00
James Callahan
e420666d76 feat: add org.opencontainers.image.source label to docker images (#12270)
Signed-off-by: James Callahan <james@wavesquid.com>
2023-02-03 10:44:47 -05:00
Michael Crenshaw
02eb67a43e chore: upgrade cookiejar to avoid CVE-2022-25901 (#12030)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-03 10:41:50 -05:00
Keith Chong
52d223d9ef docs: sign up for 1.8 release (#12266) 2023-02-03 10:32:02 -05:00
Josh Soref
b9f9b78b8b docs: Fix heading to not include a v for the second version (#12218)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-02-03 10:28:59 -05:00
wmgroot
f847670157 fix: AppSet Progressive sync fixes, docs, and logging improvements (#11924) (#12103)
Signed-off-by: wmgroot <wmgroot@gmail.com>
2023-02-03 10:27:16 -05:00
Ishita Sequeira
9b86af18bc fix: disable edit button on App Details Summary and Parameters tabs multi-source apps (#12048)
* disable edit button on App Details Summary and Parameters tabs for applications with multiple sources

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* disable editing specific fields in Application Summary Tab for Multiple Source apps

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

---------

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2023-02-03 10:14:09 -05:00
Ishita Sequeira
da46381907 fix: return nil if reading application set was successful (#12261)
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2023-02-03 10:04:52 -05:00
Thomas Decaux
b17007b7cf docs: add destination.name example (#12242)
I had trouble finding the documentation to use the cluster name for destination, instead of the full URL. This is really useful.

Use case: we manage multiple clusters, destination.name is a better way to set destination.

Signed-off-by: Thomas Decaux <ebuildy@gmail.com>
Signed-off-by: ebuildy <ebuildy@gmail.com>
2023-02-02 12:54:42 -05:00
Veronica Herzog
7dcfe1fc38 chore: Add Sauce Labs to USERS.md (#12252)
Signed-off-by: Veronica Herzog <94460138+vherzog-sauce@users.noreply.github.com>
2023-02-02 12:53:38 -05:00
Soumya Ghosh Dastidar
97d75a61fd feat: make discovery field optional in plugins (#12073)
* feat: make discovery field optional in plugins

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* docs: updated plugin docs

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* docs: updated plugin docs

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: updated discovery check for named plugins

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: fixed unit tests

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: simplified code

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: close connection on error

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: simplify code

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: add named return values

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

---------

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2023-02-02 12:07:58 -05:00
Alex Eftimie
048902a32e fix: issue reported by sonar cloud. use forEach instead of map (#12250)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2023-02-01 23:36:15 +00:00
Panagiotis Georgiadis
3524128d7f fix: Upgrade gopkg.in/yaml.v2 to v2.4.0 (#12249)
Signed-off-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
2023-02-01 16:04:44 -05:00
jannfis
b600da1318 feat: Allow force of basic auth for HTTP repositories (#11983)
* feat: Allow force of basic auth for HTTP repositories

Signed-off-by: jannfis <jann@mistrust.net>

* Some docs

Signed-off-by: jannfis <jann@mistrust.net>

---------

Signed-off-by: jannfis <jann@mistrust.net>
2023-02-01 13:11:46 -05:00
Artur Rodrigues
e510a77a1d fix: repo-server - prevent locked state after unclean git checkout (#7898) (#11805)
* Pull in new version of argoproj/pkg

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>

* Allow timeout behavior to be specified in util/exec/exec

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>

* Git processes receive SIGTERM when timedout

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>

* Update util/exec/exec_test.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-01 12:59:34 -05:00
dependabot[bot]
06b98c5a25 chore(deps): bump docker/setup-buildx-action from 2.2.1 to 2.4.0 (#12227)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.2.1 to 2.4.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](8c0edbc76e...15c905b16b)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 16:54:59 -05:00
dependabot[bot]
4242cfc126 chore(deps): bump actions/cache from 3.2.3 to 3.2.4 (#12228)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](58c146cc91...627f0f41f6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 16:53:19 -05:00
Adam Jensen
977b730569 docs: Fix copy that refers to a different CLI flag (#12236)
Signed-off-by: Adam Jensen <adam@acj.sh>
2023-01-31 16:51:41 -05:00
Leonardo Luz Almeida
1373f4fd3f docs: Add authz and authn architectural document (#12005)
* docs: Add authz and authn docs

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* docs: add authz and authn architectural documentation

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add more links and details

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add architecture topic to readthedocs

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix image link

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* compact image

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix extension

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* minor fixes

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

---------

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2023-01-31 16:34:13 -05:00
jannfis
9b7498ce84 fix: Prevent Git from waiting for terminal input (#12028)
Signed-off-by: jannfis <jann@mistrust.net>
2023-01-31 16:31:06 -05:00
Kostis (Codefresh)
c043f4ad0a docs: Clarify directory recursion (#12037)
Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>
2023-01-31 16:29:17 -05:00
James Brady
1000ac15ab docs: Fix list formatting in "Resource Actions" docs page (#12061)
Signed-off-by: James Brady <goodgravy@users.noreply.github.com>
2023-01-31 16:26:15 -05:00
Rohit Rajak
88b6cfcea7 chore: add platform9 to USERS.md (#12126) 2023-01-31 16:01:20 -05:00
Pascal M
3cb111545f chore: Update USERS.md (#12193) 2023-01-31 15:58:06 -05:00
Nobuo Takizawa
1e6a47cd39 chore: Update dex's image tag that is forgotten to be updated (#12234)
Signed-off-by: nobuyo <longzechangsheng@gmail.com>
2023-01-31 15:43:05 -05:00
Vladimir Pouzanov
f9571760a3 docs: Update the security instructions link (#12232)
The original link points at the doc that says 'deprecated'

Signed-off-by: Vladimir Pouzanov <farcaller@gmail.com>
2023-01-31 13:15:32 -05:00
Alex Eftimie
9bd10330ff docs: how to change default view (#12140)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2023-01-30 13:26:33 -08:00
Andriy Drozd
b1d0009fd9 fix: clarify error wording when syncing (#12156)
Signed-off-by: Andriy Drozd <48000208+drozd-A@users.noreply.github.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-30 18:45:41 +00:00
David U
9b994c4af0 Replace width:webkit-fill-avail with left/right 0 (#11991)
Signed-off-by: David Usken <david@timeanddate.com>
2023-01-30 09:52:44 -08:00
github-actions[bot]
a77d149668 [Bot] docs: Update Snyk reports (#12198)
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-01-30 10:35:14 -05:00
Nolan Emirot
062e245192 docs(helm): clarify that helm is only used to inflate chart (#11692)
* docs(helm): helm use to inflate chart

Signed-off-by: emirot <emirot.nolan@gmail.com>

* docs(helm): helm use to inflate chart

Signed-off-by: emirot <emirot.nolan@gmail.com>

* Update helm.md

Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>

* docs: add helm info

Signed-off-by: emirot <emirot.nolan@gmail.com>

* Update docs/user-guide/helm.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: Nolan Emirot <emirot.nolan@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-30 15:12:35 +00:00
Nolan Emirot
ac96269bda chore: fix target name in comment (#11696)
* fix: add pod age icon details in tooltip (#10290) (#11170)

* pod-age-icon details added in tooltip

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

* Tooltip change

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* chore: fix flaky e2e test for immutable fields (#11685)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* fix: target name in comment

Signed-off-by: emirot <emirot.nolan@gmail.com>

* feat: expose deep links in UI (#11680)

Signed-off-by: Remington Breeze <remington@breeze.software>
Signed-off-by: emirot <emirot.nolan@gmail.com>

---------

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Remington Breeze <remington@breeze.software>
Co-authored-by: schakrad <58915923+schakrad@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-30 15:10:00 +00:00
Remington Breeze
a4c0f3cf1f feat: add labels to pod log navigation buttons (#10890) 2023-01-29 21:44:21 -08:00
Andriy Drozd
193cf76e12 fix: replace copy tooltip with copy line text (#12180)
Signed-off-by: Andriy Drozd <48000208+drozd-A@users.noreply.github.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-28 03:13:47 +00:00
Remington Breeze
afb88308fa fix: create app shows dest URL instead of name (#12054)
Signed-off-by: Remington Breeze <remington@breeze.software>
2023-01-27 20:34:06 -05:00
Márcio Pessoa
8b4516519f fix log Filter string toggle button tooltip (#12191) 2023-01-27 17:28:33 -08:00
Michael Crenshaw
adb4471569 feat(security): require the aud claim from OIDC providers by default (#12187)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-27 21:29:08 +00:00
Ishita Sequeira
59b00bb0c0 fix: disable More button for multiple sources (#11760) (#11971)
* disable More button for multiple sources

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* address comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Addressed merge conflicts

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

---------

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2023-01-27 15:27:21 -05:00
Eugen Friedland
eaac2c636f fix(health): Handling SparkApplication CRD health status if dynamic allocation is enabled (#7557) (#11522)
Signed-off-by: Yevgeniy Fridland <yevg.mord@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-27 15:16:27 -05:00
Michael Crenshaw
a825aad384 fix: add CLI client IDs to default OIDC allowed audiences (#12170) (#12179)
* fix(settings): add CLI client ID in default OAuth2 allowed audiences

Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>

* fix: add CLI client IDs to default OIDC allowed audiences (#12170)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* handle expired token properly

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
2023-01-27 14:17:51 -05:00
Alexander Matyushentsev
4610bc831c fix: create separate API to load configured plugins (#12164)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2023-01-26 22:58:31 +00:00
杨刚
61f6530e8a chore: repo command give more hints. (#11849)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-26 02:54:04 +00:00
Keith Chong
b2a6387ca0 feat: Always Show ReplicaSets as Pod Groups (#12051) (#12065)
Signed-off-by: Keith Chong <kykchong@redhat.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-25 18:20:45 +00:00
Alex Eftimie
f7011f646b feat(ui): allow sorting the application list (#11645)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-25 18:17:49 +00:00
杨刚
3da1eaa261 chore: Reused common.DefaultRepoServerAddr (#11842)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-25 09:59:05 -05:00
Michael Crenshaw
b38bc0040b Merge pull request from GHSA-q9hr-j4rf-8fjc
* fix: verify audience claim

Co-Authored-By: Vladimir Pouzanov <farcaller@gmail.com>
Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>

* fix lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix handling of expired token error

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* go mod tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* handle single aud claim marshaled as a string

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Vladimir Pouzanov <farcaller@gmail.com>
2023-01-25 09:15:03 -05:00
ChangZhuo Chen (陳昌倬)
95da518e7d Merge pull request from GHSA-6p4m-hw2h-6gmw
Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@czchen.org>

add test

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>

better comment

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-25 09:14:29 -05:00
杨刚
adc6f564f7 test: Reused const annotationKey string for legacy_test.go (#11837)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-25 08:03:59 -05:00
杨刚
996262021b refactor: Make fsnotify event more readable. (#11836)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-25 07:57:44 -05:00
Mike Bryant
6069ded532 fix: Support resource actions for apps in different Namespace (#12115)
Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>

Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
2023-01-24 17:31:53 -05:00
Andriy Drozd
221a03973e docs: replace period with parenthesis (#12044)
Signed-off-by: Andriy Drozd <48000208+drozd-A@users.noreply.github.com>

Signed-off-by: Andriy Drozd <48000208+drozd-A@users.noreply.github.com>
2023-01-24 17:14:11 -05:00
Ananda Dwi Ae
c20301f27c chore: add btech user (#12116) 2023-01-24 13:32:31 -05:00
Leonardo Luz Almeida
5a6f969b83 chore: Refactor terminal handler to use auth-middleware (#12052)
* chore: Refactor terminal handler to use auth-middleware

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* remove context key for now

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* implement unit-tests

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* remove claim valid check for now

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* remove unnecessary test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* don't too much details in http response

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix error

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* trigger build

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* builder pattern in terminal feature-flag middleware

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2023-01-24 10:46:36 -05:00
Ian Delahorne
bd8777a8f8 fix: Add namespace to sub-application link URLs (#11946)
Signed-off-by: Ian Delahorne <ian@patreon.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-23 16:40:11 -08:00
Alex Eftimie
4a50114126 feat(UI): allow applications to declare default view preferences (#12019) (#12080)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-23 10:10:26 -08:00
github-actions[bot]
9414fb303d [Bot] docs: Update Snyk reports (#12069)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-01-23 11:08:01 -05:00
Justin Marquis
61f8876b99 chore: disable docker sbom and attestations (#12059)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2023-01-20 09:59:48 -05:00
Jellyfrog
584428edaf 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 <Jellyfrog@users.noreply.github.com>

* test multiple resource owners

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-19 11:57:45 -05:00
Fish-pro
49412a1ea9 chore: Remove dependency on github.com/pkg/errors (#11886)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>

Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-01-18 17:06:10 -05:00
Nicholas Morey
8895b4a83a docs: clarify value for disabling tools (#11395)
* docs: clarify value for disabling tools

Although it is implied to set the value for the key to `false`, this explicitly states it to add clarity. Along with some wording changes.

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* docs: add use-case for disabling tools

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-18 16:46:29 -05:00
github-actions[bot]
806ab33d7c [Bot] docs: Update Snyk reports (#12023)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-01-18 16:39:05 -05:00
Peter Macdonald
70f9de4403 docs: Fixed typos, and grammar in the High Availability Docs (#12021)
* Fixed typos, and grammar

Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>

* Updated Docs based on PR Feedback

Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>

Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
2023-01-18 16:03:27 -05:00
rumstead
c9e4bcd351 docs: use environment variable for argo cd user (#12024)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
2023-01-18 16:02:34 -05:00
Alex Eftimie
1808539652 fix: values should always be visible, even when they are empty (#11676) (#11681)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-18 09:49:24 -05:00
jannfis
96b0eb0f53 chore: Support running dockerized toolchain using sudo (#11955)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2023-01-18 09:06:23 -05:00
Michael Crenshaw
15b284b142 chore: upgrade net/http2 to avoid CVE-2022-41717 (#11616)
* chore: upgrade net/http2 to avoid CVE-2022-41717

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* ugprade net

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* go mod tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-17 18:41:19 -05:00
Aymen Ben Tanfous
891707721f fix: Fixed matrix requeueAfterSeconds for PR (#10914) (#10915)
* Fixed matrix requeueAfterSeconds for PR

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@gmail.com>

* A try to make some tests

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

* Fixed default test returns the default time

Signed-off-by: Aymen Ben Tanfous <aymenbentanfous@gmail.com>

* Fixed default test returns the default time

Signed-off-by: Aymen Ben Tanfous <aymenbentanfous@gmail.com>

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@gmail.com>
Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>
Signed-off-by: Aymen Ben Tanfous <aymenbentanfous@gmail.com>
Co-authored-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>
Co-authored-by: Aymen Ben Tanfous <aymenbentanfous@gmail.com>
2023-01-17 16:53:41 -05:00
Shun Nishitsuji
c3784349d3 fix: Remove unnecessary branch (#11963)
Already checked outside the conditional expression

Signed-off-by: asuforce <owata.sn@gmail.com>

Signed-off-by: asuforce <owata.sn@gmail.com>
2023-01-17 16:47:11 -05:00
Remington Breeze
2358669114 feat: App View extensions (#12006)
Signed-off-by: Remington Breeze <remington@breeze.software>
2023-01-17 09:17:27 -08:00
github-actions[bot]
c31d15e8d6 [Bot] docs: Update Snyk reports (#11985)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-01-15 02:47:03 +00:00
Michael Crenshaw
2ddb7772d1 fix: pathParamPrefix is optional (#11796) (#11943)
* fix: pathParamPrefix is optional

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* go mod tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix import

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-13 13:34:03 -05:00
dependabot[bot]
1ab40261c0 chore(deps): bump actions/cache from 3.2.2 to 3.2.3 (#11928)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](4723a57e26...58c146cc91)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-13 09:51:02 -05:00
schakrad
63e410a9fc fix(ui): trash icon for resources to be pruned, plus better tooltip (#10290) (#11171)
* Trash Icon for the resource that will be pruned on sync

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

* Trash icon for the resource that gets pruned on sync.

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

* Tobepruned icon on grid view

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

* Update ui/src/app/applications/components/utils.tsx

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-12 12:26:20 -05:00
Michael Crenshaw
e82a6447e2 docs: add FOSSA badge to README (#11956)
* docs: add FOSSA badge to README

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* organization

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* no quality

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-12 10:04:05 -05:00
Alexander Matyushentsev
3b05351675 fix: Argo CD doesn't detect the repo type when repository is scoped (#11959)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2023-01-12 07:34:44 +00:00
jannfis
cc2a27ef14 chore: Add K8s v1.26, v1.25 to CI and remove v1.22 (#11957)
* chore: Add K8s v1.26, v1.25 to CI and remove v1.22

Signed-off-by: jannfis <jann@mistrust.net>

* Accommodate for changed error message from K8s 1.25+

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2023-01-11 18:47:27 -05:00
Michael Crenshaw
8d262f2585 docs: release cycle refresh (#11137)
* docs: release cycle

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* remove TODOs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* add release champion

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* formatting

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* no 2.6 champion yet

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix dates

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* checklist links

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* reorg

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* reuse roadmap doc, add note about Release Champion access requirements

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* note triage access requirement

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* release issue template

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* tweaks

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* simplify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* update dates

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* add notes for next release champion

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-11 17:12:26 -05:00
dependabot[bot]
88936be9ce chore(deps): bump actions/checkout from 3.2.0 to 3.3.0 (#11895)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-11 14:05:56 -05:00
jannfis
1ccaefef1d fix: Explicitly set private key type for GPG key generation (#11944)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2023-01-11 14:03:09 -05:00
reggie-k
913ac509c2 docs: custom health check resource group wildcard (#4212)
Signed-off-by: reggie <reginakagan@gmail.com>

Signed-off-by: reggie <reginakagan@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-11 10:05:23 -05:00
Fish-pro
57d01a472c chore: use format to replace fmt in log output (#11854)
Signed-off-by: chen zechun <zechun.chen@daocloud.io>

Signed-off-by: chen zechun <zechun.chen@daocloud.io>
2023-01-10 15:35:12 -05:00
정승원
3c52ce1873 docs: Add M1 Section in cli_installation.md (#11911)
Signed-off-by: Triumph1 <seungwon.jeong@wesang.com>

Signed-off-by: Triumph1 <seungwon.jeong@wesang.com>
Co-authored-by: Triumph1 <seungwon.jeong@wesang.com>
2023-01-10 15:33:39 -05:00
dependabot[bot]
1c6d2806d1 chore(deps): bump actions/setup-node from 3.5.1 to 3.6.0 (#11896)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](8c91899e58...64ed1c7eab)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 15:24:50 -05:00
dependabot[bot]
720858fbbc chore(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2 (#11929)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](83fd05a356...0b7f8abb15)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 15:20:49 -05:00
Ryan Umstead
cd3fe2d1b1 fix(redis): explicit bind to redis and sentinel for IPv4 clusters (#11388) (#11862)
* fix(redis): explicit bind to redis and sentinel for IPv4 clusters #11388

Signed-off-by: rumstead <rjumstead@gmail.com>

* fix(redis): run manifests generate

Signed-off-by: rumstead <rjumstead@gmail.com>

* fix(redis): run manifests generate

Signed-off-by: rumstead <rjumstead@gmail.com>

* Retrigger CI pipeline

Signed-off-by: rumstead <rjumstead@gmail.com>

Signed-off-by: rumstead <rjumstead@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 14:01:45 -05:00
Soumya Ghosh Dastidar
e32388066d fix: redact secret data in deep links (#11931)
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2023-01-10 09:36:19 -08:00
Michael Crenshaw
ffff9112da ci: add security warnings for PR workflow (#11803)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 10:54:50 -05:00
Michael Crenshaw
efd3802856 docs: add an example ApplicationSet to document all fields (#11799)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 10:53:40 -05:00
Michael Crenshaw
9923159304 chore: upgrade redis to 7.0.7 to avoid CVE-2022-3996 (#11925)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 10:36:18 -05:00
Alex Eftimie
2f8da71a1b fix: parsed url is not exposed (#11816) (#11916)
* fix: parsed url is not exposed (#11816)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* subtler fix, thanks @woehrl01

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2023-01-10 10:32:46 -05:00
Soumya Ghosh Dastidar
7f2dd9e8fc docs: added deep links doc (#11888)
* docs: added deep links doc

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* refactor: resolved review comments

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* refactor: moved cmp and deep links doc to operator manual

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: add warning for templates

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: add note for secret data fields being redacted

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2023-01-10 10:28:16 -05:00
Michael Crenshaw
fddb06fc54 fix: upgrade qs to avoid CVE-2022-24999 (#11743)
* fix: upgrade qs to avoid CVE-2022-24999

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* don't explicitly add dependency

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 09:27:57 -05:00
dependabot[bot]
abf6d73b0c chore(deps): bump actions/cache from 3.2.0 to 3.2.2 (#11839)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.0 to 3.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](c17f4bf466...4723a57e26)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 17:11:28 -05:00
dependabot[bot]
983b9ca584 chore(deps): bump actions/download-artifact from 3.0.1 to 3.0.2 (#11894)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](9782bd6a98...9bc31d5ccc)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 16:51:54 -05:00
Michael Crenshaw
1cc154f151 chore: better error messages (#11738)
* chore: better error messages

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update util/db/cluster.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-09 16:32:27 -05:00
Michael Crenshaw
f6d5c31e98 docs: no longer mark parameter overrides feature as beta (#11673)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-09 16:32:15 -05:00
Michael Crenshaw
842b55b6ba chore: Verbose release notes (#11144)
* chore: verbose release notes

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix duplication

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* typo

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix duplication

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* updates from comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* exclude bot commits

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-09 21:30:22 +00:00
Michael Crenshaw
69b36514e3 docs: note risks of secret-injection plugins (#11617)
* docs: note risks of secret-injection plugins

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* grammar tweaks

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* grammar tweaks

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-09 16:29:25 -05:00
Leonardo Luz Almeida
79bcaa6001 fix: web terminal namespace handler (#11891)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2023-01-09 16:27:58 -05:00
github-actions[bot]
f6abf72b6c [Bot] docs: Update Snyk reports (#11908)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-01-09 09:10:11 -05:00
Alex Eftimie
052a5d2f69 bug: fix url parsing for non git urls (oci://, no protocol etc) (#11819)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2023-01-06 14:39:58 -08:00
Alex Eftimie
c683ab916b fix: remove other occurrences of externalURLS #11887 (#11889)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2023-01-06 14:39:10 -08:00
Mahesh Baliga
8ee4387268 feat: inversion selection support for the resource filter on sync and wait app commands (#10548)
Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>

Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>
2023-01-05 15:52:36 -05:00
Mahesh Baliga
a454093924 feat: set cluster command (#9996)
Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>

Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>
2023-01-05 09:43:08 -05:00
jiwonaid
35fdd38d10 fix: ui cluster server url overlaps (#11873)
Signed-off-by: Jiwon Kim <jiwonaid0@gmail.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-04 19:42:39 +00:00
Alex Eftimie
55da026fd5 fix: Application's own link in UI (#11123) (#11124)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2023-01-04 10:40:51 -08:00
asingh
8f0ef8d326 fix: Applications with suspended jobs now marked "Suspended" instead of "Progressing" (#11603) (#11626)
* fix: add suspended condition

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix: add suspended condition

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* Update go.sum

Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>

* fix: add suspended condition

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix: add suspended condition

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* Update go.sum

Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>

* upgrade notes for 2.6

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-03 16:19:43 -05:00
github-actions[bot]
2c1698022b [Bot] docs: Update Snyk reports (#11865)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2023-01-03 16:33:08 +00:00
dependabot[bot]
566d50f633 chore(deps): bump actions/cache from 3.0.11 to 3.2.0 (#11809)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.2.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](9b0c1fce7a...c17f4bf466)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 13:38:26 -05:00
Michael Crenshaw
50b6577345 fix: web terminal outside argocd namespace (#11166) (#11400)
* fix: web terminal outside argocd namespace (#11166)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* reorganize

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix reference

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* move things around, fix stuff maybe

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-22 13:28:53 -05:00
Michael Crenshaw
43c928e2e5 ci: enforce semantic PR title (#11779)
* ci: enforce semantic PR title

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* concurrency limit

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* remove scopes

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-21 19:35:03 +00:00
Ishita Sequeira
825a0f3aba fix: disable rollback button for apps with multiple sources (#11785)
* disble rollback button for apps with multiple sources

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint errors

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* disble rollback button for apps with multiple sources

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2022-12-21 12:37:24 -05:00
Chris Reilly
ec95d12d9f docs: Update bullet formatting on Progressive Rollouts.md (#11777)
The bullet list in the example format was rendering inline in the paragraph on the doc site rather than showing a bulleted list. This also makes the rest of the doc follow the same convention. 

Signed-off-by: Chris Reilly <chris@chris-reilly.com>

Signed-off-by: Chris Reilly <chris@chris-reilly.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-21 08:52:10 -05:00
Ishita Sequeira
05ab30ebe1 fix: set Path as empty if path is not specified for a source in multiple sources (#11756) (#11774)
* set Path as '' if path is not specified for a source in multiple sources

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update check for not setting value of path

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* cleanup

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* address comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Update ui/src/app/shared/components/revision.tsx

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
Signed-off-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-21 08:44:52 -05:00
dependabot[bot]
82a1e554d5 chore(deps): bump github.com/aws/aws-sdk-go from 1.44.156 to 1.44.164 (#11791)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.156 to 1.44.164.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.156...v1.44.164)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 08:44:14 -05:00
dependabot[bot]
ed4e80c95d chore(deps): bump golang.org/x/term from 0.1.0 to 0.3.0 (#11792)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.1.0 to 0.3.0.
- [Release notes](https://github.com/golang/term/releases)
- [Commits](https://github.com/golang/term/compare/v0.1.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 08:42:42 -05:00
Justin Marquis
bb33e8ca76 chore: fix lint error (#11788)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-12-21 08:13:27 -05:00
Justin Marquis
a50a67e2ad chore: get image digest in seperate step (#11778)
* chore: get image digest in seperate step

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-12-20 17:21:45 -05:00
dependabot[bot]
f8bc471801 chore(deps): bump github.com/fsnotify/fsnotify from 1.5.1 to 1.6.0 (#11553)
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 18:17:09 +00:00
Gaël Jourdan-Weil
58ce42b824 docs: clarify project destination possibilities (#11706)
Clarify that it's possible to reference clusters by `cluster` or by `name`.

Signed-off-by: Gaël Jourdan-Weil <gjourdanweil@gmail.com>

Signed-off-by: Gaël Jourdan-Weil <gjourdanweil@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-20 12:51:41 -05:00
toyamagu
66d2f1e962 fix: sources.ref allow hyphen and underscore (#11775)
Signed-off-by: toyamagu2021@gmail.com <toyamagu2021@gmail.com>

Signed-off-by: toyamagu2021@gmail.com <toyamagu2021@gmail.com>
2022-12-20 12:50:07 -05:00
Nicholas Morey
3d79487e85 fix: support for enabling progressive rollouts from argocd-cmd-params-cm (#11776)
* fix(applicationset): use consistent syntax for env vars

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* fix(manifests): add new appset env var from configmap

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-12-20 12:46:13 -05:00
Ishita Sequeira
0c5d4d8500 chore: change logging level to Debug (#11773)
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2022-12-20 11:37:39 -05:00
toyamagu
f65e0b52f5 docs: bump elasticsearch version to 8.5.1 (#11771)
Signed-off-by: toyamagu2021@gmail.com <toyamagu2021@gmail.com>

Signed-off-by: toyamagu2021@gmail.com <toyamagu2021@gmail.com>
2022-12-20 10:19:47 -05:00
dependabot[bot]
d7baab244f chore(deps): bump github.com/itchyny/gojq from 0.12.9 to 0.12.10 (#11677)
Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.12.9 to 0.12.10.
- [Release notes](https://github.com/itchyny/gojq/releases)
- [Changelog](https://github.com/itchyny/gojq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/itchyny/gojq/compare/v0.12.9...v0.12.10)

---
updated-dependencies:
- dependency-name: github.com/itchyny/gojq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 14:57:43 +00:00
Matt Clegg
231fab4e58 docs: correct SSO configuration URL in example configmap (#11720)
Signed-off-by: Matt Clegg <m@cle.gg>

Signed-off-by: Matt Clegg <m@cle.gg>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-20 08:57:00 -05:00
Phil Wright- Christie
b2bdbedc6a docs: Update example dockerfile (#11721)
The latest tag hasn't been updated in almost a year, and as a result, the ubuntu repositories are out of date and are throwing errors. This updates the example to use a fixed version, which are updated much more frequently.

Signed-off-by: Phil Wright- Christie <philwc@gmail.com>

Signed-off-by: Phil Wright- Christie <philwc@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-20 08:54:27 -05:00
Leonardo Luz Almeida
72c3d0fa58 fix: ssa e2e tests failing after updating to kubectl 1.26 (#11753)
* fix: ssa e2e test failing after updating to kubectl 1.26

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Remove pinned kubectl version

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Cleaner approach to fix e2e test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-12-20 08:48:55 -05:00
Nicholas Morey
68d1a6f3d6 docs: clarify that all labels must exist (#11693)
It's unclear if all or any of the labels need to exist. This clarifies that all of the labels must exist.

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-12-20 08:45:55 -05:00
Balaji Siva
9e392fa432 chore: add OpsMx to USERS.md (#11765)
adding our company name to Argo CD users.

Signed-off-by: Balaji Siva <balaji@opsmx.com>

Signed-off-by: Balaji Siva <balaji@opsmx.com>
2022-12-20 08:43:45 -05:00
dependabot[bot]
852f62c484 chore(deps): bump actions/setup-go from 3.4.0 to 3.5.0 (#11697)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](d0a58c1c4d...6edd4406fa)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 08:40:33 -05:00
yanyx
8df3c19301 doc: correct kustomize demo path (#11762)
Signed-off-by: Yixing Yan <yixingyan@gmail.com>

Signed-off-by: Yixing Yan <yixingyan@gmail.com>
2022-12-20 08:37:35 -05:00
Justin Marquis
1d885b7eea fix: sign container images by digest (#11151)
* chore: sign container images by digest

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* use sha hash

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-12-19 20:44:41 -05:00
Michael Crenshaw
1ad91259bd chore: upgrade go-oidc (#11579)
* chore: upgrade go-oidc

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* take advantage of new error type

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-19 16:31:23 -05:00
Leonardo Luz Almeida
cb467bc231 chore: add kustomize project for testing param CMP locally (#11265)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-12-19 11:29:43 -05:00
Michael Crenshaw
234e44aaad chore: upgrade minimatch to avoid CVE-2022-3517 (#11745)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-19 11:25:40 -05:00
Michael Crenshaw
5bffa7b1ca chore: upgrade git-url-parse to avoid CVE-2022-2900 (#11744)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-19 11:25:34 -05:00
Justin Marquis
0dad6c9321 docs: update cosign docs (#11749)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-12-19 11:18:01 -05:00
wmgroot
cf7eb6aecb docs: add appset progressive rollout strategy proposal (#9979)
Signed-off-by: wmgroot <wmgroot@gmail.com>

Signed-off-by: wmgroot <wmgroot@gmail.com>
2022-12-19 10:57:36 -05:00
github-actions[bot]
7a7636d61d [Bot] Update Snyk reports (#11748)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-12-19 08:45:29 -05:00
Thomas Schuetz
0864a0212f feat: add health checks for keptn resources (#11716)
* feat: add keptnappversion

Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>

* feat: added keptn resource tests

Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>

* feat: fix test for KeptnWorkloadInstance

Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>

* fix: apiVersion and quotes

Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>

Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-17 00:33:20 +00:00
Jellyfrog
c4f6ed857d feat: Extend Cluster.cluster.x-k8s.io health check (#11705)
Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-12-16 18:01:43 -05:00
wei
2f16fcad6e feat: support Knative Serving 1.5 Custom Health Checks (#9719)
* fix: Update account.proto annotaion for gen grpc gateway

Signed-off-by: wei840222 <wei840222@gmail.com>

* fix: Changes from codegen

Signed-off-by: wei840222 <wei840222@gmail.com>

* Retrigger CI pipeline

Signed-off-by: wei.wan <wei.wan@linecorp.com>

* Retrigger CI pipeline

Signed-off-by: wei.wan <wei.wan@linecorp.com>

* fix: Changes from codegen

Signed-off-by: wei <wei840222@gmail.com>

* Retrigger CI pipeline

Signed-off-by: wei.wan <wei.wan@linecorp.com>

* Retrigger CI pipeline

Signed-off-by: wei <wei840222@gmail.com>

* feat: support Knative Serving 1.5 Custom Health Checks

Signed-off-by: wei.wan <wei.wan@linecorp.com>

* fix: fix test fail

Signed-off-by: wei.wan <wei.wan@linecorp.com>

* feat: support Knative Serving 1.5 Custom Health Checks

Signed-off-by: wei840222 <wei840222@gmail.com>

Signed-off-by: wei840222 <wei840222@gmail.com>
Signed-off-by: wei.wan <wei.wan@linecorp.com>
Signed-off-by: wei <wei840222@gmail.com>
Co-authored-by: wei.wan <wei.wan@linecorp.com>
2022-12-16 17:54:46 -05:00
github-actions[bot]
2b1f00dd4e [Bot] Update Snyk reports (#11739)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-12-16 17:53:06 -05:00
wmgroot
ec4e2f26d5 feat: AppSet Progressive Rollouts with RollingSync (#9437) (#10048)
Signed-off-by: Matt Groot <mgroot@indeed.com>

Signed-off-by: Matt Groot <mgroot@indeed.com>
Co-authored-by: Matt Groot <mgroot@indeed.com>
2022-12-16 22:11:58 +00:00
Ishita Sequeira
c6fa942e94 feat: Multiple sources for applications (#2789) (#10432)
* feat: support multiple sources for application

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

remove debug logging and unwanted code

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

fix lint and unit test errors

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

fix lint and unit test errors

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix bug introduced after rebase

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

executed make codegen

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

remove unwanted logging

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

fix ci failures

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix index out of bounds error

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* ui fixes

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add revisions to SyncOperation for rollback

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* change Source to *ApplicationSource in ApplicationSpec

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix env variable read logic for ValueFiles

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update multiple sources doc

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add repository lock and checkout target revision

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

fix codegen

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* checkout all sources before generating manifest

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

generate mock reposerverclient

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update logic for returning ManifestResponse to avoid nil pointer issues

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* 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 <350466+crenshaw-dev@users.noreply.github.com>

Rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update grpc field numbers

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* path resolution tests (#12)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

do things in better ways

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

consolidate

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add regex check for value of source.ref

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add webhook tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

change Source to *ApplicationSource in ApplicationSpec

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

address PR comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Retrigger CI pipeline

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

rebased with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix env variable read logic for ValueFiles

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Address PR comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add repository lock and checkout target revision

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

fix codegen

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* checkout all sources before generating manifest

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* generate mock reposerverclient

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* address comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update logic for returning ManifestResponse to avoid nil pointer issues

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* 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 <350466+crenshaw-dev@users.noreply.github.com>

Rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update grpc field numbers

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add regex check for value of source.ref

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Added unit tests (#15)

* add unit tests 1
* fix lint

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix application parameters tab, rebased UI changes, tests

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* More tests (#16)

* more tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix lint error

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Test get ref sources (#17)

* test GetRefSources

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: ishitasequeira <ishiseq29@gmail.com>

GenerateManifests test (#18)

* GenerateManifests test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Fix broken tests (#19)

* fix broken tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Symlink test (#20)

* check referenced sources for out-of-bounds symlinks

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

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

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* multi source docs (#21)

* multi source docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix warning title

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* clarify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* clarify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* 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 <ishiseq29@gmail.com>

* add auto-sync and hard refresh to e2e tests

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* change refresh type to RefreshTypeNormal for e2e

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update e2e testcase with helm data

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add TestMultiSourceAppWithSourceOverride

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add missing yaml file

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* rebase with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 15:47:08 -05:00
jannfis
66a1e40e39 docs: Document applications in any namespace (#10678)
* docs: Document applications in any namespace

Signed-off-by: jannfis <jann@mistrust.net>

* Fix some code blocks

Signed-off-by: jannfis <jann@mistrust.net>

* Fix link

Signed-off-by: jannfis <jann@mistrust.net>

* docs: Document applications in any namespace

Signed-off-by: jannfis <jann@mistrust.net>

* Fix some code blocks

Signed-off-by: jannfis <jann@mistrust.net>

* Fix link

Signed-off-by: jannfis <jann@mistrust.net>

* Apply reviewer comments

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-12-16 14:41:38 -05:00
Alex Eftimie
a2d756e4ac feat: add google cloud source repo support (#7534) (#11618)
* feat: Add support for cloning Google Cloud Source repos (#7534)

* Google Cloud service account auth

Signed-off-by: David Becher <becher.david@googlemail.com>

* fix: Fill missing struct field (GCP SA key) in cli cmd

Signed-off-by: David Becher <becher.david@googlemail.com>

* fix(ui): Add proxy option when configuring Google Cloud Source repo

Signed-off-by: David Becher <becher.david@googlemail.com>

* fix: Remove secret (GCP SA key) in Get server req

Signed-off-by: David Becher <becher.david@googlemail.com>

* refactor: Do not use context.WithTimeout for Google creds

As the context is used in the background to refresh credentials, it
should not be cancelled.

Signed-off-by: David Becher <becher.david@googlemail.com>

* fix: Use proxy setting only in repo-service, not repocreds-service

Signed-off-by: David Becher <becher.david@googlemail.com>

* test: Create tests for GoogleCloudCreds

This commit refactors the implementation of GoogleCloudCreds in order to
make its methods testable.

Signed-off-by: David Becher <becher.david@googlemail.com>

* fix: Linting issues

Signed-off-by: David Becher <becher.david@googlemail.com>

* chore: Fix typo in docs.

Signed-off-by: David Becher <becher.david@googlemail.com>

* chore: Adjust url-allow-list for lint-docs action

Signed-off-by: David Becher <becher.david@googlemail.com>

* chore: Incorporate suggested refactorings

Signed-off-by: David Becher <becher.david@googlemail.com>

* Delete url-allow-list

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* wrap errors

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* More UI goodies and codegen

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Update docs screenshots

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* move interface up next to other interfaces

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Reduce png size

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* update generated

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* fix whitespace from codegen

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: David Becher <becher.david@googlemail.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: David Becher <becher.david@googlemail.com>
2022-12-16 17:07:26 +00:00
hopisaurus
46975dac36 chore: add Voyager Digital to USERS.md (#11735)
Signed-off-by: hopisaurus <hopisaurus@gmail.com>

Signed-off-by: hopisaurus <hopisaurus@gmail.com>
2022-12-16 16:59:53 +00:00
Detlev V
a89e489316 fix: support relative links in OCI tags query response (#11708)
* fix: support relative links in OCI tags query response

Pagination for OCI tags retrieval is not supported when the
Link header URI is relative.
According to https://docs.docker.com/registry/spec/api/#pagination
and the therein referenced RFC
https://www.rfc-editor.org/rfc/rfc5988#section-5
relative links should be resolved to the initial request URL

Signed-off-by: detvdl <detvdael.services@protonmail.com>

* chore: clean up unused prints & assert errors

Signed-off-by: detvdl <detvdael.services@protonmail.com>

* fix: stop double-escaping repoURL

Signed-off-by: detvdl <detvdael.services@protonmail.com>

* chore: CodeQL CWE-117 log sanitizing

Signed-off-by: detvdl <detvdael.services@protonmail.com>

* chore: remove unnecessary error

Signed-off-by: detvdl <detvdael.services@protonmail.com>

Signed-off-by: detvdl <detvdael.services@protonmail.com>
2022-12-16 16:01:34 +00:00
jannfis
396f5a2186 fix: Unbreak termination of operation with apps in other namespaces (#11239) (#11724)
* fix: Unbreak operation termination

Signed-off-by: jannfis <jann@mistrust.net>

* Revert change to Dockerfile

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-12-16 09:26:16 -05:00
Justin Marquis
daf547407e chore: upgrade helm to most recent version (v3.10.3) (#11725)
* chore: upgrade helm to most recent version (v3.10.3)

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 09:22:51 -05:00
Takuma Kume
9fe4ad3253 feat: ApplicationSet add create-delete policy #9101 (#11107)
* feat: ApplicationSet add create-delete policy

Signed-off-by: 久米 拓馬 <takuma.kume@pepabo.com>

* test for applicationSet policies

Signed-off-by: 久米 拓馬 <takuma.kume@pepabo.com>

* Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md

Co-authored-by: Mubarak Jama <83465122+mubarak-j@users.noreply.github.com>
Signed-off-by: Takuma Kume <takuma.kume@gmail.com>

Signed-off-by: 久米 拓馬 <takuma.kume@pepabo.com>
Signed-off-by: Takuma Kume <takuma.kume@gmail.com>
Co-authored-by: Mubarak Jama <83465122+mubarak-j@users.noreply.github.com>
2022-12-16 09:05:15 -05:00
Matthew Bennett
ed0273039d feat: Allow Matrix generator to have two Git child generators without conflict (#10522) (#10523)
* misc: NoError instead of Error in repository test
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* misc: Extend lint timeout
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* feat: Add GitGenerator.PathParamPrefix
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* auto: Results of codegen
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* test: Add tests for PathParamPrefix
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* docs: Add notes to Matrix/Git generator docs about PathParamPrefix
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* misc: Undo unrelated test change
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* auto: Results of codegen
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

* docs: Add detailed example
Signed-off-by: Lobstrosity <matthew.t.bennett@gmail.com>

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 09:04:44 -05:00
Nandita
9decefe1d6 chore: Add Cloud Scale to USERS.md (#11731)
* Update USERS.md

Add cloud scale 

Signed-off-by: Nandita <105474264+nandita-cloudscaleinc@users.noreply.github.com>

* Update USERS.md

Signed-off-by: Nandita <105474264+nandita-cloudscaleinc@users.noreply.github.com>

* Update USERS.md

Signed-off-by: Nandita <105474264+nandita-cloudscaleinc@users.noreply.github.com>

* Update USERS.md

Signed-off-by: Nandita <105474264+nandita-cloudscaleinc@users.noreply.github.com>

* Update USERS.md

Signed-off-by: Nandita <105474264+nandita-cloudscaleinc@users.noreply.github.com>

Signed-off-by: Nandita <105474264+nandita-cloudscaleinc@users.noreply.github.com>
2022-12-16 08:34:45 -05:00
Leonardo Luz Almeida
1730e4bf4f docs: Clarification of the create namespace feature (#11723)
* docs: Clarification of the create namespace feature

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Address review suggestion

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-12-16 03:29:20 +00:00
Michael Crenshaw
4f7a7f6a1b fix: pin kubectl version (#11726)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-15 20:08:52 -05:00
Alex Eftimie
358088ae1d fix: rollback react to known working version (#11703)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-14 14:06:42 +00:00
Alex Eftimie
3dcab562e2 chore: Add Getyourguide to USERS.md (#11704)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-14 08:06:37 -05:00
Remington Breeze
22e62fe173 feat: expose deep links in UI (#11680)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-12-13 21:07:39 +00:00
Michael Crenshaw
d29c07beaf chore: fix flaky e2e test for immutable fields (#11685)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-13 15:23:00 -05:00
schakrad
ac009c4860 fix: add pod age icon details in tooltip (#10290) (#11170)
* pod-age-icon details added in tooltip

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

* Tooltip change

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>

Signed-off-by: schakradari <58915923+schakrad@users.noreply.github.com>
2022-12-13 09:45:49 -05:00
asingh
586c00d689 fix: appname in searchbar (#11493)
* fix: appname in searchbar

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix: appname in searchbar

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
2022-12-13 09:35:04 -05:00
Marco Lecheler
f4c05ae94c chore: add Mercedes-Benz Tech Innovation to user list (#11682)
Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>

Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>
2022-12-13 09:29:44 -05:00
dependabot[bot]
c4c6bfad16 chore(deps): bump actions/checkout from 3.1.0 to 3.2.0 (#11679)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](93ea575cb5...755da8c3cf)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 08:24:45 -05:00
dependabot[bot]
4431ace96a chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.54 to 0.9.55 (#11678)
Bumps [github.com/ktrysmt/go-bitbucket](https://github.com/ktrysmt/go-bitbucket) from 0.9.54 to 0.9.55.
- [Release notes](https://github.com/ktrysmt/go-bitbucket/releases)
- [Commits](https://github.com/ktrysmt/go-bitbucket/compare/v0.9.54...v0.9.55)

---
updated-dependencies:
- dependency-name: github.com/ktrysmt/go-bitbucket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 04:09:49 +00:00
Soumya Ghosh Dastidar
99b222ce39 feat: show cmpv2 plugins in create app wizard (#11615)
* feat: show cmpv2 plugins in create app wizard

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: fixed doc formatting and sidecar plugin info

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: updated plugin info

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-12-12 18:31:06 -08:00
github-actions[bot]
95c95cf9e6 [Bot] Update Snyk reports (#11649)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-12 20:57:19 -05:00
Michael Crenshaw
627b91ef0e chore: fix flaky e2e test (#11670)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-12 17:33:58 -05:00
dependabot[bot]
ea7a264508 chore(deps-dev): bump @types/cookie from 0.3.3 to 0.5.1 in /ui (#11659)
Bumps [@types/cookie](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cookie) from 0.3.3 to 0.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/cookie)

---
updated-dependencies:
- dependency-name: "@types/cookie"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 22:33:20 +00:00
Michael Crenshaw
be50b1d9af chore: downgrade React to v17 (#11653)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-12 16:40:39 -05:00
Michael Crenshaw
9b6a34260d chore: fix flaky e2e test (#11509) (#11654)
* chore: fix flaky e2e test (#11509)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* don't centralize mock response - tests should be independent

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-12 12:14:00 -05:00
dependabot[bot]
cac7ad9917 chore(deps): bump github.com/casbin/casbin/v2 from 2.59.0 to 2.60.0 (#11656)
Bumps [github.com/casbin/casbin/v2](https://github.com/casbin/casbin) from 2.59.0 to 2.60.0.
- [Release notes](https://github.com/casbin/casbin/releases)
- [Changelog](https://github.com/casbin/casbin/blob/master/.releaserc.json)
- [Commits](https://github.com/casbin/casbin/compare/v2.59.0...v2.60.0)

---
updated-dependencies:
- dependency-name: github.com/casbin/casbin/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 09:21:02 -05:00
Mahesh Baliga
2fef0dee73 feat: pull request labels exposed in Pull Request generator template (#10204) (#11397)
Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>

Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>
2022-12-12 09:17:28 -05:00
Nicholas Morey
85ea242ea7 docs: kustomize has access to build environment (#11643)
Current docs reflect that the build environment is not available to kustomize. Since https://github.com/argoproj/argo-cd/pull/8096 it is now exposed for kustomize. This updates the kustomize section of the docs to reflect that.

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-12-11 15:58:16 -05:00
dependabot[bot]
9832ce8fa7 chore(deps): bump express from 4.17.1 to 4.18.2 in /ui (#11591)
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 15:58:00 -05:00
dependabot[bot]
550b6732e5 chore(deps-dev): bump tslint-react from 3.6.0 to 5.0.0 in /ui (#11559)
Bumps [tslint-react](https://github.com/palantir/tslint-react) from 3.6.0 to 5.0.0.
- [Release notes](https://github.com/palantir/tslint-react/releases)
- [Commits](https://github.com/palantir/tslint-react/compare/3.6.0...5.0.0)

---
updated-dependencies:
- dependency-name: tslint-react
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 15:52:19 -05:00
dependabot[bot]
11fde44428 chore(deps): bump react-paginate from 6.5.0 to 8.1.4 in /ui (#11558)
Bumps [react-paginate](https://github.com/AdeleD/react-paginate) from 6.5.0 to 8.1.4.
- [Release notes](https://github.com/AdeleD/react-paginate/releases)
- [Changelog](https://github.com/AdeleD/react-paginate/blob/master/CHANGELOG.md)
- [Commits](https://github.com/AdeleD/react-paginate/compare/v6.5.0...v8.1.4)

---
updated-dependencies:
- dependency-name: react-paginate
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-11 15:51:26 -05:00
Blake Pettersson
eb576a5f3e feat: add deny sources (#11639) (#11646)
This commit adds the ability to deny a source when it is prefixed with
`!`, in the same manner as with the "deny destinations" feature.

Fixes #11639.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2022-12-11 15:48:09 -05:00
Nicholas Morey
b4c12815f0 docs: fix web terminal step list numbering (#11590)
docs: fix web terminal step list numbering (#11590)
Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-12-09 23:12:14 +00:00
Alexander Matyushentsev
42911db31a fix: Unknown sync operation state on app list page (#11621)
fix: Unknown sync operation state on app list page (#11621)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-12-09 21:47:59 +00:00
Justin Marquis
f0359fbd78 chore: Bump version in master to 2.6.0 (#11641)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-12-09 19:16:37 +00:00
asingh
fba9154ab2 docs: add warning for user when using replace sync option (#11566)
* docs: adding warning to 'replace' sync option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* Update sync-options.md

Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>
2022-12-09 14:01:03 -05:00
Roger Rumao
9f2523b46d includeKinds for APIVersions in cluster info cache (#11241)
Signed-off-by: Roger Rumao <rogerrum@gmail.com>

Signed-off-by: Roger Rumao <rogerrum@gmail.com>
2022-12-09 12:56:18 -05:00
Leonardo Luz Almeida
f80d3bee84 feat: Add support for proxy extensions (#11307)
* feat: Add support for proxy extensions

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* return list of extensions

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add service set in argocd server struct

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* implements cluster name lookup

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add cli docs

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* apply connection config defaults

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add unit tests

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Address review comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add test for invalid extension name

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Address review comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix deadcode lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix unused lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix deadcode lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Better error message

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix deadcode lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix empty branch

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-12-09 12:02:55 -05:00
dependabot[bot]
9dab4f659d chore(deps): bump github.com/aws/aws-sdk-go from 1.44.129 to 1.44.156 (#11629)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.129 to 1.44.156.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.129...v1.44.156)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-09 10:02:22 -05:00
Marco Lecheler
07c0ee55ba fix: only add baseURL in github_app client for GHE client (#11622)
fixes #11613

Co-authored-by: crenshaw-dev <crenshaw-dev@users.noreply.github.com>
Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>

Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>
Co-authored-by: crenshaw-dev <crenshaw-dev@users.noreply.github.com>
2022-12-08 17:32:39 -05:00
Marco Lecheler
a3a3e8d65d fix: set baseURL in github_app client (#11613)
Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>

Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>
2022-12-08 10:28:46 -05:00
Cuong Nguyen Duc
4462debe28 chore: add Trusting Social users list (#11584)
* Add Trusting Social user

Signed-off-by: Cuong Nguyen Duc <90603605+cuong-ts@users.noreply.github.com>

* fixing other

Signed-off-by: Cuong Nguyen Duc <90603605+cuong-ts@users.noreply.github.com>
2022-12-08 09:24:04 -05:00
dependabot[bot]
9ceef4a1a1 chore(deps): bump github.com/casbin/casbin/v2 from 2.57.1 to 2.59.0 (#11607)
Bumps [github.com/casbin/casbin/v2](https://github.com/casbin/casbin) from 2.57.1 to 2.59.0.
- [Release notes](https://github.com/casbin/casbin/releases)
- [Changelog](https://github.com/casbin/casbin/blob/master/.releaserc.json)
- [Commits](https://github.com/casbin/casbin/compare/v2.57.1...v2.59.0)

---
updated-dependencies:
- dependency-name: github.com/casbin/casbin/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 09:14:23 -05:00
dependabot[bot]
74798a68e3 chore(deps): bump github.com/go-redis/redis/v8 from 8.11.3 to 8.11.5 (#11606)
Bumps [github.com/go-redis/redis/v8](https://github.com/go-redis/redis) from 8.11.3 to 8.11.5.
- [Release notes](https://github.com/go-redis/redis/releases)
- [Changelog](https://github.com/go-redis/redis/blob/v8.11.5/CHANGELOG.md)
- [Commits](https://github.com/go-redis/redis/compare/v8.11.3...v8.11.5)

---
updated-dependencies:
- dependency-name: github.com/go-redis/redis/v8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 09:13:48 -05:00
dependabot[bot]
6c5da3f60b chore(deps): bump github.com/Masterminds/semver/v3 from 3.1.1 to 3.2.0 (#11605)
Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/Masterminds/semver/releases)
- [Changelog](https://github.com/Masterminds/semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Masterminds/semver/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: github.com/Masterminds/semver/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 09:12:29 -05:00
Soumya Ghosh Dastidar
661afe0ad9 feat: added deep links backend changes (#11401)
* feat: added deep links backend changes

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: add rbac check to list links services

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: removed project param and updated sample config

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: update sample config

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-12-07 11:39:45 -08:00
Alex Eftimie
30e37b7bb4 fix: misc css fixes for mobile (#5705) (#11508)
* Misc css fixes for mobile

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* More fixes for mobile

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* fix ui tests. bring back application status labels

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-07 12:57:26 -05:00
Alex Eftimie
13dd04fa71 fix(helm): login OCI Helm dependencies correctly (#8563) (#11327)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-07 12:42:10 -05:00
Alex Eftimie
6ecd70ae74 fix(helm): helm v3 doesn't have these flags (#11100) (#11540)
* fix: helm v3 doesn't have these flags

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Revert repoAdd change. Was to greedy, ca-file is needed there

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-07 12:41:43 -05:00
dependabot[bot]
c9f54652ba chore(deps): bump github.com/go-openapi/loads from 0.19.4 to 0.21.2 (#11569)
Bumps [github.com/go-openapi/loads](https://github.com/go-openapi/loads) from 0.19.4 to 0.21.2.
- [Release notes](https://github.com/go-openapi/loads/releases)
- [Commits](https://github.com/go-openapi/loads/compare/v0.19.4...v0.21.2)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/loads
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 11:08:36 -05:00
dependabot[bot]
5a8f64b428 chore(deps): bump sigs.k8s.io/structured-merge-diff/v4 (#11580)
Bumps [sigs.k8s.io/structured-merge-diff/v4](https://github.com/kubernetes-sigs/structured-merge-diff) from 4.2.1 to 4.2.3.
- [Release notes](https://github.com/kubernetes-sigs/structured-merge-diff/releases)
- [Changelog](https://github.com/kubernetes-sigs/structured-merge-diff/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/structured-merge-diff/compare/v4.2.1...v4.2.3)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/structured-merge-diff/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 11:03:11 -05:00
Edgaras
434f35eec5 chore: add Vinted to users list (#11214)
Signed-off-by: Edgaras <edgaras@apsega.lt>

Signed-off-by: Edgaras <edgaras@apsega.lt>
2022-12-06 16:08:13 +00:00
Michael Vittrup Larsen
2e9f57316a docs: Add skipCrds and ignoreMissingValueFiles to application.yaml example (#11565) 2022-12-06 09:50:51 -05:00
dependabot[bot]
507bd9d2d0 chore(deps): bump github.com/go-openapi/runtime from 0.19.4 to 0.25.0 (#11568)
Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.19.4 to 0.25.0.
- [Release notes](https://github.com/go-openapi/runtime/releases)
- [Commits](https://github.com/go-openapi/runtime/compare/v0.19.4...v0.25.0)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 09:25:28 -05:00
Nathanael Liechti
4018fd8924 feat: Allow proxy to be saved when creating repoCreds (#11351) (#11425)
* fix: allow proxy to be saved in repoCreds (https + github app)

Signed-off-by: Nathanael Liechti <technat@technat.ch>

* chore: changes from codegen

Signed-off-by: Nathanael Liechti <technat@technat.ch>

* chore: add unit test for CreateRepoCreds

Signed-off-by: Nathanael Liechti <technat@technat.ch>

Signed-off-by: Nathanael Liechti <technat@technat.ch>
2022-12-06 09:17:36 -05:00
asingh
d2699888d1 fix: sidebar css (#11531)
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2022-12-05 16:59:29 -08:00
Alex Eftimie
cf7bf14541 feat: show app age in application list view (#11209) (#11502)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-05 16:59:05 -08:00
Nathanael Liechti
5bb937cf3a fix: use repository GithubAppCreds proxy if set (#11422)
Signed-off-by: Nathanael Liechti <technat@technat.ch>

Signed-off-by: Nathanael Liechti <technat@technat.ch>
2022-12-05 12:25:55 -05:00
Murphy Chen
f25f0b2cee add otel interceptor (#11561)
Signed-off-by: minquan.chen <minquan.chen@daocloud.io>

Signed-off-by: minquan.chen <minquan.chen@daocloud.io>
2022-12-05 09:37:07 -05:00
Dieter Bocklandt
89792b4cc1 docs: update how to access arrays in Go templates (#11562)
Signed-off-by: Dieter Bocklandt <dieterbocklandt@gmail.com>

Signed-off-by: Dieter Bocklandt <dieterbocklandt@gmail.com>
2022-12-05 08:52:03 -05:00
dependabot[bot]
cbb430337f chore(deps): bump github.com/imdario/mergo from 0.3.12 to 0.3.13 (#11555)
Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo) from 0.3.12 to 0.3.13.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/0.3.12...v0.3.13)

---
updated-dependencies:
- dependency-name: github.com/imdario/mergo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 08:41:34 -05:00
dependabot[bot]
44a4ec16b5 chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.40 to 0.9.54 (#11554)
Bumps [github.com/ktrysmt/go-bitbucket](https://github.com/ktrysmt/go-bitbucket) from 0.9.40 to 0.9.54.
- [Release notes](https://github.com/ktrysmt/go-bitbucket/releases)
- [Commits](https://github.com/ktrysmt/go-bitbucket/compare/v0.9.40...v0.9.54)

---
updated-dependencies:
- dependency-name: github.com/ktrysmt/go-bitbucket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 08:40:55 -05:00
dependabot[bot]
ac71ec8dfb chore(deps): bump github.com/valyala/fasttemplate from 1.2.1 to 1.2.2 (#11552)
Bumps [github.com/valyala/fasttemplate](https://github.com/valyala/fasttemplate) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/valyala/fasttemplate/releases)
- [Commits](https://github.com/valyala/fasttemplate/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasttemplate
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 08:38:03 -05:00
Jocelyn Thode
8e57f5383e chore: Update notifications-engine dependency (#11479)
* chore: update `notifications-engine`

Signed-off-by: Jocelyn Thode <jocelyn@thode.email>

* chore: generate notifications docs

Signed-off-by: Jocelyn Thode <jocelyn@thode.email>

Signed-off-by: Jocelyn Thode <jocelyn@thode.email>
2022-12-05 11:18:12 +02:00
Dan Garfield
42efcb36bf [Hack] Add concurrency to cluster creation in resource generator. (#11266)
* add threading to cluster creation

Signed-off-by: Dan Garfield <dan@codefresh.io>

* Add default values

Signed-off-by: Dan Garfield <dan@codefresh.io>

* Cleanup

Signed-off-by: Dan Garfield <dan@codefresh.io>

* Move external dependency to internal

Signed-off-by: Dan Garfield <dan@codefresh.io>

* ability to run cluster generation in parallel

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* fix linter

Signed-off-by: pashavictorovich <pavel@codefresh.io>

Signed-off-by: Dan Garfield <dan@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
2022-12-04 17:27:19 +02:00
Philip Haberkern
62c85d6f39 docs: Added ARGOCD_ENV_ prefix to FOO (#11545)
Signed-off-by: Philip Haberkern <59010269+thedatabaseme@users.noreply.github.com>

Signed-off-by: Philip Haberkern <59010269+thedatabaseme@users.noreply.github.com>
2022-12-03 21:53:19 -05:00
dependabot[bot]
9839564a67 chore(deps-dev): bump babel-jest from 24.9.0 to 26.6.3 in /ui (#11483)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 08:29:12 -08:00
dependabot[bot]
2b4c5659ea chore(deps-dev): bump @babel/preset-react from 7.7.0 to 7.18.6 in /ui (#11489)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 08:27:56 -08:00
dependabot[bot]
f6501accee chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /ui (#11533)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 08:24:50 -08:00
Duncan
2b3ac697d7 docs: Add CSI secret driver to the secret management options (#10900)
Signed-off-by: Duncan <62943186+duncan485@users.noreply.github.com>

Signed-off-by: Duncan <62943186+duncan485@users.noreply.github.com>
2022-12-02 08:51:04 -05:00
Antoine Pultier
c9af1f8eec docs: Improve Keycloak documentation for command line sign-in (#8758)
Documenting what is discussed in #2932

Signed-off-by: Antoine Pultier <antoine.pultier@sintef.no>

Signed-off-by: Antoine Pultier <antoine.pultier@sintef.no>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
2022-12-02 08:47:09 -05:00
Cedar
ac7be1f4b4 docs: Update operator manual installation helm available url (#11120)
Signed-off-by: cedarkuo <cedarkuo@gmail.com>

Signed-off-by: cedarkuo <cedarkuo@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-02 08:45:42 -05:00
Gerald Spencer
48da592248 docs: Update Pull Request generator documentation to include application lifecycle (#11274)
* Update Pull Request generator documentation

The lifecycle of the generated applications was not explained

Signed-off-by: Gerald Spencer <Geethree@users.noreply.github.com>

* Update docs/operator-manual/applicationset/Generators-Pull-Request.md

Co-authored-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Gerald Spencer <Geethree@users.noreply.github.com>

Signed-off-by: Gerald Spencer <Geethree@users.noreply.github.com>
Co-authored-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-12-02 08:44:31 -05:00
dependabot[bot]
7a1e8273f3 chore(deps-dev): bump @types/prop-types from 15.7.1 to 15.7.5 in /ui (#11487)
Bumps [@types/prop-types](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prop-types) from 15.7.1 to 15.7.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prop-types)

---
updated-dependencies:
- dependency-name: "@types/prop-types"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 05:17:08 +00:00
dependabot[bot]
cfad9edd4a chore(deps): bump actions/setup-go from 3.3.1 to 3.4.0 (#11535)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](c4a742cab1...d0a58c1c4d)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 04:32:52 +00:00
dependabot[bot]
36c3d72a87 chore(deps): bump softprops/action-gh-release from 0.1.14 to 0.1.15 (#11534)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 0.1.14 to 0.1.15.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](1e07f43987...de2c0eb89a)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 04:25:01 +00:00
dependabot[bot]
16d50c2267 chore(deps): bump github.com/google/go-jsonnet from 0.18.0 to 0.19.1 (#11484)
Bumps [github.com/google/go-jsonnet](https://github.com/google/go-jsonnet) from 0.18.0 to 0.19.1.
- [Release notes](https://github.com/google/go-jsonnet/releases)
- [Changelog](https://github.com/google/go-jsonnet/blob/master/.goreleaser.yml)
- [Commits](https://github.com/google/go-jsonnet/compare/v0.18.0...v0.19.1)

---
updated-dependencies:
- dependency-name: github.com/google/go-jsonnet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 04:16:04 +00:00
dependabot[bot]
ac6949b0de chore(deps): bump github.com/mattn/go-zglob from 0.0.3 to 0.0.4 (#11486)
Bumps [github.com/mattn/go-zglob](https://github.com/mattn/go-zglob) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/mattn/go-zglob/releases)
- [Commits](https://github.com/mattn/go-zglob/compare/v0.0.3...v0.0.4)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-zglob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 23:08:00 -05:00
Nicholas Morey
3ac4483052 docs: clarify finalizer effect and link to app-of-apps (#11272)
* docs: clarify deletion finalizer

- Provide a concise explanation of the effect of the finalizer. Which clarifies that it only takes effect once the Application has been deleted.

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* docs: fix wording and spelling

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* docs: fix spelling

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-12-01 22:50:10 -05:00
Soumya Ghosh Dastidar
470ac1343f feat: add support for plugin name in CMPv2 (#11290) (#11341)
* feat: add support for plugin name in cmpV2

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: updated e2e test to use name for CMPv2 plugin

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* docs: updated docs

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: check whether final socket path is inside sock dir or not

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-12-01 22:30:09 -05:00
Remington Breeze
9a90bf8b1e chore: upgrade React version (#11467)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-12-01 22:24:44 -05:00
dependabot[bot]
addc758963 chore(deps-dev): bump @types/lodash-es from 4.17.5 to 4.17.6 in /ui (#11488)
Bumps [@types/lodash-es](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash-es) from 4.17.5 to 4.17.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash-es)

---
updated-dependencies:
- dependency-name: "@types/lodash-es"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 22:15:28 -05:00
dependabot[bot]
2a9cc279ab chore(deps): bump github.com/golang-jwt/jwt/v4 from 4.4.2 to 4.4.3 (#11485)
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.4.2...v4.4.3)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 22:11:59 -05:00
dependabot[bot]
2bb3820a62 chore(deps): bump github.com/alicebob/miniredis/v2 from 2.14.2 to 2.23.1 (#11481)
Bumps [github.com/alicebob/miniredis/v2](https://github.com/alicebob/miniredis) from 2.14.2 to 2.23.1.
- [Release notes](https://github.com/alicebob/miniredis/releases)
- [Changelog](https://github.com/alicebob/miniredis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alicebob/miniredis/compare/v2.14.2...v2.23.1)

---
updated-dependencies:
- dependency-name: github.com/alicebob/miniredis/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 22:11:17 -05:00
dependabot[bot]
489b670a96 chore(deps): bump github.com/evanphx/json-patch (#11482)
Bumps [github.com/evanphx/json-patch](https://github.com/evanphx/json-patch) from 4.12.0+incompatible to 5.6.0+incompatible.
- [Release notes](https://github.com/evanphx/json-patch/releases)
- [Commits](https://github.com/evanphx/json-patch/compare/v4.12.0...v5.6.0)

---
updated-dependencies:
- dependency-name: github.com/evanphx/json-patch
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 22:10:11 -05:00
Michael Merrill
f9f27cc644 fix: add missing changes for bitbucket cloud SCM provider (#10143) (#11150)
Signed-off-by: mmerrill3 <jjpaacks@gmail.com>

Signed-off-by: mmerrill3 <jjpaacks@gmail.com>
2022-11-30 21:01:48 -05:00
Alexander Matyushentsev
67ae39e99d fix: expose missing ReactDOM to enable extensions implementation (#11495)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-11-30 18:44:01 +00:00
Gene Hand
981a1f1c9f chore: Update to v3 of the sprig library for ApplicationSets (#11277) (#11292)
* Update to v3 of the sprig library for ApplicationSets

Signed-off-by: Gene Hand <ghand@doximity.com>

* go mod tidy

Signed-off-by: Gene Hand <ghand@doximity.com>

* add Doximity to the users list

Signed-off-by: Gene Hand <ghand@doximity.com>

* empty commit to retest

Signed-off-by: Gene Hand <ghand@doximity.com>

* note the sprig semver change in the 2.6 upgrade guide

Signed-off-by: Gene Hand <ghand@doximity.com>

Signed-off-by: Gene Hand <ghand@doximity.com>
2022-11-29 22:34:06 +00:00
Michael Crenshaw
95b38f1db4 feat: parameterized config management plugins (#9135) (#9216)
* feat: parameterized CMPs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* values types for parameters

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Add types for CMP announcement

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Reorg

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* finish type

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* First pass at working GetParametersAnnouncement

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Typos

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Make all fields optional

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Make sure response makes it to repo server

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Refactor for testing

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* send build env to param announcement gen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* test parameter announcement

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* environ tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Rename workdir to app dir

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

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

* Add types for CMP announcement

Signed-off-by: zachaller <zachaller@hotmail.com>

* Reorg

Signed-off-by: zachaller <zachaller@hotmail.com>

* finish type

Signed-off-by: zachaller <zachaller@hotmail.com>

* First pass at working GetParametersAnnouncement

Signed-off-by: zachaller <zachaller@hotmail.com>

* Typos

Signed-off-by: zachaller <zachaller@hotmail.com>

* Make all fields optional

Signed-off-by: zachaller <zachaller@hotmail.com>

* Make sure response makes it to repo server

Signed-off-by: zachaller <zachaller@hotmail.com>

* Refactor for testing

Signed-off-by: zachaller <zachaller@hotmail.com>

* values types for parameters

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* send build env to param announcement gen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* test parameter announcement

* tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* environ tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Rename workdir to app dir

Signed-off-by: zachaller <zachaller@hotmail.com>

* handle empty command, start ui work

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix order

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix map merging, make params read-only

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: zachaller <zachaller@hotmail.com>

* Add helm PoC example plugin

Signed-off-by: zachaller <zachaller@hotmail.com>

* example as kustomize overlay

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Parameterized cmps docs (#12)

* use printf instead of echo

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* test for temp dir cleanup

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle empty params

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle empty values

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* consolidate types

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* remove duplicate info

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* add warning about param announcements vs param values

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* tests (#13)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix types

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix codegen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix codegen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* revert test hack

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs correction

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix indentation

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix spacing

Signed-off-by: CI <michael@crenshaw.dev>

* move util function to util file and add test

Signed-off-by: CI <michael@crenshaw.dev>

* wrap error

Signed-off-by: CI <michael@crenshaw.dev>

* correct version number

Signed-off-by: CI <michael@crenshaw.dev>

* document necessity of collectionType param

Signed-off-by: CI <michael@crenshaw.dev>

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

Signed-off-by: CI <michael@crenshaw.dev>

* fix things so that they are not broken

Signed-off-by: CI <michael@crenshaw.dev>

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

Signed-off-by: CI <michael@crenshaw.dev>

* codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* DON'T PANIC

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: zachaller <zachaller@hotmail.com>
2022-11-29 13:08:32 -05:00
Michael Crenshaw
362abff610 chore: dependabot for npm (#11474)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-29 12:14:35 -05:00
Michael Crenshaw
012ffd584a chore: pin actions (#11360)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-29 12:13:16 -05:00
dependabot[bot]
50ed4bcc02 chore(deps): bump github.com/bradleyfalzon/ghinstallation/v2 (#11469)
Bumps [github.com/bradleyfalzon/ghinstallation/v2](https://github.com/bradleyfalzon/ghinstallation) from 2.0.4 to 2.1.0.
- [Release notes](https://github.com/bradleyfalzon/ghinstallation/releases)
- [Commits](https://github.com/bradleyfalzon/ghinstallation/compare/v2.0.4...v2.1.0)

---
updated-dependencies:
- dependency-name: github.com/bradleyfalzon/ghinstallation/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 10:20:30 -05:00
fsl
a14aa81169 fix: upgrade golang.org/x/net vuln (#11447)
Signed-off-by: fsl <1171313930@qq.com>

Signed-off-by: fsl <1171313930@qq.com>
2022-11-29 15:11:00 +00:00
dependabot[bot]
18435c998e chore(deps): bump google.golang.org/grpc from 1.45.0 to 1.51.0 (#11454)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.45.0 to 1.51.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.45.0...v1.51.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 15:09:28 +00:00
Michael Crenshaw
b8685bb243 chore: use set-output environment file (#10999)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-29 09:48:02 -05:00
Adrian Moisey
c30b7775ce docs: fix markdown formatting (#11460)
The exiting table is a bit off

Signed-off-by: Adrian Moisey <adrian@changeover.za.net>

Signed-off-by: Adrian Moisey <adrian@changeover.za.net>
2022-11-29 09:19:14 -05:00
dependabot[bot]
f6f183d1d9 chore(deps): bump github.com/gosimple/slug from 1.12.0 to 1.13.1 (#11452)
Bumps [github.com/gosimple/slug](https://github.com/gosimple/slug) from 1.12.0 to 1.13.1.
- [Release notes](https://github.com/gosimple/slug/releases)
- [Commits](https://github.com/gosimple/slug/compare/v1.12.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/gosimple/slug
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 08:35:51 -05:00
dependabot[bot]
47c17932ac chore(deps): bump github.com/golang-jwt/jwt/v4 from 4.2.0 to 4.4.2 (#11468)
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.2.0 to 4.4.2.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.2.0...v4.4.2)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 08:33:48 -05:00
dependabot[bot]
7c880c6006 chore(deps): bump github.com/itchyny/gojq from 0.12.3 to 0.12.9 (#11471)
Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.12.3 to 0.12.9.
- [Release notes](https://github.com/itchyny/gojq/releases)
- [Changelog](https://github.com/itchyny/gojq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/itchyny/gojq/compare/v0.12.3...v0.12.9)

---
updated-dependencies:
- dependency-name: github.com/itchyny/gojq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 08:32:05 -05:00
asingh
b9712fc908 fix: sonarlint issue (#11472)
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
2022-11-29 08:29:57 -05:00
Remington Breeze
83463c67be fix: incorrect can-i documentation (#11463)
Signed-off-by: Remington Breeze <remington@breeze.software>
Signed-off-by: Jesse Suen <jessesuen@users.noreply.github.com>
Co-authored-by: Jesse Suen <jessesuen@users.noreply.github.com>
2022-11-28 23:06:30 +00:00
Leonardo Luz Almeida
3db9bff3da chore: update otel libraries to 1.11.1 (#11461)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-11-28 16:24:16 -05:00
usernameisnull
752bc5f80d chore:remove redundant parentheses (#11436)
Signed-off-by: mabing <bing.ma@daocloud.io>

Signed-off-by: mabing <bing.ma@daocloud.io>
Co-authored-by: mabing <bing.ma@daocloud.io>
2022-11-26 13:45:19 -05:00
Saumeya Katyal
ba8931b67d fix: ui banner covering sidebar (#11101) 2022-11-25 13:52:00 -08:00
Alex Eftimie
9b6992af61 feat: Add wildcard support in OCI Helm Repositories targetRevision (#6686) (#10641)
* Add wildcard support in OCI Helm Repositories

A naive approach, adapting existing code for fetching the index.

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Fix unittest missing mock

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Fix release resolution also in Manual Sync dialog

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Show target revision in application list. Tiles and Table updated

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Follow Link rel=next in tags response for tag list completion (signed)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Wrap errors into fmt.Errorf according to PR review

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Address PR comments, add test for tags MaxVersion and pagination

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Apply suggestions from code review

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* more feedback from pr

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Revert url.JoinPath change - only available in 1.19

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* use strings.Join. add unittest

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Safe access to app.status.sync object

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Remove status.revision from UI. It doesn't bring much value and it does clutter the ui a bit

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Update util/helm/client.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update util/helm/client.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-25 21:51:30 +00:00
dependabot[bot]
a0d7b5c2ba chore(deps): bump gopkg.in/go-playground/webhooks.v5 (#11369)
Bumps [gopkg.in/go-playground/webhooks.v5](https://github.com/go-playground/webhooks) from 5.11.0 to 5.17.0.
- [Release notes](https://github.com/go-playground/webhooks/releases)
- [Commits](https://github.com/go-playground/webhooks/compare/v5.11.0...v5.17.0)

---
updated-dependencies:
- dependency-name: gopkg.in/go-playground/webhooks.v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-25 21:13:14 +00:00
Nicholas Morey
e9598a3677 docs: improve build env variable list formatting (#11429)
* docs: normalize build env list

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* docs: use table instead of list

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* docs: remove separator from description

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-11-25 15:31:04 -05:00
Nick Mohoric
e824f5e210 fix: Add support for /api/v1/applicationsets* via HTTP (#11409)
Signed-off-by: Nick Mohoric <nmohoric@hearst.com>

Signed-off-by: Nick Mohoric <nmohoric@hearst.com>
2022-11-25 15:14:25 -05:00
dependabot[bot]
ab51bc3cde chore(deps): bump github.com/prometheus/client_golang (#11366)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-25 14:31:44 -05:00
dependabot[bot]
1eaaa56a45 chore(deps): bump github.com/casbin/casbin/v2 from 2.39.1 to 2.57.1 (#11420)
Bumps [github.com/casbin/casbin/v2](https://github.com/casbin/casbin) from 2.39.1 to 2.57.1.
- [Release notes](https://github.com/casbin/casbin/releases)
- [Changelog](https://github.com/casbin/casbin/blob/master/.releaserc.json)
- [Commits](https://github.com/casbin/casbin/compare/v2.39.1...v2.57.1)

---
updated-dependencies:
- dependency-name: github.com/casbin/casbin/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-25 13:26:04 -05:00
Nathanael Liechti
6509d0b92f docs: update remote-debugging-docs (#11424)
Fix wrong port mapping, add explanation what actually happens and remove misleading phrase in vs-code section

Signed-off-by: Nathanael Liechti <technat@technat.ch>

Signed-off-by: Nathanael Liechti <technat@technat.ch>
2022-11-25 13:24:52 -05:00
Michael Crenshaw
a9da5d83d6 chore: push GHCR image to repo scope (#11394)
* chore: push GHCR image to repo scope

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* missed a spot

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-22 13:43:32 -05:00
asingh
15b0785ba4 fix: hide app namespace on the ui (#11111) (#11247)
* fix: hide app namespace when irrelevant (#11111)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* wire up setting

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix: hide app namespace

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix: hide app namespace

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* add null check

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* Update ui/src/app/applications/components/utils.tsx

Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>

* lint

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix name generation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: asingh <11219262+ashutosh16@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
2022-11-21 22:16:36 +00:00
Robert Kelly
437cd4f1b5 chore: add Liatrio to the official users list (#11377)
Signed-off-by: Robert Kelly <RobertKelly@users.noreply.github.com>

Signed-off-by: Robert Kelly <RobertKelly@users.noreply.github.com>
2022-11-21 16:33:13 -05:00
Alex Eftimie
3f5c2eb60c feat(ui): add a filter for auto sync (#11357) 2022-11-21 09:20:34 -08:00
Soumya Ghosh Dastidar
13026e28ac proposal: Deep Links (#10278) 2022-11-21 08:56:48 -08:00
Alex Eftimie
967999df79 bug(ui): fix incomplete drop-down resource acctions (#11384)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-11-21 08:17:56 -08:00
Justin Marquis
a259654e32 chore: fix username for ghcr.io (#11373)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-11-19 19:52:32 +00:00
dependabot[bot]
bd6bb09320 chore(deps): bump actions/upload-artifact from 2 to 3 (#11365)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 22:07:33 -05:00
dependabot[bot]
eaf6e9e0a0 chore(deps): bump actions/setup-node from 1 to 3 (#11364)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 22:06:08 -05:00
dependabot[bot]
9960f54166 chore(deps): bump actions/cache from 1 to 3 (#11363)
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 22:03:55 -05:00
dependabot[bot]
dc959e900f chore(deps): bump codecov/codecov-action from 1 to 3 (#11362)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 22:02:09 -05:00
Nick Dombroski
ea3215bc0a chore: Include error when dex config unmarshal fails (#11349)
Signed-off-by: Nick Dombroski <nick.m.dombroski@gmail.com>

Signed-off-by: Nick Dombroski <nick.m.dombroski@gmail.com>
2022-11-18 21:15:45 -05:00
dependabot[bot]
7d24fe7e08 chore(deps): bump actions/download-artifact from 2 to 3 (#11361)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 21:06:09 -05:00
Alex Eftimie
17e9ef409a docs: fix references to cli tools moved under argocd admin (#11181)
* docs: fix references to cli tools moved under argocd admin

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* attempt to fix the build by fiddling the generated docs

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Update hack/gen-catalog/main.go

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* docs: fix doc generator for argocd admin notifications

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* docs: fix doc generator diff

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-11-18 21:02:59 -05:00
Chauncey
f73e7014ce feat: Implement karmada CRD health checks (#11192)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
2022-11-18 21:01:23 -05:00
Alexander Matyushentsev
097ed6f108 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 <AMatyushentsev@gmail.com>

* add missing unit test

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-11-18 20:57:34 -05:00
F1ko
812664cbb1 fix: remove 0.0.0.0/0 ipblock from network policies (#11321) (#11322)
* fix: remove 0.0.0.0/0 ipblock from network policies

https://github.com/argoproj/argo-cd/issues/11321
Signed-off-by: Filip Nikolic <oss.filipn@gmail.com>

* chore: add postfinance to the list of users

Signed-off-by: Filip Nikolic <oss.filipn@gmail.com>

Signed-off-by: Filip Nikolic <oss.filipn@gmail.com>
2022-11-18 20:56:15 -05:00
Pier
299af2172f chore: add user to list (#11336)
* docs: add user to list

Signed-off-by: Pier <53210578+pie-r@users.noreply.github.com>

* retrigger the pipeline

Signed-off-by: Pier <53210578+pie-r@users.noreply.github.com>

Signed-off-by: Pier <53210578+pie-r@users.noreply.github.com>
2022-11-18 20:54:35 -05:00
Phước Trung
c9dfd41308 chore: add Wolffun Game to USERS (#11342)
Signed-off-by: Phước Trung <93299415+trungdlp-wolffun@users.noreply.github.com>

Signed-off-by: Phước Trung <93299415+trungdlp-wolffun@users.noreply.github.com>
2022-11-18 20:53:59 -05:00
Michael Crenshaw
aa02e79401 chore: grant packages.write for image workflow (#11358)
* chore: grant packages.write for image workflow

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* use github token instead of PAT

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-19 00:44:48 +00:00
William Van Hevelingen
3b36f34d8f chore: Enable dependabot for automatic dependency updates (#8339)
Signed-off-by: William Van Hevelingen <william.vanhevelingen@acquia.com>

Signed-off-by: William Van Hevelingen <william.vanhevelingen@acquia.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-19 00:07:24 +00:00
Alex Eftimie
0ea88b7d72 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 <alex.eftimie@getyourguide.com>
2022-11-18 22:29:22 +00:00
Alex Eftimie
0c242fe535 fix(ui): fix sorting of parameters. Make the Remove override button clickable again (#11316)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2022-11-18 20:47:57 +00:00
Alex Eftimie
a72b262b5e feat: display auto sync status in application details view (#11200)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2022-11-18 18:51:13 +00:00
Alex Eftimie
2173b87b99 fix: set HELM_CONFIG_HOME dir for oci registry authentication; fixes: #11284 (#11285)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-11-17 14:23:16 -08:00
Justin Marquis
8f00d347b5 docs: update contributor meeting times (#11294)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-11-17 11:32:59 -05:00
Edmund Rhudy
c1b0c7ba4c fix: UI can now get clusters with slashes in name (#9812) (#9813)
* fix: #9812 UI can now get clusters with slashes in name

Fixes #9812

If a cluster name has a slash in it, the API would not be able
to fetch that cluster and would display "in-cluster (undefined)"
for that application. This fixes that issue by URI-encoding
the cluster name on the UI side and URI-decoding the cluster name
on the API side.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
2022-11-17 09:55:17 -05:00
Michael Crenshaw
e1c21480e4 chore: use --password-stdin for docker login (#11331)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-17 14:43:59 +00:00
Alexander Matyushentsev
9bd0ed0d56 fix: application list api is very slow when fields query parameter is supplied (#11250)
* fix: application list api is very slow when fields query parameter is supplied

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* regenerate docs

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* document the requirement to maintain support fields of application list/watch api

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-11-16 09:42:05 -08:00
Husni Rofiq Muttaqin
d2da477791 chore: Add Divistant to Users list (#11298)
Signed-off-by: hrofiq <husni@divistant.com>

Signed-off-by: hrofiq <husni@divistant.com>
Co-authored-by: hrofiq <husni@divistant.com>
2022-11-15 20:00:32 -05:00
Patrice Chalin
0240958c15 docs: Use new Google Analytics 4 ID (#11291)
Signed-off-by: Patrice Chalin <chalin@cncf.io>

Signed-off-by: Patrice Chalin <chalin@cncf.io>
2022-11-15 13:41:27 -08:00
Shuai Zhang
4328bfc1ff fix: allow resolving repo root as jsonnet lib path (#11119)
Signed-off-by: shuai-zh <shuaiz8023@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-15 12:56:48 -08:00
Nicholas Morey
817161a33b docs: add info about sync interval (#11281)
* docs: add info about sync interval

Add information about the sync interval to the Automated Sync Policy page. Users will likely check this page when looking for how to configure the sync interval.

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* docs: add default value

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
2022-11-14 17:52:15 +00:00
github-actions[bot]
87a0d02b3a [Bot] Update Snyk reports (#11282)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-11-14 10:22:43 -05:00
Alex Eftimie
16c6e36ee4 chore(docs): fix build, prepare for google analytics v4 (#10850) (#11248)
* fix docs build. prepare for google analytics v4

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* fix build

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* fix build codegen check

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-11-14 08:50:05 -05:00
Ferenc Horvay
8375840344 fix: add check for trailing/leading whitespace in project role group names (#10919) (#10988)
* fix: add check for trailing/leading whitespace in project role group names

Signed-off-by: Ferenc <ferenc.horvay@web.de>

* fix: change expected output on whitespace test

Signed-off-by: Ferenc <ferenc.horvay@web.de>

* fix: apply requested changes

Signed-off-by: Ferenc <ferenc.horvay@web.de>

Signed-off-by: Ferenc <ferenc.horvay@web.de>
2022-11-14 08:28:06 -05:00
Michael Crenshaw
41b1ebef83 docs: fix formatting (#11245)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-09 21:27:11 +00:00
Alex Eftimie
4cf807e67a fix(ui): show orphaned as gray. fixes: #11180 (#11218)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-11-09 11:46:42 -08:00
ChangZhuo Chen (陳昌倬)
6344d9623e docs: add example for config management plugins exclusion (#11187)
Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@czchen.org>

Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@czchen.org>
2022-11-09 08:29:22 -05:00
Justin Marquis
1a8dd249c0 fix: use non distroless image for dex (#11219)
* fix: use non distroless image for dex

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* change image in ci workflow

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-11-09 08:22:06 -05:00
Leonardo Luz Almeida
b0dab38c7d fix: point gitops-engine to current master (#11230)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-11-08 22:46:44 +00:00
Jesse Suen
1f0d4cfccc fix: retry token creation/deletion upon project conflict errors (#11199)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-11-08 13:52:00 -08:00
Arthur Busser
1ae5aff2f8 chore: add Pigment to list of users (#11127)
Signed-off-by: Arthur Busser <arthur.busser@gopigment.com>

Signed-off-by: Arthur Busser <arthur.busser@gopigment.com>
2022-11-08 16:07:19 -05:00
Leonardo Luz Almeida
fe151a1c0e 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 <leonardo_almeida@intuit.com>

* fix unit-test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix unit-test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* remove trackingID from e2e test validation

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix e2e

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* remove unnecessary config

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-11-08 16:06:05 -05:00
Alex Eftimie
149926dec4 Action menu: sort items, show in resource details page (#11008)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2022-11-08 17:45:28 +00:00
reggie-k
d5a961c7f6 feat: Shared custom health check for multiple resources (#4212) (#10885)
* Kind wildcard support in health customizations

Signed-off-by: reggie <reginakagan@gmail.com>

* Updated health customizations docs to using the correct field with a /

Signed-off-by: reggie <reginakagan@gmail.com>

* Updated health customizations docs to using the correct field with a /

Signed-off-by: reggie <reginakagan@gmail.com>

* Document resource kind wildcard for custom health check

Signed-off-by: reggie <reginakagan@gmail.com>

* Implemented wildcard * support in API Group and Resource Kind and updated docs

Signed-off-by: reggie <reginakagan@gmail.com>

* Implemented wildcard * support in API Group and Resource Kind and updated docs

Signed-off-by: reggie <reginakagan@gmail.com>

* Implemented wildcard * support in API Group and Resource Kind and updated docs

Signed-off-by: reggie <reginakagan@gmail.com>

* Removed code duplication and returned an empty string instead of an error

Signed-off-by: reggie <reginakagan@gmail.com>

Signed-off-by: reggie <reginakagan@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-08 08:42:08 -05:00
github-actions[bot]
428bf48734 [Bot] Update Snyk reports (#11205)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-11-07 13:50:24 -05:00
Roee Landesman
4d6d20427e chore: Add Envoy to Users list (#11169)
Signed-off-by: Roee Landesman <roee.landesman@envoy.com>

Signed-off-by: Roee Landesman <roee.landesman@envoy.com>
2022-11-07 07:57:51 -05:00
Lukas Grossar
9bada88f0f docs(user-guide): update link to Helm hooks documentation (#11045)
Signed-off-by: Lukas Grossar <lukas.grossar@adfinis.com>

Signed-off-by: Lukas Grossar <lukas.grossar@adfinis.com>
2022-11-07 07:55:32 -05:00
my-git9
234fc9d1cd chore: beta.kubernetes.io/arch has been deprecated in 1.14 (#11016)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-11-07 07:54:44 -05:00
Nolan Emirot
79f4b5ceb6 docs: fix typo in declarative-setup.md (#11190)
* fix: typo

Signed-off-by: emirot <emirot.nolan@gmail.com>

* chore: fix typo

Signed-off-by: emirot <emirot.nolan@gmail.com>

Signed-off-by: emirot <emirot.nolan@gmail.com>
2022-11-07 07:52:46 -05:00
d3adb5
1ae0317423 chore: add Objective to USERS.md (#11202)
Signed-off-by: d3adb5 <me@d3adb5.net>

Signed-off-by: d3adb5 <me@d3adb5.net>
2022-11-07 07:47:25 -05:00
Chris Lewis
cfb24701d2 docs: Add Contributor's Quickstart Page (#11108)
* First Draft

* Update docs/contributors_quickstart.md

Co-authored-by: ChanJong Na <cjna@umich.edu>
Signed-off-by: ctlewis <lewisengineer@gmail.com>

* Update docs/contributors_quickstart.md

Co-authored-by: Dan Garfield <dan@codefresh.io>
Signed-off-by: ctlewis <lewisengineer@gmail.com>

* Update docs/contributors_quickstart.md

Co-authored-by: Moshe Shitrit <moshe@s5t.dev>
Signed-off-by: ctlewis <lewisengineer@gmail.com>

* Update docs/contributors_quickstart.md

Co-authored-by: Jason Poley <jason.poley@gmail.com>
Signed-off-by: ctlewis <lewisengineer@gmail.com>

* Update docs/contributors_quickstart.md

Co-authored-by: Moshe Shitrit <moshe@s5t.dev>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update docs/contributors_quickstart.md

Co-authored-by: Garima Negi <garima.negy@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* tweaks

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* undo temporary change

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Add sign off

Signed-off-by: Chris Lewis <clewis@powercosts.com>

* Update docs/developer-guide/contributors-quickstart.md

Co-authored-by: Angela Wilson <84730053+awilson-payit@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update docs/developer-guide/contributors-quickstart.md

Co-authored-by: Andre Marcelo-Tanner <andre@enthropia.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: ctlewis <lewisengineer@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Chris Lewis <clewis@powercosts.com>
Co-authored-by: Chris Lewis <clewis@powercosts.com>
Co-authored-by: ChanJong Na <cjna@umich.edu>
Co-authored-by: Dan Garfield <dan@codefresh.io>
Co-authored-by: Moshe Shitrit <moshe@s5t.dev>
Co-authored-by: Jason Poley <jason.poley@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Garima Negi <garima.negy@gmail.com>
Co-authored-by: Angela Wilson <84730053+awilson-payit@users.noreply.github.com>
Co-authored-by: Andre Marcelo-Tanner <andre@enthropia.com>
2022-11-04 20:21:27 -04:00
Abhishek Veeramalla
e21a82fcc1 feat: Add new admin command to print Argo CD initial password (11117) (#11155)
* feat: Add new admin command to print Argo CD initial password (11117)

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

* fix failing CI

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

* fix failing CI

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

* fix failing CI

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

* fix failing CI

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

* fix failing CI

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

* Update docs/getting_started.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update cmd/argocd/commands/admin/initial_password.go

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Update docs/user-guide/commands/argocd_admin_initial-password.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-04 16:57:35 +00:00
Michael Crenshaw
ac69e27fd2 docs: debugging CMPs (#11142)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-04 14:10:53 +00:00
Michael Crenshaw
46ae472cee docs: document metadata access for go-templated cluster generator (#10929)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-04 09:03:25 -04:00
Michael Crenshaw
08124045dc docs: add Dockerfile example for plugin (#11130)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-04 09:02:25 -04:00
Blake Pettersson
777302191f feat: enable metadata to be set on namespaces (#10672)
* namespace labels

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* create namespace should support annotations

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* handle also modification hook

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* regenerate entity on modify hook

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* manifests

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* 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 <blake.pettersson@gmail.com>

* 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 <blake.pettersson@gmail.com>

* fix: always return true with `hasManagedMetadata`

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

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* docs: add clarifying docs on resource tracking

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* style: pr tweaks

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* fix: re-add label unsetting

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* Update gitops-engine to current master

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Co-authored-by: pashavictorovich <pavel@codefresh.io>
Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-11-04 08:59:16 -04:00
balajisa
ebf2682214 docs(user-guide): Add doc for import argocd packages (#11041) (#11096)
* Add doc for argocd pkg import

Signed-off-by: balajisa09 <balajisa09@gmail.com>

* Update docs/user-guide/import.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: balajisa <50614674+balajisa09@users.noreply.github.com>

* Add detailed solution

Signed-off-by: balajisa09 <balajisa09@gmail.com>

* Update suggestions

Signed-off-by: balajisa09 <balajisa09@gmail.com>

* Update docs/user-guide/import.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: balajisa <50614674+balajisa09@users.noreply.github.com>

* Update docs/user-guide/import.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: balajisa <50614674+balajisa09@users.noreply.github.com>

* Update docs/user-guide/import.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: balajisa <50614674+balajisa09@users.noreply.github.com>

* Update docs/user-guide/import.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: balajisa <50614674+balajisa09@users.noreply.github.com>

* Update docs/user-guide/import.md

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix code block

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: balajisa09 <balajisa09@gmail.com>
Signed-off-by: balajisa <50614674+balajisa09@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: balajisa09 <balajisa09@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-04 08:43:21 -04:00
Artur Rodrigues
a773b1effb chore: add debug logs around CMP manifest generation (#11185)
* docs: note one single CMP per app

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>

* cmp: debug logs around manifest handling

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>

Signed-off-by: Artur Rodrigues <artur.rodrigues@lacework.net>
2022-11-03 20:30:50 -04:00
Michael Crenshaw
7101965bd6 fix: templating keys in ApplicationSet (#11076) (#11163)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-03 19:17:04 -04:00
Hariharasuthan99
c8cae4a293 chore: Add Amadeus to user list (#11177)
Co-authored-by: hraajeshwar <hariharasuthan.raajeshwar@amadeus.com>
2022-11-03 17:08:48 -04:00
Saumeya Katyal
3047db9709 docs: add ui banner options in docs (#10907)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-11-03 16:39:53 -04:00
Leonardo Luz Almeida
327936d164 fix: handle apiGroup updates in resource-tracking (#11012)
* fix: handle apiGroup updates in resource-tracking

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

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

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add unit-test to validate the scenario

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix test lint

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* review fixes

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Reword godocs for clarity

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-11-03 15:02:13 -04:00
Justin Marquis
9fa3c4fa94 fix: upgrade redis-ha chart to 4.22.3, redis regression (#11176)
* chore: upgrade redis-ha chart to 4.22.3, redis regression

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fix manifest

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fix missing cidr

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fix typo

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fix typo

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-11-03 15:00:48 -04:00
Zach Aller
297eb7168a chore: update owners file from membership meeting (#11184)
Signed-off-by: zachaller <zachaller@users.noreply.github.com>

Signed-off-by: zachaller <zachaller@users.noreply.github.com>
2022-11-03 14:54:01 -04:00
github-actions[bot]
21731c9c2d [Bot] Update Snyk reports (#11162)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-11-02 14:05:49 +00:00
Mike Mwanje
ec649b6d86 docs: Add AirQo to users list (#11160)
Signed-off-by: Mike Mwanje <mwanjemike767@gmail.com>

Signed-off-by: Mike Mwanje <mwanjemike767@gmail.com>
2022-11-02 13:43:14 +00:00
Michael Crenshaw
f60ae50f38 chore: don't generate release notes (#11141)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-11-01 20:15:16 +00:00
Jooho Lee
4aaed135b8 docs: Add SI Analytics to ArgoCD Users list (#11110) 2022-11-01 13:06:35 -04:00
Dan Garfield
9353328eb8 chore: Add retry to cluster generation for testing in hack folder (#11067)
* Add retry for cluster generation

Signed-off-by: Dan Garfield <dan@codefresh.io>

* Switch to human readable count

Signed-off-by: Dan Garfield <dan@codefresh.io>

* fix logic

Signed-off-by: Dan Garfield <dan@codefresh.io>

* Add retry for cluster generation

Signed-off-by: Dan Garfield <dan@codefresh.io>

* remove superfluous if from previous iteration.

Signed-off-by: Dan Garfield <dan@codefresh.io>

* clean up code for final PR

Signed-off-by: Dan Garfield <dan@codefresh.io>

Signed-off-by: Dan Garfield <dan@codefresh.io>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
2022-10-31 17:31:39 -04:00
github-actions[bot]
a765c141ca [Bot] Update Snyk reports (#11114)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-10-31 10:21:03 -04:00
github-actions[bot]
776d8f97cc [Bot] Update Snyk reports (#11039)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-10-29 10:50:53 -04:00
Abhishek Veeramalla
1494f9bbea chore: fix misleading error message in the e2e tests (#11085)
* chore: fix misleading error message in the e2e tests

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

* re-run tests

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

* re-run tests

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

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
2022-10-29 10:46:59 -04:00
Trishna Kalita
45fc484447 chore: migrate import statements from es5 to es6 (#11042)
* Migrating import syntax from es5 to es6

Signed-off-by: trishnakalita660 <trishnakalita660@gmail.com>

* Migrating import syntax from es5 to es6

Signed-off-by: trishnakalita660 <trishnakalita660@gmail.com>

* Run build, test and lint UI code Signed-off-by: Trishna Kalita trishnakalita660@gmail.com

Signed-off-by: trishnakalita660 <trishnakalita660@gmail.com>

* Removed package-lock.json

Signed-off-by: trishnakalita660 <trishnakalita660@gmail.com>

Signed-off-by: trishnakalita660 <trishnakalita660@gmail.com>
2022-10-27 10:07:03 -04:00
Chromo-residuum-opec
309654cece docs: fix 'bellow' typos (#11038)
Signed-off-by: backfire-monism-net <development.0extl@simplelogin.com>

Signed-off-by: backfire-monism-net <development.0extl@simplelogin.com>
2022-10-22 20:10:34 -04:00
Marcus Söderberg
3d3e947242 feat: add labels and annotations to cluster details page (#9707)
Signed-off-by: Marcus Söderberg <msoderb@gmail.com>

Signed-off-by: Marcus Söderberg <msoderb@gmail.com>
2022-10-21 12:39:39 -04:00
Nolan Emirot
ba682e58d7 test: simplify bcrypt test (#11013)
* chore: wrap errors with message (#10592) (#10986)

* issue-10592 Wrap errors with message

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>

* issue-10592 remove unwanted error  wrappers

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>

* chore: fix  error wrapper messages

Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>
Co-authored-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* test: simplify test

Signed-off-by: emirot <nolan.emirot@workday.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* trigger ci

Signed-off-by: emirot <emirot.nolan@gmail.com>

* feat: sort resource list by created_at, add message to AnalysisRun and replicas to ReplicaSet (#10613)

* Misc UI Improvements: sort by created at in resource list view, add message to AnalysisRun and replicas to Replicaset

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Address PR comments

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* No underscore needed in created_at. Add space between icon and message in health details for non-controlled resources

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Guard section

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
Signed-off-by: emirot <emirot.nolan@gmail.com>

* chore: fix e2e (#11005)

* chore: fix e2e

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* more config

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* global

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: emirot <nolan.emirot@workday.com>
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: apoorvam1 <apoorvambhat@gmail.com>
Co-authored-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Co-authored-by: emirot <nolan.emirot@workday.com>
Co-authored-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-21 16:18:51 +00:00
cleverhu
f059d8bb33 chore: increase liveness timeout (#10730)
Fix: https://github.com/argoproj/argo-cd/issues/10728
Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-10-21 11:55:23 -04:00
Michael Crenshaw
63c42d8dda chore: fix CI (#11022)
* chore: fix CI

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* no more set global

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-21 11:08:30 -04:00
Michael Crenshaw
cfdd85cc64 chore: fix e2e (#11005)
* chore: fix e2e

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* more config

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* global

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-20 10:15:54 -04:00
Alex Eftimie
6a7d79f8e0 feat: sort resource list by created_at, add message to AnalysisRun and replicas to ReplicaSet (#10613)
* Misc UI Improvements: sort by created at in resource list view, add message to AnalysisRun and replicas to Replicaset

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Address PR comments

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* No underscore needed in created_at. Add space between icon and message in health details for non-controlled resources

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Guard section

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2022-10-20 00:36:09 +00:00
apoorvam1
92abb563af chore: wrap errors with message (#10592) (#10986)
* issue-10592 Wrap errors with message

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>

* issue-10592 remove unwanted error  wrappers

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>

* chore: fix  error wrapper messages

Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>

Signed-off-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
Signed-off-by: Apoorva Mahabaleshwara <apoorvambhat@gmail.com>
Co-authored-by: Apoorva Mahabaleshwara <apoorvamahabaleshwara@Apoorvas-MBP.attlocal.net>
2022-10-19 19:21:32 +00:00
Allex
8fd917693b fix: Update custom health check for kiali.io/Kiali (#10995)
With Kiali v1.57.1 an additional status condition was added:
```
    - lastTransitionTime: '2022-10-14T11:56:24Z'
      message: ''
      reason: ''
      status: 'False'
      type: Failure
```

Based on the discussion in https://github.com/kiali/kiali/issues/5560 this should not lead to a degraded health state.

This will no longer return Degraded as a catch-all and use the `type` and `status` fields of the condition to determine the CR health.

Signed-off-by: Allex Veldman <allexveldman+github@gmail.com>

Signed-off-by: Allex Veldman <allexveldman+github@gmail.com>
2022-10-19 12:17:00 -04:00
Nolan Emirot
d207de224e test: add unit test for server version (#10720)
* test: add unit test for server version

Signed-off-by: emirot <emirot.nolan@gmail.com>

* test: add unit test for server version

Signed-off-by: emirot <emirot.nolan@gmail.com>

* test: add unit test for server version

Signed-off-by: emirot <emirot.nolan@gmail.com>

* tests: update cmd dependencies

Signed-off-by: emirot <emirot.nolan@gmail.com>

Signed-off-by: emirot <emirot.nolan@gmail.com>
2022-10-19 12:00:36 -04:00
Michael Crenshaw
8a71b8af94 chore: upgrade actions/checkout to v3, i.e. Node.js 16 (#10947)
* chore: updgrade actions/checkout to v3, i.e. Node.js 16

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* more node 12

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-19 10:31:41 -04:00
cristina-lopez
07d1bffb73 chore: update error message to provide context (#10978)
* updated error message to provide context

Signed-off-by: Cristina Lopez <cristinalopez956@gmail.com>

* updated error message to provide context

Signed-off-by: Cristina Lopez <cristinalopez956@gmail.com>

Signed-off-by: Cristina Lopez <cristinalopez956@gmail.com>
2022-10-19 10:23:04 -04:00
Mikhail Fesenko
5d9d53cc15 chore: decreased indent level in setApplicationHealth (#10980)
Signed-off-by: Mikhail Fesenko <proggga@gmail.com>

Signed-off-by: Mikhail Fesenko <proggga@gmail.com>
2022-10-19 10:19:57 -04:00
Jennifer Trevillian
663245468c chore: updated error message to include context (#10592) (#10960)
* Updated error message

Signed-off-by: Jennifer Trevilian <JCPTrevillian@Gmail.com>

* Updated error message

Signed-off-by: Jennifer Trevilian <JCPTrevillian@Gmail.com>

Signed-off-by: Jennifer Trevilian <JCPTrevillian@Gmail.com>
2022-10-19 08:56:25 -04:00
github-actions[bot]
9639795f89 [Bot] Update Snyk reports (#10989)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-10-19 08:29:35 -04:00
Jessie Teng
9c40fcb0e3 fix: Resource list in sync page msg style#10887 (#10970)
* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>
2022-10-18 14:01:13 -04:00
Aiman Fatima
40126b5afa chore: Enhance title & description for Certificates on settings page (#7560) (#10956)
* fix: Enhance title & description for Certificates on settings page

Signed-off-by: Aiman Fatima <aiman_fatima@intuit.com>
Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>

* fix: Review comments

Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>

Signed-off-by: Aiman Fatima <aiman_fatima@intuit.com>
Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>
2022-10-18 11:49:32 -04:00
smriti0710
d0216905d1 chore: improve error logs (#10944)
* fix: Resource list loading slowly due to Sync Wave sorting (#10932)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

Signed-off-by: wujunwei <wjw3323@live.com>

Signed-off-by: wujunwei <wjw3323@live.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

* Adding bcrypt support for argocd CLI

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Fixing linter issues

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Nesting bcrypt under account instead of admin

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Removing admin bcrypt docs

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Update docs/faq.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: implement signed images (#10925)

* consolidate checksums into one file

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* remove id-token permissions

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: delete old snyk reports (#10938)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: rewording of misleading message (#10407)

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* 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 <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: covered error log in controllers

 Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* [Bot] Update Snyk reports (#10953)

Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

Signed-off-by: toVersus <toversus2357@gmail.com>

Signed-off-by: toVersus <toversus2357@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

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

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* fix: addressed review comments

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: wujunwei <wjw3323@live.com>
Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
Signed-off-by: CI <ci@argoproj.com>
Signed-off-by: toVersus <toversus2357@gmail.com>
Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Adam <wjw3323@live.com>
Co-authored-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Smriti Prakash <smriti_prakash@intuit.com>
Co-authored-by: 34FathomBelow <34fathombelow@protonmail.com>
Co-authored-by: Ryan Talbot <4523072+RyanTalbot@users.noreply.github.com>
Co-authored-by: nsahai8 <ns8gupta@gmail.com>
Co-authored-by: Chris Davis <chris@codeflow.org.uk>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com>
Co-authored-by: Shawn Toffel <shawn.toffel+github@gmail.com>
2022-10-18 11:16:20 -04:00
Jesse Suen
a7e8d970ac fix: Retry IsConflict for settings update. Map kube API errors to retryable HTTP status codes (#10817)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-10-17 17:01:50 -07:00
Thirunavukkarasu Ramanathan
952b98960d feat: UI Add copy to clipboard shortcut (#10958)
* feat: UI Add copy to clipboard shortcut #10803

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

* 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: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

* feat: UI Add copy to clipboard shortcut

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
Co-authored-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
Co-authored-by: Chris Davis <chris@codeflow.org.uk>
2022-10-17 17:39:12 -04:00
karengineering
7f2d513426 feat: directory app include/exclude fields in UI (#10880)
Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>

Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>
2022-10-17 17:31:17 -04:00
Michael Crenshaw
56fd4596e5 fix: upgrade Helm to avoid disk use issue (#8773) (#10937)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-17 12:44:16 -04:00
34FathomBelow
1a7ec6dee0 chore: release signature of sbom (#10969)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-17 12:43:54 -04:00
Michael Crenshaw
793f7289d5 chore: upgrade dex to v2.35.3 to avoid CVE-2022-27665 (#10939)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-17 12:30:03 -04:00
34FathomBelow
a0d4b11a55 docs: release signature verification (#10967)
* chore: release signature documentation

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fixed typos

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fixed requested changes

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-17 11:48:35 -04:00
Aiman Fatima
36c1a15658 fix: Display pointer on labels for resource names in sync panel (#10959)
Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>

Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>
2022-10-17 09:29:40 -04:00
Shawn Toffel
4e8cfde1a0 docs: message is no longer truncated (#10962)
Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
2022-10-16 16:10:54 -04:00
Tsubasa Nagasawa
f9ef32c756 feat: make applicationset controller configurable in argocd-cmd-params (#10961)
Signed-off-by: toVersus <toversus2357@gmail.com>

Signed-off-by: toVersus <toversus2357@gmail.com>
2022-10-16 11:58:26 -04:00
github-actions[bot]
06fa661360 [Bot] Update Snyk reports (#10953)
Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
2022-10-15 09:50:19 -04:00
34FathomBelow
193cb146bc chore: sign checksums file for release binaries (#10963)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-15 08:45:40 -04:00
Chris Davis
a35a94e5fc 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)
2022-10-14 13:36:59 -07:00
nsahai8
7cb9d40836 chore: wrap error objects to include context (#10592) (#10940)
Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
2022-10-14 17:41:52 +00:00
Michael Crenshaw
a74af1e343 chore: delete old snyk reports, 2nd attempt (#10950)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-14 17:31:29 +00:00
Ryan Talbot
0dbf570933 chore: rewording of misleading message (#10407)
Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
2022-10-14 11:25:11 -04:00
Michael Crenshaw
75f5985a58 chore: delete old snyk reports (#10938)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-14 10:56:53 -04:00
34FathomBelow
d11ac8954e chore: implement signed images (#10925)
* consolidate checksums into one file

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* remove id-token permissions

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-14 10:38:08 -04:00
Amey Totawar
254f3b69ae feat: add bcrypt support for argocd CLI (#10934)
* Adding bcrypt support for argocd CLI

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Fixing linter issues

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Nesting bcrypt under account instead of admin

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Removing admin bcrypt docs

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Update docs/faq.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-14 00:47:12 +00:00
Adam
eb9d0a52aa chore: fix wrong annotation in function (#10923)
Signed-off-by: wujunwei <wjw3323@live.com>

Signed-off-by: wujunwei <wjw3323@live.com>
2022-10-13 19:30:23 -04:00
Alexander Matyushentsev
bff4860563 fix: Resource list loading slowly due to Sync Wave sorting (#10932)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-10-13 22:13:04 +00:00
Nir Shtein
cd171bf66b feat: link path directly to the path in repo (#10568) (#10860)
* Wrap error objects to include context

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Revert "Wrap error objects to include context"

This reverts commit d1789bd271.

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* In Application Details, link the path field directly to the path in the repo

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* fix: duplicate source namespace validation (#10853)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* docs: fix examples for ArgoCD ApplicationSet Git Generator (#10857)

* Doc: ArgoCD ApplicationSet Git directory

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

* Docs: use "my-project" rather than default project

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

Signed-off-by: toyamagu <toyamagu2021@gmail.com>
Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Change 'branch' to 'src'

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Fix CR

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Fix CR

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* renaming

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Add comment

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: toyamagu <toyamagu2021@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: toyamagu <83329336+toyamagu-2021@users.noreply.github.com>
2022-10-13 18:04:00 -04:00
doshianish8
b1eff1a7eb feat: make ARGOCD_GIT_MODULES_ENABLED configurable in argocd-cmd-params (#10931)
Signed-off-by: doshianish8 <doshi.anish.s@gmail.com>

Signed-off-by: doshianish8 <doshi.anish.s@gmail.com>
2022-10-13 17:54:04 -04:00
Prajilesh N
6e9e16e80f chore: improve error logs (#10933)
Signed-off-by: Prajilesh <nprajilesh@gmail.com>

Signed-off-by: Prajilesh <nprajilesh@gmail.com>
2022-10-13 17:53:06 -04:00
karengineering
f9a7ea8f27 chore: improve log in argo-cd/applicationset/generators/generator_spec_processor.go (#10906)
* wrap error object to include context for generator_spec_processor.go

Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>

* addressing PR comments

Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>

Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>
2022-10-13 21:26:53 +00:00
Michael Crenshaw
ba10959313 chore: fix git push command in Snyk update workflow (#10920)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-13 13:57:40 -04:00
Leonardo Luz Almeida
c99669e088 docs: add reverse proxy proposal for enhanced UI extensions (#10435)
* docs: add reverse proxy proposal for enhanced UI extensions

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add goals and use-case

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add CRD example

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add goal details

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add rbac use-case

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add rbac details and examples

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add config section

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add diagrams to the proposal

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add considerations

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Minor fixes

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* minor fixes

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add multi backend support to proxy proposal

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Address review comments + multi-backend details

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* address comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Address review comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add additional goal for additional security

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add RBAC suggestions

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Minor changes

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Visual improvement

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-10-12 15:19:11 -04:00
Michael Crenshaw
b73363e015 chore: open a PR instead of pushing for Snyk updates (#10889)
* chore: open a PR instead of pushing for Snyk updates

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* gotta have write for push

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* save codegen for the automation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 15:16:35 -04:00
Mayursinh Sarvaiya
05dce81d09 feat(ui): notification subscriptions edit field #10310 (#10839)
* feat(ui): notification subscriptions edit field

> this new field is just an abstraction of relevant annotations

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>

* fix: codeql regex issue

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
2022-10-12 09:50:36 -07:00
Michael Crenshaw
dc69539820 docs: appset PR generator docs fixes (#10567)
* docs: appset PR generator docs fixes

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* oh, that field is actually a thing

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 10:50:53 -04:00
Michael Crenshaw
7183c9fcb3 docs: add link to 2.4-2.5 upgrade guide (#10808)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 10:50:15 -04:00
Michael Crenshaw
625e5d2daf docs: more docs for directory apps (#10879)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 10:49:45 -04:00
Michael Crenshaw
00937c98e5 docs: clarify how default RBAC policy works (#10896)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 10:46:53 -04:00
someOne404
b5d8d5a02b chore: wrap error objects to include context (#10904)
Signed-off-by: Jiayi Lu <jiayi_lu@intuit.com>

Signed-off-by: Jiayi Lu <jiayi_lu@intuit.com>
2022-10-12 09:15:11 -04:00
karengineering
4583ccadc1 fix: add applicationsets to RBAC policy (#10810) (#10891)
Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>

Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>
2022-10-11 17:00:53 -04:00
Michael Crenshaw
3f164cf576 chore: add script to generate release notes (#10806)
* chore: add script to generate release notes

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* newlines look bad in the release markdown rendering on GitHub

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* use diff instead of comp

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* use auto-generated docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* pre-pended, not appended

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-11 14:54:08 -04:00
Remington Breeze
16613fe96c fix: defaulting to in-cluster is misleading for disconnected clusters (#10132)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-10-10 18:52:36 +00:00
Mayursinh Sarvaiya
2aaf997b1f fix(ui): sync option label doesn't check corresponding box (#10863) (#10876)
* fix(ui): sync option label doesn't check corresponding box

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>

* fix: lint

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
2022-10-10 14:52:02 -04:00
Aiman Fatima
cac0de1b16 chore: wrap error objects to include context (#10592) (#10871)
* chore: wrap error objects to include context

Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>

* chore: review comments

Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>

Signed-off-by: Aiman Fatima <aimanfatimadl@gmail.com>
2022-10-10 10:10:04 -04:00
Jake
00a1ce6bb2 chore: add security logs to webhook verification failures (#10372)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-10-09 14:09:44 -04:00
Kalyan Vurugonda
23b6bfad55 docs: fix link in auth0.md (#10531)
* Made changes to auth0,md

The link to the user management overview page is not working, so I replaced it and slightly changed the line.
If you want any more changes please tell me.

Signed-off-by: Kalyan Vurugonda <Vurugondakalyan811@gmail.com>

* fix : Made changes to the file auth0.md

I reverted the line as you mentioned change 

Signed-off-by: Kalyan Vurugonda <Vurugondakalyan811@gmail.com>

* Update auth0.md

I have removed the new line at the end.

Signed-off-by: Kalyan Vurugonda <Vurugondakalyan811@gmail.com>

* use md file

This should make both GitHub and RTD links work.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Kalyan Vurugonda <Vurugondakalyan811@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-09 13:51:24 -04:00
Pascal Bourdier
44c882c686 chore: use appv1 prefix everywhere (#10621)
avoid to import `application` twice

Signed-off-by: Pascal Bourdier <pascal.bourdier@gmail.com>

Signed-off-by: Pascal Bourdier <pascal.bourdier@gmail.com>
2022-10-09 13:06:11 -04:00
cleverhu
896ed12446 fix: trim whitespace from auth token (#10539)
Fixes: https://github.com/argoproj/argo-cd/issues/10539
Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-10-09 12:59:27 -04:00
Nir Shtein
2833be88f0 chore: wrap error objects to include context (#10592) (#10859)
* Wrap error objects to include context

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Fix CR

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>
2022-10-09 12:13:49 -04:00
Nir Shtein
eba374c618 fix: clicking HEAD in bitbucket leads to a 404 page (#10862)
* Wrap error objects to include context

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* fix: duplicate source namespace validation (#10853)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Fix CR

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Change 'branch' to 'src' when building url path

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Revert "Fix CR"

This reverts commit 4b92408412.

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

* Revert "Wrap error objects to include context"

This reverts commit d1789bd271.

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>

Signed-off-by: Nir Shtein <89006520+nirsht@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-09 12:10:38 -04:00
Sakshi Jain
51d34dd951 fix: added css to change cursor to pointer on hover (#10864) (#10867)
* added css to change cursor to pointer on hover

Signed-off-by: Sakshi <sakshi.jain7597@gmail.com>

* moved cursor change to only label and input

Signed-off-by: Sakshi <sakshi.jain7597@gmail.com>

Signed-off-by: Sakshi <sakshi.jain7597@gmail.com>
2022-10-09 12:04:47 -04:00
Michael Crenshaw
cbfcb19cc7 docs: more versioned docs fixes (#10342)
* docs: remove more version notes - rely on docs versioning

Signed-off-by: CI <michael@crenshaw.dev>

* missed some things

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-10-08 15:08:39 -04:00
toyamagu
612c415d97 docs: fix examples for ArgoCD ApplicationSet Git Generator (#10857)
* Doc: ArgoCD ApplicationSet Git directory

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

* Docs: use "my-project" rather than default project

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

Signed-off-by: toyamagu <toyamagu2021@gmail.com>
2022-10-08 14:44:42 -04:00
Michael Crenshaw
e32090f0d4 fix: duplicate source namespace validation (#10853)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-08 19:01:41 +02:00
Michael Crenshaw
441b583daf docs: remove unused plugin config fields (#10304)
* docs: remove unused plugin config fields

Signed-off-by: CI <michael@crenshaw.dev>

* fix codegen

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-10-07 19:42:25 -04:00
Eddie Knight
c68cafa6af chore: Added artifact hub badge (#10854)
Signed-off-by: Eddie Knight <iv.eddieknight@gmail.com>

Signed-off-by: Eddie Knight <iv.eddieknight@gmail.com>
2022-10-07 22:37:30 +00:00
Tsubasa Nagasawa
b00d9b73c3 fix: applicationset controller should respect logging flags (#10513)
* Align logging setup with other controllers

Signed-off-by: toVersus <toversus2357@gmail.com>

Signed-off-by: toVersus <toversus2357@gmail.com>
2022-10-07 17:34:12 -04:00
Thijs van Tol
6df4a802f2 fix: show revision in badge when param is true (#10545)
* fix: show revision in badge when param is true

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* Update badge.go

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* Update badge.go

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* pr feedback

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
2022-10-07 17:12:37 -04:00
Mitsuo Heijo
9480c0f65b chore: update robfig/cron to v3 (#10588)
* chore: update robfig/cron to v3

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

* fix parser option to keep old non-standard behavior

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

* fix parser option to keep old non-standard behavior

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

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

This reverts commit f3d75b68f4.

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

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

This reverts commit 49ec9ef7ec.

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

* add chain to recover from panic

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
2022-10-07 17:01:49 -04:00
Matt Morrison
a73c45fb96 fix: consider destination cluster name when validating destinations (#10594)
Signed-off-by: Matt Morrison <matt.morrison@zapier.com>

Signed-off-by: Matt Morrison <matt.morrison@zapier.com>
2022-10-07 16:36:27 -04:00
Minchao
8e38b4f2a3 docs: fix advice about preferred version in high availability (#10619)
* docs: fix advice about preferred version in high availability

Signed-off-by: Minchao <minchao.220@gmail.com>

* Update docs/operator-manual/high_availability.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Minchao <minchao.220@gmail.com>

Signed-off-by: Minchao <minchao.220@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-07 16:10:47 -04:00
Lars Kellogg-Stedman
43a9457ede docs: Correct grammar issues in docs on manifest path annotations (#10776)
The "Webhook and Manifest Paths Annotation" section of the documentation
contained a number of grammar and spelling issues as well as what appeared
to be some unintentionally pasted text.

This commit attempts to address these issues.

Signed-off-by: Lars Kellogg-Stedman <lars@oddbit.com>

Signed-off-by: Lars Kellogg-Stedman <lars@oddbit.com>
2022-10-07 15:33:30 -04:00
Nathanael Liechti
0a02a63c54 docs: update debugging remote argocd environment (#10811)
- launch.json now uses `main.go` and env var to determine which service is launched
- telepresence v2 uses new structure to initialice and intercept connections
- Add .envrc.remote to .gitignore

Signed-off-by: Nathanael Liechti <technat@technat.ch>

Signed-off-by: Nathanael Liechti <technat@technat.ch>
2022-10-07 15:19:31 -04:00
Eddie Knight
90760a5088 chore: Added recommended permissions to github actions workflows (#10812)
* Added recommended permissions to 4 of 5 workflows

Signed-off-by: Eddie Knight <iv.eddieknight@gmail.com>

* Added release.yaml permissions... might need to add pagages:write

Signed-off-by: Eddie Knight <iv.eddieknight@gmail.com>

* Updated inline comments

Signed-off-by: Eddie Knight <iv.eddieknight@gmail.com>

Signed-off-by: Eddie Knight <iv.eddieknight@gmail.com>
2022-10-07 14:40:10 -04:00
Denis Krivenko
8e3b915d0e fix: Add missing statuses to MinIO Tenant health check (#10815)
Signed-off-by: dnskr <dnskrv88@gmail.com>

Signed-off-by: dnskr <dnskrv88@gmail.com>
2022-10-07 14:31:04 -04:00
Jellyfrog
ee47700c4d feat: Implement MachineHealthCheck CRD health check (#10846)
Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-10-07 13:52:53 -04:00
jannfis
06b3a3613d fix: Unbreak app refresh from panel list (#10825)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-10-07 11:52:36 -04:00
Richard Jennings
2fc7c7da73 fix: add applicationset to crds generated by gen-crd-spec (#10833)
* add applicationset to crds generated

Signed-off-by: Richard Jennings <richardjennings@gmail.com>

* update applicationset crd

Signed-off-by: Richard Jennings <richardjennings@gmail.com>

* remove description from applicationset crd

Signed-off-by: Richard Jennings <richardjennings@gmail.com>

Signed-off-by: Richard Jennings <richardjennings@gmail.com>
2022-10-07 10:52:08 -04:00
Felix
0303715a33 docs: Add Gepardec to users (#10840)
Signed-off-by: fhochleitner <felix.hochleitner@outlook.com>

Signed-off-by: fhochleitner <felix.hochleitner@outlook.com>
2022-10-07 10:50:18 -04:00
Moritz
553371b73f docs: add dtag to users (#10845)
Signed-off-by: moritz.zemke@telekom.de <moritz.zemke@telekom.de>

Signed-off-by: moritz.zemke@telekom.de <moritz.zemke@telekom.de>
2022-10-07 10:49:39 -04:00
Jellyfrog
45744d20be feat: Implement SecretStore health check (#10847)
Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-10-07 14:11:43 +00:00
jannfis
22ba8f519a fix(ui): Don't jump back to tiles view on app deletion (#8764) (#10826)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-10-06 14:06:55 -04:00
Leonardo Luz Almeida
44a0d73ecd docs: Add example about how to patch with SSA syncs (#10829)
* docs: Add example about how to patch with SSA syncs

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* docs: minor fixes

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-10-06 13:00:54 -04:00
rumstead
d8cb04e9d7 docs: Update link to resource customizations (#10827) (#10828)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
2022-10-06 12:04:00 -04:00
Abhishek Veeramalla
812bbad09b chore: update Server-Side Apply docs for patching of existing rresources (#10822)
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
2022-10-06 10:32:42 -04:00
Remington Breeze
53a210eef8 fix: Add filter icon to help users find filters (#10809)
* fix: add clear indicator that filters are now in sidebar

Signed-off-by: Remington Breeze <remington@breeze.software>

* address code review

Signed-off-by: Remington Breeze <remington@breeze.software>

Signed-off-by: Remington Breeze <remington@breeze.software>
2022-10-05 16:51:05 -07:00
Alex Eftimie
9849a17aa9 docs: #argo-contributors instead of #argo-dev in FAQ
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-10-05 21:50:26 +00:00
Nicholas Morey
214b980940 docs: add declarative syntax examples for helm (#10764)
* docs: add declarative syntax examples for helm

Signed-off-by: Nicholas Morey <nicholas@morey.tech>

* fix spacing

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Nicholas Morey <nicholas@morey.tech>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-05 20:08:34 +00:00
Michael Crenshaw
f67375b2f4 chore: upgrade dex to v2.35.1 (#10797) (#10799)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-05 11:06:19 -04:00
Ben Knear
22a75701db fix: reduce noise in logs (#10369) (#10765)
* chore: reduce noise in logs

Signed-off-by: Ben Knear <ben.knear@oracle.com>

* remove log lines entirely

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Ben Knear <ben.knear@oracle.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-05 13:50:00 +00:00
Alexander Matyushentsev
33ef0b96e0 fix: New sidebar icons are missing margin (#10794)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-10-04 21:22:41 -07:00
Michael Crenshaw
7d813183bd chore: remove unused import (#10773)
* chore: remove unused import

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-04 10:21:15 -07:00
Alex Eftimie
f724773f5e chore: Add support for apple sillicon build machines (#10777)
* Add support for apple sillicon build machines

When building the docker image on my M1 laptop, I noticed the produced builds are not usable in our Kubernetes cluster (running on x86 nodes).

By passing the DOCKER_PLATFORM build argument to `docker build` I am able to overcome this and build x86 images locally.

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Hardcode platform in dev build (same as we hardcode GOOS and GOARCH)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Drop platform from build-ui target

It is only used to produce app/dist, not relevant

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-10-04 10:52:38 -04:00
Leonardo Luz Almeida
5495e2c24d chore: update to gitops engine 98ccd3d43f (#10787)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-10-04 14:32:08 +00:00
Remington Breeze
8bdc1145ae fix: incorrect filters placement on resource list (#10781)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-10-03 17:07:28 -07:00
Remington Breeze
d2111136c7 feat: system level extensions (#10758)
* feat: sidebar extensions

Signed-off-by: Remington Breeze <remington@breeze.software>
2022-10-03 22:23:36 +00:00
Michael Crenshaw
76fe1d5d44 chore: upgrade Dex to 2.35.0 (#10775)
* chore: upgrade dex to v2.35.0

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* upgrade github workflow too

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-03 20:52:37 +02:00
Saumeya Katyal
04d114b8bc fix: add theme to version panel in ui (#10762)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-10-03 13:45:03 -04:00
Alex Parra
c4085f1684 docs: Add OccMundial to list of users (#10712) 2022-10-03 11:39:47 -04:00
Buk Bukowski
5b13997786 docs: fix broken links in faq.md (#10744)
* fix broken links in faq.md

Signed-off-by: Bukowa <gitbukowa@gmail.com>

* doc:faq.md: fix

Signed-off-by: bukowa <gitbukowa@gmail.com>

Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: bukowa <gitbukowa@gmail.com>
2022-10-03 10:48:35 -04:00
Mahesh Baliga
a8e2fb9209 feat: equality-based and set-based filtering by label keys and values for list, sync, delete and wait App commands (#10548)
Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>

Signed-off-by: maheshbaliga <mahesh.baliga@infracloud.io>
2022-10-03 09:47:13 -04:00
Daniel Hix
6d5a2238b9 fix: always prune on git fetch (#10664)
This should clean up any old branches and save on disk space, and fix any errors around bad branch names.

Signed-off-by: Daniel Hix <danieljacobhix@gmail.com>

Signed-off-by: Daniel Hix <danieljacobhix@gmail.com>
2022-10-03 09:33:36 -04:00
Em Karisch
202efb2ece docs: add note about multiple sync options on annotation (#10739)
Signed-off-by: Em Karisch <em@khaos.solutions>

Signed-off-by: Em Karisch <em@khaos.solutions>
2022-10-03 08:47:11 -04:00
vgelot
ba18b65fee feat: add health checks for storage.cnrm.cloud.google.com/StorageBucketAccessControl (#10727)
* fix: ui add tooltips on repository url links and names (#9868) (#10108)

* fix: ui add tooltips on repository url links and names (#9868)

Signed-off-by: XieYanke <xieyanke007@gmail.com>

* fix: yarn lint failure

Signed-off-by: XieYanke <xieyanke007@gmail.com>

Signed-off-by: XieYanke <xieyanke007@gmail.com>
Signed-off-by: Vincent <vincent.gelot@akeneo.com>

* Add feature for storage.cnrm.cloud.google.com/StorageBucketAccessControl

Signed-off-by: Vincent <vincent.gelot@akeneo.com>

Signed-off-by: XieYanke <xieyanke007@gmail.com>
Signed-off-by: Vincent <vincent.gelot@akeneo.com>
Co-authored-by: 谢烟客 <xieyanke007@gmail.com>
2022-10-03 08:35:46 -04:00
Michael Crenshaw
11c44f2908 docs: syncWindows in project.yaml (#10591)
* docs: syncWindows in project.yaml

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* trailing newline

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-10-01 19:59:22 -04:00
grid-dev
b6741aa773 chore: Add Gridfuse to USERS.md (#10750)
* chor: Add Gridfuse to USERS list

Signed-off-by: Goetz Epperlein <goetz.epperlein@gridfuse.com>

* fix order

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Goetz Epperlein <goetz.epperlein@gridfuse.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-01 23:50:10 +00:00
my-git9
fa26801c9e feat: add the ability to filter apps based on clusters (#10465)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-10-01 19:45:57 -04:00
my-git9
2c3bc81fcf chore: fix incorrect cluster delete description (#10631)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-10-01 19:27:10 -04:00
my-git9
eb1bed03fa chore: Add security logging for Dex errors (#10455)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-10-01 19:25:30 -04:00
Daniel Helfand
ca5e4c5f79 feat: argocd app delete apps by label (#10091) (#10118)
* feat: argocd app delete apps by label

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: add path to e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: use guestbook path in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: change operation status assertions in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: change sync status to synced

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: assert on cli output for err in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: assert on err not output in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: ignore error to allow assertion to take place in test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: assert on Contains instead of Equal

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: swtich args to assert.Contains

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: selector and args should not be used together

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: add app to delete example

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: return err instead of nil

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-10-01 19:03:38 -04:00
Michael Crenshaw
a1279e0dee fix: duplicate z-index (#10760)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-01 08:20:24 -07:00
vgelot
fc6d09234e feat: add health checks for iam.cnrm.cloud.google.com/IAMPolicy (#10725)
Signed-off-by: Vincent <vincent.gelot@akeneo.com>

Signed-off-by: Vincent <vincent.gelot@akeneo.com>
2022-10-01 01:06:26 +00:00
jannfis
66d82fc641 chore: Upgrade shipped version of Redis to 7.0.5 to fix CVE-2022-35951 (#10702)
* chore: Upgrade redis to 7.0.5

Signed-off-by: jannfis <jann@mistrust.net>

* Also update Redis version in containerized toolchain

Signed-off-by: jannfis <jann@mistrust.net>

* Update Redis and Dex in CI

Signed-off-by: jannfis <jann@mistrust.net>

* Fix Dex image path

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-01 00:17:19 +00:00
roelvdberg
8a38b8b03d feat: add Prometheus health check (#10508)
* Create Prometheus health check

Signed-off-by: Roel van den Berg <roel.vandenberg@infosupport.com>

* remove details from our test environment

Co-authored-by: Rouke Broersma <mobrockers@gmail.com>
Signed-off-by: roelvdberg <email@roelvdberg.nl>

Signed-off-by: Roel van den Berg <roel.vandenberg@infosupport.com>
Signed-off-by: roelvdberg <email@roelvdberg.nl>
Co-authored-by: Roel van den Berg <roel.vandenberg@infosupport.com>
Co-authored-by: Rouke Broersma <mobrockers@gmail.com>
2022-09-30 19:37:47 -04:00
vgelot
e8dd95c37a feat: add health check for cloudscheduler.cnrm.cloud.google.com/CloudSchedulerJob (#10606)
Signed-off-by: Vincent <vincent.gelot@akeneo.com>

Signed-off-by: Vincent <vincent.gelot@akeneo.com>
2022-09-30 19:34:18 -04:00
vgelot
4cb945084a feat: add health check for cloudscheduler.cnrm.cloud.google.com/CloudFunctionsFunction (#10607)
Signed-off-by: Vincent <vincent.gelot@akeneo.com>

Signed-off-by: Vincent <vincent.gelot@akeneo.com>
2022-09-30 19:31:32 -04:00
vgelot
8d2c9aa0ad feat: health check for compute.cnrm.cloud.google.com/ComputeDisk (#10608)
Signed-off-by: Vincent <vincent.gelot@akeneo.com>

Signed-off-by: Vincent <vincent.gelot@akeneo.com>
2022-09-30 19:29:06 -04:00
Chris Hoffman
0e068f5bcc feat: health check for OnePasswordItem (#10690)
Signed-off-by: Chris Hoffman <cehoffman@gmail.com>

Signed-off-by: Chris Hoffman <cehoffman@gmail.com>
2022-09-30 19:27:01 -04:00
vgelot
4f043cc2eb feat: health check storage.cnrm.cloud.google.com/StorageDefaultObjectAccessControl (#10726)
Signed-off-by: Vincent <vincent.gelot@akeneo.com>

Signed-off-by: Vincent <vincent.gelot@akeneo.com>
2022-09-30 19:25:22 -04:00
Darek Dwornikowski
fe61938c1b chore: Added Hetki to USERS.md (#10586)
* Add Hetki to organizations

Added Hetki.ai where ArgoCD is the main CD for k8s clusters.

Signed-off-by: Darek Dwornikowski <dariusz.dwornikowski@gmail.com>

* Update USERS.md

Substitute all the lines number with 1.

Signed-off-by: Darek Dwornikowski <dariusz.dwornikowski@gmail.com>

Signed-off-by: Darek Dwornikowski <dariusz.dwornikowski@gmail.com>
2022-09-30 19:16:12 -04:00
Mohammad Abusaa
5ff4dd25d4 docs: Update Generators-Pull-Request.md (#10643) (#10642)
Signed-off-by: Mohammad Abusaa <abusaa_mz@hotmail.com>

Signed-off-by: Mohammad Abusaa <abusaa_mz@hotmail.com>
2022-09-30 19:08:31 -04:00
Ahmed Mahmoud BACHIRI
f032cbb546 docs: fix typo in GitHub section (#10723)
Replace and with an

Signed-off-by: Ahmed Mahmoud BACHIRI <bachiriahmedmahmoud@gmail.com>

Signed-off-by: Ahmed Mahmoud BACHIRI <bachiriahmedmahmoud@gmail.com>
2022-09-30 19:03:48 -04:00
Lucas Bickel
74815799a0 chore: add Adfinis to USERS.md (#10741)
Signed-off-by: Lucas <lucas.bickel@adfinis.com>

Signed-off-by: Lucas <lucas.bickel@adfinis.com>
2022-09-30 19:02:46 -04:00
Nolan Emirot
3cdde8b79d test: read appset (#10743)
Signed-off-by: emirot <emirot.nolan@gmail.com>

Signed-off-by: emirot <emirot.nolan@gmail.com>
2022-09-30 19:01:56 -04:00
杨英明
5e1eb5ce90 chore: typo for SyncStatusCodeOutOfSync comment (#10748)
Signed-off-by: 杨英明 <951376975@qq.com>

Signed-off-by: 杨英明 <951376975@qq.com>
2022-09-30 18:59:08 -04:00
34FathomBelow
90d576261a chore: upgrade dex to v2.32.1-distroless (#10746)
* chore: upgrade dex to v2.32.1-distroless

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-09-30 18:49:35 -04:00
Jason Meridth
194414157e docs: Fix TLS configure link on getting started (#10734)
Needs operator-manual root instead of nested under getting started

Co-authored-by: jmeridth <jmeridth@gmail.com>
Co-authored-by: rogerogers <rogerogers@outlook.com>

Signed-off-by: jmeridth <jmeridth@gmail.com>

Signed-off-by: jmeridth <jmeridth@gmail.com>
2022-09-29 10:08:44 +02:00
Remington Breeze
856ba52757 feat(ui): Collapsable sidebar with filters (#10626)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-09-28 18:14:21 -07:00
emagana
3960cfd6c5 Add Splunk as ArgoCD user (#10718)
Signed-off-by: emagana <112656855+emagana@users.noreply.github.com>

Signed-off-by: emagana <112656855+emagana@users.noreply.github.com>
2022-09-28 22:25:18 +00:00
谢烟客
f3f73348aa fix: ui add tooltips on repository url links and names (#9868) (#10108)
* fix: ui add tooltips on repository url links and names (#9868)

Signed-off-by: XieYanke <xieyanke007@gmail.com>

* fix: yarn lint failure

Signed-off-by: XieYanke <xieyanke007@gmail.com>

Signed-off-by: XieYanke <xieyanke007@gmail.com>
2022-09-27 12:02:00 -04:00
Saumeya Katyal
7cb6daef5e fix: add tooltip for long title in list view ui (#9792)
* fix: add tooltip for long title in list view ui

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

* review comments

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

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-09-27 11:48:51 -04:00
Petr Drastil
b431d253e5 docs: Default value for server.rootpath is incorrect (#10665)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2022-09-27 11:21:58 +02:00
Nolan Emirot
65804bbac8 tests: cmd unit test version (#10689)
* tests: add unit test version command

Signed-off-by: emirot <emirot.nolan@gmail.com>

* tests: add unit test version command

Signed-off-by: emirot <emirot.nolan@gmail.com>

* tests: add unit test version command

Signed-off-by: emirot <emirot.nolan@gmail.com>

* tests: add unit test version command

Signed-off-by: emirot <emirot.nolan@gmail.com>

* tests: add unit test version command

Signed-off-by: emirot <emirot.nolan@gmail.com>

* tests: client version

Signed-off-by: emirot <emirot.nolan@gmail.com>

Signed-off-by: emirot <emirot.nolan@gmail.com>
2022-09-27 09:04:12 +02:00
Mayursinh Sarvaiya
6fd4c6f44a fix: button consistency in logs panel #9945 (#10016)
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
2022-09-26 11:01:32 -07:00
cleverhu
49487ea8e5 fix: Fix a nil pointer crash for repo server (#10696)
Fixes: https://github.com/argoproj/argo-cd/issues/10614
Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
Co-authored-by: jannfis <jann@mistrust.net>
2022-09-26 08:01:02 +00:00
34FathomBelow
01b9ffe985 chore: upgrade k8s.io/kube-openapi to avoid CVE-2022-1996 (#10691)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-09-26 09:48:01 +02:00
34FathomBelow
03b0fc63bd chore: update install-codegen-tools.sh and upgrade docs (#10692)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-09-26 09:47:05 +02:00
cleverhu
34392a5826 fix: Provide better error message when application source is missing some settings (#10694)
Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-09-26 09:41:30 +02:00
Masatoshi Natsume
02bf903dd9 docs: Add enigmo to list of users (#10603)
Signed-off-by: Masatoshi Natsume <27754135+natten426@users.noreply.github.com>

Signed-off-by: Masatoshi Natsume <27754135+natten426@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-09-23 00:40:02 +00:00
Michael Crenshaw
0214c7c9c3 chore: update Helm and Kustomize versions (#10273) (#10599)
* chore: update Helm and Kustomize versions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* remove v from kustomize version

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* DRY

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Helm 3.10.0

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* update tool-versions.sh

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-09-23 00:19:01 +00:00
my-git9
675cbf40d4 test: Add logic to handle for fileHandle.Close() (#10632)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-09-22 19:31:40 -04:00
Stephen Wolfe
93aa192ff0 Add Kandji to users list (#10650)
Signed-off-by: Stephen Wolfe <stephen@swolfe.io>

Signed-off-by: Stephen Wolfe <stephen@swolfe.io>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-09-20 16:58:49 -07:00
Christopher Cutajar
57288c2605 Adding Elastic as an ArgoCD User (#10649)
Adding Elastic in the user list

Signed-off-by: Christopher Cutajar <60098546+christophercutajar@users.noreply.github.com>

Signed-off-by: Christopher Cutajar <60098546+christophercutajar@users.noreply.github.com>
2022-09-20 16:58:23 -07:00
Alexander Matyushentsev
c05b1c2595 fix: Application details page crashes with JS error (#10640)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-09-19 16:20:18 -07:00
Saumeya Katyal
da9063b486 feat: dark mode (#4722) (#9703)
* feat: enable dark theme in ui

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

* add more theme styles

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

* remove package lock

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

* improvements

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

* improvements

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

* cleanup

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

* fix review comments

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

* update argo-ui sha

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

* update moment yarn.lock

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

update moment yarn.lock

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

update moment yarn.lock

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

* fix review comments

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

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-09-17 18:23:44 -04:00
RutviShukla
158e92c718 added ./ for broken url link (#10623)
* added ./ for broken url link

Signed-off-by: RutviShukla <rutvi.shukla@ufl.edu>

* added command for setting default namespace

Signed-off-by: RutviShukla <rutvi.shukla@ufl.edu>

* added command for setting default namespace

Signed-off-by: RutviShukla <rutvi.shukla@ufl.edu>

* relocated incommand related to setting default namespace

Signed-off-by: RutviShukla <rutvi.shukla@ufl.edu>

Signed-off-by: RutviShukla <rutvi.shukla@ufl.edu>
2022-09-16 20:22:02 -04:00
Leonardo Luz Almeida
192bc5093a chore: update gitops-engine (3951079) (#10616)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-09-16 15:38:01 +00:00
Michael Crenshaw
68255c9552 fix: snyk report bugs (#10544)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-09-16 09:53:59 -04:00
Michael Crenshaw
6a44732966 docs: decision about logs RBAC enforcement in release notes for 2.4 (#10564)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-09-15 14:21:17 -04:00
msvechla
55cda5bcdc fix: add skip-test-tls flag to optionally skip testing for tls (#9679) (#10484)
* feat: add skip-test-tls flag to optionally skip testing for tls, fixes #9679

Signed-off-by: msvechla <m.svechla@gmail.com>

* docs: update cli documentation

Signed-off-by: msvechla <m.svechla@gmail.com>

Signed-off-by: msvechla <m.svechla@gmail.com>
2022-09-15 15:43:33 +00:00
Michael Crenshaw
ff014481be docs: decision about logs RBAC enforcement in release notes (#10563)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-09-15 09:17:06 -04:00
Minchao
86343f8117 docs: update description of policy.csv example in rbac.md (#10565)
Signed-off-by: Minchao <minchao.220@gmail.com>

Signed-off-by: Minchao <minchao.220@gmail.com>
2022-09-15 08:11:32 -04:00
Mitsuo Heijo
f0975b9ad3 chore: remove incompatible miniredis dependency (#10566)
Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>

Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
2022-09-15 08:10:29 -04:00
Greg Knoblauch
b55b60db4c docs: Fix Broken Link in Getting Started Docs (#10585)
* Fix Broken Link

Signed-off-by: Greg Knoblauch <knoblauch.greg@gmail.com>

* Update docs/getting_started.md

Co-authored-by: asingh <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: Greg Knoblauch <knoblauch.greg@gmail.com>

Signed-off-by: Greg Knoblauch <knoblauch.greg@gmail.com>
Co-authored-by: asingh <11219262+ashutosh16@users.noreply.github.com>
2022-09-15 08:08:19 -04:00
Edward Smit
f361e674e7 docs: Include Pandosearch in USERS.md (#10596)
Signed-off-by: Edward Smit <github@edwardsmit.com>

Signed-off-by: Edward Smit <github@edwardsmit.com>
2022-09-15 08:06:15 -04:00
Ishita Sequeira
e53ab49cb5 feat: create cli commands for ApplicationSet (#9584)
* feat: add applicationset cli commands

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* squashed commits and rebased with master

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* addressed comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint errors

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Retrigger CI pipeline

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Retrigger CI pipeline

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* feat: add applicationset cli commands

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* addressed comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint errors

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Retrigger CI pipeline

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Retrigger CI pipeline

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Addressed PR comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* removed duplicate imports

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix CI errors

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* address PR comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add k8s RBAC, docs tweaks

Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* rebase master branch

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Addressed PR coments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* remove unnecessary fields, add docs

Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix unit test

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
Signed-off-by: CI <michael@crenshaw.dev>
Co-authored-by: CI <michael@crenshaw.dev>
2022-09-14 09:27:15 +02:00
asingh
9fac0f6ae6 fix: add more info to creationtime format (#10286) (#10493)
* fix: add more info to  creationtime format

Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>

* lint issue

Signed-off-by: ashutosh16 <mail.ashutosh8@gmail.com>

* fix: add more info to creationtime format

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>
Signed-off-by: ashutosh16 <mail.ashutosh8@gmail.com>
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Co-authored-by: Ashutosh <mail.ashutosh8@gmail.com>
2022-09-09 12:41:39 -04:00
asingh
ed9cddb045 fix: hide terminal on the non-pod resource kind (#9980) (#10556)
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
2022-09-09 11:22:32 -04:00
Mickaël Canévet
ebf1d7256c docs: remove duplicate word in user-management doc (#10546)
Signed-off-by: Mickaël Canévet <mickael.canevet@jellysmack.com>

Signed-off-by: Mickaël Canévet <mickael.canevet@jellysmack.com>
2022-09-09 10:03:56 -04:00
Blake Pettersson
5f3fc68b17 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 <blake.pettersson@gmail.com>

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2022-09-08 07:33:10 -04:00
jannfis
9de5a14a84 chore: Remove bad symlink used for tests (#10527)
* chore: Remove bad symlink used for tests

Signed-off-by: jannfis <jann@mistrust.net>

* Mark CreateSymlink as helper function

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-09-06 19:37:12 +00:00
Jake
30b289f700 chore: add security log issue template (#10368)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-09-06 09:00:25 -04:00
Takumi Sue
aa3fe62c33 fix: invalid error handling (#10384) (#10385)
os.IsNotExist only supports errors returned by the os package

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
2022-09-06 08:49:05 -04:00
Jesse Suen
13af7e25f5 fix: appset controller should preserve argocd refresh annotation (#10510)
Signed-off-by: Jesse Suen <jesse@akuity.io>

Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-09-06 08:37:50 -04:00
Lukáš Kutner
49b3957d46 docs: Add Productboard to users (#10528)
Signed-off-by: Lukáš Kutner <lukas.kutner@productboard.com>

Signed-off-by: Lukáš Kutner <lukas.kutner@productboard.com>
2022-09-06 13:15:30 +02:00
Sondre Lillebø Gundersen
a60dd36ca8 docs: Fix typo and rephrase sentence (#10504)
Signed-off-by: Sondre Lillebø Gundersen <sondrelg@live.no>

Signed-off-by: Sondre Lillebø Gundersen <sondrelg@live.no>
2022-09-05 12:44:57 +02:00
Kostis (Codefresh)
1aba751343 docs: document sync interval setting (#10520)
* docs: document sync interval setting

Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>

* docs: review changes

Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>

Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>
2022-09-05 10:44:44 +00:00
RoCha
9ae5b03b5e Adding Magic Leap as argocd user (#10509)
Signed-off-by: RoCha <rchalumeau@magicleap.com>
2022-09-02 11:32:37 -07:00
Leonardo Luz Almeida
e51b2c054f chore: update gitops-engine to c036d3f6b0 (#10423)
* chore: update gitops-engine to master (9970fab)

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* chore: update gitops-engine to current master

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix: update latest gitops-engine master

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-09-01 20:28:54 +00:00
Jessie Teng
a057ae1607 fix: Remove quotes from delete dialog #10008 (#10471)
Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>
2022-09-01 07:35:19 -07:00
Krzysztof Nazarewski
75313e0d57 chore: drop hardcoded processors from HA manifests (#10458)
Signed-off-by: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com>

Signed-off-by: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com>
2022-09-01 08:19:12 +02:00
jannfis
67171624db fix(ui): Remove application namespace field in app creation (#10481)
* fix(ui): Remove application namespace field in app creation

Signed-off-by: jannfis <jann@mistrust.net>

* Lint

Signed-off-by: jannfis <jann@mistrust.net>

* Move parsing logic to application-service

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-30 20:35:37 +00:00
Gerald Roncajolo
0a3f29b950 fix: update deploymentConfig's healthcheck to wait for replicationController to be Available (#10462)
* update deploymentConfig's healthcheck to wait for replicationController to be available

Signed-off-by: Roncajolo Gerald <groncajolo@softwaymedical.fr>

* Add Softway Medical to users

Signed-off-by: Roncajolo Gerald <groncajolo@softwaymedical.fr>

Signed-off-by: Roncajolo Gerald <groncajolo@softwaymedical.fr>
2022-08-30 21:34:11 +02:00
Abirdcfly
43dd2b361c chore: remove duplicate word in comments (#10479)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-30 14:22:54 +02:00
Yuan Tang
437419fff6 docs: Remove invalid link to hands-on labs (#10466)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-08-30 09:59:11 +02:00
Ishita Sequeira
40594cd273 fix: fix subscription health check (#10450)
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2022-08-29 14:20:51 +02:00
Ricardo Rocha
f2143a41eb docs: Add CERN as a ArgoCD user (#10470)
Signed-off-by: Ricardo Rocha <rocha.porto@gmail.com>

Signed-off-by: Ricardo Rocha <rocha.porto@gmail.com>
2022-08-29 14:18:03 +02:00
asingh
0936da9703 feat: add scrollbar to live manifest (#10379)
* feat: add scrollbar to livemanifest

Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>

* feat: add scrollbar to livemanifest

Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>

* lint issue

Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>

Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>
Co-authored-by: Ashutosh <mail.ashutosh8@gmail.com>
2022-08-26 16:55:33 -04:00
Pavel
37ad433759 feat: add notifications API (#10279)
* add notifications API

we allow to list triggers, templates and services

Signed-off-by: Pavel <aborilov@gmail.com>

* fix: add notification manifest to tests

Signed-off-by: Pavel <aborilov@gmail.com>

* fix: add sleep to fix integration tests

for some reason notification configmap has old data, trying to fix with
the sleep

Signed-off-by: Pavel <aborilov@gmail.com>

* add proposal

Signed-off-by: Pavel <aborilov@gmail.com>

* more info to proposal

Signed-off-by: Pavel <aborilov@gmail.com>

* use struct for notifications objects instead of just strings

to be able easily extend API in the future return list of
trigger/template/service as list of structs

Signed-off-by: Pavel <aborilov@gmail.com>

Signed-off-by: Pavel <aborilov@gmail.com>
2022-08-25 16:04:14 -07:00
sat-devopsnow
a23bfc3aca docs: add OpsVerse as an official user (USERS.md) (#10436)
Signed-off-by: sat-devopsnow <sat@opsverse.io>

Signed-off-by: sat-devopsnow <sat@opsverse.io>
2022-08-23 16:32:36 -07:00
my-git9
202b69a990 chore: Add security logging in util/app (#10416)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
Co-authored-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2022-08-23 18:11:18 +00:00
my-git9
662caa2030 chore: Add security logging in util/git|helm (#10410)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
Co-authored-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2022-08-23 18:08:55 +00:00
jannfis
7d6077d960 fix(ui): Fix multi-app refresh and sync in the UI (#10421)
* fix(ui): Fix multi-app refresh and sync in the UI

Signed-off-by: jannfis <jann@mistrust.net>

* Also fix node info

Signed-off-by: jannfis <jann@mistrust.net>

* Pass namespace instead of name

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-23 13:10:48 -04:00
Adrian Moisey
febf49f666 Add a newline character to fix the render (#10431)
Signed-off-by: Adrian Moisey <adrian@changeover.za.net>

Signed-off-by: Adrian Moisey <adrian@changeover.za.net>
2022-08-23 13:01:10 -04:00
noah
506bd3b282 feat(applicationset): reuse repo-creds for an existing GitHub App (#10092)
Closes #10079

Signed-off-by: Noah Perks Sloan <noah_sloan@securityjourney.com>

Signed-off-by: Noah Perks Sloan <noah_sloan@securityjourney.com>
2022-08-19 16:57:49 -04:00
David Monks
d545198493 feat: Support Custom Application Actions in CLI #7577 (#10015)
* Expand `ListResourceActions` to support the root App

Prior to this change, `ListResourceActions` could only be performed on
resources managed by the Application; this implicitly did not include
the Application itself, unless it was a self-referential Application.
This prevents the listing of actions on the Application itself.

This change detects when the requested resource is an Application with
the same name as the managing Application, thus bypassing the fetching
of the requested resource listing and  simply retrieving the
Application.  It then retrieves the resource details from the
Application itself, instead of any sub-resource.

Signed-off-by: David Monks <david.monks@octoenergy.com>

* Expand `RunResourceAction` to support the root App

Prior to this change, similar to the `ListResourceActions` function
updated in the previous commit, the `RunResourceAction` function only
supports running actions on resources managed by the Application, rather
than the Application itself.

This change re-uses in the `RunResourceAction` function the new
behaviour introduced in the previous commit to make the Application a
valid target for resource actions.

Signed-off-by: David Monks <david.monks@octoenergy.com>

* Extract App actions resource gathering to a private function

This abstracts the fetching of resources that can provide custom resource actions for a given Application via the CLI to a new private function next to the two Commands that do it.

This is a precursor to expanding this set of resources to include the Application itself.

Signed-off-by: David Monks <david.monks@octoenergy.com>

* Include the Application in the `actions list` CLI command

Prior to this change, only resources managed by the Application (and not
the Application itself) were able to have actions associated with them
for running via the CLI.

This change includes the Application itself in the list of resources to
check for custom resource actions when listing or running them via the
CLI.

Signed-off-by: David Monks <david.monks@octoenergy.com>

Signed-off-by: David Monks <david.monks@octoenergy.com>
2022-08-19 16:43:35 -04:00
Yi Cai
f93d678dae feat: make https repo credentials editable in the UI (#9108) (#9782)
* fix: missing actions (#10327) (#10359)

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: Yi Cai <yicai@redhat.com>

* 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 <AMatyushentsev@gmail.com>

* apply reviewer notes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* fix: Add logic to handle for fileHandle.Close() (#9963) (#10361)

Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
Signed-off-by: Yi Cai <yicai@redhat.com>

* docs: fix typo in upgrade notes (#10377)

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* fix: add space before prompt in CLI (#10362)

Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
Signed-off-by: Yi Cai <yicai@redhat.com>

* docs: fix indentation of example AppProject in 'Sync Windows' documentation (#10388)

Signed-off-by: Yi Cai <yicai@redhat.com>

* fix: Correctly assume cluster-scoped resources to be self-referenced (#10390)

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: Yi Cai <yicai@redhat.com>

* ui-make-https-repo-credential-editable

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* Minor format fix

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* Minor fix for unclickable input field

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* Updates for comments

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* ui-make-https-repo-credential-editable

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* Minor format fix

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* Minor fix for unclickable input field

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

* Updates for comments

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>

Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: xin.li <xin.li@daocloud.io>
Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: ciiay <yicai@redhat.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: my-git9 <xin.li@daocloud.io>
Co-authored-by: Xijun Dai <daixijun1990@gmail.com>
Co-authored-by: Jun Duan <jun.duan@ibm.com>
Co-authored-by: jannfis <jann@mistrust.net>
2022-08-19 13:07:51 -04:00
trudog
4e59f66d1e docs: add nethopper to users.md (#10402)
adding Nethopper to the users list

Signed-off-by: trudog <pm.marek@pm.me>

Signed-off-by: trudog <pm.marek@pm.me>
2022-08-19 17:07:07 +00:00
my-git9
2fb2c23370 feat!(cli): add confirm for cluster remove (#10319)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-19 11:42:23 -04:00
Andreas Sommer
9874e49430 docs: Add fully-local developer workflow and traps (#10333)
* docs: Add fully-local developer workflow and traps

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* docs: Replace "ArgoCD" with "Argo CD" in local development guide

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
2022-08-19 11:39:44 -04:00
Michael Crenshaw
a5f4caf3b8 chore: sort users.md (#10387)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-19 09:40:58 -04:00
Michael Crenshaw
69122e4c95 docs: s/ArgoCD/Argo CD (#10352)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-19 09:40:44 -04:00
jannfis
f84d828092 fix: Correctly assume cluster-scoped resources to be self-referenced (#10390)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-18 20:15:38 +00:00
Jun Duan
5642ffd23a docs: fix indentation of example AppProject in 'Sync Windows' documentation (#10388) 2022-08-18 16:01:58 +00:00
my-git9
5181bc1502 fix: add space before prompt in CLI (#10362)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-18 10:25:17 -04:00
Xijun Dai
cdb55541a5 docs: fix typo in upgrade notes (#10377)
Signed-off-by: Xijun Dai <daixijun1990@gmail.com>

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
2022-08-18 10:22:13 -04:00
my-git9
519448ec80 fix: Add logic to handle for fileHandle.Close() (#9963) (#10361)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-18 10:14:47 -04:00
Alexander Matyushentsev
893a8670b0 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 <AMatyushentsev@gmail.com>

* apply reviewer notes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-08-17 21:03:24 +00:00
Michael Crenshaw
4ea4a06ec7 fix: missing actions (#10327) (#10359)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-17 16:30:32 -04:00
JesseBot
42863a475b docs: Add "Create Namespace" to sync options doc (#3490) (#10326)
* Add create namespace to the sync options doc

Signed-off-by: JesseBot <jessebot@linux.com>

* Update docs/user-guide/sync-options.md

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: JesseBot <jessebot@linux.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-08-17 15:11:41 -04:00
Jake
95987d8bea feat: server-side manifest generation for local diff (#8145) (#10019)
* feat: server-side manifest generation for diff (#8145)

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix docs, mocks, ineffectual err

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix CMPs, ineffectual err

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* refactor

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* add unit tests

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* handle err

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* add size limits and inclusion filters

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix docs

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix errors, increase defaults

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* use quantity, wrap errors, add security fields to logs, deprecation warning

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* have e2e test use server side generation

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* nits

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* remove unused import

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix merge conflict

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix conflicts

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix e2e test

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* add deprecation/breaking change info

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* remove security logging stuff, will be in a separate PR

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* more specific docs

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* add security logging

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-08-17 14:48:50 -04:00
Michael Crenshaw
c89be2ed6f test: fix flaky gitea tests (#10354)
* test: fix flaky gitea tests

Signed-off-by: CI <michael@crenshaw.dev>

* embed test data

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-17 14:00:13 -04:00
Michael Crenshaw
6b08a23a01 chore: deprecate argocd-cm plugins (#8117) (#10341)
* chore: deprecate argocd-cm plugins (#8117)

Signed-off-by: CI <michael@crenshaw.dev>

* more warnings

Signed-off-by: CI <michael@crenshaw.dev>

* more warnings

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-17 11:48:27 -04:00
Jake
68d0ef030e chore: add security logging and cwe fields (#10256)
* chore: add security logging and cve fields

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* add missing package

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* capitalize CWE, add warning block to docs

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-08-17 09:32:47 -04:00
Michael Crenshaw
d427c3c048 docs: use table instead of list for Snyk scans (#10141)
* docs: use table instead of list for Snyk scans

Signed-off-by: CI <michael@crenshaw.dev>

* mistake when merging

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-17 09:06:30 -04:00
Omer Kahani
ae4a67a815 chore: Ignore VERSION file for Snyk scan (#10363)
Signed-off-by: Omer Kahani <8766193+OmerKahani@users.noreply.github.com>

Signed-off-by: Omer Kahani <8766193+OmerKahani@users.noreply.github.com>
2022-08-17 09:06:09 -04:00
34FathomBelow
2d544b42c9 docs: Note Helm has been upgraded (#10349)
* docs: Note Kustomize has been upgraded

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* fixed typo

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-16 15:22:16 +00:00
Ishita Sequeira
56be7b69d7 chore: downgrade go version to v1.18 (#10351)
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
2022-08-16 14:55:00 +00:00
Louis HOLLEVILLE
377ae074ed docs: add wemaintain as official user (#10348)
Signed-off-by: Louis Holleville <louis@wemaintain.com>

Signed-off-by: Louis Holleville <louis@wemaintain.com>
2022-08-16 10:19:09 -04:00
Alexander Matyushentsev
9b4f468f72 feat: support gzip compression for data stored in redis (#10190)
* feat: support gzip compression for data stored in redis

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* allow using different redis compression algorithms

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-08-15 16:15:27 -04:00
jsmcnair
e25f21eec8 docs: Document safe concurrent processing of sidecar CMP (#10336)
Signed-off-by: jsmcnair <john.mcnair@yellowdog.co>

Signed-off-by: jsmcnair <john.mcnair@yellowdog.co>
2022-08-15 16:06:38 -04:00
Michael Crenshaw
73ccf1692e docs: remove version notes - rely on docs versioning (#10338)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-15 13:32:24 -04:00
Jonas Mai
4719ca73ea docs: fix first sentence in custom style docs (#10322) 2022-08-15 16:37:30 +00:00
Tom Hughes
40abd16f6e docs: grammar fix (#10328)
authenticate ~> authentication
2022-08-15 16:22:25 +00:00
Tadayuki Onishi
4d776693db fix: Suppressed ssh scheme url warn log (#9836)
* Fixed ssh scheme warn log degrade by #8508
Signed-off-by: kenchan0130 <tt.tanishi100@gmail.com>

* Expanded repository type getCAPath testing
Signed-off-by: kenchan0130 <tt.tanishi100@gmail.com>
2022-08-15 12:18:34 -04:00
Ole-Martin Bratteng
d88803b85d docs: fixes the YAML codefence for Slack notification service (#8776) (#10311)
* chore: update `notifications-engine` to get latest docs

Signed-off-by: Ole-Martin Bratteng <1681525+omBratteng@users.noreply.github.com>

* chore: generate notifications docs

Signed-off-by: Ole-Martin Bratteng <1681525+omBratteng@users.noreply.github.com>

* chore: run `go mod tidy`

Signed-off-by: Ole-Martin Bratteng <1681525+omBratteng@users.noreply.github.com>

Signed-off-by: Ole-Martin Bratteng <1681525+omBratteng@users.noreply.github.com>
2022-08-15 11:37:48 -04:00
jannfis
139c22122b chore: Don't run snyk report in clones (#10323)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-15 11:36:23 -04:00
Andreas Sommer
6b0973d32b fix: Replace dangerous use of xargs (#10331)
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
2022-08-15 11:33:06 -04:00
Yuan Tang
6756a5f816 ci: Update K3s version matrix in e2e tests (#10313)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-08-12 21:48:57 +00:00
Michael Crenshaw
b0bb52adca docs: document revision history limit field (#10302)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-12 14:37:55 -04:00
Michael Crenshaw
5d184ac82b fix: respect ARGOCD_GIT_MODULES_ENABLED in the appset controller (#10285) (#10287)
* fix: respect ARGOCD_GIT_MODULES_ENABLED in the appset controller (#10285)

Signed-off-by: CI <michael@crenshaw.dev>

* remove duplicate line

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-12 14:37:34 -04:00
34FathomBelow
a9423aa4f5 chore: upgrade helm to most recent version (v3.9.3) (#10296)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-12 10:09:34 -04:00
34FathomBelow
05aa2ad7a2 chore: upgrade redis-ha chart to 4.17.8, HAProxy v2.6.2 (#10032) (#10297)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-12 10:04:07 -04:00
Michael Crenshaw
b38ff17524 docs: clusterResources in declarative cluster config (#10219)
* docs: clusterResources in declarative cluster config

Signed-off-by: CI <michael@crenshaw.dev>

* add article

Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-11 13:48:20 -04:00
jannfis
03bd6e62a0 feat: Make additional namespaces configurable via environment (#10270)
* feat: Make additional namespaces configurable via environment

Signed-off-by: jannfis <jann@mistrust.net>

* Change from clidocsgen

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-11 12:31:41 -04:00
jannfis
b52098f36a fix: Trim white space from string slice retrieved from environment (#10275)
* fix: Trim spaces from string slice retrieved from env

Signed-off-by: jannfis <jann@mistrust.net>

* Add more tests

Signed-off-by: jannfis <jann@mistrust.net>

* Construct slice a little more efficient

Signed-off-by: jannfis <jann@mistrust.net>

* Fix trim logic

Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-11 16:22:54 +00:00
Chirag Kanase
30cab3b02d docs: add freshop to USERS.md (#10276)
Adding Freshop to the list of users for argo
2022-08-11 14:09:30 +00:00
Sverre Boschman
5515cde64b fix(applicationset): support webhook with matrix interpolation (#9931) (#10236)
* chore(applicationset): move webhook code to its own package

Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>

* fix(applicationset): support matrix interpolation in webhook events

Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>

Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
2022-08-10 21:06:31 -04:00
Leonardo Luz Almeida
7fe26de428 chore: improve logs in util/argo/argo.go (#10271)
* chore: improve logs in util/argo/argo.go

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* chore: fix error message

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix unit test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-08-10 20:50:44 -04:00
jannfis
4dc276e269 chore: Bump version in master to 2.5.0 (#10266)
Signed-off-by: jannfis <jann@mistrust.net>
2022-08-10 09:32:05 -04:00
jannfis
068048cb80 feat: Applications in any namespace (#9755)
* feat: Applications in any namespace

Signed-off-by: jannfis <jann@mistrust.net>

* Fix typo in CI

Signed-off-by: jannfis <jann@mistrust.net>

* Create argocd-e2e-external namespace

Signed-off-by: jannfis <jann@mistrust.net>

* Update from codegen

Signed-off-by: jannfis <jann@mistrust.net>

* Remove debug code

Signed-off-by: jannfis <jann@mistrust.net>

* Update help text for -N option to app create

Signed-off-by: jannfis <jann@mistrust.net>

* Wrap error when retrieving AppProject from cache

Signed-off-by: jannfis <jann@mistrust.net>

* Check for controller namespace first before matching on additional ns

Signed-off-by: jannfis <jann@mistrust.net>

* Improve TestAppProjectIsSourceNamespacePermitted unit test

Signed-off-by: jannfis <jann@mistrust.net>

* Get rid of some debug leftovers

Signed-off-by: jannfis <jann@mistrust.net>

* Better error wrapping; return IsNotFound as-is

Signed-off-by: jannfis <jann@mistrust.net>

* Updates from codegen

Signed-off-by: jannfis <jann@mistrust.net>

* We don't need AppShortName() anymore

Signed-off-by: jannfis <jann@mistrust.net>

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

Signed-off-by: jannfis <jann@mistrust.net>

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

Signed-off-by: jannfis <jann@mistrust.net>

* Remove deprecated code

Signed-off-by: jannfis <jann@mistrust.net>

* Remove dead code

Signed-off-by: jannfis <jann@mistrust.net>

* Add RBACName() method to application type

Signed-off-by: jannfis <jann@mistrust.net>

* Update from codegen

Signed-off-by: jannfis <jann@mistrust.net>

* Fix e2e test

Signed-off-by: jannfis <jann@mistrust.net>

* Update codegen

Signed-off-by: jannfis <jann@mistrust.net>

* Move RBAC name generation to an application receiver

Signed-off-by: jannfis <jann@mistrust.net>

* Fix sync window status in UI

Signed-off-by: jannfis <jann@mistrust.net>

* Fix pod logs viewer

Signed-off-by: jannfis <jann@mistrust.net>

* Fix application events in UI

Signed-off-by: jannfis <jann@mistrust.net>

* Fix application search in UI

Signed-off-by: jannfis <jann@mistrust.net>

* Fix yarn lint

Signed-off-by: jannfis <jann@mistrust.net>

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

Signed-off-by: jannfis <jann@mistrust.net>

* Adapt e2e test to a changed error message

Signed-off-by: jannfis <jann@mistrust.net>

* Application namespace should be taken into account for create

Signed-off-by: jannfis <jann@mistrust.net>

* Use non-qualified application name as Helm release name

Signed-off-by: jannfis <jann@mistrust.net>

* Support --app-namespace in e2e tests

Signed-off-by: jannfis <jann@mistrust.net>

* Enable more e2e tests

Signed-off-by: jannfis <jann@mistrust.net>

* Increase e2e timeout for newly added tests

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-10 11:39:10 +02:00
Michael Crenshaw
3d06d8202e docs: revert appset path.path and path.segments docs (#10254)
* docs: revert appset path.path and path.segments docs

Signed-off-by: CI <michael@crenshaw.dev>

* more

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-09 21:34:37 +00:00
Michael Crenshaw
15965b8262 docs: fix version reference for logs UI fix (#10245)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-09 16:57:27 -04:00
erezweissgloat
0ce705471e docs: add gloat to USERS.md (#10252)
* Update USERS.md

We are also using argo!

* Update USERS.md
2022-08-09 17:42:51 +00:00
Edward Grönroos
af40d52ca0 feat: add support for default container annotation (#8015) (#9769)
* feat: add support for default container in logs/exec

Signed-off-by: Edward Grönroos <edward@gronroos.se>

* chore: resolve linting issues

Signed-off-by: Edward Grönroos <edward@gronroos.se>
2022-08-09 10:30:48 -04:00
César M. Cristóbal
10303dc168 docs: fix microsoft user management mapping role (#10251) 2022-08-09 10:16:59 -04:00
Sverre Boschman
da20f16d7b docs(applicationset): fix layout matrix/merge generator restrictions (#10246)
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
2022-08-09 10:04:43 -04:00
dependabot[bot]
915bd81d08 chore(deps): bump terser from 5.12.1 to 5.14.2 in /ui (#10064)
Bumps [terser](https://github.com/terser/terser) from 5.12.1 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 17:44:20 -04:00
Justin Watkinson
4e7434aa94 feat: add projects filter to app sync command (#8320) (#10133)
* feat: add projects filter to app sync command

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* test: add e2e sync by project

Signed-off-by: Justin Watkinson <justin.watkinson@gmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Watkinson <justin.watkinson@gmail.com>

Co-authored-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-08-08 17:19:42 -04:00
my-git9
729c9a83a1 chore: improve argocd app delete (#10160)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-08 17:16:22 -04:00
Kerwood
22ea51d4e4 fix: Drop all references to exec unless the feature is enabled (#9920) (#10187)
* fix:  Drop all references to exec unless the feature is enabled #9920

Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>

* fixed tslint issues

Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>
2022-08-08 16:27:20 -04:00
Boroda
0baf485a5c feat: add Gitlab PR generator webhooks support (#10235)
Signed-off-by: vlad-boroda <enity.w@gmail.com>
2022-08-08 20:18:10 +00:00
Michael Crenshaw
fc7c88b6f3 docs: update changelog for 2.1.x through 2.4.x (#10241) (#10242)
* docs: update changelog for 2.2.x through 2.4.x (#10241)

Signed-off-by: CI <michael@crenshaw.dev>

* also 2.1.x series

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-08 15:44:32 -04:00
34FathomBelow
2260c79d8f feat: refactor redis-ha NetworkPolicy to include egress rules (#10226)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-08 15:04:47 -04:00
34FathomBelow
fd8ecf49b2 feat: restrict egress onredis (#10227)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-08 15:03:15 -04:00
jannfis
591c4d9d15 fix: Ignore non-self-referencing resources while pruning (#10198)
* fix: Ignore non-self-referencing resources while pruning

Signed-off-by: jannfis <jann@mistrust.net>

* Pull in latest gitops-engine code

Signed-off-by: jannfis <jann@mistrust.net>

* Revert a replace in go.mod

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-08 19:37:45 +02:00
jannfis
ca08f4d0c7 proposal: Applications outside argocd namespace (#6409)
* proposal: Applications outside argocd namespace

Signed-off-by: jannfis <jann@mistrust.net>

* Typos and add another use-case

Signed-off-by: jannfis <jann@mistrust.net>

* Update 003-applications-outside-argocd-namespace.md

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-08 18:39:13 +02:00
dleinov
c6c82239b5 feat: Added health check for spot.io SpotDeployment (#10152)
* feat: Added health check for spot.io SpotDeployment

Signed-off-by: Daniel Leinov <dleinov@netapp.com>

* feat: Added fixed SpotDeployment health check

Signed-off-by: Daniel Leinov <dleinov@netapp.com>

* feat: Added fixed SpotDeployment health check script

Signed-off-by: Daniel Leinov <dleinov@netapp.com>
2022-08-08 12:07:54 -04:00
Kerwood
5a002def35 feat: Added Google Project health check (#10230)
Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>
2022-08-08 12:06:51 -04:00
Kerwood
c317d48590 feat: Added Google PubSub Topic and Subscription health checks (#10229)
* feat: Added Google PubSub Topic and Subscription to health checks

Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>

* Fixed apiVersion in test files

Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>
2022-08-08 12:06:04 -04:00
Geoffrey MUSELLI
97471f4a5a feat: ApplicationSet Go template (#10026)
* ApplicationSet Go Template

Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>

* go template improvements

Signed-off-by: CI <michael@crenshaw.dev>

* update go mod

Signed-off-by: CI <michael@crenshaw.dev>

* fix tests

Signed-off-by: CI <michael@crenshaw.dev>

* fix tests

Signed-off-by: CI <michael@crenshaw.dev>

* fix tests

Signed-off-by: CI <michael@crenshaw.dev>

* Add tests for error handling

Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>

Co-authored-by: CI <michael@crenshaw.dev>
2022-08-08 11:50:53 -04:00
34FathomBelow
c0f16fb5a2 chore: cleanup remnants of snyk scan removal (#10225)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-08 10:20:30 +02:00
Brandon High
84f5648f3b docs: Document ignoreAggregatedRoles setting (#10206)
Signed-off-by: Brandon High <highb@users.noreply.github.com>
2022-08-07 14:20:10 +02:00
Leonardo Luz Almeida
22a3b02a2d feat: Introduces Server-Side Apply as sync option (#9711)
* feat: Introduces Server-Side Apply as sync option

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* add docs

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Implement the structured-merge diff when ssa is enabled

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* update gitops-engine

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* update gitops-engine

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* go mod tidy

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add server-side apply option to the UI

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* update gitops-engine to master

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix live default values

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-08-05 19:16:35 -04:00
Michael Crenshaw
84bb996d12 chore: no non-container scans in workflow (scan limit hit) (#10222)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-05 15:29:42 -04:00
Fish-pro
d95c5c991a fix: consistent example indentation in CLI (#10075)
Signed-off-by: chen zechun <zechun.chen@daocloud.io>
2022-08-05 15:27:42 -04:00
Sahdev Zala
39a8deff73 docs: correct the api field description for the GitLab example (#10081)
The api field description for the GitLab example seems mistakenly
copied from the GitHub example.

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-08-05 15:24:31 -04:00
May Zhang
5da0c2e727 feat: app wait with --degraded (#10139)
* feat: app wait with --degraded

Signed-off-by: May Zhang <may_zhang@intuit.com>

* feat: adding doc change

Signed-off-by: May Zhang <may_zhang@intuit.com>
2022-08-05 15:23:30 -04:00
rumstead
e93397e84e feat: Expose the Argo CD ID through an ENV in the Dockerfile (#10113) (#10115)
Signed-off-by: Ryan Umstead <ryan.umstead@blackrock.com>
Signed-off-by: rumstead <rjumstead@gmail.com>

Co-authored-by: Ryan Umstead <ryan.umstead@blackrock.com>
2022-08-05 15:17:35 -04:00
Takuya Yaginuma
7488f68c91 fix: set default value for users.session.duration (#9962) (#10185)
* fix: set default value for users.session.duration

Signed-off-by: Takuya Yaginuma <biz.mkgoat.yagi+github@gmail.com>
Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

* docs: add user.session.duration change

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

* docs: fix users.session.duration parameter name

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

* Retrigger CI pipeline

Signed-off-by: y-takuya <biz.mkgoat.yagi+github@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-08-05 15:05:37 -04:00
Marius Sturm
73f80d7eb0 feat: Support environment variables in Helm value file paths (#10213)
* Add env var support for value file paths

Signed-off-by: Marius Sturm <marius.sturm@snyk.io>

* Add note about env vars in value file path

Signed-off-by: Marius Sturm <marius.sturm@snyk.io>

* Fix yaml syntax

Signed-off-by: Marius Sturm <marius.sturm@snyk.io>
2022-08-05 17:06:54 +00:00
OmarKalloush
ce394dd3e2 chore: Upgrade Golang to 1.19 (#10176) (#10186)
* Upgrade Golang to 1.19

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* go mod tidy with go 1.19

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* Replace deprecated ioutil

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* make codegen changes

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>

* Codegen Changes

Signed-off-by: OmarKalloush <omar.kalloush@optimumpartners.co>
2022-08-05 12:59:28 -04:00
cui fliter
2b11915e95 chore: fix some typos (#10217)
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-08-05 09:34:54 -04:00
34FathomBelow
9f635dc33d chore: upgrade dex to distroless avoid CVE-2022-2097/CVE-2022-30065 (#10203)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-08-05 09:06:11 -04:00
Michael Crenshaw
3520dfca51 chore: fix codegen (#10202)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-04 21:22:43 +00:00
Renaud Guérin
23ef831cd4 docs: Use ConfigMap to disable TLS (#10106)
* docs: Use ConfigMap to disable TLS

Signed-off-by: Renaud Guerin <renaud@renaudguerin.net>

* Fix typo

Signed-off-by: Renaud Guerin <renaud@renaudguerin.net>
2022-08-04 16:59:56 -04:00
Michael Crenshaw
fc15731c3f chore: update redis-ha manifests (#10032)
* chore: update redis manifests

Signed-off-by: CI <michael@crenshaw.dev>

* upgrade haproxy

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-04 19:56:30 +02:00
Michael Crenshaw
1aebc93ad3 docs: recommend offline bcrypt (#10050) (#10056)
* docs: recommend offline bcrypt (#10050)

Signed-off-by: CI <michael@crenshaw.dev>

* add bcrypt example

Signed-off-by: CI <michael@crenshaw.dev>

* note title

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-04 19:55:53 +02:00
my-git9
c07a127861 docs: improve Installation.md (#10173)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-04 10:22:21 -04:00
jannfis
5a540ab556 build: Enable optional skipping of building test-tools-image (#10199)
Signed-off-by: jannfis <jann@mistrust.net>
2022-08-04 09:50:44 -04:00
Michael Crenshaw
3f858f58f4 chore: install snyk before generating report (#10158)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-03 22:42:17 +02:00
Michael Crenshaw
221559cc38 chore: upgrade codeql action to v2 (#10165)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-03 20:26:35 +00:00
Michael Crenshaw
3166864b5b chore: no colons in filenames (#10183)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-03 22:17:10 +02:00
Michael Crenshaw
0064fa729c feat: Add labelSelector style to filter all generators (#9312)
Fixes https://github.com/argoproj/applicationset/issues/361

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

Co-authored-by: Jan Jansen <jan.jansen@gdata.de>
2022-08-03 15:30:52 -04:00
Michael Crenshaw
94e12e6952 docs: use install instead of curling directly to /usr/local/bin (#9944)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-03 21:29:27 +02:00
Michael Crenshaw
ee08c7b144 chore: fix sarif upload categories (#10171)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-03 20:50:36 +02:00
Yves Richard
4d7ff83b29 docs: fix kustomize namePrefix misconception in application.yaml (#10162)
* Update docs/operator-manual/application.yaml

- Removed comment about what namePrefix does. (i.e. it does not add a prefix to the image)
- Added examples of other supported transformers. (based on looking at the source code)
- Added link to the kustomize docs where the transormers are described in more detail.

* Update kustomize casing to be consistent

Signed-off-by: whyvez <yves@premise.com>
2022-08-03 14:38:44 -04:00
my-git9
9d21bb91b1 fix: Add logic to handle for file.Close() (#9963) (#10159)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-03 14:33:40 -04:00
Michael Crenshaw
15ac1a6ac9 chore: fix typo in image workflow (again) (#10164)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-01 20:51:56 +00:00
Michael Crenshaw
5c05aa4af2 chore: fix typo in image workflow (#10161)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-01 18:20:10 +00:00
Mohamed Iflan
7bd9e1eb83 docs: Fixed indentation Error (#10123)
* Fixed indentation Error

Signed-off-by: iflan7744 <iflan_mohamed@yahoo.com>

* Fixed indentation Error for top-level data key

Signed-off-by: iflan7744 <iflan_mohamed@yahoo.com>

Co-authored-by: iflan7744 <iflan_mohamed@yahoo.com>
2022-08-01 10:39:44 -04:00
Michael Crenshaw
33f17596f7 chore: fix codeql category error (#10137)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-30 17:25:54 +02:00
Michael Crenshaw
4be0d412c4 chore: exclude docs from Sonar check completely (#10142)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-30 17:25:08 +02:00
Michael Crenshaw
00d6e832f2 chore: exclude docs from Sonar check (#10136)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-29 19:48:06 +02:00
Blake Pettersson
470176b77a feat: add deny destinations for projects (#9464) (#9652)
This adds the ability to selectively deny destinations, by prefixing
either its `namespace` or `server` with a `!`. Closes #9464.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2022-07-29 13:43:29 +02:00
Michael Crenshaw
e786ff801e chore: ignore CVE-2022-0624 - not exploitable in Argo CD (#10128)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-28 13:28:19 -04:00
my-git9
57a407ecdb fix: add logic to handle for f.Close() for util/gpg (#9963) (#10130)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-07-28 15:14:11 +00:00
my-git9
85b4dc33e8 fix: Add logic to handle for f.Close() for util/db (#9963) (#10127)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-07-28 14:47:27 +00:00
my-git9
ea5063d5d1 test: Add logic to handle for f.Close() for cmd/argocd/commands/admin (#9963) (#10074)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-07-28 14:26:12 +00:00
Liam Jarvis
b8ad57f2d4 fix: Handle github ping webhook event (#7555) (#10082)
- Add github ping event handler
- Move webhook data to testdata folder

Signed-off-by: Liam Jarvis <jarviliam@gmail.com>
2022-07-28 09:28:38 -04:00
Michael Crenshaw
e3940cd2bf chore: add Snyk scans to docs (#9856)
* chore: generate Snyk reports

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

sarif

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

dashboard

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

cron job

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

more consistent formatting

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

clarification

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

sarif files

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix naming, fix doc get text

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

apply suggestions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

apply suggestions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

blarn

Signed-off-by: CI <michael@crenshaw.dev>

ignore errors due to vulns

Signed-off-by: CI <michael@crenshaw.dev>

specify target branch in script

Signed-off-by: CI <michael@crenshaw.dev>

don't checkout before running script

Signed-off-by: CI <michael@crenshaw.dev>

make sure dest dir exists

Signed-off-by: CI <michael@crenshaw.dev>

fix workflow

Signed-off-by: CI <michael@crenshaw.dev>

* update scans

Signed-off-by: CI <michael@crenshaw.dev>

* update reports

Signed-off-by: CI <michael@crenshaw.dev>

* use latest ignore rules

Signed-off-by: CI <michael@crenshaw.dev>

* update reports

Signed-off-by: CI <michael@crenshaw.dev>

* update reports

Signed-off-by: CI <michael@crenshaw.dev>

* update reports, add link to latest, push to master instead of stable

Signed-off-by: CI <michael@crenshaw.dev>

* fix for double-digit patch versions

Signed-off-by: CI <michael@crenshaw.dev>

* clean up testing changes

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 21:15:00 +00:00
Michael Crenshaw
a329416788 fix: skip redirect url validation when it's the base href (#10058) (#10116)
* fix: skip redirect url validation when it's the base href (#10058)

Signed-off-by: CI <michael@crenshaw.dev>

nicer way of doing it

Signed-off-by: CI <michael@crenshaw.dev>

* fix missin arg

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 15:51:57 -04:00
Michael Crenshaw
01e4936cd6 docs: add OpenSSH breaking change notes (#10104)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 15:20:39 -04:00
Michael Crenshaw
ab90d8010b chore: update parse-url (#10101)
* chore: upgrade parse-url

Signed-off-by: CI <michael@crenshaw.dev>

* edit a generated file, because that's smart

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 14:50:00 -04:00
Michael Crenshaw
a5ec960a71 fix: avoid CVE-2022-28948 (#10093)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 14:49:26 -04:00
wgzhao
44fea52359 docs: add Lian Chu Securities to Users (#10080)
Signed-off-by: wgzhao <wgzhao@gmail.com>
2022-07-26 09:23:58 -04:00
Sahdev Zala
3b290753c5 docs: add api field example in the appset security doc (#10087)
It seems like most of the work for the mentioned issue below is done
under the PR #9466 but from the issue description, it's probably
worth to mention the example as added here.

Related #9352

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-07-26 09:15:02 -04:00
Tuan Anh Tran
02db022b9a docs: add Techcombank to users (#10085)
Signed-off-by: Tuan Anh Tran <me@tuananh.org>
2022-07-25 14:40:14 -04:00
yongjoon.park-DevOps
804c230d7a docs: add kurly to Argo CD Users (#10069)
Co-authored-by: yongjoon.park-DevOps <github-actions@github.com>
2022-07-25 14:30:14 -04:00
my-git9
716578642b fix: add logic to handle for f.Close() for util/io/files/tar.go (#9963)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-07-25 14:08:30 -04:00
Michael Crenshaw
9211034cad feat: argocd app manifests --local (#5525) (#10061)
* feat: argocd app manifests --local option

Signed-off-by: Simon Ninon <simon.ninon@gmail.com>

* fix missing param

Signed-off-by: CI <michael@crenshaw.dev>

* more docs

Signed-off-by: CI <michael@crenshaw.dev>

Co-authored-by: Simon Ninon <simon.ninon@gmail.com>
2022-07-25 14:01:42 -04:00
34FathomBelow
33fa916bf5 feat: add ingress network policies for applicationset and notifications controller (#10053)
* feat: add ingress network policies for applicationset and notifications controllers

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* updated count of manifest

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-25 12:33:36 -04:00
Hyeonmin Park
dff35604ae fix: Set HOST_ARCH for yarn build from platform (#10018)
Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>
2022-07-25 12:26:44 -04:00
Nicholas Hawkes
e343d3bb15 docs: fix typo - user->use (#10078)
Small typo in the documentation - should say use not user
2022-07-22 15:47:05 +00:00
Mayursinh Sarvaiya
5c08527132 fix: off positioned filter icon (#10013)
Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
2022-07-20 14:33:26 -07:00
34FathomBelow
e1acb16644 chore: update redis to 7.0.4 avoid CVE-2022-30065 (#10059)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-20 17:10:17 -04:00
my-git9
dfe60a5486 docs: improve docs/user-guide/kustomize.md (#10025)
Signed-off-by: xin.li <xin.li@daocloud.io>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-20 20:41:07 +00:00
my-git9
b090103a67 fix: Add logic to handle for f.Close() in util/localconfig/ (#9963)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-07-20 16:20:18 -04:00
Daniel Helfand
0b5b4a8f90 chore: argocd app create output states whether app exists (#9984)
* chore: argocd app create output states whether app exists

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: determine if app has changed without server err

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: unchanged if app has not changed

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: add logic to tell user if app was updated

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: edit comments

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: check if get err is notfound

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-07-20 15:32:03 -04:00
Ashutosh
1f964dcd36 docs: add argocd-server grpc metric usage (#10007)
Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>

Co-authored-by: Ashutosh <mail.ashutosh8@gmail.com>
2022-07-20 14:58:08 -04:00
Joe Bowbeer
d09819283e add securityContext to redis-ha containers (#9930)
Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2022-07-20 14:55:20 -04:00
Josh Soref
2cff57e359 chore: spelling: retrieve (#10051)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-07-20 12:27:15 +02:00
Michael Crenshaw
80a6b0c004 chore: update redis to avoid CVE-2022-2097 (#10031)
* chore: update redis to avoid CVE-2022-2097

Signed-off-by: CI <michael@crenshaw.dev>

* codegen

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-20 12:17:30 +02:00
Michael Crenshaw
eb4418d065 chore: upgrade Dex to 2.32.0 (#10036) (#10042)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-20 12:16:50 +02:00
34FathomBelow
da0bb0456c chore: update haproxy to 2.0.29 for redis-ha (#10045)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-19 15:05:02 -04:00
Jake
bb7c71c803 fix: copy claims before modifying for logs (#10044)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-19 18:27:55 +00:00
Michael Crenshaw
708906d063 docs: use quotes to emphasize that ConfigMap value is a string (#9995)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-16 12:21:23 -04:00
Michael Crenshaw
a2a6d9d694 docs: document directory app include/exclude fields (#9997)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-15 21:42:28 -04:00
Alexander Matyushentsev
d577bffe1e fix: extensions is not loading for ConfigMap/Pods (#10010)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-15 21:40:33 -04:00
Michael Crenshaw
43b7ded16c fix: terminal websocket write lock to avoid races (#10011)
* fix: protect terminal WriteMessage with a lock

Signed-off-by: CI <michael@crenshaw.dev>

* give write its own lock

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-15 17:23:28 -07:00
Michael Crenshaw
99a889cdcc docs: simplify Docker toolchain docs (#9966) (#10006)
* docs: simplify Docker toolchain docs (#9966)

Signed-off-by: CI <michael@crenshaw.dev>

* to be or not to be

Signed-off-by: CI <michael@crenshaw.dev>

* pin dependencies to avoid absurdity

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-15 15:42:23 +00:00
rishabh625
ff40c209f2 fix: e2e test to use func from clusterauth instead creating one with old logic (#9989)
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-07-15 09:21:19 -04:00
chroju
7df9a0b377 docs: add GLOBIS to users (#9987)
Signed-off-by: chroju <chroju@users.noreply.github.com>

Co-authored-by: chroju <chroju@users.noreply.github.com>
2022-07-15 09:12:18 -04:00
Hyeonmin Park
774a8884a6 fix: add missing download CLI tool URL response for ppc64le, s390x (#9983)
Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>
2022-07-15 08:55:08 -04:00
Michael de Hoog
aa630d878f docs: fix Ingress documentation for AWS ALBs (#9926)
* Update ingress.md

Fix documentation about AWS ALBs (was only routing the root path /)

* Update ingress.md

Use `pathType: Prefix` instead of `/*`
2022-07-15 08:48:09 -04:00
my-git9
8ec9ad7c8d add logic to handle for f.Close() (#10004)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-07-15 08:34:45 -04:00
usernameisnull
7d31d612ef fix: api server should use ARGOCD_SERVER_LOG_LEVEL instead of ARGOCD_REPO_SERVER_LOGLEVEL (#9970) (#9975)
* change ARGOCD_REPO_SERVER_LOGLEVEL to ARGOCD_SERVER_LOG_LEVEL

Signed-off-by: mabing <bing.ma@daocloud.io>

* Changed too much,revert it.

Signed-off-by: mabing <bing.ma@daocloud.io>

* make manifests

Signed-off-by: mabing <bing.ma@daocloud.io>

Co-authored-by: mabing <bing.ma@daocloud.io>
2022-07-14 16:57:14 -04:00
Jake
1be1a0475b feat: add HTTPS to dex server (#9424) (#9883)
* feat: add HTTPS support to dex server (#9424)

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* refactor transports, add v2.5 to docs, other small nits

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* use OIDCTLSConfig in session manager

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* update tls to use os instead of ioutil (but really this is just me trying to get CICD to work)

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* cleanup and nits

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix tests after merge

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix tests

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* nit

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-13 16:45:35 -04:00
reggie-k
dee67bd97d fix: UI part for logs RBAC - do not display the logs tab when no RBAC in place (#7211) (#9828)
* show logs tab only upon explicit rbac allow policy

Signed-off-by: reggie-k <reginakagan@gmail.com>

* 2.4.7 docs edit

Signed-off-by: reggie-k <reginakagan@gmail.com>
2022-07-13 16:08:29 +00:00
Michael Crenshaw
665d83e94e fix: don't log group claims unless log level is debug (#9549) (#9947)
* fix: don't log group claims unless log level is debug (#9549)

Signed-off-by: CI <michael@crenshaw.dev>

* ignore lint error

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-13 11:22:18 -04:00
Kostis (Codefresh)
e6a6cae4c0 docs: supported versions (#9876)
* docs: supported versions

Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>

* docs: supported versions feedback

Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>
2022-07-13 11:09:03 -04:00
Jake
79178ea50e chore: use manifest version for redis+dex in E2E tests (#9955) (#9959)
* chore: use manifest version for redis+dex in E2E tests (#9955)

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* use grep and cut instead of yq

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-12 19:06:48 -07:00
Michael Crenshaw
c02f213ce8 fix: bad error message (#9967)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-12 21:51:43 -04:00
Alexander Matyushentsev
6b84b2fe1c chore: upgrade k8s client to v0.24.2 (#9932)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-12 17:46:10 -07:00
Alexander Matyushentsev
804b11b6fe feat: support application level extensions (#9923)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-12 16:16:37 -07:00
taksenov
fdceed6051 docs: fix typo in Generators-Git.md (#9949)
`ApplictionSet` --> `ApplicationSet`
2022-07-12 15:34:36 -04:00
Jake
3f78b3e201 docs: add terminal documentation (#9948)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-12 15:07:25 -04:00
Michael Crenshaw
b515ea789f test: check for error messages from CI env (#9953)
test: check for error messages from CI env (#9953)

Signed-off-by: CI <michael@crenshaw.dev>
2022-07-12 10:28:05 -07:00
Michael Crenshaw
f223182ddc Merge pull request from GHSA-7943-82jg-wmw5
* add tests to demonstrate issue

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

more

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

settings tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

tests for OIDC handlers, consolidating test helpers

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

consolidate

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

consolidate

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix log message

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-12 08:46:13 -04:00
Michael Crenshaw
8b2f081ded Merge pull request from GHSA-pmjg-52h9-72qv
* fix: server-side XSS

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

formatting

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fixes from comments

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-12 08:45:22 -04:00
Jake
179d1e0e8a block out of bounds symlinks (#9738) (#9843)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-11 15:56:18 -04:00
jannfis
74348abf42 test: Use dedicated multi-arch workloads in e2e tests (#9921)
* test: Use dedicated multi-arch workloads in e2e tests

Signed-off-by: jannfis <jann@mistrust.net>

* Use correct tag

Signed-off-by: jannfis <jann@mistrust.net>
2022-07-11 14:04:29 -04:00
Xiao Yang
3ee03f6af2 fix: argocd login just hangs on 2.4.0 #9679 (#9935)
Signed-off-by: Xiao Yang <muma.378@163.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-11 16:55:52 +00:00
Jake
af7d97076c fix: CMP manifest generation fails with ENHANCE_YOUR_CALM if over 40s (#9922)
* fix: CMP manifest generation fails with ENHANCE_YOUR_CALM if over 40s

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix timeouts across all gRPC servers

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* use common consts

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-11 12:02:10 -04:00
yongguangl
19e9de3497 fix: NotAfter is not set when ValidFor is set (#9911)
Signed-off-by: yongguangl <1363186473@qq.com>
2022-07-11 11:53:55 -04:00
Noah Tang
10324a6216 fix: validateProject() function in app_project_types.go file has nil dereference bug (#9917)
fix: validateProject() function in app_project_types.go file has nil dereference bug
Signed-off-by: hai.tang <hai.tang@daocloud.io>

Co-authored-by: hai.tang <hai.tang@daocloud.io>
2022-07-08 21:12:09 +00:00
Alexander Matyushentsev
58d4068f9a feat: support multiple extensions per resource group/kind (#9834)
* feat: support multiple extensions per resource group/kind

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* apply reviewers suggestions

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* apply reviewer notes: stream extension files one by one

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* wrap errors

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* skip symlinks

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-08 11:23:32 -07:00
Daniel Helfand
335ffa8dfc feat: allow argocd cluster rotate-auth to accept cluster name (#9838)
* feat: allow argocd cluster rotate-auth to accept cluster name

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: test assertions

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: address pr feedback

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-07-08 15:47:31 +00:00
Jim Wright
61c09dd748 Support files in argocd.argoproj.io/manifest-generate-paths annotation (#9908)
Signed-off-by: Jim Wright <jmwri93@gmail.com>
2022-07-08 08:53:45 -04:00
jannfis
2d6ce088ac chore: Replace deprecated ioutil in CLI code (#9846)
Signed-off-by: jannfis <jann@mistrust.net>
2022-07-07 16:52:14 -04:00
Kerwood
e272c3a8e0 Added health checks for Config Connector resources. (#9878)
Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>
2022-07-07 16:05:58 -04:00
dependabot[bot]
f128f95734 chore(deps): bump moment from 2.29.3 to 2.29.4 in /ui (#9897)
Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-07 16:04:10 -04:00
Michael Crenshaw
cbc7966441 fix: 'unexpected reserved bits' breaking web terminal (#9605) (#9895)
* fix: 'unexpected reserved bits' breaking web terminal (#9605)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* make things more like they were originally, since the mutex fixes the problem

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix typo, don't pass around a pointer when it isn't necessary

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* apply suggestions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-07 19:39:34 +00:00
Hyeonmin Park
9dfc3a1a0e fix: add missing download CLI tool link for ppc64le, s390x (#9649)
Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>
2022-07-07 07:46:50 -07:00
jannfis
3d092f991c docs: Add application.resourceTrackingMethod to example CM (#9892)
Signed-off-by: jannfis <jann@mistrust.net>
2022-07-06 16:16:35 -04:00
jannfis
bcfdef89c2 fix: Check tracking annotation for being self-referencing (#9791)
* fix: Check tracking annotation for being self-referencing

Signed-off-by: jannfis <jann@mistrust.net>

* Tweak isManagedLiveObj() logic

Signed-off-by: jannfis <jann@mistrust.net>

* Rename isManagedLiveResource to isSelfReferencedObj

Signed-off-by: jannfis <jann@mistrust.net>

* Add e2e test

Signed-off-by: jannfis <jann@mistrust.net>
2022-07-06 18:12:34 +00:00
jannfis
2a3c69279f fix: Make change of tracking method work at runtime (#9820)
* fix: Make change of tracking method work at runtime

Signed-off-by: jannfis <jann@mistrust.net>

* GetAppName() will figure tracking label or annotation on its own

Signed-off-by: jannfis <jann@mistrust.net>

* Correct test comments and add another test

Signed-off-by: jannfis <jann@mistrust.net>

* Add a read lock before getting cache settings

Signed-off-by: jannfis <jann@mistrust.net>
2022-07-06 18:53:38 +02:00
jannfis
f34687bd80 chore: Replace deprecated ioutil in util packages (#9848)
Signed-off-by: jannfis <jann@mistrust.net>
2022-07-06 12:45:04 -04:00
jannfis
b8b7e91ccd chore: Replace deprecated ioutil in hacks (#9851)
Signed-off-by: jannfis <jann@mistrust.net>
2022-07-06 12:33:06 -04:00
Shunki
f457dbbebd fix: argo-cd git submodule is using SSH auth instead of HTTPs (#3118) (#9821)
* fix: argo-cd git submodule is using SSH auth instead of HTTPs (#3118)

Signed-off-by: shunki-fujita <shunki-fujita@cybozu.co.jp>

* Add submodule functions and unit tests
Signed-off-by: shunki-fujita <shunki-fujita@cybozu.co.jp>
2022-07-06 08:59:10 -04:00
jannfis
2389e5bf99 test: Remove circular symlinks from testdata (#9886)
* test: Remove circular symlinks from testdata

Signed-off-by: jannfis <jann@mistrust.net>

* Another test case

Signed-off-by: jannfis <jann@mistrust.net>

* Use defer for changing back to original workdir

Signed-off-by: jannfis <jann@mistrust.net>

* Abort the test on error in defer

Signed-off-by: jannfis <jann@mistrust.net>
2022-07-06 08:49:33 -04:00
YaytayAtWork
f13fc39650 #9429: Adding blank line so list is formatted correctly. (#9880) 2022-07-05 14:04:29 -04:00
Jake
61f321cd2e docs: small fix for plugin stream filtering (#9871)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-05 10:48:31 -04:00
Didrik Finnøy
792308c327 docs: Document the possibility of rendering Helm charts with Kustomize (#9841)
* Update kustomize.md

Resolves  #7835.

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>

* Removed unnecessary command flag from example. Minor text edits.

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>

* spelling

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>
2022-07-05 10:47:38 -04:00
Kent Rancourt
ae19965ff7 refactor: improve context handling in cmd/ (#9860)
Signed-off-by: Kent <kent.rancourt@gmail.com>
2022-07-05 09:32:22 -04:00
Didrik Finnøy
38009fb6ce docs: fix outdated example in helm.md (#8506)
* Update helm.md

The `initContainer` example for installing Helm plugins broke after of version 3.32.1 of the ArgoCD Helm chart. I've updated it with a working code example.

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>

* docs: Updated USERS.md

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>
2022-07-05 09:19:19 -04:00
jannfis
c1d81738d3 chore: Fix import of context package across codebase (#9852)
* chore: fix context imports

Signed-off-by: jannfis <jann@mistrust.net>

* x/net is now imported indirectly

Signed-off-by: jannfis <jann@mistrust.net>

* Make sanitizerKey a unique type

Signed-off-by: jannfis <jann@mistrust.net>
2022-07-01 15:56:50 -04:00
noah
ece5de6840 fix: missing path segments for git file generator (#9839)
* fix: missing path segments for git file generator

given the path:

  /one/two/file.yaml

This change adds the params:

path[1]=two
path.filename=file.yaml
path.filenameNormalized

The use case is for symmetry with other generators (e.g., merge with a directory generator using the key path[1]). As no existing parameter values are changed it should be non-breaking.

Signed-off-by: Noah Perks Sloan <noah@hackedu.io>

* fix: expose all path elements for directory generator

This makes it consistent with the files generator and removes un-intuitive behavior without any breaking change.

docs: clarify - can use either baseName or nth path element
docs: use "directory", like the name of the generator, where "folder" was mentioned
Signed-off-by: Noah Perks Sloan <noah@hackedu.io>
2022-07-01 15:53:06 -04:00
usernameisnull
41f72a9862 chore: remove semicolon from end of statement (#9837)
Signed-off-by: mabing <bing.ma@daocloud.io>

Co-authored-by: mabing <bing.ma@daocloud.io>
2022-07-01 10:40:20 +02:00
Alexander Matyushentsev
ee7356a202 fix: make sure api server informer does not stop after setting change (#9842)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-30 22:28:52 +00:00
noah
71c1f549c4 docs: custom secret must be labeled (#9835)
As far as I can tell, this isn't explicitly documented anywhere (some docs mentioned this label in reference to ConfigMaps) I only figure it out by looking at the code.
2022-06-30 16:20:37 +00:00
Michael Crenshaw
ea01fd7535 chore: upgrade parse-url to avoid SNYK-JS-PARSEURL-2936249 (#9826)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-30 08:15:10 -07:00
Xiao Yang
c702693380 fix: support resource logs and exec (#9833)
Signed-off-by: Xiao Yang <muma.378@163.com>
2022-06-30 09:06:30 -04:00
Max Knee
1717eb9a47 chore: adjust docs (#9829)
Signed-off-by: Max Knee <max.knee@nytimes.com>
2022-06-30 03:33:22 -07:00
Kent Rancourt
07a54b6aea fix: make test-tools-image work on apple silicon (#9808)
Signed-off-by: Kent <kent.rancourt@gmail.com>
2022-06-30 03:16:34 -07:00
Paulo Coelho
7630d434a4 docs: update archlinux install with official package (#9718)
Signed-off-by: Paulo Coelho <prscoelho@protonmail.com>
2022-06-29 16:35:29 -04:00
Jake
355025240c fix: configurable CMP tar exclusions (#9675) (#9789)
* feat: configurable CMP tar exclusions

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* rename cmp to plugin

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* add test for tar stream exclusions

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fix tests

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* update cmp guide

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>

* fully parameterize

Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-06-29 16:27:02 -04:00
Romain Poirot
2ac7bd3039 feat(applicationset): add short sha to PR generator (#9668) (#9669)
* feat(applicationset): add short sha to PR generator

Signed-off-by: Romain Poirot <github@romainpoirot.fr>

* feat(applicationset): add short sha to SCM generator

Signed-off-by: Romain Poirot <github@romainpoirot.fr>
2022-06-29 12:33:44 -04:00
Yuan Tang
8dcf71f0a7 feat: Treat connection reset as a retryable error (#9739)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-06-29 08:52:28 -07:00
Chris Ng
eb3fb904e5 Add scmp.com to argo-cd users (#9823) 2022-06-29 11:23:10 -04:00
Kent Rancourt
b524769714 feat: implement consistent startup messages for all components (#9800)
* feat: implement consistent startup messages for all components

Signed-off-by: Kent <kent.rancourt@gmail.com>

* DRY up previous commit

Signed-off-by: Kent <kent.rancourt@gmail.com>
2022-06-28 14:55:51 -04:00
Lawrence Carvalho
202001ac24 fix(applicationset): provide nameNormalized template param for local cluster (#9728)
Signed-off-by: Lawrence Carvalho <lawrence.carvalho@sky.uk>
2022-06-28 14:49:51 -04:00
Soumya Ghosh Dastidar
2786b70ae8 fix: updated all a tags to Link tags in app summary (#9777)
* fix: updated all a tags to Link tags

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: revert external links to a tags

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: linting

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-06-28 09:47:49 -07:00
Alex Collins
8649c419bc fix: upgrade superagent from 7.1.3 to 7.1.6 (#9748)
Snyk has created this PR to upgrade superagent from 7.1.3 to 7.1.6.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/argoproj/project/d2931792-eef9-4d7c-b9d6-c0cbd2bd4dbe?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2022-06-28 10:59:56 -04:00
Joe Bowbeer
356307e243 fix: pss restricted securityContext (#9765)
* fix: pss restricted securityContext

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>

* fix: argocd-dex-server seccomp strict

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>

* fix: remove seccomp from generated haproxy manifests

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>

* fix: indentation in namespace-install

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>

* fix: indentation in namespace-install

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2022-06-28 09:19:46 -04:00
YaytayAtWork
a491eb2d40 docs: getting started notes on self-signed cert (#9429) (#9784)
* Fix #9429: A couple of notes in the docs to explain that the default certificate is insecure.

Signed-off-by: Jim Talbut <jim.talbut@groupgti.com>

* Fixes #9429: More verbose, but complete, text for Getting Started.

Signed-off-by: Jim Talbut <jim.talbut@groupgti.com>
2022-06-28 09:00:45 -04:00
Chris Reilly
1434e8960d docs: explain rightmost git generator path parameter behavior (#9799) 2022-06-27 21:35:36 +00:00
TomHellier
0d0d5fc8e5 fix: websockets for terminal not working on subPath (#9795)
Signed-off-by: Tom Hellier <me@tomhellier.com>
2022-06-27 10:25:52 -07:00
Blake Pettersson
a041bf80fc feat: allow interpolation of cluster generator values (#9254)
* feat: allow interpolation of generator values

Allow the interpolation of `values` found in the cluster generator.
This allows interpolation of `{{name}}`, `{{server}}`,
`{{metadata.labels.*}}` and `{{metadata.annotations.*}}`. See
argoproj/applicationset#371.

This interpolation could potentially be extended to the list and
duck-type generators if desired.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* docs: add values interpolation usage instructions

Add a basic example of how values interpolation can be used with the
cluster generator.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* fix: remove billion-laughs attack vector

The previous implementation was vulnerable to a billion-laughs attack,
where someone could interpolate values based upon other values,
something like:

```yaml

values:
  lol1: lol
  lol2: '{{values.lol1}}{{values.lol1}}' #
  lol3: '{{values.lol2}}{{values.lol2}}{{values.lol2}}{{values.lol2}}'
```

To counteract that, instead of directly manipulating the `params` map,
we create a map to keep track of the interpolated values, and only
template the values which have been previously whitelisted. Once we go
through all the values, we then merge the interpolated values map back
to the `params` map.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
2022-06-27 09:35:59 -04:00
Alexander Matyushentsev
9d4c940a5a fix: avoid closing and re-opening port of api server settings change (#9778)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-23 14:30:39 -07:00
Nicolas Fillot
a588e63e3c [ArgoCD] Fixing webhook typo in case of error in GetManifests (#9671)
Signed-off-by: Nicolas Fillot <nfillot@weborama.com>

Co-authored-by: Nicolas Fillot <nfillot@weborama.com>
2022-06-23 09:26:28 -04:00
Michael Crenshaw
19cfbfd777 fix: respect OIDC providers' supported token signing algorithms (#9433) (#9761)
* fix: respect OIDC providers' supported token signing algorithms (#9433)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* go mod tidy

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-22 15:30:47 -04:00
Yaakov Selkowitz
2b5371681f test/remote: Allow override of base image (#9734)
ubuntu:22.04 bumped the ppc64el baseline to POWER9, rendering this
unusable on existing POWER8 systems.  This allows customization similar
to the top-level Dockerfile.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2022-06-21 19:23:04 +00:00
Soumya Ghosh Dastidar
88708504f3 fix: updated config file permission requirements for windows (#9732)
* fix: reduced config file permission restriction on windows

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: updated localconfig tests to check error

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-06-21 19:02:26 +00:00
Daniel Helfand
1639981806 chore: add k8s v1.24.1 to test matrix (#9714)
* chore: add k8s v1.24.1 to test matrix

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* chore: lower bearer token secret timeout to 5s

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-06-21 11:25:06 -07:00
Michael Crenshaw
a0ec77e7b5 chore: fix docs gen (#9733)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 10:48:52 -07:00
Joren Zandstra
9b41c08449 fix broken symlink in Dockerfile (#9674)
Signed-off-by: Joren Zandstra <jorenzandstra@yahoo.com>
2022-06-21 09:46:41 -04:00
Michael Crenshaw
f9c3319749 Merge pull request from GHSA-jhqp-vf4w-rpwq
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

defer instead of multiple close calls

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

oops

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

don't count jsonnet against max

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix codegen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

add caveat about 300x ratio

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix versions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix tests/lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:40:36 -04:00
Michael Crenshaw
7987a4e1e7 Merge pull request from GHSA-q4w5-4gq2-98vm
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

remove debug logic

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix tests/lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:39:56 -04:00
Michael Crenshaw
47e4133cc0 Merge pull request from GHSA-2m7h-86qq-fp4v
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix references

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

use long enough state param for oauth2

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

typo

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

more entropy

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:39:01 -04:00
Michael Crenshaw
937f42ffa4 Merge pull request from GHSA-h4w9-6x78-8vrj
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:36:37 -04:00
Soumya Ghosh Dastidar
952230eaf8 fix: updated baseHRefRegex to perform lazy match (#9724)
* fix: updated baseHRefRegex to perform lazy match

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* feat: added unit tests for replaceBaseHRef

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-06-20 15:52:33 -07:00
Mário Bezerra
a67b97d6ad feat: add initiatedBy info to App status field when performing a rollback (#9713)
Signed-off-by: Mário Bezerra <mario.bezerra@incognia.com>
2022-06-20 08:14:35 -07:00
Michael Crenshaw
dfeacd3e9e fix: project filter (#9651) (#9709)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-17 16:39:55 -04:00
Hyeonmin Park
6c4a6b7a70 chore: upgrade kustomize to 4.5.5 (#9650)
* chore: upgrade kustomize to 4.5.5

Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>

* docs: add 2.5 notes for kustomize 4.5.5

Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-17 10:43:12 -04:00
brinchm
64c0847449 docs correction on how to override azure devops URL. (#9699)
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>
2022-06-16 21:05:35 +00:00
Michael Crenshaw
c478617148 log: debug manifest cache (#9602)
* log: debug manifest cache

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix silly refactor

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* shorter function signatures

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* less duplication

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-16 11:02:32 -04:00
hritikch24
5c4e38aa5c Update sync-options.md (#9687) 2022-06-16 14:54:50 +00:00
Michael Crenshaw
91de2f3750 fix: overrides should not appear in the manifest cache key (#9601)
* fix: overrides should not appear in the manifest cache key

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix Helm regression

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix test again

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-15 11:24:07 -04:00
brinchm
56eb09507e feat: Add Azure DevOps SCM Provider Generator; add branchNormalized to SCM Generator template fields. (#9283)
* feat: add Azure DevOps SCM provider
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* feat: add branchNormalized scm provider parameter.
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* add Azure DevOps SCM provider docs.
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* add branchNormalized docs.
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* Changes to Azure DevOps SCM generator from PR feeback.

Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* fix linting error and failing tests.

Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* remove NoError assertion

Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* handle errors when repos are disabled, fix branch name in query when getting default branch.

Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* set proper example values for SCMProviderGeneratorAzureDevOps fields.
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>

* sort dependencies properly by name
Signed-off-by: Christer Brinchmann <christer.brinchmann@gmail.com>
2022-06-15 09:25:43 -04:00
Daniel Helfand
a66046e25c chore: revert adding k8s 1.24.1 to test matrix (#9657)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-06-14 20:18:56 +00:00
Daniel Helfand
3966e50890 chore: add k8s v1.24.1 release to test matrix (#9636)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-06-13 13:15:03 -04:00
Evan Lowry
85e9fe54c7 chore: fix typo in godoc string (#9644)
While investigating how to disable the new terminal feature introduced in version 2.4, came across this accidental copy/paste. Figured would boyscout it in.

Signed-off-by: Evan Lowry <lowry.e@gmail.com>
2022-06-13 17:09:18 +00:00
Christian Hernandez
3008b525f0 Update Generators-Git.md (#9632)
Document how to deploy from the root of the git repository

Signed-off-by: Christian Hernandez <christian@codefresh.io>
2022-06-13 10:56:56 -04:00
Hari Sekhon
d4c277bcc8 docs: added environment variables documentation (#8680)
* added environment variables page

Signed-off-by: Hari Sekhon <harisekhon@gmail.com>

* added Environment Variables page to User Guide

Signed-off-by: Hari Sekhon <harisekhon@gmail.com>

* reformatted table cells as multiline for clarity

Signed-off-by: Hari Sekhon <harisekhon@gmail.com>

* fixed typo

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 10:37:43 -04:00
Michael Crenshaw
d48c8080d0 chore: use Ubuntu 22.04 in CI (#9587)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-12 21:31:12 +02:00
Leonardo Luz Almeida
081608ed93 chore: Implement tests to validate aws auth retry (#9627)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-06-09 20:12:38 -04:00
Michael Crenshaw
e8cb58ecab docs: document OpenSSH upgrade (#9598) (#9615)
docs: document OpenSSH upgrade (#9598) (#9615)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-09 15:43:44 -07:00
Alexander Matyushentsev
1d8a2cdf13 fix: change repo-server command to expand 'ARGOCD_REDIS_SERVICE' env variable (#9628)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-09 22:15:46 +00:00
Leonardo Luz Almeida
b8f6b1c338 chore: Implement a retry in aws auth command (#9618)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-06-08 18:02:38 -04:00
Daniel Helfand
73d01b3656 fix: use serviceaccount name instead of struct (#9614)
* fix: use serviceaccount name instead of struct

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: change name of param from sa to serviceAccount

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-06-08 19:54:12 +00:00
Aymen Ben Tanfous
8a1d9fe76d feat: Added the ability to filter MRs by 'state' to Gitlab PR Generator (#9540)
* Added the ability to filter MRs by 'state' to Gitlab PR Generator
Simplied state verification + Added Unit test

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

* Updated the doc

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

Co-authored-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>
2022-06-08 17:46:14 +00:00
Michael Crenshaw
42bf090a38 docs: document argocd cluster add behavior for 1.24 clusters (#9611)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-08 16:23:24 +00:00
Daniel Helfand
67bc5ee708 fix: create serviceaccount token for v1.24 clusters (#9546)
* fix: create serviceaccount token for v1.24 clusters

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* change create to get in err

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-06-08 15:23:41 +00:00
Michael Crenshaw
ab1b0ec4ac test: fix plugin var test for OSX (#9590)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-08 10:56:23 -04:00
AlexanderSarson
0388368d47 docs: clarify microsoft.md OIDC setup (#8329)
* Update microsoft.md

It was unclear the url was needed to be specified.

* Update docs/operator-manual/user-management/microsoft.md

Co-authored-by: jannfis <jann@mistrust.net>

Co-authored-by: jannfis <jann@mistrust.net>
2022-06-08 10:24:21 -04:00
ChangZhuo Chen (陳昌倬)
dd56fc9e87 feat: support health check on FlinkDeployment (#9300) (#9300)
Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@czchen.org>
2022-06-08 10:05:03 -04:00
Aymen Ben Tanfous
f209ae1975 feat: Slugified the branch name in PR generators (#9462)
* Slugified the branch name in PR generators
Add branchSlug attr to not cause a breaking change

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

* Fixed pull_request_test

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

* Adding 'branch_slug' as an output of the generator

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

* Updated the doc

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

* Fixed test

Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>

Co-authored-by: Aymen Ben Tanfous <aymen.bentanfous@cimpress.com>
2022-06-08 10:02:57 -04:00
Regina Scott
f0a53cd132 feat: combine form repo settings page #9167 (#9374)
* feat: combine form repo settings page

Signed-off-by: Regina Scott <rescott@redhat.com>

* Retrigger CI pipeline

Signed-off-by: Regina Scott <rescott@redhat.com>
2022-06-07 17:32:04 -04:00
Yaakov Selkowitz
0d0d09f262 chore: Fix working directory for remote e2e test image (#9600)
Commit cc6c625401 changed a RUN mkdir
command into a WORKDIR, which also affected the entrypoint.  This
triggered an error in goreman which looks for Procfile (which is
installed here in the root directory) in the working directory.

Since COPY creates any missing directories in the destination path,
there is no need for a separate step to create it.  This change leaves
WORKDIR as the default (the root directory) as before.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2022-06-07 19:29:59 +02:00
Jay P Kulkarni
001c7b2c9d feat: Matrix generator where a generator can reference items of another one (#9080)
* Upgraded Go to 1.18, & have changes related to matrix generator's child generators reading parameters. Specifically, 2nd generator reading the 1st generator's parameters.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Added import for applicationSet in matrix.go

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Added import for applicationSet in matrix.go

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Added logging + small fixes for ArgoCD PR

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Added testing for GetRelevantGenerators

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Added a test for interpolating Generators

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Added a 2nd test for interpolating Generators

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Updated Generators-Matrix.md documentation to include an example + restrictions regarding child generator B consuming parameters produced by child generator A/

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Small wording fix.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Small change to generator_spec_processor.go

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Fixing Test case

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Small changes for matrix + generator_spec_processor.go

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Fixed (I believe) the issue that @Lobstrosity mentioned.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Refactored code to accept map[string]string instead of []map[string]string (for interpolateGenerator && Transform)

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Fixing test cases

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Fixing lint error.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Using test-case suggestion from @rumstead.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Changing up naming from testing.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Updated go.sum

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Cleaning up for linter.

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

* Update Generators-Matrix.md

Changed all numbering back to 1 in "Restrictions" section

Signed-off-by: Jay P Kulkarni <jkulkarni@ucla.edu>

* Added changes as asked by @crenshaw-dev. These include

1) Removing part of comment in generator_spec_processor.go that was for an earlier iteration of code

2) Returning nil instead of an empty map in matrix.go

3) Creating a full-test (TestInterpolatedMatrixGenerate) in matrix.go. This example is not exactly the same, but very similar, to the example appset I had written in the Matrix Docs (also part of this PR).

Signed-off-by: jkulkarn <jay.p.kulkarni@blackrock.com>

Co-authored-by: jkulkarn <jay.p.kulkarni@blackrock.com>
2022-06-06 15:48:01 -04:00
Saumeya Katyal
50bf41f606 fix: ui add tooltips on cluster urls (#9567)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-06-06 10:35:32 -04:00
Hristo Gyulev
4f5170d32c Grupo MasMovil Spain added to users list (#9585)
Signed-off-by: Hristo Gyulev <hristo.georgiev@masmovil.com>
2022-06-06 10:32:41 -04:00
34FathomBelow
89485771b7 chore: upgrade base image to ubuntu:20.04 (#9551)
Signed-off-by: douhunt <douhunt@protonmail.com>

Co-authored-by: douhunt <douhunt@protonmail.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-05 19:20:44 +02:00
34FathomBelow
83f8ec320f chore upgrade base image for test containers Ubuntu:22.04 (#9563)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-06-05 19:19:59 +02:00
34FathomBelow
f6f578b8b4 chore: update Kex-Algorithms (#9561)
* chore: update Kex-Algorithms

Signed-off-by: douhunt <douhunt@protonmail.com>

* sorted kex-algorithms

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Co-authored-by: douhunt <douhunt@protonmail.com>
2022-06-05 19:19:15 +02:00
Leonardo Luz Almeida
a3283d4b09 docs: Add server-side apply proposal (#8812)
* docs: Add server-side apply proposal

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-06-05 08:16:38 -07:00
Michael Crenshaw
9d81222652 fix: missing Helm params (#9565) (#9566)
* fix: missing Helm params

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* use absolute paths, fix tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix race in test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-04 20:16:54 -04:00
Bjorn Stange
68c7e7d206 docs: fix cm typo (#9577)
Signed-off-by: Bjorn Stange <bjorn.stange@expel.io>
2022-06-03 13:20:15 -04:00
margueritepd
7ca8c11f24 docs: document action RBAC action and application resource path (#8413)
Signed-off-by: Marguerite des Trois Maisons <marguerite+github@pagerduty.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-02 21:15:39 +00:00
Michael Crenshaw
66efffb014 fix: better error message for invalid repo URL (#9513)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-02 16:39:38 -04:00
Chetan Banavikalmutt
89346fa7e9 fix: Use the matchMode specified in the rbac configmap (#9419)
* fix: Use the matchMode specified in the rbac configmap

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* add unit tests for checking policy using regex

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-06-02 16:39:15 -04:00
Michael Crenshaw
a5618f137e docs: document plugin prefixed env vars (#9548)
* docs: document plugin prefixed env vars

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* restructure, clarify env vars from main container behavior

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* grammer

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* grammer

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* no link - the cert is bad

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fixes

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-02 15:44:34 -04:00
Leonardo Luz Almeida
895f9cc9c0 chore: remove controller liveness probe (#9557)
* chore: remove controller liveness probe

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Trigger build

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Update generated manifests

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* trigger build

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-06-02 18:46:17 +00:00
Michael Crenshaw
bfb59e7b56 chore: fix long socket path breaking test on osx (#9391)
* chore: fix long socket path breaking test on osx

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* comment

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* simplify

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* simplify

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-02 14:37:07 -04:00
34FathomBelow
b2fe209a6a ci: remove cache from image build (#9564)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-06-01 18:20:11 -07:00
Alexander Matyushentsev
fc3c5fbdc9 chore: remove obsolete repo-server unit test (#9559)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-01 21:58:20 +00:00
Alexander Matyushentsev
dee550a8dc fix: web terminal due to query parameters name mismatch (#9560)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-01 14:38:59 -07:00
Pierre Crégut
61f48d56b1 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 <pierre.cregut@orange.com>

* 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 <pierre.cregut@orange.com>
2022-05-31 16:19:54 -04:00
Michael Crenshaw
e33f968466 docs: security warning for plugins (#9547)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-31 17:40:07 +00:00
Leonardo Luz Almeida
eb3517baad fix: Ignore diff with schema (#9170) 2022-05-31 13:21:22 -04:00
ops-hummus
5edaa6c4b2 Add elementor (#9544)
We uses argo cd/workflows/events
2022-05-31 10:08:19 -07:00
Michael Crenshaw
226b7891d2 docs: document new repo-server ServiceAccount (#9484)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-31 12:27:07 -04:00
Michael Crenshaw
70054538b7 chore: ignore irrelevant formidable vulnerability (#9470)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-30 22:46:13 +00:00
Fernando Luís da Silva
8c96a361af add pismo on users (#9532)
add Pismo.io on users list

Signed-off-by: Fernando Luís da Silva <me@templarfelix.com>
2022-05-30 14:52:12 -07:00
neosu
c899591aaa Fixes: #9364 (#9367)
In the #8929, the project parameter had changed to projects.

5f5d7aa59b/server/application/application.proto (L23)
Signed-off-by: neosu <neo@neobaran.com>
2022-05-30 14:51:30 -07:00
Pavel Savchenko
95f0624316 docs: Update 2.3 notes - mention helm chart (#9512)
the helm chart values should be copied as-is into the `notifications` section of the argo-cd chart

Signed-off-by: Pavel Savchenko <asfaltboy@gmail.com>
2022-05-30 11:02:57 +02:00
Keith Chong
a7dac146c2 fix: New line layout not applied to load balancer; podGroup fix (#9452) (#9523)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-05-27 10:47:29 -07:00
KevinSnyderCodes
2a690388ed git: prune any deleted refs before fetching (#9504)
* git: prune any deleted refers before fetching

This commit modifies `nativeGitClient.Fetch()` to call `git remote prune origin` before fetching refs.

In some cases, an old branch may exist that conflicts with the name of a new branch. The old branch will have been deleted from `origin` but still exist locally in the `argocd-repo-server`.

Example: an old branch `feature/foo` conflicts with a new branch `feature/foo/bar`

In these cases, syncing an application results in the error:

```
rpc error: code = Internal desc = Failed to fetch default: `git fetch origin --tags --force` failed exit status 1: error: cannot lock ref 'refs/remotes/origin/feature/foo/bar': 'refs/remotes/origin/feature/foo' exists; cannot create 'refs/remotes/origin/feature/foo/bar' From https://github.com/org/repo ! [new branch] feature/foo/bar -> origin/feature/foo/bar (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches
```

Adding `git remote prune origin` before fetching, as recommended by the error message, should fix this issue.

The current workaround is to restart the `argocd-repo-server` which should flush the local repository folder. This works when Argo CD is installed using the Helm chart.

Signed-off-by: Kevin Snyder <kevin.snyder.codes@gmail.com>

* fix: added extra protection to syncing app with replace (#9187)

* fix: added extra protection to syncing app with replace

Signed-off-by: ciiay <yicai@redhat.com>

* Code clean up

Signed-off-by: ciiay <yicai@redhat.com>

* Updated logic for isAppOfAppsPattern

Signed-off-by: ciiay <yicai@redhat.com>

* Updated text strings as per comment

Signed-off-by: ciiay <yicai@redhat.com>

* Fixed lint issue

Signed-off-by: ciiay <yicai@redhat.com>
Signed-off-by: Kevin Snyder <kevin.snyder.codes@gmail.com>

* chore: Simplified GetRepoHTTPClient function (#9396)

* chore: Simplified GetRepoHTTPClient function

Signed-off-by: ls0f <lovedboy.tk@qq.com>

* simplified code and improve unit test coverage

Signed-off-by: ls0f <lovedboy.tk@qq.com>
Signed-off-by: Kevin Snyder <kevin.snyder.codes@gmail.com>

* Only prune if fetch error message indicates that it is worthwhile, add unit tests

Confirmed that `Test_nativeGitClient_Fetch_Prune` fails without the bug fix, succeeds with it.

Signed-off-by: Kevin Snyder <kevin.snyder.codes@gmail.com>

* fix: avoid k8s call before authorization for terminal endpoint (#9434)

* fix: avoid k8s API call before authorization in k8s endpoint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* check for bad project

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* more logging

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle 404, return 500 instead of 400 for other errors

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* use user input

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* refactor validation

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fixes, tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Kevin Snyder <kevin.snyder.codes@gmail.com>

* Match against "try running 'git remote prune origin'"

Signed-off-by: Kevin Snyder <kevin.snyder.codes@gmail.com>

Co-authored-by: Yi Cai <yicai@redhat.com>
Co-authored-by: ls0f <lovedboy.tk@qq.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-27 15:44:42 +00:00
Daniel Helfand
847255a8c8 docs: add applicationset and notifications controllers to running locally instructions (#9517)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-27 15:36:29 +00:00
reggie-k
7e2af69012 docs: logs RBAC known UI issue section (#9479)
* updated changelog and upgrade instructions to contain know UI issue with logs rbac

Signed-off-by: reggie-k <reginakagan@gmail.com>

* updated changelog and upgrade instructions to contain know UI issue with logs rbac

Signed-off-by: reggie-k <reginakagan@gmail.com>
2022-05-27 10:56:45 -04:00
Wilson Wu
059f947034 Fix radio button click experience problem (#9520)
Signed-off-by: Wilson Wu <iwilsonwu@gmail.com>
2022-05-27 10:49:44 -04:00
Yevhen Sakhniuk
c4306daff1 bump helm version to 3.9.0 (#9486)
Signed-off-by: Yevhen Sakhniuk <yevhens@backbase.com>
2022-05-27 10:20:32 -04:00
Michael Crenshaw
0395414ada fix: avoid k8s call before authorization for terminal endpoint (#9434)
* fix: avoid k8s API call before authorization in k8s endpoint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* check for bad project

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* more logging

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle 404, return 500 instead of 400 for other errors

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* use user input

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* refactor validation

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fixes, tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-26 10:48:37 -04:00
ls0f
f831c07443 chore: Simplified GetRepoHTTPClient function (#9396)
* chore: Simplified GetRepoHTTPClient function

Signed-off-by: ls0f <lovedboy.tk@qq.com>

* simplified code and improve unit test coverage

Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-25 15:13:26 -04:00
Yi Cai
489f85a706 fix: added extra protection to syncing app with replace (#9187)
* fix: added extra protection to syncing app with replace

Signed-off-by: ciiay <yicai@redhat.com>

* Code clean up

Signed-off-by: ciiay <yicai@redhat.com>

* Updated logic for isAppOfAppsPattern

Signed-off-by: ciiay <yicai@redhat.com>

* Updated text strings as per comment

Signed-off-by: ciiay <yicai@redhat.com>

* Fixed lint issue

Signed-off-by: ciiay <yicai@redhat.com>
2022-05-25 14:05:43 -04:00
Michael Crenshaw
7faae31ff6 test: directory app manifest generation (#9503)
* test: directory app manifest generation

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* git doesn't support empty dirs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-24 21:12:03 +00:00
Michael Crenshaw
9346e19c6f docs: fix PR generators list (#9387)
* docs: fix PR generators list

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* grammar

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-24 19:02:45 +00:00
jannfis
59c94b4440 test: Make context tests idempodent (#9502)
Signed-off-by: jannfis <jann@mistrust.net>
2022-05-24 11:42:50 -07:00
jannfis
26b289b0c0 test: Remove temp directories from repo server tests (#9501)
Signed-off-by: jannfis <jann@mistrust.net>
2022-05-24 18:41:45 +02:00
Tommaso Sardelli
725b2d4f61 chore: add argocd binary to argocd-test-tool docker image (#9459) (#9467)
Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>
2022-05-24 16:16:12 +02:00
Alexander Matyushentsev
41dc57b772 fix: api server should dynamically enabled terminal handler (#9497)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-24 06:37:11 +00:00
Joseph Michael Casey
8635af3d16 bug(gitpod): change Kubebuilder curl (#9097) (#9197)
* bug(gitpod): change Kubebuilder curl (#9097)

Signed-off-by: Joseph Casey <me@josephmcasey.com>

* bug(gitpod): Use go build cache permission

* Targets path that user has permission to use

Signed-off-by: Joseph Casey <me@josephmcasey.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-23 22:54:20 -07:00
Alexander Matyushentsev
15adda970b fix: Undefined cluster in UI when app is referencing cluster by name (#9493)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 22:03:26 -07:00
Alexander Matyushentsev
df13d96eaa fix: upgrade superagent to resolve potential CVE (#9494)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 22:00:19 -07:00
Alexander Matyushentsev
ff18034a3f fix: restore broken source-maps to simplify UI debugging (#9491)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 22:00:01 -07:00
Alexander Matyushentsev
9b3d2778d5 chore: add GOPKGINYAMLV2-2840885 to snyk ignore list (#9495)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 22:26:46 +00:00
Dan Garfield
f788c4e737 refactor: Update notification engine (#9386)
refactor: Update notification engine  (#9386)

Signed-off-by: todaywasawesome <dan@codefresh.io>
2022-05-23 15:10:35 -07:00
Alexander Matyushentsev
1b6275a31d fix: make more proto fields optional (#9490)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 13:45:28 -07:00
Leonardo Luz Almeida
ba7d2e700f chore: Improve application logs adding message context (#9435)
* chore: Improve application logs adding message context

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix bug returning error incorrectly

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix unit-test and avoid api breaking change

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix e2e test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Fix e2e test

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* small fix

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Address review comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-05-20 21:16:55 +00:00
Michael Crenshaw
4a51875179 fix: test race (#9469)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-20 16:38:01 +00:00
Michael Crenshaw
f6240151ff docs: more appset security docs (#9466)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-20 15:17:49 +00:00
Ivo Verberk
dd4dbe2a81 Add GitLab PR generator for applicationset (#9264)
Signed-off-by: Ivo Verberk <ivo.verberk@gmail.com>
2022-05-19 09:54:28 -04:00
Tommaso Sardelli
c2a9a7f5a1 chore: upgrade golangci-lint to v1.46.2 (#9448)
* chore: upgrade golangci-lint to v1.46.2

Because:

* Installation of golangci-lint v1.45.2 is currently broken and fails
  silently due to a redacted dependency
  (https://github.com/blizzy78/varnamelen/issues/13)

This commit:

* Upgrades golangci-lint to v1.46.2

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>

* fix: lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix: lint

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-19 09:27:01 -04:00
Michael Crenshaw
fc077b14cd fix: lint (#9444)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 18:50:20 +02:00
jannfis
a809469d9a Merge pull request from GHSA-r642-gv9p-2wjj
Signed-off-by: jannfis <jann@mistrust.net>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 13:16:21 +02:00
Michael Crenshaw
aa8a84ce3c Merge pull request from GHSA-6gcg-hp2x-q54h
* fix: do not allow symlinks from directory-type applications

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* chore: use t.TempDir for simpler tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* address comments

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 13:13:41 +02:00
Michael Crenshaw
8558bea5d0 Merge pull request from GHSA-xmg8-99r8-jc2j
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 13:06:31 +02:00
ls0f
4b4fd885c8 some optimizations for cert.go (#9404)
Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-17 09:43:11 -04:00
Daniel Helfand
3896ae04c8 chore: add labels to notifications controller serviceaccount (#9373)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-05-16 22:13:34 -04:00
smcavallo
23d9cf21a4 feat: support pod exec terminal logging (#9385)
* feat: support pod exec terminal logging
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* enhanced validation and logging when resource not found
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* fix lint
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* log warning when pod or container not found
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* go/log-injection fixes
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* log levels and lowercase message
Signed-off-by: smcavallo <smcavallo@hotmail.com>
2022-05-16 22:10:27 -04:00
Keith Chong
8cd7d470e8 feat: Expansion support and line relayout (#8661)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-05-16 12:53:00 -04:00
ls0f
c29651de91 receiveFile memory optimization: do not use bytes.buffer but write directly to file (#9415)
Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-16 11:33:16 -04:00
Saumeya Katyal
d1f2e302e7 fix: update filter combo-box icon color (#9416)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-05-16 10:21:44 +02:00
Saumeya Katyal
727c59f08b fix: favorite icon and overlapping app title (#9130)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-05-14 18:35:23 -07:00
Robert Wiesner
416245fb2a add reev.com (#9409)
Signed-off-by: Robert Wiesner <robert.wiesner@reev.com>
2022-05-14 10:03:30 -04:00
Keith Chong
1186fee7dc fix: Pass context to resource tree (#5468) (#9401)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-05-13 13:52:04 -07:00
Leonardo Luz Almeida
1246e156a0 chore: Improve otel grpc traces adding span correlation (#9371)
* chore: Improve otel grpc traces adding span correlation

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Create a tracer for argocd controller

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Update controller command doc

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Instrument cmp-client

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* Add otlp config as part of configmaps

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* update manifests

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-05-13 18:10:48 +00:00
Chetan Banavikalmutt
b9146ab9a4 fix: ListResourceActions() returns duplicate actions (#9360)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-05-13 10:24:34 -04:00
rishabh625
86d1531def fix: Added mock for gitea response in appset PR,SCM generator (#9400)
* fix: Added mock for gitea response

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* applied reviewers comment

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-05-13 13:50:05 +00:00
Michael Crenshaw
116e8d9fb9 docs: plugins need their own writeable tmp volume (#9389)
* docs: plugin needs temp dir

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* revert temp changes

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix version number

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* update upgrade instructions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* simplify

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-13 09:27:36 -04:00
ls0f
fa61f00d85 chore: use filepath.Join to get sock path (#9395)
Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-13 09:15:28 -04:00
rumstead
c026189c11 fix spelling (#9372)
Signed-off-by: Ryan Umstead <rjumstead@gmail.com>
2022-05-12 22:08:54 -04:00
ls0f
0c8e7ec316 fix: http headers contain colons in the field value (#9375)
* fix: http headers contain colons in the field value

Signed-off-by: ls0f <lovedboy.tk@qq.com>

* add parseHeaders unit test

Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-12 22:05:58 -04:00
Michael Crenshaw
68a0a83025 chore: ignore irrelevant go-restful vulnerability (#9347)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-12 14:40:44 -04:00
king.wang
d0fe8f14c9 docs: add Meican to users (#9377)
Co-authored-by: wangkexue <wangkexue@meican.com>
2022-05-12 11:17:02 -04:00
Michael Crenshaw
15a2bec24d docs: clarify Role/ClusterRole uses for exec feature (#9354)
* docs: clarify Role/ClusterRole uses for exec feature

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix missed `get`s

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-12 11:13:37 -04:00
Keith Chong
cb85f23519 feat: Network view should group pods into higher level workload (#5468) (#8996)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-05-12 09:14:06 -04:00
rishabh625
e59060cb0e fix: added github and gitlab response mock and replaced external calls (#9305)
* Added mock for gitlab and github for Unit test

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Added missing mock endpoint

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* removed println and aserted for 1 master branch

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* removed auth header assertion

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* procfile to run binaries instead go run

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* procfile to run binaries instead go run

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* reverted unintentional testdata change

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Added test for branch do not exists

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-05-12 09:07:10 -04:00
ls0f
5f5d7aa59b use filepath to combire dirs (#9358)
Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-11 11:04:00 -04:00
Amit Oren
3c1969bc3c docs: add Coralogix to users (#9361)
Signed-off-by: Amit Oren <amit@coralogix.com>
2022-05-11 11:02:12 -04:00
Snyk bot
f75e881d30 fix: upgrade moment from 2.29.2 to 2.29.3 (#9330)
Snyk has created this PR to upgrade moment from 2.29.2 to 2.29.3.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/argoproj/project/d2931792-eef9-4d7c-b9d6-c0cbd2bd4dbe?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-05-10 21:01:26 -04:00
Hao Xin
7e39284b84 feat(manifests): Add service account for repo server (#9301)
Signed-off-by: Hao Xin <haoxinst@gmail.com>
2022-05-10 20:33:24 -04:00
Takeshi Kondo
016fd5f66f Remove Kubernetes External Secret from docs (#9251)
It seems to be deprecated.
https://github.com/external-secrets/kubernetes-external-secrets

Signed-off-by: kondo takeshi <chaspy@users.noreply.github.com>

Co-authored-by: kondo takeshi <chaspy@users.noreply.github.com>
2022-05-10 17:02:02 -04:00
rishabh625
6307b73f17 improved pr generator doc (#9350)
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-05-10 13:47:07 -04:00
Michael Crenshaw
543f922b56 docs: logs RBAC upgrate notes (#9345)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-10 19:02:10 +03:00
Hoang Quoc Trung
ce18611e41 docs: Reword SSO Client Secrets doc (#8666)
* Reword sensitive data documentation

Signed-off-by: Trung <trung.hoang@pricehubble.com>

* Correct typos

Signed-off-by: Trung <trung.hoang@pricehubble.com>

Co-authored-by: pasha-codefresh <pavel@codefresh.io>
2022-05-10 17:08:44 +03:00
pasha-codefresh
b7b000ace2 feat: Move app resources commands to dedicated command file (#9306)
* add to approvers

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* move to different file

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* add import

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* add import

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* filter resources

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* app resources test , and filter resources test improvement

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* missed returns of errors

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-05-10 09:34:55 -04:00
pasha-codefresh
8cc8a7fde5 chore: resource state tests (#9307)
* resource state test

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* comment and fix test

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-05-10 09:13:37 -04:00
Regina Scott
08009211ff fix: grouped node titles no longer wrap (#9337)
Signed-off-by: Regina Scott <rescott@redhat.com>
2022-05-09 16:26:49 -04:00
Josh Gavant
88134c4520 docs: fix local apiserver host name (#9313)
See https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/
2022-05-07 21:06:03 +02:00
jannfis
a8e6e40a88 chore: Set GITHUB_TOKEN in the test container (#9317)
Signed-off-by: jannfis <jann@mistrust.net>
2022-05-07 15:08:06 +02:00
jannfis
f9d65ddd4c chore: Pull in recent kubectl to test container (#9316)
Signed-off-by: jannfis <jann@mistrust.net>
2022-05-07 09:38:15 +02:00
David J. M. Karlsen
a3a429787e feat: Add cli support for additional linux based architectures, s390x + ppc64le (#8991)
feat: Add cli support for additional linux based architectures, s390x + ppc64le (#8991)

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>

* add more architectures for linux

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>

* drop aix arch as it won't compile

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-06 22:48:29 +00:00
Alexander Matyushentsev
4a3f76b62b chore: add linux/s390x,linux/ppc64le platforms to release workflow (#9324)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-06 22:44:29 +00:00
1146 changed files with 192848 additions and 25312 deletions

32
.github/ISSUE_TEMPLATE/release.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: Argo CD Release
about: Used by our Release Champion to track progress of a minor release
title: 'Argo CD Release vX.X'
labels: 'release'
assignees: ''
---
Target RC1 date: ___. __, ____
Target GA date: ___. __, ____
- [ ] Create new section in the [Release Planning doc](https://docs.google.com/document/d/1trJIomcgXcfvLw0aYnERrFWfPjQOfYMDJOCh1S8nMBc/edit?usp=sharing)
- [ ] Schedule a Release Planning meeting roughly two weeks before the scheduled Release freeze date by adding it to the community calendar (or delegate this task to someone with write access to the community calendar)
- [ ] Include Zoom link in the invite
- [ ] Post in #argo-cd and #argo-contributors one week before the meeting
- [ ] Post again one hour before the meeting
- [ ] At the meeting, remove issues/PRs from the project's column for that release which have not been “claimed” by at least one Approver (add it to the next column if Approver requests that)
- [ ] 1wk before feature freeze post in #argo-contributors that PRs must be merged by DD-MM-YYYY to be included in the release - ask approvers to drop items from milestone they cant merge
- [ ] At least two days before RC1 date, draft RC blog post and submit it for review (or delegate this task)
- [ ] Cut RC1 (or delegate this task to an Approver and coordinate timing)
- [ ] Create new release branch
- [ ] Add the release branch to ReadTheDocs
- [ ] Confirm that tweet and blog post are ready
- [ ] Trigger the release
- [ ] After the release is finished, publish tweet and blog post
- [ ] Post in #argo-cd and #argo-announcements with lots of emojis announcing the release and requesting help testing
- [ ] Monitor support channels for issues, cherry-picking bugfixes and docs fixes as appropriate (or delegate this task to an Approver and coordinate timing)
- [ ] At release date, evaluate if any bugs justify delaying the release. If not, cut the release (or delegate this task to an Approver and coordinate timing)
- [ ] If unreleased changes are on the release branch for {current minor version minus 3}, cut a final patch release for that series (or delegate this task to an Approver and coordinate timing)
- [ ] After the release, post in #argo-cd that the {current minor version minus 3} has reached EOL (example: https://cloud-native.slack.com/archives/C01TSERG0KZ/p1667336234059729)
- [ ] (For the next release champion) Review the [items scheduled for the next release](https://github.com/orgs/argoproj/projects/25). If any item does not have an assignee who can commit to finish the feature, move it to the next release.
- [ ] (For the next release champion) Schedule a time mid-way through the release cycle to review items again.

19
.github/ISSUE_TEMPLATE/security_logs.md vendored Normal file
View File

@@ -0,0 +1,19 @@
---
name: Security log
about: Propose adding security-related logs or tagging existing logs with security fields
title: "seclog: [Event Description]"
labels: security-log
assignees: notfromstatefarm
---
# Event to be logged
Specify the event that needs to be logged or existing logs that need to be tagged.
# Proposed level
What security level should these events be logged under? Refer to https://argo-cd.readthedocs.io/en/latest/operator-manual/security/#security-field for more info.
# Common Weakness Enumeration
Is there an associated [CWE](https://cwe.mitre.org/) that could be tagged as well?

18
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: k8s.io/*
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/ui/"
schedule:
interval: "daily"

View File

@@ -24,7 +24,7 @@ permissions:
jobs:
check-go:
name: Ensure Go modules synchronicity
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -42,7 +42,7 @@ jobs:
build-go:
name: Build & cache Go code
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -51,7 +51,7 @@ jobs:
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Restore go build cache
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -66,7 +66,7 @@ jobs:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Lint Go code
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -77,12 +77,12 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # v3.3.1
with:
version: v1.45.2
version: v1.46.2
args: --timeout 10m --exclude SA5011 --verbose
test-go:
name: Run unit tests for Go packages
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build-go
env:
@@ -116,17 +116,13 @@ jobs:
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
# We install kustomize in the dist directory
- name: Add dist to PATH
run: |
echo "/home/runner/work/argo-cd/argo-cd/dist" >> $GITHUB_PATH
- name: Setup git username and email
run: |
git config --global user.name "John Doe"
@@ -149,7 +145,7 @@ jobs:
test-go-race:
name: Run unit tests with -race, for Go packages
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build-go
env:
@@ -183,17 +179,13 @@ jobs:
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
# We install kustomize in the dist directory
- name: Add dist to PATH
run: |
echo "/home/runner/work/argo-cd/argo-cd/dist" >> $GITHUB_PATH
- name: Setup git username and email
run: |
git config --global user.name "John Doe"
@@ -211,7 +203,7 @@ jobs:
codegen:
name: Check changes to generated code
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -240,10 +232,6 @@ jobs:
make install-codegen-tools-local
make install-go-tools-local
working-directory: /home/runner/go/src/github.com/argoproj/argo-cd
# We install kustomize in the dist directory
- name: Add dist to PATH
run: |
echo "/home/runner/work/argo-cd/argo-cd/dist" >> $GITHUB_PATH
- name: Run codegen
run: |
set -x
@@ -259,7 +247,7 @@ jobs:
build-ui:
name: Build, test & lint UI code
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
@@ -269,7 +257,7 @@ jobs:
node-version: '12.18.4'
- name: Restore node dependency cache
id: cache-dependencies
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -291,7 +279,7 @@ jobs:
analyze:
name: Process & analyze test artifacts
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- test-go
- build-ui
@@ -304,7 +292,7 @@ jobs:
fetch-depth: 0
- name: Restore node dependency cache
id: cache-dependencies
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -357,10 +345,10 @@ jobs:
test-e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
k3s-version: [v1.23.3, v1.22.6, v1.21.2]
k3s-version: [v1.26.0, v1.25.4, v1.24.3, v1.23.3]
needs:
- build-go
env:
@@ -372,6 +360,7 @@ jobs:
ARGOCD_E2E_K3S: "true"
ARGOCD_IN_CI: "true"
ARGOCD_E2E_APISERVER_PORT: "8088"
ARGOCD_APPLICATION_NAMESPACES: "argocd-e2e-external"
ARGOCD_SERVER: "127.0.0.1:8088"
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
@@ -385,14 +374,6 @@ jobs:
- name: GH actions workaround - Kill XSP4 process
run: |
sudo pkill mono || true
# ubuntu-22.04 comes with kubectl, but the version is not pinned. The version as of 2022-12-05 is 1.26.0 which
# breaks the `TestNamespacedResourceDiffing` e2e test. So we'll pin to 1.25 and then fix the underlying issue.
- name: Install kubectl
run: |
rm /usr/local/bin/kubectl
curl -LO https://dl.k8s.io/release/v1.25.4/bin/linux/amd64/kubectl
mv kubectl /usr/local/bin/kubectl
chmod +x /usr/local/bin/kubectl
- name: Install K3S
env:
INSTALL_K3S_VERSION: ${{ matrix.k3s-version }}+k3s1
@@ -405,7 +386,7 @@ jobs:
sudo chown runner $HOME/.kube/config
kubectl version
- name: Restore go build cache
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}

View File

@@ -25,7 +25,7 @@ jobs:
if: github.repository == 'argoproj/argo-cd'
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository

View File

@@ -23,8 +23,9 @@ jobs:
publish:
permissions:
contents: write # for git to push upgrade commit if not already deployed
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
if: github.repository == 'argoproj/argo-cd'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
GOPATH: /home/runner/work/argo-cd/argo-cd
steps:
@@ -46,45 +47,14 @@ jobs:
docker login quay.io --username "$DOCKER_USERNAME" --password-stdin <<< "$DOCKER_TOKEN"
if: github.event_name == 'push'
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.TOKEN }}
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.RELEASE_QUAY_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
# build
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
- name: Setup cache for argocd-ui docker layer
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
- name: Build cache for argocd-ui stage
uses: docker/build-push-action@v2
with:
context: ./src/github.com/argoproj/argo-cd
target: argocd-ui
push: false
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test-arm-image')
- name: Run non-container Snyk scans
if: github.event_name == 'push'
working-directory: ./src/github.com/argoproj/argo-cd
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
npm install -g snyk
# Run with high threshold to fail build.
snyk test --org=argoproj --all-projects --exclude=docs,site --severity-threshold=high --policy-path=.snyk
snyk iac test manifests/install.yaml --org=argoproj --severity-threshold=high --policy-path=.snyk
- uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98 # v2.4.0
- run: |
IMAGE_PLATFORMS=linux/amd64
if [[ "${{ github.event_name }}" == "push" || "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]
@@ -93,28 +63,10 @@ jobs:
fi
echo "Building image for platforms: $IMAGE_PLATFORMS"
docker buildx build --platform $IMAGE_PLATFORMS --sbom=false --provenance=false --push="${{ github.event_name == 'push' }}" \
--cache-from "type=local,src=/tmp/.buildx-cache" \
-t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} \
-t ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }} \
-t quay.io/argoproj/argocd:latest .
working-directory: ./src/github.com/argoproj/argo-cd
- name: Run container Snyk scan
if: github.event_name == 'push'
working-directory: ./src/github.com/argoproj/argo-cd
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
snyk container test quay.io/argoproj/argocd:latest --org=argoproj --file=Dockerfile --severity-threshold=high
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Clean up build cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test-arm-image')
# sign container images
- name: Install cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v2.8.1
@@ -122,7 +74,7 @@ jobs:
cosign-release: 'v1.13.1'
- name: Install crane to get digest of image
uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c
uses: imjasonh/setup-crane@e82f1b9a8007d399333baba4d75915558e9fb6a4
- name: Get digest of image
run: |
@@ -144,7 +96,7 @@ jobs:
env:
TOKEN: ${{ secrets.TOKEN }}
- run: |
docker run -u $(id -u):$(id -g) -v $(pwd):/src -w /src --rm -t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} kustomize edit set image quay.io/argoproj/argocd=ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }}
docker run -u $(id -u):$(id -g) -v $(pwd):/src -w /src --rm -t ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }} kustomize edit set image quay.io/argoproj/argocd=ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }}
git config --global user.email 'ci@argoproj.com'
git config --global user.name 'CI'
git diff --exit-code && echo 'Already deployed' || (git commit -am 'Upgrade argocd to ${{ steps.image.outputs.tag }}' && git push)

41
.github/workflows/pr-title-check.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: "Lint PR"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
# IMPORTANT: No checkout actions, scripts, or builds should be added to this workflow. Permissions should always be used
# with extreme caution.
permissions:
contents: read
# PR updates can happen in quick succession leading to this
# workflow being trigger a number of times. This limits it
# to one run per PR.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
name: Validate PR title
runs-on: ubuntu-latest
steps:
# IMPORTANT: Carefully review changes when updating this action. Using the pull_request_target event requires caution.
- uses: amannn/action-semantic-pull-request@01d5fd8a8ebb9aafe902c40c53f0f4744f7381eb # v5.0.2
with:
types: |
feat
fix
docs
test
ci
chore
[Bot] docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -23,7 +23,7 @@ jobs:
contents: write # To push changes to release branch
name: Perform automatic release on trigger ${{ github.ref }}
if: github.repository == 'argoproj/argo-cd'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
# The name of the tag as supplied by the GitHub event
SOURCE_TAG: ${{ github.ref }}
@@ -177,10 +177,6 @@ jobs:
run: |
set -ue
make install-codegen-tools-local
# We install kustomize in the dist directory
echo "/home/runner/work/argo-cd/argo-cd/dist" >> $GITHUB_PATH
make manifests-local VERSION=${TARGET_VERSION}
git diff
git commit manifests/ -m "Bump version to ${TARGET_VERSION}"
@@ -205,7 +201,7 @@ jobs:
if: ${{ env.DRY_RUN != 'true' }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
- uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98 # v2.4.0
- name: Build and push Docker image for release
run: |
set -ue
@@ -224,7 +220,7 @@ jobs:
cosign-release: 'v1.13.1'
- name: Install crane to get digest of image
uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c
uses: imjasonh/setup-crane@e82f1b9a8007d399333baba4d75915558e9fb6a4
- name: Get digest of image
run: |

36
.github/workflows/update-snyk.yaml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Snyk report update
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * 0' # midnight every Sunday
permissions:
contents: read
jobs:
snyk-report:
permissions:
contents: write
pull-requests: write
if: github.repository == 'argoproj/argo-cd'
name: Update Snyk report in the docs directory
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
make snyk-report
pr_branch="snyk-update-$(echo $RANDOM | md5sum | head -c 20)"
git checkout -b "$pr_branch"
git config --global user.email 'ci@argoproj.com'
git config --global user.name 'CI'
git add docs/snyk
git commit -m "[Bot] docs: Update Snyk reports" --signoff
git push --set-upstream origin "$pr_branch"
gh pr create -B master -H "$pr_branch" --title '[Bot] docs: Update Snyk report' --body ''

1
.gitignore vendored
View File

@@ -17,6 +17,7 @@ test-results
node_modules/
.kube/
./test/cmp/*.sock
.envrc.remote
# ignore built binaries
cmd/argocd/argocd

6
.gitpod.Dockerfile vendored
View File

@@ -5,13 +5,15 @@ USER root
RUN curl -o /usr/local/bin/kubectl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x /usr/local/bin/kubectl
RUN curl -L https://go.kubebuilder.io/dl/2.3.1/$(go env GOOS)/$(go env GOARCH) | \
RUN curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_$(go env GOOS)_$(go env GOARCH).tar.gz | \
tar -xz -C /tmp/ && mv /tmp/kubebuilder_2.3.1_$(go env GOOS)_$(go env GOARCH) /usr/local/kubebuilder
ENV GOCACHE=/go-build-cache
RUN apt-get install redis-server -y
RUN go install github.com/mattn/goreman@latest
USER gitpod
ENV ARGOCD_REDIS_LOCAL=true
ENV KUBECONFIG=/tmp/kubeconfig
ENV KUBECONFIG=/tmp/kubeconfig

18
.snyk
View File

@@ -18,5 +18,23 @@ ignore:
- '*':
reason: >-
Code is only run client-side. No risk of directory traversal.
SNYK-GOLANG-GITHUBCOMEMICKLEIGORESTFUL-2435653:
- '*':
reason: >-
Argo CD uses go-restful as a transitive dependency of kube-openapi. kube-openapi is used to generate openapi
specs. We do not use go-restul at runtime and are therefore not vulnerable to this CORS misconfiguration
issue in go-restful.
SNYK-JS-FORMIDABLE-2838956:
- '*':
reason: >-
Code is only run client-side. No risk of arbitrary file upload.
SNYK-JS-PARSEPATH-2936439:
- '*':
reason: >-
The issue is that, for specific URLs, parse-path may incorrectly identify the "resource" (domain name)
portion. For example, in "http://127.0.0.1#@example.com", it identifies "example.com" as the "resource".
We use parse-path on the client side, but permissions for git URLs are checked server-side. This is a
potential usability issue, but it is not a security issue.
patch: {}

View File

@@ -1,14 +1,185 @@
# Changelog
## v2.4.0 (Unreleased)
## v2.4.8 (2022-07-29)
### Web Terminal In Argo CD UI
### Bug fixes
- feat: support application level extensions (#9923)
- feat: support multiple extensions per resource group/kind (#9834)
- fix: extensions is not loading for ConfigMap/Pods (#10010)
- fix: upgrade moment from 2.29.2 to 2.29.3 (#9330)
- fix: skip redirect url validation when it's the base href (#10058) (#10116)
- fix: avoid CVE-2022-28948 (#10093)
- fix: Set HOST_ARCH for yarn build from platform (#10018)
### Other changes
- chore(deps): bump moment from 2.29.3 to 2.29.4 in /ui (#9897)
- docs: add OpenSSH breaking change notes (#10104)
- chore: update parse-url (#10101)
- docs: add api field example in the appset security doc (#10087)
- chore: update redis to 7.0.4 avoid CVE-2022-30065 (#10059)
- docs: add argocd-server grpc metric usage (#10007)
- chore: upgrade Dex to 2.32.0 (#10036) (#10042)
- chore: update redis to avoid CVE-2022-2097 (#10031)
- chore: update haproxy to 2.0.29 for redis-ha (#10045)
## v2.4.7 (2022-07-18)
### Bug fixes
fix: Support files in argocd.argoproj.io/manifest-generate-paths annotation (#9908)
fix: terminal websocket write lock to avoid races (#10011)
fix: updated all a tags to Link tags in app summary (#9777)
fix: e2e test to use func from clusterauth instead creating one with old logic (#9989)
fix: add missing download CLI tool URL response for ppc64le, s390x (#9983)
### Other
chore: upgrade parse-url to avoid SNYK-JS-PARSEURL-2936249 (#9826)
docs: use quotes to emphasize that ConfigMap value is a string (#9995)
docs: document directory app include/exclude fields (#9997)
docs: simplify Docker toolchain docs (#9966) (#10006)
docs: supported versions (#9876)
## v2.4.6 (2022-07-12)
### Features
* feat: Treat connection reset as a retryable error (#9739)
### Bug fixes
* fix: 'unexpected reserved bits' breaking web terminal (#9605) (#9895)
* fix: argocd login just hangs on 2.4.0 #9679 (#9935)
* fix: CMP manifest generation fails with ENHANCE_YOUR_CALM if over 40s (#9922)
* fix: NotAfter is not set when ValidFor is set (#9911)
* fix: add missing download CLI tool link for ppc64le, s390x (#9649)
* fix: Check tracking annotation for being self-referencing (#9791)
* fix: Make change of tracking method work at runtime (#9820)
* fix: argo-cd git submodule is using SSH auth instead of HTTPs (#3118) (#9821)
### Other
* docs: fix typo in Generators-Git.md (#9949)
* docs: add terminal documentation (#9948)
* test: Use dedicated multi-arch workloads in e2e tests (#9921)
* docs: Adding blank line so list is formatted correctly (#9880)
* docs: small fix for plugin stream filtering (#9871)
* docs: Document the possibility of rendering Helm charts with Kustomize (#9841)
* docs: getting started notes on self-signed cert (#9429) (#9784)
* test: check for error messages from CI env (#9953)
## v2.4.5 (2022-07-12)
### Security fixes
* HIGH: Certificate verification is skipped for connections to OIDC providers ([GHSA-7943-82jg-wmw5](https://github.com/argoproj/argo-cd/security/advisories/GHSA-7943-82jg-wmw5))
* LOW: A leaked API server encryption key can allow XSS for SSO users ([GHSA-pmjg-52h9-72qv](https://github.com/argoproj/argo-cd/security/advisories/GHSA-pmjg-52h9-72qv))
### Potentially-breaking changes
The fix for GHSA-7943-82jg-wmw5 enables TLS certificate validation by default for connections to OIDC providers. If
connections to your OIDC provider fails validation, SSO will be broken for your Argo CD instance. You should test 2.4.5
before upgrading it to production. From the new documentation:
> By default, all connections made by the API server to OIDC providers (either external providers or the bundled Dex
> instance) must pass certificate validation. These connections occur when getting the OIDC provider's well-known
> configuration, when getting the OIDC provider's keys, and when exchanging an authorization code or verifying an ID
> token as part of an OIDC login flow.
>
> Disabling certificate verification might make sense if:
> * You are using the bundled Dex instance **and** your Argo CD instance has TLS configured with a self-signed certificate
> **and** you understand and accept the risks of skipping OIDC provider cert verification.
> * You are using an external OIDC provider **and** that provider uses an invalid certificate **and** you cannot solve
> the problem by setting `oidcConfig.rootCA` **and** you understand and accept the risks of skipping OIDC provider cert
> verification.
>
> If either of those two applies, then you can disable OIDC provider certificate verification by setting
> `oidc.tls.insecure.skip.verify` to `"true"` in the `argocd-cm` ConfigMap.
### Bug fixes
* fix: webhook typo in case of error in GetManifests (#9671)
## v2.4.4 (2022-07-07)
### Bug fixes
- fix: missing path segments for git file generator (#9839)
- fix: make sure api server informer does not stop after setting change (#9842)
- fix: support resource logs and exec (#9833)
- fix: configurable CMP tar exclusions (#9675) (#9789)
- fix: prune any deleted refs before fetching (#9504)
### Other
- test: Remove circular symlinks from testdata (#9886)
- docs: custom secret must be labeled (#9835)
- docs: update archlinux install with official package (#9718)
- docs: explain rightmost git generator path parameter behavior (#9799)
## v2.4.3 (2022-06-27)
### Bug fixes
- fix: respect OIDC providers' supported token signing algorithms (#9433) (#9761)
- fix websockets for terminal not working on subPath (#9795)
- fix: avoid closing and re-opening port of api server settings change (#9778)
- fix: [ArgoCD] Fixing webhook typo in case of error in GetManifests (#9671)
- fix: overrides should not appear in the manifest cache key (#9601)
## v2.4.2 (2022-06-21)
### Bug fixes
* fix: project filter (#9651) (#9709)
* fix: broken symlink in Dockerfile (#9674)
* fix: updated baseHRefRegex to perform lazy match (#9724)
* fix: updated config file permission requirements for windows (#9666)
### Other
* docs: Update sync-options.md (#9687)
* test/remote: Allow override of base image (#9734)
## v2.4.1 (2022-06-21)
### Security fixes
* CRITICAL: External URLs for Deployments can include javascript ([GHSA-h4w9-6x78-8vrj](https://github.com/argoproj/argo-cd/security/advisories/GHSA-h4w9-6x78-8vrj))
* HIGH: Insecure entropy in PKCE/Oauth2/OIDC params ([GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v))
* MODERATE: DoS through large directory app manifest files ([GHSA-jhqp-vf4w-rpwq](https://github.com/argoproj/argo-cd/security/advisories/GHSA-jhqp-vf4w-rpwq))
* MODERATE: Symlink following allows leaking out-of-bounds YAML files from Argo CD repo-server ([GHSA-q4w5-4gq2-98vm](https://github.com/argoproj/argo-cd/security/advisories/GHSA-q4w5-4gq2-98vm))
### Potentially-breaking changes
From the [GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v) description:
> The patch introduces a new `reposerver.max.combined.directory.manifests.size` config parameter, which you should tune before upgrading in production. It caps the maximum total file size of .yaml/.yml/.json files in directory-type (raw manifest) Applications. The default max is 10M per Application. This max is designed to keep any single app from consuming more than 3G of memory in the repo-server (manifests consume more space in memory than on disk). The 300x ratio assumes a maliciously-crafted manifest file. If you only want to protect against accidental excessive memory use, it is probably safe to use a smaller ratio.
>
> If your organization uses directory-type Applications with very many manifests or very large manifests then check the size of those manifests and tune the config parameter before deploying this change to production. When testing, make sure to do a "hard refresh" in either the CLI or UI to test your directory-type App. That will make sure you're using the new max logic instead of relying on cached manifest responses from Redis.
### Other
* test: directory app manifest generation (#9503)
* chore: Implement tests to validate aws auth retry (#9627)
* chore: Implement a retry in aws auth command (#9618)
* test: Remove temp directories from repo server tests (#9501)
* test: Make context tests idempodent (#9502)
* test: fix plugin var test for OSX (#9590)
* docs: Document how to deploy from the root of the git repository (#9632)
* docs: added environment variables documentation (#8680)
## v2.4.0 (2022-06-10)
### Web Terminal In Argo CD UI
Feature enables engineers to start a shell in the running application container without leaving the web interface. Just find the required Kubernetes
Pod using the Application Details page, click on it and select the Terminal tab. The shell starts automatically and enables you to execute the required
commands, and helps to troubleshoot the application state.
### Access Control For Pod Logs & Web Terminal
### Access Control For Pod Logs & Web Terminal
Argo CD is used to manage the critical infrastructure of multiple organizations, which makes security the top priority of the project. We've listened to
your feedback and introduced additional access control settings that control access to Kubernetes Pod logs and the new Web Terminal feature.
@@ -26,12 +197,12 @@ Upon pressing the "LOGS" tab in pod view by users who don't have an explicit all
The new feature allows emitting richer telemetry data that might make identifying performance bottlenecks easier. The new feature is available for argocd-server
and argocd-repo-server components and can be enabled using the --otlp-address flag.
### Power PC and IBM Z Support
### Power PC and IBM Z Support
The list of supported architectures has been expanded, and now includes IBM Z (s390x) and PowerPC (ppc64le). Starting with the v2.4 release the official quay.io
repository is going to have images for amd64, arm64, ppc64le, and s390x architectures.
### Other Notable Changes
### Other Notable Changes
Overall v2.4 release includes more than 300 hundred commits from nearly 90 contributors. Here is a short sample of the contributions:
@@ -40,6 +211,116 @@ Overall v2.4 release includes more than 300 hundred commits from nearly 90 contr
* Secured Redis connection
* ApplicationSet Gitea support
## v2.3.7 (2022-07-29)
### Notes
This is mainly a security related release and updates compatibility with Kubernetes 1.24.
**Attention:** The base image for 2.3.x reached end-of-life on July 14, 2022. This release upgraded the base image to Ubuntu 22.04 LTS. The change should have no effect on the majority of users. But if any of your git providers only supports now-deprecated key hash algorithms, then Application syncing might break. See the [2.2-to-2.3 upgrade notes](https://argo-cd.readthedocs.io/en/latest/operator-manual/upgrading/2.2-2.3/#support-for-private-repo-ssh-keys-using-the-sha-1-signature-hash-algorithm-is-removed-in-237) for details and workaround instructions.
### Bug fixes
- fix: skip redirect url validation when it's the base href (#10058) (#10116)
- fix: upgrade moment from 2.29.2 to 2.29.3 (#9330)
- fix: avoid CVE-2022-28948 (#10093)
- fix: use serviceaccount name instead of struct (#9614)
- fix: create serviceaccount token for v1.24 clusters (#9546)
### Other changes
- test: Remove cluster e2e tests not intended for release-2.3
- test: Remove circular symlinks from testdata (#9886)
- chore(deps): bump moment from 2.29.3 to 2.29.4 in /ui (#9897)
- chore: upgrade moment to latest version to fix CVE (#9005)
- chore: move dependencies to dev dependencies (#8541)
- docs: add OpenSSH breaking change notes (#10104)
- chore: update parse-url (#10101)
- chore: upgrade base image to 22.04 (#10103)
- docs: simplify Docker toolchain docs (#9966) (#10006)
- chore: update redis to 6.2.7 avoid CVE-2022-30065/CVE-2022-2097 (#10062)
- chore: upgrade Dex to 2.32.0 (#10036) (#10042)
- chore: update haproxy to 2.0.29 for redis-ha (#10045)
- test: check for error messages from CI env (#9953)
## v2.3.6 (2022-07-12)
### Security fixes
* HIGH: Certificate verification is skipped for connections to OIDC providers ([GHSA-7943-82jg-wmw5](https://github.com/argoproj/argo-cd/security/advisories/GHSA-7943-82jg-wmw5))
* LOW: A leaked API server encryption key can allow XSS for SSO users ([GHSA-pmjg-52h9-72qv](https://github.com/argoproj/argo-cd/security/advisories/GHSA-pmjg-52h9-72qv))
### Potentially-breaking changes
The fix for GHSA-7943-82jg-wmw5 enables TLS certificate validation by default for connections to OIDC providers. If
connections to your OIDC provider fails validation, SSO will be broken for your Argo CD instance. You should test 2.3.6
before upgrading it to production. From the new documentation:
> By default, all connections made by the API server to OIDC providers (either external providers or the bundled Dex
> instance) must pass certificate validation. These connections occur when getting the OIDC provider's well-known
> configuration, when getting the OIDC provider's keys, and when exchanging an authorization code or verifying an ID
> token as part of an OIDC login flow.
>
> Disabling certificate verification might make sense if:
> * You are using the bundled Dex instance **and** your Argo CD instance has TLS configured with a self-signed certificate
> **and** you understand and accept the risks of skipping OIDC provider cert verification.
> * You are using an external OIDC provider **and** that provider uses an invalid certificate **and** you cannot solve
> the problem by setting `oidcConfig.rootCA` **and** you understand and accept the risks of skipping OIDC provider cert
> verification.
>
> If either of those two applies, then you can disable OIDC provider certificate verification by setting
> `oidc.tls.insecure.skip.verify` to `"true"` in the `argocd-cm` ConfigMap.
### Bug fixes
* fix: webhook typo in case of error in GetManifests (#9671)
## v2.3.5 (2022-06-21)
### Security fixes
* CRITICAL: External URLs for Deployments can include javascript ([GHSA-h4w9-6x78-8vrj](https://github.com/argoproj/argo-cd/security/advisories/GHSA-h4w9-6x78-8vrj))
* HIGH: Insecure entropy in PKCE/Oauth2/OIDC params ([GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v))
* MODERATE: DoS through large directory app manifest files ([GHSA-jhqp-vf4w-rpwq](https://github.com/argoproj/argo-cd/security/advisories/GHSA-jhqp-vf4w-rpwq))
* MODERATE: Symlink following allows leaking out-of-bounds YAML files from Argo CD repo-server ([GHSA-q4w5-4gq2-98vm](https://github.com/argoproj/argo-cd/security/advisories/GHSA-q4w5-4gq2-98vm))
### Potentially-breaking changes
From the [GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v) description:
> The patch introduces a new `reposerver.max.combined.directory.manifests.size` config parameter, which you should tune before upgrading in production. It caps the maximum total file size of .yaml/.yml/.json files in directory-type (raw manifest) Applications. The default max is 10M per Application. This max is designed to keep any single app from consuming more than 3G of memory in the repo-server (manifests consume more space in memory than on disk). The 300x ratio assumes a maliciously-crafted manifest file. If you only want to protect against accidental excessive memory use, it is probably safe to use a smaller ratio.
>
> If your organization uses directory-type Applications with very many manifests or very large manifests then check the size of those manifests and tune the config parameter before deploying this change to production. When testing, make sure to do a "hard refresh" in either the CLI or UI to test your directory-type App. That will make sure you're using the new max logic instead of relying on cached manifest responses from Redis.
### Bug fixes
* fix: missing Helm params (#9565) (#9566)
### Other
* test: directory app manifest generation (#9503)
* chore: eliminate go-mpatch dependency (#9045)
* chore: Make unit tests run on platforms other than amd64 (#8995)
* chore: remove obsolete repo-server unit test (#9559)
* chore: update golangci-lint (#8988)
* fix: test race (#9469)
* chore: upgrade golangci-lint to v1.46.2 (#9448)
* test: fix ErrorContains (#9445)
## v2.3.4 (2022-05-18)
### Security fixes
- CRITICAL: Argo CD will trust invalid JWT claims if anonymous access is enabled (https://github.com/argoproj/argo-cd/security/advisories/GHSA-r642-gv9p-2wjj)
- LOW: Login screen allows message spoofing if SSO is enabled (https://github.com/argoproj/argo-cd/security/advisories/GHSA-xmg8-99r8-jc2j)
- MODERATE: Symlink following allows leaking out-of-bound manifests and JSON files from Argo CD repo-server (https://github.com/argoproj/argo-cd/security/advisories/GHSA-6gcg-hp2x-q54h)
### Bug Fixes
- fix: Fix docs build error (#8895)
- fix: fix broken monaco editor collapse icons (#8709)
- chore: upgrade to go 1.17.8 (#8866) (#9004)
- fix: allow cli/ui to follow logs (#8987) (#9065)
## v2.3.3 (2022-03-29)
@@ -181,6 +462,174 @@ Both bundled Helm and Kustomize binaries have been upgraded to the latest versio
- refactor: Introduce 'byClusterName' secret index to speedup cluster server URL lookup (#8133)
- refactor: Move project filtering to server side (#8102)
## v2.2.12 (2022-07-29)
### Notes
This is mainly a security related release and updates compatibility with Kubernetes 1.24.
**Attention:** The base image for 2.2.x reached end-of-life on January 20, 2022. This release upgraded the base image to Ubuntu 22.04 LTS. The change should have no effect on the majority of users. But if any of your git providers only supports now-deprecated key hash algorithms, then Application syncing might break. See the [2.1-to-2.2 upgrade notes](https://argo-cd.readthedocs.io/en/latest/operator-manual/upgrading/2.1-2.2/#support-for-private-repo-ssh-keys-using-the-sha-1-signature-hash-algorithm-is-removed-in-2212) for details and workaround instructions.
### Bug fixes
- fix: create serviceaccount token for v1.24 clusters (#9546)
- fix: upgrade moment from 2.29.2 to 2.29.3 (#9330)
- fix: avoid CVE-2022-28948 (#10093)
### Other changes
- chore: Remove deprecated K8s versions from test matrix
- chore: Go mod tidy
- test: Remove circular symlinks from testdata (#9886)
- test: Fix e2e tests for release-2.2 branch
- chore: bump redoc vesion to avoid CVE-2021-23820 (#8604)
- chore(deps): bump moment from 2.29.3 to 2.29.4 in /ui (#9897)
- chore: upgrade moment to latest version to fix CVE (#9005)
- chore: move dependencies to dev dependencies (#8541)
- docs: add OpenSSH breaking change notes (#10104)
- chore: update parse-url (#10101)
- chore: fix codegen
- chore: fix codegen
- chore: upgrade base image to 22.04 (#10105)
- docs: simplify Docker toolchain docs (#9966) (#10006)
- chore: update redis to 6.2.7 avoid CVE-2022-30065/CVE-2022-2097 (#10068)
- chore: upgrade Dex to 2.32.0 (#10036) (#10042)
- chore: update haproxy to 2.0.29 for redis-ha (#10045)
- test: check for error messages from CI env (#9953)
## v2.2.11 (2022-07-12)
### Security fixes
* HIGH: Certificate verification is skipped for connections to OIDC providers ([GHSA-7943-82jg-wmw5](https://github.com/argoproj/argo-cd/security/advisories/GHSA-7943-82jg-wmw5))
* LOW: A leaked API server encryption key can allow XSS for SSO users ([GHSA-pmjg-52h9-72qv](https://github.com/argoproj/argo-cd/security/advisories/GHSA-pmjg-52h9-72qv))
### Potentially-breaking changes
The fix for GHSA-7943-82jg-wmw5 enables TLS certificate validation by default for connections to OIDC providers. If
connections to your OIDC provider fails validation, SSO will be broken for your Argo CD instance. You should test 2.2.11
before upgrading it to production. From the new documentation:
> By default, all connections made by the API server to OIDC providers (either external providers or the bundled Dex
> instance) must pass certificate validation. These connections occur when getting the OIDC provider's well-known
> configuration, when getting the OIDC provider's keys, and when exchanging an authorization code or verifying an ID
> token as part of an OIDC login flow.
>
> Disabling certificate verification might make sense if:
> * You are using the bundled Dex instance **and** your Argo CD instance has TLS configured with a self-signed certificate
> **and** you understand and accept the risks of skipping OIDC provider cert verification.
> * You are using an external OIDC provider **and** that provider uses an invalid certificate **and** you cannot solve
> the problem by setting `oidcConfig.rootCA` **and** you understand and accept the risks of skipping OIDC provider cert
> verification.
>
> If either of those two applies, then you can disable OIDC provider certificate verification by setting
> `oidc.tls.insecure.skip.verify` to `"true"` in the `argocd-cm` ConfigMap.
### Features
* feat: enable specifying root ca for oidc (#6712)
### Bug fixes
* fix: webhook typo in case of error in GetManifests (#9671)
## v2.2.10 (2022-06-21)
### Security fixes
* CRITICAL: External URLs for Deployments can include javascript ([GHSA-h4w9-6x78-8vrj](https://github.com/argoproj/argo-cd/security/advisories/GHSA-h4w9-6x78-8vrj))
* HIGH: Insecure entropy in PKCE/Oauth2/OIDC params ([GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v))
* MODERATE: DoS through large directory app manifest files ([GHSA-jhqp-vf4w-rpwq](https://github.com/argoproj/argo-cd/security/advisories/GHSA-jhqp-vf4w-rpwq))
* MODERATE: Symlink following allows leaking out-of-bounds YAML files from Argo CD repo-server ([GHSA-q4w5-4gq2-98vm](https://github.com/argoproj/argo-cd/security/advisories/GHSA-q4w5-4gq2-98vm))
### Potentially-breaking changes
From the [GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v) description:
> The patch introduces a new `reposerver.max.combined.directory.manifests.size` config parameter, which you should tune before upgrading in production. It caps the maximum total file size of .yaml/.yml/.json files in directory-type (raw manifest) Applications. The default max is 10M per Application. This max is designed to keep any single app from consuming more than 3G of memory in the repo-server (manifests consume more space in memory than on disk). The 300x ratio assumes a maliciously-crafted manifest file. If you only want to protect against accidental excessive memory use, it is probably safe to use a smaller ratio.
>
> If your organization uses directory-type Applications with very many manifests or very large manifests then check the size of those manifests and tune the config parameter before deploying this change to production. When testing, make sure to do a "hard refresh" in either the CLI or UI to test your directory-type App. That will make sure you're using the new max logic instead of relying on cached manifest responses from Redis.
### Bug fixes
* fix: missing Helm params (#9565) (#9566)
### Other
* test: directory app manifest generation (#9503)
* test: fix erroneous test change
* chore: eliminate go-mpatch dependency (#9045)
* chore: Make unit tests run on platforms other than amd64 (#8995)
* chore: remove obsolete repo-server unit test (#9559)
* chore: upgrade golangci-lint to v1.46.2 (#9448)
* chore: update golangci-lint (#8988)
## v2.2.9 (2022-05-18)
### Notes
This is a security release. We urge all users of the 2.2.z branch to update as soon as possible. Please refer to the _Security fixes_ section below for more details.
### Security fixes
- CRITICAL: Argo CD will trust invalid JWT claims if anonymous access is enabled (https://github.com/argoproj/argo-cd/security/advisories/GHSA-r642-gv9p-2wjj)
- LOW: Login screen allows message spoofing if SSO is enabled (https://github.com/argoproj/argo-cd/security/advisories/GHSA-xmg8-99r8-jc2j)
- MODERATE: Symlink following allows leaking out-of-bound manifests and JSON files from Argo CD repo-server (https://github.com/argoproj/argo-cd/security/advisories/GHSA-6gcg-hp2x-q54h)
## v2.2.8 (2022-03-22)
### Special notes
This release contains the fix for a security issue with critical severity. We recommend users on the 2.2 release branch to update to this release as soon as possible.
More information can be found in the related
[security advisory](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2f5v-8r3f-8pww).
### Changes
As part of the security fix, the Argo CD UI no longer automatically presents child resources of allow-listed resources unless the child resources are also allow-listed. For example, Pods are not going to show up if only Deployment is added to the allow-list.
If you have [projects](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/) configured with allow-lists, make sure the allow-lists include all the resources you want users to be able to view/manage through the UI. For example, if your project allows `Deployments`, you would add `ReplicaSets` and `Pods`.
#### Bug Fixes
- fix: application resource APIs must enforce project restrictions
## v2.2.7 (2022-03-08)
### Bug Fixes
- fix: correct jsonnet paths resolution (#8721)
## v2.2.6 (2022-03-06)
### Bug Fixes
- fix: prevent file traversal using helm file values param and application details api (#8606)
- fix!: enforce app create/update privileges when getting repo details (#8558)
- feat: support custom helm values file schemes (#8535)
## v2.2.5 (2022-02-04)
- fix: Resolve symlinked value files correctly (#8387)
## v2.2.4 (2022-02-03)
### Special notes
This release contains the fix for a security issue with high severity. We recommend users on the 2.2 release branch to update to this release as soon as possible.
More information can be found in the related
[security advisory](https://github.com/argoproj/argo-cd/security/advisories/GHSA-63qx-x74g-jcr7)
### Bug Fixes
- fix: Prevent value files outside repository root
### Other changes
- chore: upgrade dex to v2.30.2 (backport of #8237) (#8257)
## v2.2.3 (2022-01-18)
- fix: Application exist panic when execute api call (#8188)
@@ -238,6 +687,117 @@ as there are no conflicts with other Kubernetes tools, and you can easily instal
* Cluster name support in project destinations (#7198)
* around 30 more features and a total of 84 bug fixes
## v2.1.16 (2022-06-21)
### Security fixes
* CRITICAL: External URLs for Deployments can include javascript ([GHSA-h4w9-6x78-8vrj](https://github.com/argoproj/argo-cd/security/advisories/GHSA-h4w9-6x78-8vrj))
* HIGH: Insecure entropy in PKCE/Oauth2/OIDC params ([GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v))
* MODERATE: DoS through large directory app manifest files ([GHSA-jhqp-vf4w-rpwq](https://github.com/argoproj/argo-cd/security/advisories/GHSA-jhqp-vf4w-rpwq))
* MODERATE: Symlink following allows leaking out-of-bounds YAML files from Argo CD repo-server ([GHSA-q4w5-4gq2-98vm](https://github.com/argoproj/argo-cd/security/advisories/GHSA-q4w5-4gq2-98vm))
**Note:** This will be the last security fix release in the 2.1.x series. Please [upgrade to a newer minor version](https://argo-cd.readthedocs.io/en/latest/operator-manual/upgrading/overview/) to continue to get security fixes.
### Potentially-breaking changes
From the [GHSA-2m7h-86qq-fp4v](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2m7h-86qq-fp4v) description:
> The patch introduces a new `reposerver.max.combined.directory.manifests.size` config parameter, which you should tune before upgrading in production. It caps the maximum total file size of .yaml/.yml/.json files in directory-type (raw manifest) Applications. The default max is 10M per Application. This max is designed to keep any single app from consuming more than 3G of memory in the repo-server (manifests consume more space in memory than on disk). The 300x ratio assumes a maliciously-crafted manifest file. If you only want to protect against accidental excessive memory use, it is probably safe to use a smaller ratio.
>
> If your organization uses directory-type Applications with very many manifests or very large manifests then check the size of those manifests and tune the config parameter before deploying this change to production. When testing, make sure to do a "hard refresh" in either the CLI or UI to test your directory-type App. That will make sure you're using the new max logic instead of relying on cached manifest responses from Redis.
### Bug fixes
* fix: missing Helm params (#9565) (#9566)
### Other
* test: directory app manifest generation (#9503)
* test: fix erroneous test change
* chore: eliminate go-mpatch dependency (#9045)
* chore: Make unit tests run on platforms other than amd64 (#8995)
* chore: remove obsolete repo-server unit test (#9559)
* chore: upgrade golangci-lint to v1.46.2 (#9448)
* chore: update golangci-lint (#8988)
* test: fix ErrorContains (#9445)
## v2.1.15 (2022-05-18)
### Notes
This is a security release. We urge all users of the 2.1.z branch to update as soon as possible. Please refer to the _Security fixes_ section below for more details.
### Security fixes
- CRITICAL: Argo CD will trust invalid JWT claims if anonymous access is enabled (https://github.com/argoproj/argo-cd/security/advisories/GHSA-r642-gv9p-2wjj)
- LOW: Login screen allows message spoofing if SSO is enabled (https://github.com/argoproj/argo-cd/security/advisories/GHSA-xmg8-99r8-jc2j)
- MODERATE: Symlink following allows leaking out-of-bound manifests and JSON files from Argo CD repo-server (https://github.com/argoproj/argo-cd/security/advisories/GHSA-6gcg-hp2x-q54h)
## v2.1.14 (2022-03-22)
### Special notes
This release contains the fix for a security issue with critical severity. We recommend users on the 2.1 release branch to update to this release as soon as possible.
More information can be found in the related
[security advisory](https://github.com/argoproj/argo-cd/security/advisories/GHSA-2f5v-8r3f-8pww).
### Changes
As part of the security fix, the Argo CD UI no longer automatically presents child resources of allow-listed resources unless the child resources are also allow-listed. For example, Pods are not going to show up if only Deployment is added to the allow-list.
If you have [projects](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/) configured with allow-lists, make sure the allow-lists include all the resources you want users to be able to view/manage through the UI. For example, if your project allows `Deployments`, you would add `ReplicaSets` and `Pods`.
#### Bug Fixes
- fix: application resource APIs must enforce project restrictions
## v2.1.13 (2022-03-22)
Unused release number.
## v2.1.12 (2022-03-08)
### Bug Fixes
- fix: correct jsonnet paths resolution (#8721)
## v2.1.11 (2022-03-06)
### Bug Fixes
- fix: prevent file traversal using helm file values param and application details api (#8606)
- fix!: enforce app create/update privileges when getting repo details (#8558)
- feat: support custom helm values file schemes (#8535)
## v2.1.10 (2022-02-04)
### Bug Fixes
- fix: Resolve symlinked value files correctly (#8387)
## v2.1.9 (2022-02-03)
### Special notes
This release contains the fix for a security issue with high severity. We recommend users on the 2.1 release branch to update to this release as soon as possible.
More information can be found in the related
[security advisory](https://github.com/argoproj/argo-cd/security/advisories/GHSA-63qx-x74g-jcr7)
### Bug Fixes
- fix: Prevent value files outside repository root
## v2.1.8 (2021-12-13)
### Bug Fixes
- fix: issue with keepalive (#7861)
- fix nil pointer dereference error (#7905)
- fix: env vars to tune cluster cache were broken (#7779)
- fix: upgraded gitops engine to v0.4.2 (fixes #7561)
## v2.1.7 (2021-12-14)
- fix: issue with keepalive (#7861)
@@ -448,7 +1008,7 @@ resources, you will have to adapt your cluster resources allow lists to explicit
## v1.8.4 (2021-02-05)
- feat: set X-XSS-Protection while serving static content (#5412)
- fix: version info should be avaialble if anonymous access is enabled (#5422)
- fix: version info should be available if anonymous access is enabled (#5422)
- fix: disable jwt claim audience validation #5381 (#5413)
- fix: /api/version should not return tools version for unauthenticated requests (#5415)
- fix: account tokens should be rejected if required capability is disabled (#5414)

View File

@@ -36,12 +36,15 @@ RUN ./install.sh helm-linux && \
####################################################################################################
FROM $BASE_IMAGE AS argocd-base
LABEL org.opencontainers.image.source="https://github.com/argoproj/argo-cd"
USER root
ENV ARGOCD_USER_ID=999
ENV DEBIAN_FRONTEND=noninteractive
RUN groupadd -g 999 argocd && \
useradd -r -u 999 -g argocd argocd && \
RUN groupadd -g $ARGOCD_USER_ID argocd && \
useradd -r -u $ARGOCD_USER_ID -g argocd argocd && \
mkdir -p /home/argocd && \
chown argocd:0 /home/argocd && \
chmod g=u /home/argocd && \
@@ -74,7 +77,7 @@ RUN mkdir -p tls && \
ENV USER=argocd
USER 999
USER $ARGOCD_USER_ID
WORKDIR /home/argocd
####################################################################################################
@@ -128,4 +131,4 @@ RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-applicationset-controller && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-k8s-auth
USER 999
USER $ARGOCD_USER_ID

View File

@@ -47,7 +47,7 @@ ARGOCD_E2E_DEX_PORT?=5556
ARGOCD_E2E_YARN_HOST?=localhost
ARGOCD_E2E_DISABLE_AUTH?=
ARGOCD_E2E_TEST_TIMEOUT?=30m
ARGOCD_E2E_TEST_TIMEOUT?=45m
ARGOCD_IN_CI?=false
ARGOCD_TEST_E2E?=true
@@ -64,13 +64,20 @@ else
DOCKER_SRC_MOUNT="$(PWD):/go/src/github.com/argoproj/argo-cd$(VOLUME_MOUNT)"
endif
# User and group IDs to map to the test container
CONTAINER_UID=$(shell id -u)
CONTAINER_GID=$(shell id -g)
# Set SUDO to sudo to run privileged commands with sudo
SUDO?=
# Runs any command in the argocd-test-utils container in server mode
# Server mode container will start with uid 0 and drop privileges during runtime
define run-in-test-server
docker run --rm -it \
$(SUDO) docker run --rm -it \
--name argocd-test-server \
-u $(shell id -u):$(shell id -g) \
-e USER_ID=$(shell id -u) \
-u $(CONTAINER_UID):$(CONTAINER_GID) \
-e USER_ID=$(CONTAINER_UID) \
-e HOME=/home/user \
-e GOPATH=/go \
-e GOCACHE=/tmp/go-build-cache \
@@ -81,6 +88,8 @@ define run-in-test-server
-e ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} \
-e ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} \
-e ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} \
-e ARGOCD_APPLICATION_NAMESPACES \
-e GITHUB_TOKEN \
-v ${DOCKER_SRC_MOUNT} \
-v ${GOPATH}/pkg/mod:/go/pkg/mod${VOLUME_MOUNT} \
-v ${GOCACHE}:/tmp/go-build-cache${VOLUME_MOUNT} \
@@ -96,12 +105,13 @@ endef
# Runs any command in the argocd-test-utils container in client mode
define run-in-test-client
docker run --rm -it \
$(SUDO) docker run --rm -it \
--name argocd-test-client \
-u $(shell id -u):$(shell id -g) \
-u $(CONTAINER_UID):$(CONTAINER_GID) \
-e HOME=/home/user \
-e GOPATH=/go \
-e ARGOCD_E2E_K3S=$(ARGOCD_E2E_K3S) \
-e GITHUB_TOKEN \
-e GOCACHE=/tmp/go-build-cache \
-e ARGOCD_LINT_GOGC=$(ARGOCD_LINT_GOGC) \
-v ${DOCKER_SRC_MOUNT} \
@@ -116,7 +126,7 @@ endef
#
define exec-in-test-server
docker exec -it -u $(shell id -u):$(shell id -g) -e ARGOCD_E2E_K3S=$(ARGOCD_E2E_K3S) argocd-test-server $(1)
$(SUDO) docker exec -it -u $(CONTAINER_UID):$(CONTAINER_GID) -e ARGOCD_E2E_RECORD=$(ARGOCD_E2E_RECORD) -e ARGOCD_E2E_K3S=$(ARGOCD_E2E_K3S) argocd-test-server $(1)
endef
PATH:=$(PATH):$(PWD)/hack
@@ -240,8 +250,10 @@ release-cli: clean-debug build-ui
.PHONY: test-tools-image
test-tools-image:
docker build --build-arg UID=$(shell id -u) -t $(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE) -f test/container/Dockerfile .
docker tag $(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE) $(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE):$(TEST_TOOLS_TAG)
ifndef SKIP_TEST_TOOLS_IMAGE
$(SUDO) docker build --build-arg UID=$(CONTAINER_UID) -t $(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE) -f test/container/Dockerfile .
$(SUDO) docker tag $(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE) $(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE):$(TEST_TOOLS_TAG)
endif
.PHONY: manifests-local
manifests-local:
@@ -281,7 +293,7 @@ ifeq ($(DEV_IMAGE), true)
# the dist directory is under .dockerignore.
IMAGE_TAG="dev-$(shell git describe --always --dirty)"
image: build-ui
DOCKER_BUILDKIT=1 docker build -t argocd-base --target argocd-base .
DOCKER_BUILDKIT=1 docker build --platform=linux/amd64 -t argocd-base --target argocd-base .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-application-controller
@@ -289,7 +301,7 @@ image: build-ui
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-cmp-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-dex
cp Dockerfile.dev dist
docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) -f dist/Dockerfile.dev dist
DOCKER_BUILDKIT=1 docker build --platform=linux/amd64 -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) -f dist/Dockerfile.dev dist
else
image:
DOCKER_BUILDKIT=1 docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) .
@@ -321,7 +333,7 @@ mod-vendor: test-tools-image
mod-vendor-local: mod-download-local
go mod vendor
# Deprecated - replace by install-local-tools
# Deprecated - replace by install-tools-local
.PHONY: install-lint-tools
install-lint-tools:
./hack/install.sh lint-tools
@@ -337,7 +349,7 @@ lint-local:
golangci-lint --version
# NOTE: If you get a "Killed" OOM message, try reducing the value of GOGC
# See https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
GOGC=$(ARGOCD_LINT_GOGC) GOMAXPROCS=2 golangci-lint run --fix --verbose --timeout 300s
GOGC=$(ARGOCD_LINT_GOGC) GOMAXPROCS=2 golangci-lint run --fix --verbose --timeout 3000s
.PHONY: lint-ui
lint-ui: test-tools-image
@@ -401,7 +413,7 @@ test-e2e:
test-e2e-local: cli-local
# NO_PROXY ensures all tests don't go out through a proxy if one is configured on the test system
export GO111MODULE=off
ARGOCD_GPG_ENABLED=true NO_PROXY=* ./hack/test.sh -timeout $(ARGOCD_E2E_TEST_TIMEOUT) -v ./test/e2e
ARGOCD_E2E_RECORD=${ARGOCD_E2E_RECORD} ARGOCD_GPG_ENABLED=true NO_PROXY=* ./hack/test.sh -timeout $(ARGOCD_E2E_TEST_TIMEOUT) -v ./test/e2e
# Spawns a shell in the test server container for debugging purposes
debug-test-server: test-tools-image
@@ -422,6 +434,7 @@ start-e2e: test-tools-image
.PHONY: start-e2e-local
start-e2e-local: mod-vendor-local dep-ui-local cli-local
kubectl create ns argocd-e2e || true
kubectl create ns argocd-e2e-external || true
kubectl config set-context --current --namespace=argocd-e2e
kustomize build test/manifests/base | kubectl apply -f -
kubectl apply -f https://raw.githubusercontent.com/open-cluster-management/api/a6845f2ebcb186ec26b832f60c988537a58f3859/cluster/v1alpha1/0000_04_clusters.open-cluster-management.io_placementdecisions.crd.yaml
@@ -442,13 +455,14 @@ start-e2e-local: mod-vendor-local dep-ui-local cli-local
ARGOCD_ZJWT_FEATURE_FLAG=always \
ARGOCD_IN_CI=$(ARGOCD_IN_CI) \
BIN_MODE=$(ARGOCD_BIN_MODE) \
ARGOCD_APPLICATION_NAMESPACES=argocd-e2e-external \
ARGOCD_E2E_TEST=true \
goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START}
# Cleans VSCode debug.test files from sub-dirs to prevent them from being included in by golang embed
.PHONY: clean-debug
clean-debug:
-find ${CURRENT_DIR} -name debug.test | xargs rm -f
-find ${CURRENT_DIR} -name debug.test -exec rm -f {} +
.PHONY: clean
clean: clean-debug
@@ -461,7 +475,7 @@ start: test-tools-image
# Starts a local instance of ArgoCD
.PHONY: start-local
start-local: mod-vendor-local dep-ui-local
start-local: mod-vendor-local dep-ui-local cli-local
# check we can connect to Docker to start Redis
killall goreman || true
kubectl create ns argocd || true
@@ -473,6 +487,7 @@ start-local: mod-vendor-local dep-ui-local
ARGOCD_IN_CI=false \
ARGOCD_GPG_ENABLED=$(ARGOCD_GPG_ENABLED) \
ARGOCD_E2E_TEST=false \
ARGOCD_APPLICATION_NAMESPACES=$(ARGOCD_APPLICATION_NAMESPACES) \
goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START}
# Run goreman start with exclude option , provide exclude env variable with list of services
@@ -504,7 +519,7 @@ build-docs-local:
.PHONY: build-docs
build-docs:
docker run ${MKDOCS_RUN_ARGS} --rm -it -p 8000:8000 -v ${CURRENT_DIR}:/docs ${MKDOCS_DOCKER_IMAGE} build
docker run ${MKDOCS_RUN_ARGS} --rm -it -v ${CURRENT_DIR}:/docs --entrypoint "" ${MKDOCS_DOCKER_IMAGE} sh -c 'pip install -r docs/requirements.txt; mkdocs build'
.PHONY: serve-docs-local
serve-docs-local:
@@ -512,7 +527,7 @@ serve-docs-local:
.PHONY: serve-docs
serve-docs:
docker run ${MKDOCS_RUN_ARGS} --rm -it -p 8000:8000 -v ${CURRENT_DIR}:/docs ${MKDOCS_DOCKER_IMAGE} serve -a 0.0.0.0:8000
docker run ${MKDOCS_RUN_ARGS} --rm -it -p 8000:8000 -v ${CURRENT_DIR}/site:/site -w /site --entrypoint "" ${MKDOCS_DOCKER_IMAGE} python3 -m http.server --bind 0.0.0.0 8000
# Verify that kubectl can connect to your K8s cluster from Docker
@@ -569,3 +584,15 @@ applicationset-controller:
.PHONY: checksums
checksums:
sha256sum ./dist/$(BIN_NAME)-* | awk -F './dist/' '{print $$1 $$2}' > ./dist/$(BIN_NAME)-$(TARGET_VERSION)-checksums.txt
.PHONY: snyk-container-tests
snyk-container-tests:
./hack/snyk-container-tests.sh
.PHONY: snyk-non-container-tests
snyk-non-container-tests:
./hack/snyk-non-container-tests.sh
.PHONY: snyk-report
snyk-report:
./hack/snyk-report.sh $(target_branch)

2
OWNERS
View File

@@ -27,3 +27,5 @@ reviewers:
- wanghong230
- ciiay
- saumeya
- zachaller
- 34fathombelow

View File

@@ -1,7 +1,7 @@
controller: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-application-controller $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --otlp-address=${ARGOCD_OTLP_ADDRESS}"
api-server: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-server $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --disable-auth=${ARGOCD_E2E_DISABLE_AUTH:-'true'} --insecure --dex-server http://localhost:${ARGOCD_E2E_DEX_PORT:-5556} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --port ${ARGOCD_E2E_APISERVER_PORT:-8080} --otlp-address=${ARGOCD_OTLP_ADDRESS}"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v2/cmd gendexcfg -o `pwd`/dist/dex.yaml && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:v2.30.2 dex serve /dex.yaml"
redis: bash -c "if [ \"$ARGOCD_REDIS_LOCAL\" == 'true' ]; then redis-server --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; else docker run --rm --name argocd-redis -i -p ${ARGOCD_E2E_REDIS_PORT:-6379}:${ARGOCD_E2E_REDIS_PORT:-6379} redis:7.0.0-alpine --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; fi"
controller: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-application-controller $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --otlp-address=${ARGOCD_OTLP_ADDRESS} --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''}"
api-server: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-server $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --disable-auth=${ARGOCD_E2E_DISABLE_AUTH:-'true'} --insecure --dex-server http://localhost:${ARGOCD_E2E_DEX_PORT:-5556} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --port ${ARGOCD_E2E_APISERVER_PORT:-8080} --otlp-address=${ARGOCD_OTLP_ADDRESS} --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''}"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v2/cmd gendexcfg -o `pwd`/dist/dex.yaml && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:$(grep "image: ghcr.io/dexidp/dex" manifests/base/dex/argocd-dex-server-deployment.yaml | cut -d':' -f3) dex serve /dex.yaml"
redis: bash -c "if [ \"$ARGOCD_REDIS_LOCAL\" == 'true' ]; then redis-server --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; else docker run --rm --name argocd-redis -i -p ${ARGOCD_E2E_REDIS_PORT:-6379}:${ARGOCD_E2E_REDIS_PORT:-6379} redis:$(grep "image: redis" manifests/base/redis/argocd-redis-deployment.yaml | cut -d':' -f3) --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; fi"
repo-server: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-./test/cmp} ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-repo-server ARGOCD_GPG_ENABLED=${ARGOCD_GPG_ENABLED:-false} $COMMAND --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --otlp-address=${ARGOCD_OTLP_ADDRESS}"
cmp-server: [ "$ARGOCD_E2E_TEST" == 'true' ] && exit 0 || [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_BINARY_NAME=argocd-cmp-server ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-./test/cmp} $COMMAND --config-dir-path ./test/cmp --loglevel debug --otlp-address=${ARGOCD_OTLP_ADDRESS}"
ui: sh -c 'cd ui && ${ARGOCD_E2E_YARN_CMD:-yarn} start'

View File

@@ -1,4 +1,16 @@
[![Integration tests](https://github.com/argoproj/argo-cd/workflows/Integration%20tests/badge.svg?branch=master)](https://github.com/argoproj/argo-cd/actions?query=workflow%3A%22Integration+tests%22) [![slack](https://img.shields.io/badge/slack-argoproj-brightgreen.svg?logo=slack)](https://argoproj.github.io/community/join-slack) [![codecov](https://codecov.io/gh/argoproj/argo-cd/branch/master/graph/badge.svg)](https://codecov.io/gh/argoproj/argo-cd) [![Release Version](https://img.shields.io/github/v/release/argoproj/argo-cd?label=argo-cd)](https://github.com/argoproj/argo-cd/releases/latest) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4486/badge)](https://bestpractices.coreinfrastructure.org/projects/4486) [![Twitter Follow](https://img.shields.io/twitter/follow/argoproj?style=social)](https://twitter.com/argoproj)
**Releases:**
[![Release Version](https://img.shields.io/github/v/release/argoproj/argo-cd?label=argo-cd)](https://github.com/argoproj/argo-cd/releases/latest)
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/argo-cd)](https://artifacthub.io/packages/helm/argo/argo-cd)
**Code:**
[![Integration tests](https://github.com/argoproj/argo-cd/workflows/Integration%20tests/badge.svg?branch=master)](https://github.com/argoproj/argo-cd/actions?query=workflow%3A%22Integration+tests%22)
[![codecov](https://codecov.io/gh/argoproj/argo-cd/branch/master/graph/badge.svg)](https://codecov.io/gh/argoproj/argo-cd)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4486/badge)](https://bestpractices.coreinfrastructure.org/projects/4486)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fargoproj%2Fargo-cd.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fargoproj%2Fargo-cd?ref=badge_shield)
**Social:**
[![Twitter Follow](https://img.shields.io/twitter/follow/argoproj?style=social)](https://twitter.com/argoproj)
[![Slack](https://img.shields.io/badge/slack-argoproj-brightgreen.svg?logo=slack)](https://argoproj.github.io/community/join-slack)
# Argo CD - Declarative Continuous Delivery for Kubernetes

View File

@@ -1,7 +1,7 @@
# Defined below are the security contacts for this repo.
#
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
# INSTRUCTIONS AT https://argo-cd.readthedocs.io/en/latest/security_considerations/#reporting-vulnerabilities
# INSTRUCTIONS AT https://github.com/argoproj/argo-cd/security/policy
alexmt
edlee2121

View File

@@ -1,6 +1,7 @@
## Who uses Argo CD?
As the Argo Community grows, we'd like to keep track of our users. Please send a PR with your organization name if you are using Argo CD.
As the Argo Community grows, we'd like to keep track of our users. Please send a
PR with your organization name if you are using Argo CD.
Currently, the following organizations are **officially** using Argo CD:
@@ -8,16 +9,19 @@ Currently, the following organizations are **officially** using Argo CD:
1. [3Rein](https://www.3rein.com/)
1. [7shifts](https://www.7shifts.com/)
1. [Adevinta](https://www.adevinta.com/)
1. [Adfinis](https://adfinis.com)
1. [Adventure](https://jp.adventurekk.com/)
1. [AirQo](https://airqo.net/)
1. [Akuity](https://akuity.io/)
1. [Alibaba Group](https://www.alibabagroup.com/)
1. [Allianz Direct](https://www.allianzdirect.de/)
1. [Amadeus IT Group](https://amadeus.com/)
1. [Ambassador Labs](https://www.getambassador.io/)
1. [ANSTO - Australian Synchrotron](https://www.synchrotron.org.au/)
1. [Ant Group](https://www.antgroup.com/)
1. [AppDirect](https://www.appdirect.com)
1. [Arctiq Inc.](https://www.arctiq.ca)
1. [ARZ Allgemeines Rechenzentrum GmbH ](https://www.arz.at/)
1. [ARZ Allgemeines Rechenzentrum GmbH](https://www.arz.at/)
1. [Axual B.V.](https://axual.com)
1. [Baloise](https://www.baloise.com)
1. [BCDevExchange DevOps Platform](https://bcdevexchange.org/DevOpsPlatform)
@@ -27,20 +31,26 @@ Currently, the following organizations are **officially** using Argo CD:
1. [BigPanda](https://bigpanda.io)
1. [BioBox Analytics](https://biobox.io)
1. [BMW Group](https://www.bmwgroup.com/)
1. [PT Boer Technology (Btech)](https://btech.id/)
1. [Boozt](https://www.booztgroup.com/)
1. [Boticario](https://www.boticario.com.br/)
1. [Bulder Bank](https://bulderbank.no)
1. [Camptocamp](https://camptocamp.com)
1. [Capital One](https://www.capitalone.com)
1. [CARFAX](https://www.carfax.com)
1. [CARFAX Europe](https://www.carfax.eu)
1. [Casavo](https://casavo.com)
1. [Celonis](https://www.celonis.com/)
1. [CERN](https://home.cern/)
1. [Chargetrip](https://chargetrip.com)
1. [Chime](https://www.chime.com)
1. [Cisco ET&I](https://eti.cisco.com/)
1. [Cloud Scale](https://cloudscaleinc.com/)
1. [Cobalt](https://www.cobalt.io/)
1. [Codefresh](https://www.codefresh.io/)
1. [Codility](https://www.codility.com/)
1. [Commonbond](https://commonbond.co/)
1. [Coralogix](https://coralogix.com/)
1. [CROZ d.o.o.](https://croz.net/)
1. [Crédit Agricole CIB](https://www.ca-cib.com)
1. [CyberAgent](https://www.cyberagent.co.jp/en/)
@@ -48,32 +58,47 @@ Currently, the following organizations are **officially** using Argo CD:
1. [D2iQ](https://www.d2iq.com)
1. [Datarisk](https://www.datarisk.io/)
1. [Deloitte](https://www.deloitte.com/)
1. [Deutsche Telekom AG](https://telekom.com)
1. [Devopsi - Poland Software/DevOps Consulting](https://devopsi.pl/)
1. [Devtron Labs](https://github.com/devtron-labs/devtron)
1. [Divistant](https://divistant.com)
1. [Doximity](https://www.doximity.com/)
1. [EDF Renewables](https://www.edf-re.com/)
1. [edX](https://edx.org)
1. [Electronic Arts Inc. ](https://www.ea.com)
1. [Elastic](https://elastic.co/)
1. [Electronic Arts Inc.](https://www.ea.com)
1. [Elementor](https://elementor.com/)
1. [Elium](https://www.elium.com)
1. [END.](https://www.endclothing.com/)
1. [Energisme](https://energisme.com/)
1. [enigmo](https://enigmo.co.jp/)
1. [Envoy](https://envoy.com/)
1. [Faro](https://www.faro.com/)
1. [Fave](https://myfave.com)
1. [Flip](https://flip.id)
1. [Fonoa](https://www.fonoa.com/)
1. [freee](https://corp.freee.co.jp/en/company/)
1. [Freshop, Inc](https://www.freshop.com/)
1. [Future PLC](https://www.futureplc.com/)
1. [G DATA CyberDefense AG](https://www.gdata-software.com/)
1. [Garner](https://www.garnercorp.com)
1. [Generali Deutschland AG](https://www.generali.de/)
1. [Gepardec](https://gepardec.com/)
1. [GetYourGuide](https://www.getyourguide.com/)
1. [Gitpod](https://www.gitpod.io)
1. [Gllue](https://gllue.com)
1. [gloat](https://gloat.com/)
1. [GLOBIS](https://globis.com)
1. [Glovo](https://www.glovoapp.com)
1. [GMETRI](https://gmetri.com/)
1. [Gojek](https://www.gojek.io/)
1. [Greenpass](https://www.greenpass.com.br/)
1. [Gridfuse](https://gridfuse.com/)
1. [Grupo MasMovil](https://grupomasmovil.com/en/)
1. [Handelsbanken](https://www.handelsbanken.se)
1. [Healy](https://www.healyworld.net)
1. [Helio](https://helio.exchange)
1. [Hetki](https://hetki.ai)
1. [hipages](https://hipages.com.au/)
1. [Hiya](https://hiya.com)
1. [Honestbank](https://honestbank.com)
@@ -81,12 +106,14 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Ibotta](https://home.ibotta.com)
1. [IITS-Consulting](https://iits-consulting.de)
1. [imaware](https://imaware.health)
1. [Indeed](https://indeed.com)
1. [Index Exchange](https://www.indexexchange.com/)
1. [InsideBoard](https://www.insideboard.com)
1. [Intuit](https://www.intuit.com/)
1. [Joblift](https://joblift.com/)
1. [JovianX](https://www.jovianx.com/)
1. [Kaltura](https://corp.kaltura.com/)
1. [Kandji](https://www.kandji.io/)
1. [KarrotPay](https://www.daangnpay.com/)
1. [Karrot](https://www.daangn.com/)
1. [Kasa](https://kasa.co.kr/)
@@ -96,10 +123,14 @@ Currently, the following organizations are **officially** using Argo CD:
1. [KintoHub](https://www.kintohub.com/)
1. [KompiTech GmbH](https://www.kompitech.com/)
1. [KubeSphere](https://github.com/kubesphere)
1. [Kurly](https://www.kurly.com/)
1. [LexisNexis](https://www.lexisnexis.com/)
1. [Lian Chu Securities](https://lczq.com)
1. [Liatrio](https://www.liatrio.com)
1. [Lightricks](https://www.lightricks.com/)
1. [LINE](https://linecorp.com/en/)
1. [Lytt](https://www.lytt.co/)
1. [Magic Leap](https://www.magicleap.com/)
1. [Majid Al Futtaim](https://www.majidalfuttaim.com/)
1. [Major League Baseball](https://mlb.com)
1. [Mambu](https://www.mambu.com/)
@@ -107,6 +138,8 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Mattermost](https://www.mattermost.com)
1. [Max Kelsen](https://www.maxkelsen.com/)
1. [MeDirect](https://medirect.com.mt/)
1. [Meican](https://meican.com/)
1. [Mercedes-Benz Tech Innovation](https://www.mercedes-benz-techinnovation.com/)
1. [Metanet](http://www.metanet.co.kr/en/)
1. [MindSpore](https://mindspore.cn)
1. [Mirantis](https://mirantis.com/)
@@ -116,33 +149,49 @@ Currently, the following organizations are **officially** using Argo CD:
1. [MOO Print](https://www.moo.com/)
1. [MTN Group](https://www.mtn.com/)
1. [Natura &Co](https://naturaeco.com/)
1. [Nethopper](https://nethopper.io)
1. [New Relic](https://newrelic.com/)
1. [Nextdoor](https://nextdoor.com/)
1. [Nikkei](https://www.nikkei.co.jp/nikkeiinfo/en/)
1. [Nitro](https://gonitro.com)
1. [Objective](https://www.objective.com.br/)
1. [OCCMundial](https://occ.com.mx)
1. [Octadesk](https://octadesk.com)
1. [omegaUp](https://omegaUp.com)
1. [Omni](https://omni.se/)
1. [openEuler](https://openeuler.org)
1. [openGauss](https://opengauss.org/)
1. [openLooKeng](https://openlookeng.io)
1. [OpenSaaS Studio](https://opensaas.studio)
1. [Opensurvey](https://www.opensurvey.co.kr/)
1. [OpsMx](https://opsmx.io)
1. [OpsVerse](https://opsverse.io)
1. [Optoro](https://www.optoro.com/)
1. [Orbital Insight](https://orbitalinsight.com/)
1. [p3r](https://www.p3r.one/)
1. [Packlink](https://www.packlink.com/)
1. [Pandosearch](https://www.pandosearch.com/en/home)
1. [PagerDuty](https://www.pagerduty.com/)
1. [Patreon](https://www.patreon.com/)
1. [PayPay](https://paypay.ne.jp/)
1. [Peloton Interactive](https://www.onepeloton.com/)
1. [Pigment](https://www.gopigment.com/)
1. [Pipefy](https://www.pipefy.com/)
1. [Pismo](https://pismo.io/)
1. [Platform9 Systems](https://platform9.com/)
1. [Polarpoint.io](https://polarpoint.io)
1. [PostFinance](https://github.com/postfinance)
1. [Preferred Networks](https://preferred.jp/en/)
1. [Productboard](https://www.productboard.com/)
1. [Prudential](https://prudential.com.sg)
1. [PUBG](https://www.pubg.com)
1. [Qonto](https://qonto.com)
1. [QuintoAndar](https://quintoandar.com.br)
1. [Quipper](https://www.quipper.com/)
1. [RapidAPI](https://www.rapidapi.com/)
1. [Recreation.gov](https://www.recreation.gov/)
1. [Red Hat](https://www.redhat.com/)
1. [reev.com](https://www.reev.com/)
1. [RightRev](https://rightrev.com/)
1. [Rise](https://www.risecard.eu/)
1. [Riskified](https://www.riskified.com/)
@@ -151,14 +200,20 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Saildrone](https://www.saildrone.com/)
1. [Saloodo! GmbH](https://www.saloodo.com)
1. [Sap Labs](http://sap.com)
1. [Sauce Labs](https://saucelabs.com/)
1. [Schwarz IT](https://jobs.schwarz/it-mission)
1. [SI Analytics](https://si-analytics.ai)
1. [Skit](https://skit.ai/)
1. [Skyscanner](https://www.skyscanner.net/)
1. [Smilee.io](https://smilee.io)
1. [Smood.ch](https://www.smood.ch/)
1. [Snapp](https://snapp.ir/)
1. [Snyk](https://snyk.io/)
1. [Softway Medical](https://www.softwaymedical.fr/)
1. [South China Morning Post (SCMP)](https://www.scmp.com/)
1. [Speee](https://speee.jp/)
1. [Spendesk](https://spendesk.com/)
1. [Splunk](https://splunk.com/)
1. [Spores Labs](https://spores.app)
1. [Stuart](https://stuart.com/)
1. [Sumo Logic](https://sumologic.com/)
@@ -170,6 +225,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [TableCheck](https://tablecheck.com/)
1. [Tailor Brands](https://www.tailorbrands.com)
1. [Tamkeen Technologies](https://tamkeentech.sa/)
1. [Techcombank](https://www.techcombank.com.vn/trang-chu)
1. [Technacy](https://www.technacy.it/)
1. [Tesla](https://tesla.com/)
1. [ThousandEyes](https://www.thousandeyes.com/)
@@ -177,7 +233,9 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Tiger Analytics](https://www.tigeranalytics.com/)
1. [Tigera](https://www.tigera.io/)
1. [Toss](https://toss.im/en)
1. [Trendyol](https://www.trendyol.com/)
1. [tru.ID](https://tru.id)
1. [Trusting Social](https://trustingsocial.com/)
1. [Twilio SendGrid](https://sendgrid.com)
1. [tZERO](https://www.tzero.com/)
1. [UBIO](https://ub.io/)
@@ -186,16 +244,20 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Unifonic Inc](https://www.unifonic.com/)
1. [Universidad Mesoamericana](https://www.umes.edu.gt/)
1. [Viaduct](https://www.viaduct.ai/)
1. [Vinted](https://vinted.com/)
1. [Virtuo](https://www.govirtuo.com/)
1. [VISITS Technologies](https://visits.world/en)
1. [Volvo Cars](https://www.volvocars.com/)
1. [Voyager Digital](https://www.investvoyager.com/)
1. [VSHN - The DevOps Company](https://vshn.ch/)
1. [Walkbase](https://www.walkbase.com/)
1. [Webstores](https://www.webstores.nl)
1. [Wehkamp](https://www.wehkamp.nl/)
1. [WeMaintain](https://www.wemaintain.com/)
1. [WeMo Scooter](https://www.wemoscooter.com/)
1. [Whitehat Berlin](https://whitehat.berlin) by Guido Maria Serra +Fenaroli
1. [Witick](https://witick.io/)
1. [Wolffun Game](https://www.wolffungame.com/)
1. [WooliesX](https://wooliesx.com.au/)
1. [Woolworths Group](https://www.woolworthsgroup.com.au/)
1. [WSpot](https://www.wspot.com.br/)
@@ -204,5 +266,3 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Yubo](https://www.yubo.live/)
1. [Zimpler](https://www.zimpler.com/)
1. [ZOZO](https://corp.zozo.com/)
1. [Trendyol](https://www.trendyol.com/)
1. [RapidAPI](https://www.rapidapi.com/)

View File

@@ -1 +1 @@
2.4.23
2.6.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/event"
"github.com/argoproj/argo-cd/v2/applicationset/generators"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
// clusterSecretEventHandler is used when watching Secrets to check if they are ArgoCD Cluster Secrets, and if so

View File

@@ -15,13 +15,12 @@ import (
"github.com/argoproj/argo-cd/v2/applicationset/generators"
argov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
func TestClusterEventHandler(t *testing.T) {
scheme := runtime.NewScheme()
err := argoprojiov1alpha1.AddToScheme(scheme)
err := argov1alpha1.AddToScheme(scheme)
assert.Nil(t, err)
err = argov1alpha1.AddToScheme(scheme)
@@ -29,13 +28,13 @@ func TestClusterEventHandler(t *testing.T) {
tests := []struct {
name string
items []argoprojiov1alpha1.ApplicationSet
items []argov1alpha1.ApplicationSet
secret corev1.Secret
expectedRequests []ctrl.Request
}{
{
name: "no application sets should mean no requests",
items: []argoprojiov1alpha1.ApplicationSet{},
items: []argov1alpha1.ApplicationSet{},
secret: corev1.Secret{
ObjectMeta: v1.ObjectMeta{
Namespace: "argocd",
@@ -49,16 +48,16 @@ func TestClusterEventHandler(t *testing.T) {
},
{
name: "a cluster generator should produce a request",
items: []argoprojiov1alpha1.ApplicationSet{
items: []argov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
Clusters: &argov1alpha1.ClusterGenerator{},
},
},
},
@@ -79,16 +78,16 @@ func TestClusterEventHandler(t *testing.T) {
},
{
name: "multiple cluster generators should produce multiple requests",
items: []argoprojiov1alpha1.ApplicationSet{
items: []argov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
Clusters: &argov1alpha1.ClusterGenerator{},
},
},
},
@@ -98,10 +97,10 @@ func TestClusterEventHandler(t *testing.T) {
Name: "my-app-set2",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
Clusters: &argov1alpha1.ClusterGenerator{},
},
},
},
@@ -123,16 +122,16 @@ func TestClusterEventHandler(t *testing.T) {
},
{
name: "non-cluster generator should not match",
items: []argoprojiov1alpha1.ApplicationSet{
items: []argov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "another-namespace",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
Clusters: &argov1alpha1.ClusterGenerator{},
},
},
},
@@ -142,10 +141,10 @@ func TestClusterEventHandler(t *testing.T) {
Name: "app-set-non-cluster",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
List: &argoprojiov1alpha1.ListGenerator{},
List: &argov1alpha1.ListGenerator{},
},
},
},
@@ -167,16 +166,16 @@ func TestClusterEventHandler(t *testing.T) {
{
name: "non-argo cd secret should not match",
items: []argoprojiov1alpha1.ApplicationSet{
items: []argov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "another-namespace",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
Spec: argov1alpha1.ApplicationSetSpec{
Generators: []argov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
Clusters: &argov1alpha1.ClusterGenerator{},
},
},
},
@@ -196,7 +195,7 @@ func TestClusterEventHandler(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
appSetList := argoprojiov1alpha1.ApplicationSetList{
appSetList := argov1alpha1.ApplicationSetList{
Items: test.items,
}

View File

@@ -1,180 +0,0 @@
package controllers
import (
"context"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
dynfake "k8s.io/client-go/dynamic/fake"
kubefake "k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/record"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"github.com/argoproj/argo-cd/v2/applicationset/generators"
argoappsetv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
func TestRequeueAfter(t *testing.T) {
mockServer := argoCDServiceMock{}
ctx := context.Background()
scheme := runtime.NewScheme()
err := argoappsetv1alpha1.AddToScheme(scheme)
assert.Nil(t, err)
gvrToListKind := map[schema.GroupVersionResource]string{{
Group: "mallard.io",
Version: "v1",
Resource: "ducks",
}: "DuckList"}
appClientset := kubefake.NewSimpleClientset()
k8sClient := fake.NewClientBuilder().Build()
duckType := &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": "v2quack",
"kind": "Duck",
"metadata": map[string]interface{}{
"name": "mightyduck",
"namespace": "namespace",
"labels": map[string]interface{}{"duck": "all-species"},
},
"status": map[string]interface{}{
"decisions": []interface{}{
map[string]interface{}{
"clusterName": "staging-01",
},
map[string]interface{}{
"clusterName": "production-01",
},
},
},
},
}
fakeDynClient := dynfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, duckType)
terminalGenerators := map[string]generators.Generator{
"List": generators.NewListGenerator(),
"Clusters": generators.NewClusterGenerator(k8sClient, ctx, appClientset, "argocd"),
"Git": generators.NewGitGenerator(mockServer),
"SCMProvider": generators.NewSCMProviderGenerator(fake.NewClientBuilder().WithObjects(&corev1.Secret{}).Build()),
"ClusterDecisionResource": generators.NewDuckTypeGenerator(ctx, fakeDynClient, appClientset, "argocd"),
"PullRequest": generators.NewPullRequestGenerator(k8sClient),
}
nestedGenerators := map[string]generators.Generator{
"List": terminalGenerators["List"],
"Clusters": terminalGenerators["Clusters"],
"Git": terminalGenerators["Git"],
"SCMProvider": terminalGenerators["SCMProvider"],
"ClusterDecisionResource": terminalGenerators["ClusterDecisionResource"],
"PullRequest": terminalGenerators["PullRequest"],
"Matrix": generators.NewMatrixGenerator(terminalGenerators),
"Merge": generators.NewMergeGenerator(terminalGenerators),
}
topLevelGenerators := map[string]generators.Generator{
"List": terminalGenerators["List"],
"Clusters": terminalGenerators["Clusters"],
"Git": terminalGenerators["Git"],
"SCMProvider": terminalGenerators["SCMProvider"],
"ClusterDecisionResource": terminalGenerators["ClusterDecisionResource"],
"PullRequest": terminalGenerators["PullRequest"],
"Matrix": generators.NewMatrixGenerator(nestedGenerators),
"Merge": generators.NewMergeGenerator(nestedGenerators),
}
client := fake.NewClientBuilder().WithScheme(scheme).Build()
r := ApplicationSetReconciler{
Client: client,
Scheme: scheme,
Recorder: record.NewFakeRecorder(0),
Generators: topLevelGenerators,
}
type args struct {
appset *argoappsetv1alpha1.ApplicationSet
}
tests := []struct {
name string
args args
want time.Duration
wantErr assert.ErrorAssertionFunc
}{
{name: "Cluster", args: args{appset: &argoappsetv1alpha1.ApplicationSet{
Spec: argoappsetv1alpha1.ApplicationSetSpec{
Generators: []argoappsetv1alpha1.ApplicationSetGenerator{{Clusters: &argoappsetv1alpha1.ClusterGenerator{}}},
},
}}, want: generators.NoRequeueAfter, wantErr: assert.NoError},
{name: "ClusterMergeNested", args: args{&argoappsetv1alpha1.ApplicationSet{
Spec: argoappsetv1alpha1.ApplicationSetSpec{
Generators: []argoappsetv1alpha1.ApplicationSetGenerator{
{Clusters: &argoappsetv1alpha1.ClusterGenerator{}},
{Merge: &argoappsetv1alpha1.MergeGenerator{
Generators: []argoappsetv1alpha1.ApplicationSetNestedGenerator{
{
Clusters: &argoappsetv1alpha1.ClusterGenerator{},
Git: &argoappsetv1alpha1.GitGenerator{},
},
},
}},
},
},
}}, want: generators.DefaultRequeueAfterSeconds, wantErr: assert.NoError},
{name: "ClusterMatrixNested", args: args{&argoappsetv1alpha1.ApplicationSet{
Spec: argoappsetv1alpha1.ApplicationSetSpec{
Generators: []argoappsetv1alpha1.ApplicationSetGenerator{
{Clusters: &argoappsetv1alpha1.ClusterGenerator{}},
{Matrix: &argoappsetv1alpha1.MatrixGenerator{
Generators: []argoappsetv1alpha1.ApplicationSetNestedGenerator{
{
Clusters: &argoappsetv1alpha1.ClusterGenerator{},
Git: &argoappsetv1alpha1.GitGenerator{},
},
},
}},
},
},
}}, want: generators.DefaultRequeueAfterSeconds, wantErr: assert.NoError},
{name: "ListGenerator", args: args{appset: &argoappsetv1alpha1.ApplicationSet{
Spec: argoappsetv1alpha1.ApplicationSetSpec{
Generators: []argoappsetv1alpha1.ApplicationSetGenerator{{List: &argoappsetv1alpha1.ListGenerator{}}},
},
}}, want: generators.NoRequeueAfter, wantErr: assert.NoError},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert.Equalf(t, tt.want, r.getMinRequeueAfter(tt.args.appset), "getMinRequeueAfter(%v)", tt.args.appset)
})
}
}
type argoCDServiceMock struct {
mock *mock.Mock
}
func (a argoCDServiceMock) GetApps(ctx context.Context, repoURL string, revision string) ([]string, error) {
args := a.mock.Called(ctx, repoURL, revision)
return args.Get(0).([]string), args.Error(1)
}
func (a argoCDServiceMock) GetFiles(ctx context.Context, repoURL string, revision string, pattern string) (map[string][]byte, error) {
args := a.mock.Called(ctx, repoURL, revision, pattern)
return args.Get(0).(map[string][]byte), args.Error(1)
}
func (a argoCDServiceMock) GetFileContent(ctx context.Context, repoURL string, revision string, path string) ([]byte, error) {
args := a.mock.Called(ctx, repoURL, revision, path)
return args.Get(0).([]byte), args.Error(1)
}
func (a argoCDServiceMock) GetDirectories(ctx context.Context, repoURL string, revision string) ([]string, error) {
args := a.mock.Called(ctx, repoURL, revision)
return args.Get(0).([]string), args.Error(1)
}

View File

@@ -0,0 +1,19 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- clusters: {}
template:
metadata:
name: '{{name}}-guestbook'
spec:
project: "default"
source:
repoURL: https://github.com/argoproj/argocd-example-apps/
targetRevision: HEAD
path: guestbook
destination:
server: '{{server}}'
namespace: guestbook

View File

@@ -3,11 +3,12 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- clusters: {}
template:
metadata:
name: '{{name}}-guestbook'
name: '{{.name}}-guestbook'
spec:
project: "default"
source:
@@ -15,5 +16,5 @@ spec:
targetRevision: HEAD
path: guestbook
destination:
server: '{{server}}'
server: '{{.server}}'
namespace: guestbook

View File

@@ -0,0 +1,27 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: book-import
spec:
generators:
- clusterDecisionResource:
configMapRef: ocm-placement
name: test-placement
requeueAfterSeconds: 30
template:
metadata:
name: '{{clusterName}}-book-import'
spec:
project: "default"
source:
repoURL: https://github.com/open-cluster-management/application-samples.git
targetRevision: HEAD
path: book-import
destination:
name: '{{clusterName}}'
namespace: bookimport
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: book-import
spec:
goTemplate: true
generators:
- clusterDecisionResource:
configMapRef: ocm-placement
@@ -10,7 +11,7 @@ spec:
requeueAfterSeconds: 30
template:
metadata:
name: '{{clusterName}}-book-import'
name: '{{.clusterName}}-book-import'
spec:
project: "default"
source:
@@ -18,7 +19,7 @@ spec:
targetRevision: HEAD
path: book-import
destination:
name: '{{clusterName}}'
name: '{{.clusterName}}'
namespace: bookimport
syncPolicy:
automated:

View File

@@ -0,0 +1,22 @@
# This is an example of a typical ApplicationSet which uses the cluster generator.
# An ApplicationSet is comprised with two stanzas:
# - spec.generator - producer of a list of values supplied as arguments to an app template
# - spec.template - an application template, which has been parameterized
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- clusters: {}
template:
metadata:
name: '{{name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
chart: guestbook
destination:
server: '{{server}}'
namespace: guestbook

View File

@@ -7,16 +7,17 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- clusters: {}
template:
metadata:
name: '{{name}}-guestbook'
name: '{{.name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
chart: guestbook
destination:
server: '{{server}}'
server: '{{.server}}'
namespace: guestbook

View File

@@ -19,15 +19,15 @@ spec:
project: default
template:
metadata:
name: '{{name}}-guestbook'
name: '{{.name}}-guestbook'
labels:
environment: '{{metadata.labels.environment}}'
environment: '{{.metadata.labels.environment}}'
spec:
project: '{{values.project}}'
project: '{{.values.project}}'
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
chart: guestbook
destination:
server: '{{server}}'
server: '{{.server}}'
namespace: guestbook

View File

@@ -0,0 +1,44 @@
# This example demonstrates the git directory generator, which produces an items list
# based on discovery of directories in a git repo matching a specified pattern.
# Git generators automatically provide {{path}} and {{path.basename}} as available
# variables to the app template.
#
# Suppose the following git directory structure (note the use of different config tools):
#
# cluster-deployments
# └── add-ons
# ├── argo-rollouts
# │   ├── all.yaml
# │   └── kustomization.yaml
# ├── argo-workflows
# │   └── install.yaml
# ├── grafana
# │   ├── Chart.yaml
# │   └── values.yaml
# └── prometheus-operator
# ├── Chart.yaml
# └── values.yaml
#
# The following ApplicationSet would produce four applications (in different namespaces),
# using the directory basename as both the namespace and application name.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
spec:
generators:
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
directories:
- path: add-ons/*
template:
metadata:
name: '{{path.basename}}'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: http://kubernetes.default.svc
namespace: '{{path.basename}}'

View File

@@ -26,6 +26,7 @@ kind: ApplicationSet
metadata:
name: cluster-addons
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
@@ -33,12 +34,12 @@ spec:
- path: add-ons/*
template:
metadata:
name: '{{path.basename}}'
name: '{{.path.basename}}'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path.path}}'
destination:
server: http://kubernetes.default.svc
namespace: '{{path.basename}}'
namespace: '{{.path.basename}}'

View File

@@ -0,0 +1,55 @@
# This example demonstrates a git file generator which traverses the directory structure of a git
# repository to discover items based on a filename convention. For each file discovered, the
# contents of the discovered files themselves, act as the set of inputs to the app template.
#
# Suppose the following git directory structure:
#
# cluster-deployments
# ├── apps
# │ └── guestbook
# │ └── install.yaml
# └── cluster-config
# ├── engineering
# │ ├── dev
# │ │ └── config.json
# │ └── prod
# │ └── config.json
# └── finance
# ├── dev
# │ └── config.json
# └── prod
# └── config.json
#
# The discovered files (e.g. config.json) files can be any structured data supplied to the
# generated application. e.g.:
# {
# "aws_account": "123456",
# "asset_id": "11223344"
# "cluster": {
# "owner": "Jesse_Suen@intuit.com",
# "name": "engineering-dev",
# "address": "http://1.2.3.4"
# }
# }
#
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
files:
- path: "**/config.json"
template:
metadata:
name: '{{cluster.name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: apps/guestbook
destination:
server: '{{cluster.address}}'
namespace: guestbook

View File

@@ -37,6 +37,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
@@ -44,12 +45,12 @@ spec:
- path: "**/config.json"
template:
metadata:
name: '{{cluster.name}}-guestbook'
name: '{{.cluster.name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: apps/guestbook
destination:
server: '{{cluster.address}}'
server: '{{.cluster.address}}'
namespace: guestbook

View File

@@ -0,0 +1,68 @@
# This example demonstrates a git file generator which produces its items based on one or
# more files referenced in a git repo. The referenced files would contain a json/yaml list of
# arbitrary structured objects. Each item of the list would become a set of parameters to a
# generated application.
#
# Suppose the following git directory structure:
#
# cluster-deployments
# ├── apps
# │ └── guestbook
# │ ├── v1.0
# │ │ └── install.yaml
# │ └── v2.0
# │ └── install.yaml
# └── config
# └── clusters.json
#
# In this example, the `clusters.json` file is json list of structured data:
# [
# {
# "account": "123456",
# "asset_id": "11223344",
# "cluster": {
# "owner": "Jesse_Suen@intuit.com",
# "name": "engineering-dev",
# "address": "http://1.2.3.4"
# },
# "appVersions": {
# "prometheus-operator": "v0.38",
# "guestbook": "v2.0"
# }
# },
# {
# "account": "456789",
# "asset_id": "55667788",
# "cluster": {
# "owner": "Alexander_Matyushentsev@intuit.com",
# "name": "engineering-prod",
# "address": "http://2.4.6.8"
# },
# "appVersions": {
# "prometheus-operator": "v0.38",
# "guestbook": "v1.0"
# }
# }
# ]
#
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
files:
- path: config/clusters.json
template:
metadata:
name: '{{cluster.name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: apps/guestbook/{{appVersions.guestbook}}
destination:
server: http://kubernetes.default.svc
namespace: guestbook

View File

@@ -50,6 +50,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
@@ -57,12 +58,12 @@ spec:
- path: config/clusters.json
template:
metadata:
name: '{{cluster.name}}-guestbook'
name: '{{.cluster.name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: apps/guestbook/{{appVersions.guestbook}}
path: apps/guestbook/{{.appVersions.guestbook}}
destination:
server: http://kubernetes.default.svc
namespace: guestbook

View File

@@ -0,0 +1,33 @@
# The list generator specifies a literal list of argument values to the app spec template.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- list:
elements:
- cluster: engineering-dev
url: https://1.2.3.4
values:
project: dev
- cluster: engineering-prod
url: https://2.4.6.8
values:
project: prod
- cluster: finance-preprod
url: https://9.8.7.6
values:
project: preprod
template:
metadata:
name: '{{cluster}}-guestbook'
spec:
project: '{{values.project}}'
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: guestbook/{{cluster}}
destination:
server: '{{url}}'
namespace: guestbook

View File

@@ -4,6 +4,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- list:
elements:
@@ -21,13 +22,13 @@ spec:
project: preprod
template:
metadata:
name: '{{cluster}}-guestbook'
name: '{{.cluster}}-guestbook'
spec:
project: '{{values.project}}'
project: '{{.values.project}}'
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: guestbook/{{cluster}}
path: guestbook/{{.cluster}}
destination:
server: '{{url}}'
server: '{{.url}}'
namespace: guestbook

View File

@@ -0,0 +1,48 @@
# App templates can also be defined as part of the generator's template stanza. Sometimes it is
# useful to do this in order to override the spec.template stanza, and when simple string
# parameterization are insufficient. In the below examples, the generators[].XXX.template is
# a partial definition, which overrides/patch the default template.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- list:
elements:
- cluster: engineering-dev
url: https://1.2.3.4
template:
metadata: {}
spec:
project: "project"
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
path: '{{cluster}}-override'
destination: {}
- list:
elements:
- cluster: engineering-prod
url: https://1.2.3.4
template:
metadata: {}
spec:
project: "project2"
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
path: '{{cluster}}-override2'
destination: {}
template:
metadata:
name: '{{cluster}}-guestbook'
spec:
project: "project"
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: guestbook/{{cluster}}
destination:
server: '{{url}}'
namespace: guestbook

View File

@@ -7,6 +7,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- list:
elements:
@@ -18,7 +19,7 @@ spec:
project: "project"
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
path: '{{cluster}}-override'
path: '{{.cluster}}-override'
destination: {}
- list:
@@ -31,18 +32,18 @@ spec:
project: "project2"
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
path: '{{cluster}}-override2'
path: '{{.cluster}}-override2'
destination: {}
template:
metadata:
name: '{{cluster}}-guestbook'
name: '{{.cluster}}-guestbook'
spec:
project: "project"
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
path: guestbook/{{cluster}}
path: guestbook/{{.cluster}}
destination:
server: '{{url}}'
server: '{{.url}}'
namespace: guestbook

View File

@@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
revision: HEAD
directories:
- path: applicationset/examples/git-generator-directory/excludes/cluster-addons/*
- exclude: true
path: applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook
template:
metadata:
name: '{{path.basename}}'
spec:
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -4,6 +4,7 @@ metadata:
name: cluster-addons
namespace: argocd
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
@@ -14,16 +15,16 @@ spec:
path: applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook
template:
metadata:
name: '{{path.basename}}'
name: '{{.path.basename}}'
spec:
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path}}'
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
namespace: '{{.path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -0,0 +1,27 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
revision: HEAD
directories:
- path: applicationset/examples/git-generator-directory/cluster-addons/*
template:
metadata:
name: '{{path.basename}}'
spec:
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -4,6 +4,7 @@ metadata:
name: cluster-addons
namespace: argocd
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
@@ -12,16 +13,16 @@ spec:
- path: applicationset/examples/git-generator-directory/cluster-addons/*
template:
metadata:
name: '{{path.basename}}'
name: '{{.path.basename}}'
spec:
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path.path}}'
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
namespace: '{{.path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
revision: HEAD
files:
- path: "applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json"
template:
metadata:
name: '{{cluster.name}}-guestbook'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: "applicationset/examples/git-generator-files-discovery/apps/guestbook"
destination:
server: https://kubernetes.default.svc
#server: '{{cluster.address}}'
namespace: guestbook

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
@@ -11,7 +12,7 @@ spec:
- path: "applicationset/examples/git-generator-files-discovery/cluster-config/**/config.json"
template:
metadata:
name: '{{cluster.name}}-guestbook'
name: '{{.cluster.name}}-guestbook'
spec:
project: default
source:
@@ -20,5 +21,5 @@ spec:
path: "applicationset/examples/git-generator-files-discovery/apps/guestbook"
destination:
server: https://kubernetes.default.svc
#server: '{{cluster.address}}'
#server: '{{.cluster.address}}'
namespace: guestbook

View File

@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- list:
elements:
- cluster: engineering-dev
url: https://kubernetes.default.svc
- cluster: engineering-prod
url: https://kubernetes.default.svc
template:
metadata:
name: '{{cluster}}-guestbook'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: applicationset/examples/list-generator/guestbook/{{cluster}}
destination:
server: '{{url}}'
namespace: guestbook

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- list:
elements:
@@ -12,13 +13,13 @@ spec:
url: https://kubernetes.default.svc
template:
metadata:
name: '{{cluster}}-guestbook'
name: '{{.cluster}}-guestbook'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: applicationset/examples/list-generator/guestbook/{{cluster}}
path: applicationset/examples/list-generator/guestbook/{{.cluster}}
destination:
server: '{{url}}'
server: '{{.url}}'
namespace: guestbook

View File

@@ -0,0 +1,33 @@
# This example demonstrates the combining of the git generator with a cluster generator
# The expected output would be an application per git directory and a cluster (application_count = git directory * clusters)
#
#
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-git
spec:
generators:
- matrix:
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
revision: HEAD
directories:
- path: applicationset/examples/matrix/cluster-addons/*
- clusters:
selector:
matchLabels:
argocd.argoproj.io/secret-type: cluster
template:
metadata:
name: '{{path.basename}}-{{name}}'
spec:
project: '{{metadata.labels.environment}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: '{{server}}'
namespace: '{{path.basename}}'

View File

@@ -7,6 +7,7 @@ kind: ApplicationSet
metadata:
name: cluster-git
spec:
goTemplate: true
generators:
- matrix:
generators:
@@ -21,13 +22,13 @@ spec:
argocd.argoproj.io/secret-type: cluster
template:
metadata:
name: '{{path.basename}}-{{name}}'
name: '{{.path.basename}}-{{.name}}'
spec:
project: '{{metadata.labels.environment}}'
project: '{{.metadata.labels.environment}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path.path}}'
destination:
server: '{{server}}'
namespace: '{{path.basename}}'
server: '{{.server}}'
namespace: '{{.path.basename}}'

View File

@@ -0,0 +1,39 @@
# This example demonstrates the combining of the git generator with a list generator
# The expected output would be an application per git directory and a list entry (application_count = git directory * list entries)
#
#
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: list-git
spec:
generators:
- matrix:
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
revision: HEAD
directories:
- path: applicationset/examples/matrix/cluster-addons/*
- list:
elements:
- cluster: engineering-dev
url: https://1.2.3.4
values:
project: dev
- cluster: engineering-prod
url: https://2.4.6.8
values:
project: prod
template:
metadata:
name: '{{path.basename}}-{{cluster}}'
spec:
project: '{{values.project}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: '{{url}}'
namespace: '{{path.basename}}'

View File

@@ -7,6 +7,7 @@ kind: ApplicationSet
metadata:
name: list-git
spec:
goTemplate: true
generators:
- matrix:
generators:
@@ -27,13 +28,13 @@ spec:
project: prod
template:
metadata:
name: '{{path.basename}}-{{cluster}}'
name: '{{.path.basename}}-{{.cluster}}'
spec:
project: '{{values.project}}'
project: '{{.values.project}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path.path}}'
destination:
server: '{{url}}'
namespace: '{{path.basename}}'
server: '{{.url}}'
namespace: '{{.path.basename}}'

View File

@@ -0,0 +1,37 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: list-and-list
namespace: argocd
spec:
generators:
- matrix:
generators:
- list:
elements:
- cluster: engineering-dev
url: https://kubernetes.default.svc
values:
project: default
- cluster: engineering-prod
url: https://kubernetes.default.svc
values:
project: default
- list:
elements:
- values:
suffix: '1'
- values:
suffix: '2'
template:
metadata:
name: '{{cluster}}-{{values.suffix}}'
spec:
project: '{{values.project}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: '{{url}}'
namespace: '{{path.basename}}'

View File

@@ -4,6 +4,7 @@ metadata:
name: list-and-list
namespace: argocd
spec:
goTemplate: true
generators:
- matrix:
generators:
@@ -25,13 +26,13 @@ spec:
suffix: '2'
template:
metadata:
name: '{{cluster}}-{{values.suffix}}'
name: '{{.cluster}}-{{.values.suffix}}'
spec:
project: '{{values.project}}'
project: '{{.values.project}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path.path}}'
destination:
server: '{{url}}'
namespace: '{{path.basename}}'
server: '{{.url}}'
namespace: '{{.path.basename}}'

View File

@@ -0,0 +1,67 @@
# The matrix generator can contain other combination-type generators (matrix and union). But nested matrix and union
# generators cannot contain further-nested matrix or union generators.
#
# The generators are evaluated from most-nested to least-nested. In this case:
# 1. The union generator joins two lists to make 3 parameter sets.
# 2. The inner matrix generator takes the cartesian product of the two lists to make 4 parameters sets.
# 3. The outer matrix generator takes the cartesian product of the 3 union and the 4 inner matrix parameter sets to
# make 3*4=12 final parameter sets.
# 4. The 12 final parameter sets are evaluated against the top-level template to generate 12 Applications.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: matrix-and-union-in-matrix
spec:
generators:
- matrix:
generators:
- union:
mergeKeys:
- cluster
generators:
- list:
elements:
- cluster: engineering-dev
url: https://kubernetes.default.svc
values:
project: default
- cluster: engineering-prod
url: https://kubernetes.default.svc
values:
project: default
- list:
elements:
- cluster: engineering-dev
url: https://kubernetes.default.svc
values:
project: default
- cluster: engineering-test
url: https://kubernetes.default.svc
values:
project: default
- matrix:
generators:
- list:
elements:
- values:
suffix: '1'
- values:
suffix: '2'
- list:
elements:
- values:
prefix: 'first'
- values:
prefix: 'second'
template:
metadata:
name: '{{values.prefix}}-{{cluster}}-{{values.suffix}}'
spec:
project: '{{values.project}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: '{{url}}'
namespace: '{{path.basename}}'

View File

@@ -12,6 +12,7 @@ kind: ApplicationSet
metadata:
name: matrix-and-union-in-matrix
spec:
goTemplate: true
generators:
- matrix:
generators:
@@ -55,13 +56,13 @@ spec:
prefix: 'second'
template:
metadata:
name: '{{values.prefix}}-{{cluster}}-{{values.suffix}}'
name: '{{.values.prefix}}-{{.cluster}}-{{.values.suffix}}'
spec:
project: '{{values.project}}'
project: '{{.values.project}}'
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
path: '{{.path.path}}'
destination:
server: '{{url}}'
namespace: '{{path.basename}}'
server: '{{.url}}'
namespace: '{{.path.basename}}'

View File

@@ -0,0 +1,44 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: merge-clusters-and-list
spec:
generators:
- merge:
mergeKeys:
- server
generators:
- clusters:
values:
kafka: 'true'
redis: 'false'
# For clusters with a specific label, enable Kafka.
- clusters:
selector:
matchLabels:
use-kafka: 'false'
values:
kafka: 'false'
# For a specific cluster, enable Redis.
- list:
elements:
- server: https://some-specific-cluster
values.redis: 'true'
template:
metadata:
name: '{{name}}'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps/
targetRevision: HEAD
path: helm-guestbook
helm:
parameters:
- name: kafka
value: '{{values.kafka}}'
- name: redis
value: '{{values.redis}}'
destination:
server: '{{server}}'
namespace: default

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: merge-clusters-and-list
spec:
goTemplate: true
generators:
- merge:
mergeKeys:
@@ -26,7 +27,7 @@ spec:
values.redis: 'true'
template:
metadata:
name: '{{name}}'
name: '{{.name}}'
spec:
project: default
source:
@@ -36,9 +37,9 @@ spec:
helm:
parameters:
- name: kafka
value: '{{values.kafka}}'
value: '{{.values.kafka}}'
- name: redis
value: '{{values.redis}}'
value: '{{.values.redis}}'
destination:
server: '{{server}}'
server: '{{.server}}'
namespace: default

View File

@@ -0,0 +1,43 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: merge-two-matrixes
spec:
generators:
- merge:
mergeKeys:
- server
- environment
generators:
- matrix:
generators:
- clusters:
values:
replicaCount: '2'
- list:
elements:
- environment: staging
namespace: guestbook-non-prod
- environment: prod
namespace: guestbook
- list:
elements:
- server: https://kubernetes.default.svc
environment: staging
values.replicaCount: '1'
template:
metadata:
name: '{{name}}-guestbook-{{environment}}'
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps/
targetRevision: HEAD
path: helm-guestbook
helm:
parameters:
- name: replicaCount
value: '{{values.replicaCount}}'
destination:
server: '{{server}}'
namespace: '{{namespace}}'

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: merge-two-matrixes
spec:
goTemplate: true
generators:
- merge:
mergeKeys:
@@ -27,7 +28,7 @@ spec:
values.replicaCount: '1'
template:
metadata:
name: '{{name}}-guestbook-{{environment}}'
name: '{{.name}}-guestbook-{{.environment}}'
spec:
project: default
source:
@@ -37,7 +38,7 @@ spec:
helm:
parameters:
- name: replicaCount
value: '{{values.replicaCount}}'
value: '{{.values.replicaCount}}'
destination:
server: '{{server}}'
namespace: '{{namespace}}'
server: '{{.server}}'
namespace: '{{.namespace}}'

View File

@@ -0,0 +1,40 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: myapp
spec:
generators:
- pullRequest:
github:
# The GitHub organization or user.
owner: myorg
# The Github repository
repo: myrepo
# For GitHub Enterprise. (optional)
api: https://git.example.com/
# Reference to a Secret containing an access token. (optional)
tokenRef:
secretName: github-token
key: token
# Labels is used to filter the PRs that you want to target. (optional)
labels:
- preview
template:
metadata:
name: 'myapp-{{ branch }}-{{ number }}'
spec:
source:
repoURL: 'https://github.com/myorg/myrepo.git'
targetRevision: '{{ head_sha }}'
path: helm-guestbook
helm:
parameters:
- name: "image.tag"
value: "pull-{{ head_sha }}"
project: default
destination:
server: https://kubernetes.default.svc
namespace: "{{ branch }}-{{ number }}"
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: myapp
spec:
goTemplate: true
generators:
- pullRequest:
github:
@@ -21,20 +22,22 @@ spec:
- preview
template:
metadata:
name: 'myapp-{{ branch }}-{{ number }}'
name: 'myapp-{{ .branch }}-{{ .number }}'
labels:
key1: '{{ index .labels 0 }}'
spec:
source:
repoURL: 'https://github.com/myorg/myrepo.git'
targetRevision: '{{ head_sha }}'
targetRevision: '{{ .head_sha }}'
path: helm-guestbook
helm:
parameters:
- name: "image.tag"
value: "pull-{{ head_sha }}"
value: "pull-{{ .head_sha }}"
project: default
destination:
server: https://kubernetes.default.svc
namespace: "{{ branch }}-{{ number }}"
namespace: "{{ .branch }}-{{ .number }}"
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- scmProvider:
github:
organization: argoproj
cloneProtocol: https
filters:
- repositoryMatch: example-apps
template:
metadata:
name: '{{ repository }}-guestbook'
spec:
project: "default"
source:
repoURL: '{{ url }}'
targetRevision: '{{ branch }}'
path: guestbook
destination:
server: https://kubernetes.default.svc
namespace: guestbook

View File

@@ -3,6 +3,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- scmProvider:
github:
@@ -12,12 +13,12 @@ spec:
- repositoryMatch: example-apps
template:
metadata:
name: '{{ repository }}-guestbook'
name: '{{ .repository }}-guestbook'
spec:
project: "default"
source:
repoURL: '{{ url }}'
targetRevision: '{{ branch }}'
repoURL: '{{ .url }}'
targetRevision: '{{ .branch }}'
path: guestbook
destination:
server: https://kubernetes.default.svc

View File

@@ -0,0 +1,36 @@
# App templates can also be defined as part of the generator's template stanza. Sometimes it is
# useful to do this in order to override the spec.template stanza, and when simple string
# parameterization are insufficient. In the below examples, the generators[].XXX.template is
# a partial definition, which overrides/patch the default template.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- list:
elements:
- cluster: engineering-dev
url: https://kubernetes.default.svc
template:
metadata: {}
spec:
project: "default"
source:
targetRevision: HEAD
repoURL: https://github.com/argoproj/argo-cd.git
path: 'applicationset/examples/template-override/{{cluster}}-override'
destination: {}
template:
metadata:
name: '{{cluster}}-guestbook'
spec:
project: "default"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: applicationset/examples/template-override/default
destination:
server: '{{url}}'
namespace: guestbook

View File

@@ -7,6 +7,7 @@ kind: ApplicationSet
metadata:
name: guestbook
spec:
goTemplate: true
generators:
- list:
elements:
@@ -19,12 +20,12 @@ spec:
source:
targetRevision: HEAD
repoURL: https://github.com/argoproj/argo-cd.git
path: 'applicationset/examples/template-override/{{cluster}}-override'
path: 'applicationset/examples/template-override/{{.cluster}}-override'
destination: {}
template:
metadata:
name: '{{cluster}}-guestbook'
name: '{{.cluster}}-guestbook'
spec:
project: "default"
source:
@@ -32,5 +33,5 @@ spec:
targetRevision: HEAD
path: applicationset/examples/template-override/default
destination:
server: '{{url}}'
server: '{{.url}}'
namespace: guestbook

View File

@@ -3,8 +3,6 @@ package generators
import (
"context"
"fmt"
"regexp"
"strings"
"time"
log "github.com/sirupsen/logrus"
@@ -17,7 +15,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoappsetv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoappsetv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
const (
@@ -37,6 +35,8 @@ type ClusterGenerator struct {
settingsManager *settings.SettingsManager
}
var render = &utils.Render{}
func NewClusterGenerator(c client.Client, ctx context.Context, clientset kubernetes.Interface, namespace string) Generator {
settingsManager := settings.NewSettingsManager(ctx, clientset, namespace)
@@ -51,8 +51,6 @@ func NewClusterGenerator(c client.Client, ctx context.Context, clientset kuberne
return g
}
// GetRequeueAfter never requeue the cluster generator because the `clusterSecretEventHandler` will requeue the appsets
// when the cluster secrets change
func (g *ClusterGenerator) GetRequeueAfter(appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator) time.Duration {
return NoRequeueAfter
}
@@ -62,7 +60,7 @@ func (g *ClusterGenerator) GetTemplate(appSetGenerator *argoappsetv1alpha1.Appli
}
func (g *ClusterGenerator) GenerateParams(
appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator, _ *argoappsetv1alpha1.ApplicationSet) ([]map[string]string, error) {
appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator, appSet *argoappsetv1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
@@ -91,7 +89,7 @@ func (g *ClusterGenerator) GenerateParams(
return nil, err
}
res := []map[string]string{}
res := []map[string]interface{}{}
secretsFound := []corev1.Secret{}
@@ -104,43 +102,102 @@ func (g *ClusterGenerator) GenerateParams(
} else if !ignoreLocalClusters {
// If there is no secret for the cluster, it's the local cluster, so handle it here.
params := map[string]string{}
params := map[string]interface{}{}
params["name"] = cluster.Name
params["nameNormalized"] = cluster.Name
params["server"] = cluster.Server
for key, value := range appSetGenerator.Clusters.Values {
params[fmt.Sprintf("values.%s", key)] = value
err = appendTemplatedValues(appSetGenerator.Clusters.Values, params, appSet)
if err != nil {
return nil, err
}
log.WithField("cluster", "local cluster").Info("matched local cluster")
res = append(res, params)
log.WithField("cluster", "local cluster").Info("matched local cluster")
}
}
// For each matching cluster secret (non-local clusters only)
for _, cluster := range secretsFound {
params := map[string]string{}
params := map[string]interface{}{}
params["name"] = string(cluster.Data["name"])
params["nameNormalized"] = sanitizeName(string(cluster.Data["name"]))
params["nameNormalized"] = utils.SanitizeName(string(cluster.Data["name"]))
params["server"] = string(cluster.Data["server"])
for key, value := range cluster.ObjectMeta.Annotations {
params[fmt.Sprintf("metadata.annotations.%s", key)] = value
if appSet.Spec.GoTemplate {
meta := map[string]interface{}{}
if len(cluster.ObjectMeta.Annotations) > 0 {
meta["annotations"] = cluster.ObjectMeta.Annotations
}
if len(cluster.ObjectMeta.Labels) > 0 {
meta["labels"] = cluster.ObjectMeta.Labels
}
params["metadata"] = meta
} else {
for key, value := range cluster.ObjectMeta.Annotations {
params[fmt.Sprintf("metadata.annotations.%s", key)] = value
}
for key, value := range cluster.ObjectMeta.Labels {
params[fmt.Sprintf("metadata.labels.%s", key)] = value
}
}
for key, value := range cluster.ObjectMeta.Labels {
params[fmt.Sprintf("metadata.labels.%s", key)] = value
err = appendTemplatedValues(appSetGenerator.Clusters.Values, params, appSet)
if err != nil {
return nil, err
}
for key, value := range appSetGenerator.Clusters.Values {
params[fmt.Sprintf("values.%s", key)] = value
}
log.WithField("cluster", cluster.Name).Info("matched cluster secret")
res = append(res, params)
log.WithField("cluster", cluster.Name).Info("matched cluster secret")
}
return res, nil
}
func appendTemplatedValues(clusterValues map[string]string, params map[string]interface{}, appSet *argoappsetv1alpha1.ApplicationSet) error {
// We create a local map to ensure that we do not fall victim to a billion-laughs attack. We iterate through the
// cluster values map and only replace values in said map if it has already been whitelisted in the params map.
// Once we iterate through all the cluster values we can then safely merge the `tmp` map into the main params map.
tmp := map[string]interface{}{}
for key, value := range clusterValues {
result, err := replaceTemplatedString(value, params, appSet)
if err != nil {
return fmt.Errorf("error replacing templated String: %w", err)
}
if appSet.Spec.GoTemplate {
if tmp["values"] == nil {
tmp["values"] = map[string]string{}
}
tmp["values"].(map[string]string)[key] = result
} else {
tmp[fmt.Sprintf("values.%s", key)] = result
}
}
for key, value := range tmp {
params[key] = value
}
return nil
}
func replaceTemplatedString(value string, params map[string]interface{}, appSet *argoappsetv1alpha1.ApplicationSet) (string, error) {
replacedTmplStr, err := render.Replace(value, params, appSet.Spec.GoTemplate)
if err != nil {
return "", err
}
return replacedTmplStr, nil
}
func (g *ClusterGenerator) getSecretsByClusterName(appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator) (map[string]corev1.Secret, error) {
// List all Clusters:
clusterSecretList := &corev1.SecretList{}
@@ -167,20 +224,3 @@ func (g *ClusterGenerator) getSecretsByClusterName(appSetGenerator *argoappsetv1
return res, nil
}
// sanitize the name in accordance with the below rules
// 1. contain no more than 253 characters
// 2. contain only lowercase alphanumeric characters, '-' or '.'
// 3. start and end with an alphanumeric character
func sanitizeName(name string) string {
invalidDNSNameChars := regexp.MustCompile("[^-a-z0-9.]")
maxDNSNameLength := 253
name = strings.ToLower(name)
name = invalidDNSNameChars.ReplaceAllString(name, "-")
if len(name) > maxDNSNameLength {
name = name[:maxDNSNameLength]
}
return strings.Trim(name, "-.")
}

View File

@@ -3,6 +3,7 @@ package generators
import (
"context"
"fmt"
"testing"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -10,11 +11,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"testing"
kubefake "k8s.io/client-go/kubernetes/fake"
argoappsetv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
)
@@ -86,7 +86,7 @@ func TestGenerateParams(t *testing.T) {
name string
selector metav1.LabelSelector
values map[string]string
expected []map[string]string
expected []map[string]interface{}
// clientError is true if a k8s client error should be simulated
clientError bool
expectedError error
@@ -94,15 +94,23 @@ func TestGenerateParams(t *testing.T) {
{
name: "no label selector",
selector: metav1.LabelSelector{},
values: nil,
expected: []map[string]string{
{"name": "production_01/west", "nameNormalized": "production-01-west", "server": "https://production-01.example.com", "metadata.labels.environment": "production", "metadata.labels.org": "bar",
values: map[string]string{
"lol1": "lol",
"lol2": "{{values.lol1}}{{values.lol1}}",
"lol3": "{{values.lol2}}{{values.lol2}}{{values.lol2}}",
"foo": "bar",
"bar": "{{ metadata.annotations.foo.argoproj.io }}",
"bat": "{{ metadata.labels.environment }}",
"aaa": "{{ server }}",
"no-op": "{{ this-does-not-exist }}",
}, expected: []map[string]interface{}{
{"values.lol1": "lol", "values.lol2": "{{values.lol1}}{{values.lol1}}", "values.lol3": "{{values.lol2}}{{values.lol2}}{{values.lol2}}", "values.foo": "bar", "values.bar": "production", "values.no-op": "{{ this-does-not-exist }}", "values.bat": "production", "values.aaa": "https://production-01.example.com", "name": "production_01/west", "nameNormalized": "production-01-west", "server": "https://production-01.example.com", "metadata.labels.environment": "production", "metadata.labels.org": "bar",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "production"},
{"name": "staging-01", "nameNormalized": "staging-01", "server": "https://staging-01.example.com", "metadata.labels.environment": "staging", "metadata.labels.org": "foo",
{"values.lol1": "lol", "values.lol2": "{{values.lol1}}{{values.lol1}}", "values.lol3": "{{values.lol2}}{{values.lol2}}{{values.lol2}}", "values.foo": "bar", "values.bar": "staging", "values.no-op": "{{ this-does-not-exist }}", "values.bat": "staging", "values.aaa": "https://staging-01.example.com", "name": "staging-01", "nameNormalized": "staging-01", "server": "https://staging-01.example.com", "metadata.labels.environment": "staging", "metadata.labels.org": "foo",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "staging"},
{"name": "in-cluster", "server": "https://kubernetes.default.svc"},
{"values.lol1": "lol", "values.lol2": "{{values.lol1}}{{values.lol1}}", "values.lol3": "{{values.lol2}}{{values.lol2}}{{values.lol2}}", "values.foo": "bar", "values.bar": "{{ metadata.annotations.foo.argoproj.io }}", "values.no-op": "{{ this-does-not-exist }}", "values.bat": "{{ metadata.labels.environment }}", "values.aaa": "https://kubernetes.default.svc", "nameNormalized": "in-cluster", "name": "in-cluster", "server": "https://kubernetes.default.svc"},
},
clientError: false,
expectedError: nil,
@@ -115,7 +123,7 @@ func TestGenerateParams(t *testing.T) {
},
},
values: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"name": "production_01/west", "nameNormalized": "production-01-west", "server": "https://production-01.example.com", "metadata.labels.environment": "production", "metadata.labels.org": "bar",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "production"},
@@ -135,7 +143,7 @@ func TestGenerateParams(t *testing.T) {
values: map[string]string{
"foo": "bar",
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"values.foo": "bar", "name": "production_01/west", "nameNormalized": "production-01-west", "server": "https://production-01.example.com", "metadata.labels.environment": "production", "metadata.labels.org": "bar",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "production"},
},
@@ -159,7 +167,7 @@ func TestGenerateParams(t *testing.T) {
values: map[string]string{
"foo": "bar",
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"values.foo": "bar", "name": "staging-01", "nameNormalized": "staging-01", "server": "https://staging-01.example.com", "metadata.labels.environment": "staging", "metadata.labels.org": "foo",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "staging"},
{"values.foo": "bar", "name": "production_01/west", "nameNormalized": "production-01-west", "server": "https://production-01.example.com", "metadata.labels.environment": "production", "metadata.labels.org": "bar",
@@ -188,7 +196,7 @@ func TestGenerateParams(t *testing.T) {
values: map[string]string{
"name": "baz",
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"values.name": "baz", "name": "staging-01", "nameNormalized": "staging-01", "server": "https://staging-01.example.com", "metadata.labels.environment": "staging", "metadata.labels.org": "foo",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "staging"},
},
@@ -225,12 +233,395 @@ func TestGenerateParams(t *testing.T) {
var clusterGenerator = NewClusterGenerator(cl, context.Background(), appClientset, "namespace")
got, err := clusterGenerator.GenerateParams(&argoappsetv1alpha1.ApplicationSetGenerator{
Clusters: &argoappsetv1alpha1.ClusterGenerator{
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{},
}
got, err := clusterGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
Clusters: &argoprojiov1alpha1.ClusterGenerator{
Selector: testCase.selector,
Values: testCase.values,
},
}, nil)
}, &applicationSetInfo)
if testCase.expectedError != nil {
assert.EqualError(t, err, testCase.expectedError.Error())
} else {
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
})
}
}
func TestGenerateParamsGoTemplate(t *testing.T) {
clusters := []client.Object{
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "staging-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
Annotations: map[string]string{
"foo.argoproj.io": "staging",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("staging-01"),
"server": []byte("https://staging-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "production-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
Annotations: map[string]string{
"foo.argoproj.io": "production",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("production_01/west"),
"server": []byte("https://production-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
}
testCases := []struct {
name string
selector metav1.LabelSelector
values map[string]string
expected []map[string]interface{}
// clientError is true if a k8s client error should be simulated
clientError bool
expectedError error
}{
{
name: "no label selector",
selector: metav1.LabelSelector{},
values: map[string]string{
"lol1": "lol",
"lol2": "{{ .values.lol1 }}{{ .values.lol1 }}",
"lol3": "{{ .values.lol2 }}{{ .values.lol2 }}{{ .values.lol2 }}",
"foo": "bar",
"bar": "{{ if not (empty .metadata) }}{{index .metadata.annotations \"foo.argoproj.io\" }}{{ end }}",
"bat": "{{ if not (empty .metadata) }}{{.metadata.labels.environment}}{{ end }}",
"aaa": "{{ .server }}",
"no-op": "{{ .thisDoesNotExist }}",
}, expected: []map[string]interface{}{
{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
"values": map[string]string{
"lol1": "lol",
"lol2": "<no value><no value>",
"lol3": "<no value><no value><no value>",
"foo": "bar",
"bar": "production",
"bat": "production",
"aaa": "https://production-01.example.com",
"no-op": "<no value>",
},
},
{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
"values": map[string]string{
"lol1": "lol",
"lol2": "<no value><no value>",
"lol3": "<no value><no value><no value>",
"foo": "bar",
"bar": "staging",
"bat": "staging",
"aaa": "https://staging-01.example.com",
"no-op": "<no value>",
},
},
{
"nameNormalized": "in-cluster",
"name": "in-cluster",
"server": "https://kubernetes.default.svc",
"values": map[string]string{
"lol1": "lol",
"lol2": "<no value><no value>",
"lol3": "<no value><no value><no value>",
"foo": "bar",
"bar": "",
"bat": "",
"aaa": "https://kubernetes.default.svc",
"no-op": "<no value>",
},
},
},
clientError: false,
expectedError: nil,
},
{
name: "secret type label selector",
selector: metav1.LabelSelector{
MatchLabels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
},
},
values: nil,
expected: []map[string]interface{}{
{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
},
{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
},
},
clientError: false,
expectedError: nil,
},
{
name: "production-only",
selector: metav1.LabelSelector{
MatchLabels: map[string]string{
"environment": "production",
},
},
values: map[string]string{
"foo": "bar",
},
expected: []map[string]interface{}{
{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
"values": map[string]string{
"foo": "bar",
},
},
},
clientError: false,
expectedError: nil,
},
{
name: "production or staging",
selector: metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: "environment",
Operator: "In",
Values: []string{
"production",
"staging",
},
},
},
},
values: map[string]string{
"foo": "bar",
},
expected: []map[string]interface{}{
{
"name": "production_01/west",
"nameNormalized": "production-01-west",
"server": "https://production-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
"annotations": map[string]string{
"foo.argoproj.io": "production",
},
},
"values": map[string]string{
"foo": "bar",
},
},
{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
"values": map[string]string{
"foo": "bar",
},
},
},
clientError: false,
expectedError: nil,
},
{
name: "production or staging with match labels",
selector: metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: "environment",
Operator: "In",
Values: []string{
"production",
"staging",
},
},
},
MatchLabels: map[string]string{
"org": "foo",
},
},
values: map[string]string{
"name": "baz",
},
expected: []map[string]interface{}{
{
"name": "staging-01",
"nameNormalized": "staging-01",
"server": "https://staging-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
"annotations": map[string]string{
"foo.argoproj.io": "staging",
},
},
"values": map[string]string{
"name": "baz",
},
},
},
clientError: false,
expectedError: nil,
},
{
name: "simulate client error",
selector: metav1.LabelSelector{},
values: nil,
expected: nil,
clientError: true,
expectedError: fmt.Errorf("could not list Secrets"),
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
var clusterGenerator = NewClusterGenerator(cl, context.Background(), appClientset, "namespace")
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}
got, err := clusterGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
Clusters: &argoprojiov1alpha1.ClusterGenerator{
Selector: testCase.selector,
Values: testCase.values,
},
}, &applicationSetInfo)
if testCase.expectedError != nil {
assert.EqualError(t, err, testCase.expectedError.Error())
@@ -245,10 +636,10 @@ func TestGenerateParams(t *testing.T) {
func TestSanitizeClusterName(t *testing.T) {
t.Run("valid DNS-1123 subdomain name", func(t *testing.T) {
assert.Equal(t, "cluster-name", sanitizeName("cluster-name"))
assert.Equal(t, "cluster-name", utils.SanitizeName("cluster-name"))
})
t.Run("invalid DNS-1123 subdomain name", func(t *testing.T) {
invalidName := "-.--CLUSTER/name -./.-"
assert.Equal(t, "cluster-name", sanitizeName(invalidName))
assert.Equal(t, "cluster-name", utils.SanitizeName(invalidName))
})
}

View File

@@ -17,7 +17,7 @@ import (
"k8s.io/client-go/kubernetes"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*DuckTypeGenerator)(nil)
@@ -60,7 +60,7 @@ func (g *DuckTypeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.Appl
return &appSetGenerator.ClusterDecisionResource.Template
}
func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
@@ -152,7 +152,7 @@ func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.A
}
res := []map[string]string{}
res := []map[string]interface{}{}
clusterDecisions := []interface{}{}
// Build the decision slice
@@ -178,7 +178,7 @@ func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.A
for _, cluster := range clusterDecisions {
// generated instance of cluster params
params := map[string]string{}
params := map[string]interface{}{}
log.Infof("cluster: %v", cluster)
matchValue := cluster.(map[string]interface{})[matchKey]
@@ -215,7 +215,14 @@ func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.A
}
for key, value := range appSetGenerator.ClusterDecisionResource.Values {
params[fmt.Sprintf("values.%s", key)] = value
if appSet.Spec.GoTemplate {
if params["values"] == nil {
params["values"] = map[string]string{}
}
params["values"].(map[string]string)[key] = value
} else {
params[fmt.Sprintf("values.%s", key)] = value
}
}
res = append(res, params)

View File

@@ -14,7 +14,7 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/controller-runtime/pkg/client"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"testing"
)
@@ -149,7 +149,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
labelSelector metav1.LabelSelector
resource *unstructured.Unstructured
values map[string]string
expected []map[string]string
expected []map[string]interface{}
expectedError error
}{
{
@@ -157,7 +157,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
resourceName: "",
resource: duckType,
values: nil,
expected: []map[string]string{},
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("There is a problem with the definition of the ClusterDecisionResource generator"),
},
/*** This does not work with the FAKE runtime client, fieldSelectors are broken.
@@ -175,7 +175,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
resourceName: resourceName,
resource: duckType,
values: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"clusterName": "production-01", "name": "production-01", "server": "https://production-01.example.com"},
{"clusterName": "staging-01", "name": "staging-01", "server": "https://staging-01.example.com"},
@@ -189,7 +189,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
values: map[string]string{
"foo": "bar",
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"clusterName": "production-01", "values.foo": "bar", "name": "production-01", "server": "https://production-01.example.com"},
},
expectedError: nil,
@@ -217,7 +217,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
labelSelector: metav1.LabelSelector{MatchLabels: map[string]string{"duck": "all-species"}},
resource: duckType,
values: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"clusterName": "production-01", "name": "production-01", "server": "https://production-01.example.com"},
{"clusterName": "staging-01", "name": "staging-01", "server": "https://staging-01.example.com"},
@@ -232,7 +232,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
values: map[string]string{
"foo": "bar",
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"clusterName": "production-01", "values.foo": "bar", "name": "production-01", "server": "https://production-01.example.com"},
},
expectedError: nil,
@@ -249,7 +249,7 @@ func TestGenerateParamsForDuckType(t *testing.T) {
}},
resource: duckType,
values: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"clusterName": "production-01", "name": "production-01", "server": "https://production-01.example.com"},
{"clusterName": "staging-01", "name": "staging-01", "server": "https://staging-01.example.com"},
@@ -295,6 +295,13 @@ func TestGenerateParamsForDuckType(t *testing.T) {
var duckTypeGenerator = NewDuckTypeGenerator(context.Background(), fakeDynClient, appClientset, "namespace")
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{},
}
got, err := duckTypeGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
ClusterDecisionResource: &argoprojiov1alpha1.DuckTypeGenerator{
ConfigMapRef: "my-configmap",
@@ -302,7 +309,307 @@ func TestGenerateParamsForDuckType(t *testing.T) {
LabelSelector: testCase.labelSelector,
Values: testCase.values,
},
}, nil)
}, &applicationSetInfo)
if testCase.expectedError != nil {
assert.EqualError(t, err, testCase.expectedError.Error())
} else {
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
})
}
}
func TestGenerateParamsForDuckTypeGoTemplate(t *testing.T) {
clusters := []client.Object{
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "staging-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
Annotations: map[string]string{
"foo.argoproj.io": "staging",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("staging-01"),
"server": []byte("https://staging-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "production-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
Annotations: map[string]string{
"foo.argoproj.io": "production",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("production-01"),
"server": []byte("https://production-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
}
duckType := &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": resourceApiVersion,
"kind": "Duck",
"metadata": map[string]interface{}{
"name": resourceName,
"namespace": "namespace",
"labels": map[string]interface{}{"duck": "all-species"},
},
"status": map[string]interface{}{
"decisions": []interface{}{
map[string]interface{}{
"clusterName": "staging-01",
},
map[string]interface{}{
"clusterName": "production-01",
},
},
},
},
}
duckTypeProdOnly := &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": resourceApiVersion,
"kind": "Duck",
"metadata": map[string]interface{}{
"name": resourceName,
"namespace": "namespace",
"labels": map[string]interface{}{"duck": "spotted"},
},
"status": map[string]interface{}{
"decisions": []interface{}{
map[string]interface{}{
"clusterName": "production-01",
},
},
},
},
}
duckTypeEmpty := &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": resourceApiVersion,
"kind": "Duck",
"metadata": map[string]interface{}{
"name": resourceName,
"namespace": "namespace",
"labels": map[string]interface{}{"duck": "canvasback"},
},
"status": map[string]interface{}{},
},
}
configMap := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "my-configmap",
Namespace: "namespace",
},
Data: map[string]string{
"apiVersion": resourceApiVersion,
"kind": resourceKind,
"statusListKey": "decisions",
"matchKey": "clusterName",
},
}
testCases := []struct {
name string
configMapRef string
resourceName string
labelSelector metav1.LabelSelector
resource *unstructured.Unstructured
values map[string]string
expected []map[string]interface{}
expectedError error
}{
{
name: "no duck resource",
resourceName: "",
resource: duckType,
values: nil,
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("There is a problem with the definition of the ClusterDecisionResource generator"),
},
/*** This does not work with the FAKE runtime client, fieldSelectors are broken.
{
name: "invalid name for duck resource",
resourceName: resourceName + "-different",
resource: duckType,
values: nil,
expected: []map[string]string{},
expectedError: fmt.Errorf("duck.mallard.io \"quak\" not found"),
},
***/
{
name: "duck type generator resourceName",
resourceName: resourceName,
resource: duckType,
values: nil,
expected: []map[string]interface{}{
{"clusterName": "production-01", "name": "production-01", "server": "https://production-01.example.com"},
{"clusterName": "staging-01", "name": "staging-01", "server": "https://staging-01.example.com"},
},
expectedError: nil,
},
{
name: "production-only",
resourceName: resourceName,
resource: duckTypeProdOnly,
values: map[string]string{
"foo": "bar",
},
expected: []map[string]interface{}{
{"clusterName": "production-01", "values": map[string]string{"foo": "bar"}, "name": "production-01", "server": "https://production-01.example.com"},
},
expectedError: nil,
},
{
name: "duck type empty status",
resourceName: resourceName,
resource: duckTypeEmpty,
values: nil,
expected: nil,
expectedError: nil,
},
{
name: "duck type empty status labelSelector.matchLabels",
resourceName: "",
labelSelector: metav1.LabelSelector{MatchLabels: map[string]string{"duck": "canvasback"}},
resource: duckTypeEmpty,
values: nil,
expected: nil,
expectedError: nil,
},
{
name: "duck type generator labelSelector.matchLabels",
resourceName: "",
labelSelector: metav1.LabelSelector{MatchLabels: map[string]string{"duck": "all-species"}},
resource: duckType,
values: nil,
expected: []map[string]interface{}{
{"clusterName": "production-01", "name": "production-01", "server": "https://production-01.example.com"},
{"clusterName": "staging-01", "name": "staging-01", "server": "https://staging-01.example.com"},
},
expectedError: nil,
},
{
name: "production-only labelSelector.matchLabels",
resourceName: "",
resource: duckTypeProdOnly,
labelSelector: metav1.LabelSelector{MatchLabels: map[string]string{"duck": "spotted"}},
values: map[string]string{
"foo": "bar",
},
expected: []map[string]interface{}{
{"clusterName": "production-01", "values": map[string]string{"foo": "bar"}, "name": "production-01", "server": "https://production-01.example.com"},
},
expectedError: nil,
},
{
name: "duck type generator labelSelector.matchExpressions",
resourceName: "",
labelSelector: metav1.LabelSelector{MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: "duck",
Operator: "In",
Values: []string{"all-species", "marbled"},
},
}},
resource: duckType,
values: nil,
expected: []map[string]interface{}{
{"clusterName": "production-01", "name": "production-01", "server": "https://production-01.example.com"},
{"clusterName": "staging-01", "name": "staging-01", "server": "https://staging-01.example.com"},
},
expectedError: nil,
},
{
name: "duck type generator resourceName and labelSelector.matchExpressions",
resourceName: resourceName,
labelSelector: metav1.LabelSelector{MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: "duck",
Operator: "In",
Values: []string{"all-species", "marbled"},
},
}},
resource: duckType,
values: nil,
expected: nil,
expectedError: fmt.Errorf("There is a problem with the definition of the ClusterDecisionResource generator"),
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
appClientset := kubefake.NewSimpleClientset(append(runtimeClusters, configMap)...)
gvrToListKind := map[schema.GroupVersionResource]string{{
Group: "mallard.io",
Version: "v1",
Resource: "ducks",
}: "DuckList"}
fakeDynClient := dynfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), gvrToListKind, testCase.resource)
var duckTypeGenerator = NewDuckTypeGenerator(context.Background(), fakeDynClient, appClientset, "namespace")
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}
got, err := duckTypeGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
ClusterDecisionResource: &argoprojiov1alpha1.DuckTypeGenerator{
ConfigMapRef: "my-configmap",
Name: testCase.resourceName,
LabelSelector: testCase.labelSelector,
Values: testCase.values,
},
}, &applicationSetInfo)
if testCase.expectedError != nil {
assert.EqualError(t, err, testCase.expectedError.Error())

View File

@@ -1,23 +1,40 @@
package generators
import (
"fmt"
"encoding/json"
"reflect"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/imdario/mergo"
log "github.com/sirupsen/logrus"
)
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
const (
selectorKey = "Selector"
)
type TransformResult struct {
Params []map[string]string
Params []map[string]interface{}
Template argoprojiov1alpha1.ApplicationSetTemplate
}
//Transform a spec generator to list of paramSets and a template
func Transform(requestedGenerator argoprojiov1alpha1.ApplicationSetGenerator, allGenerators map[string]Generator, baseTemplate argoprojiov1alpha1.ApplicationSetTemplate, appSet *argoprojiov1alpha1.ApplicationSet) ([]TransformResult, error) {
func Transform(requestedGenerator argoprojiov1alpha1.ApplicationSetGenerator, allGenerators map[string]Generator, baseTemplate argoprojiov1alpha1.ApplicationSetTemplate, appSet *argoprojiov1alpha1.ApplicationSet, genParams map[string]interface{}) ([]TransformResult, error) {
selector, err := metav1.LabelSelectorAsSelector(requestedGenerator.Selector)
if err != nil {
return nil, fmt.Errorf("error parsing label selector: %w", err)
}
res := []TransformResult{}
var firstError error
interpolatedGenerator := requestedGenerator.DeepCopy()
generators := GetRelevantGenerators(&requestedGenerator, allGenerators)
for _, g := range generators {
@@ -31,8 +48,20 @@ func Transform(requestedGenerator argoprojiov1alpha1.ApplicationSetGenerator, al
}
continue
}
params, err := g.GenerateParams(&requestedGenerator, appSet)
var params []map[string]interface{}
if len(genParams) != 0 {
tempInterpolatedGenerator, err := InterpolateGenerator(&requestedGenerator, genParams, appSet.Spec.GoTemplate)
interpolatedGenerator = &tempInterpolatedGenerator
if err != nil {
log.WithError(err).WithField("genParams", genParams).
Error("error interpolating params for generator")
if firstError == nil {
firstError = err
}
continue
}
}
params, err = g.GenerateParams(interpolatedGenerator, appSet)
if err != nil {
log.WithError(err).WithField("generator", g).
Error("error generating params")
@@ -41,16 +70,34 @@ func Transform(requestedGenerator argoprojiov1alpha1.ApplicationSetGenerator, al
}
continue
}
var filterParams []map[string]interface{}
for _, param := range params {
if requestedGenerator.Selector != nil && !selector.Matches(labels.Set(keepOnlyStringValues(param))) {
continue
}
filterParams = append(filterParams, param)
}
res = append(res, TransformResult{
Params: params,
Params: filterParams,
Template: mergedTemplate,
})
}
return res, firstError
}
func keepOnlyStringValues(in map[string]interface{}) map[string]string {
var out map[string]string = map[string]string{}
for key, value := range in {
if _, ok := value.(string); ok {
out[key] = value.(string)
}
}
return out
}
func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, generators map[string]Generator) []Generator {
@@ -62,9 +109,13 @@ func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSet
if !field.CanInterface() {
continue
}
name := v.Type().Field(i).Name
if name == selectorKey {
continue
}
if !reflect.ValueOf(field.Interface()).IsNil() {
res = append(res, generators[v.Type().Field(i).Name])
res = append(res, generators[name])
}
}
@@ -72,7 +123,6 @@ func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSet
}
func mergeGeneratorTemplate(g Generator, requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetTemplate argoprojiov1alpha1.ApplicationSetTemplate) (argoprojiov1alpha1.ApplicationSetTemplate, error) {
// Make a copy of the value from `GetTemplate()` before merge, rather than copying directly into
// the provided parameter (which will touch the original resource object returned by client-go)
dest := g.GetTemplate(requestedGenerator).DeepCopy()
@@ -81,3 +131,28 @@ func mergeGeneratorTemplate(g Generator, requestedGenerator *argoprojiov1alpha1.
return *dest, err
}
// Currently for Matrix Generator. Allows interpolating the matrix's 2nd child generator with values from the 1st child generator
// "params" parameter is an array, where each index corresponds to a generator. Each index contains a map w/ that generator's parameters.
func InterpolateGenerator(requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, params map[string]interface{}, useGoTemplate bool) (argoprojiov1alpha1.ApplicationSetGenerator, error) {
interpolatedGenerator := requestedGenerator.DeepCopy()
tmplBytes, err := json.Marshal(interpolatedGenerator)
if err != nil {
log.WithError(err).WithField("requestedGenerator", interpolatedGenerator).Error("error marshalling requested generator for interpolation")
return *interpolatedGenerator, err
}
render := utils.Render{}
replacedTmplStr, err := render.Replace(string(tmplBytes), params, useGoTemplate)
if err != nil {
log.WithError(err).WithField("interpolatedGeneratorString", replacedTmplStr).Error("error interpolating generator with other generator's parameter")
return *interpolatedGenerator, err
}
err = json.Unmarshal([]byte(replacedTmplStr), interpolatedGenerator)
if err != nil {
log.WithError(err).WithField("requestedGenerator", interpolatedGenerator).Error("error unmarshalling requested generator for interpolation")
return *interpolatedGenerator, err
}
return *interpolatedGenerator, nil
}

View File

@@ -0,0 +1,267 @@
package generators
import (
"context"
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
argov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/stretchr/testify/mock"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
kubefake "k8s.io/client-go/kubernetes/fake"
crtclient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestMatchValues(t *testing.T) {
testCases := []struct {
name string
elements []apiextensionsv1.JSON
selector *metav1.LabelSelector
expected []map[string]interface{}
}{
{
name: "no filter",
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url"}`)}},
selector: &metav1.LabelSelector{},
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url"}},
},
{
name: "nil",
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url"}`)}},
selector: nil,
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url"}},
},
{
name: "values.foo should be foo but is ignore element",
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url","values":{"foo":"bar"}}`)}},
selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"values.foo": "foo",
},
},
expected: []map[string]interface{}{},
},
{
name: "values.foo should be bar",
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url","values":{"foo":"bar"}}`)}},
selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"values.foo": "bar",
},
},
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url", "values.foo": "bar"}},
},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
var listGenerator = NewListGenerator()
var data = map[string]Generator{
"List": listGenerator,
}
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{},
}
results, err := Transform(argoprojiov1alpha1.ApplicationSetGenerator{
Selector: testCase.selector,
List: &argoprojiov1alpha1.ListGenerator{
Elements: testCase.elements,
Template: emptyTemplate(),
}},
data,
emptyTemplate(),
&applicationSetInfo, nil)
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, results[0].Params)
})
}
}
func emptyTemplate() argoprojiov1alpha1.ApplicationSetTemplate {
return argoprojiov1alpha1.ApplicationSetTemplate{
Spec: argov1alpha1.ApplicationSpec{
Project: "project",
},
}
}
func getMockClusterGenerator() Generator {
clusters := []crtclient.Object{
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "staging-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "staging",
"org": "foo",
},
Annotations: map[string]string{
"foo.argoproj.io": "staging",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("staging-01"),
"server": []byte("https://staging-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "production-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "production",
"org": "bar",
},
Annotations: map[string]string{
"foo.argoproj.io": "production",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("production_01/west"),
"server": []byte("https://production-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
}
runtimeClusters := []runtime.Object{}
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
return NewClusterGenerator(fakeClient, context.Background(), appClientset, "namespace")
}
func getMockGitGenerator() Generator {
argoCDServiceMock := argoCDServiceMock{mock: &mock.Mock{}}
argoCDServiceMock.mock.On("GetDirectories", mock.Anything, mock.Anything, mock.Anything).Return([]string{"app1", "app2", "app_3", "p1/app4"}, nil)
var gitGenerator = NewGitGenerator(argoCDServiceMock)
return gitGenerator
}
func TestGetRelevantGenerators(t *testing.T) {
testGenerators := map[string]Generator{
"Clusters": getMockClusterGenerator(),
"Git": getMockGitGenerator(),
}
testGenerators["Matrix"] = NewMatrixGenerator(testGenerators)
testGenerators["Merge"] = NewMergeGenerator(testGenerators)
testGenerators["List"] = NewListGenerator()
requestedGenerator := &argoprojiov1alpha1.ApplicationSetGenerator{
List: &argoprojiov1alpha1.ListGenerator{
Elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url","values":{"foo":"bar"}}`)}},
}}
relevantGenerators := GetRelevantGenerators(requestedGenerator, testGenerators)
assert.Len(t, relevantGenerators, 1)
assert.IsType(t, &ListGenerator{}, relevantGenerators[0])
requestedGenerator = &argoprojiov1alpha1.ApplicationSetGenerator{
Clusters: &argoprojiov1alpha1.ClusterGenerator{
Selector: metav1.LabelSelector{},
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
Values: nil,
},
}
relevantGenerators = GetRelevantGenerators(requestedGenerator, testGenerators)
assert.Len(t, relevantGenerators, 1)
assert.IsType(t, &ClusterGenerator{}, relevantGenerators[0])
requestedGenerator = &argoprojiov1alpha1.ApplicationSetGenerator{
Git: &argoprojiov1alpha1.GitGenerator{
RepoURL: "",
Directories: nil,
Files: nil,
Revision: "",
RequeueAfterSeconds: nil,
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
},
}
relevantGenerators = GetRelevantGenerators(requestedGenerator, testGenerators)
assert.Len(t, relevantGenerators, 1)
assert.IsType(t, &GitGenerator{}, relevantGenerators[0])
}
func TestInterpolateGenerator(t *testing.T) {
requestedGenerator := &argoprojiov1alpha1.ApplicationSetGenerator{
Clusters: &argoprojiov1alpha1.ClusterGenerator{
Selector: metav1.LabelSelector{
MatchLabels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"path-basename": "{{path.basename}}",
"path-zero": "{{path[0]}}",
"path-full": "{{path}}",
}},
},
}
gitGeneratorParams := map[string]interface{}{
"path": "p1/p2/app3",
"path.basename": "app3",
"path[0]": "p1",
"path[1]": "p2",
"path.basenameNormalized": "app3",
}
interpolatedGenerator, err := InterpolateGenerator(requestedGenerator, gitGeneratorParams, false)
if err != nil {
log.WithError(err).WithField("requestedGenerator", requestedGenerator).Error("error interpolating Generator")
return
}
assert.Equal(t, "app3", interpolatedGenerator.Clusters.Selector.MatchLabels["path-basename"])
assert.Equal(t, "p1", interpolatedGenerator.Clusters.Selector.MatchLabels["path-zero"])
assert.Equal(t, "p1/p2/app3", interpolatedGenerator.Clusters.Selector.MatchLabels["path-full"])
fileNamePath := argoprojiov1alpha1.GitFileGeneratorItem{
Path: "{{name}}",
}
fileServerPath := argoprojiov1alpha1.GitFileGeneratorItem{
Path: "{{server}}",
}
requestedGenerator = &argoprojiov1alpha1.ApplicationSetGenerator{
Git: &argoprojiov1alpha1.GitGenerator{
Files: append([]argoprojiov1alpha1.GitFileGeneratorItem{}, fileNamePath, fileServerPath),
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
},
}
clusterGeneratorParams := map[string]interface{}{
"name": "production_01/west", "server": "https://production-01.example.com",
}
interpolatedGenerator, err = InterpolateGenerator(requestedGenerator, clusterGeneratorParams, true)
if err != nil {
log.WithError(err).WithField("requestedGenerator", requestedGenerator).Error("error interpolating Generator")
return
}
assert.Equal(t, "production_01/west", interpolatedGenerator.Git.Files[0].Path)
assert.Equal(t, "https://production-01.example.com", interpolatedGenerator.Git.Files[1].Path)
}

View File

@@ -14,7 +14,8 @@ import (
"sigs.k8s.io/yaml"
"github.com/argoproj/argo-cd/v2/applicationset/services"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*GitGenerator)(nil)
@@ -45,7 +46,7 @@ func (g *GitGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.Appli
return DefaultRequeueAfterSeconds
}
func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
@@ -56,11 +57,11 @@ func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.Applic
}
var err error
var res []map[string]string
var res []map[string]interface{}
if appSetGenerator.Git.Directories != nil {
res, err = g.generateParamsForGitDirectories(appSetGenerator)
res, err = g.generateParamsForGitDirectories(appSetGenerator, appSet.Spec.GoTemplate)
} else if appSetGenerator.Git.Files != nil {
res, err = g.generateParamsForGitFiles(appSetGenerator)
res, err = g.generateParamsForGitFiles(appSetGenerator, appSet.Spec.GoTemplate)
} else {
return nil, EmptyAppSetGeneratorError
}
@@ -71,7 +72,7 @@ func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.Applic
return res, nil
}
func (g *GitGenerator) generateParamsForGitDirectories(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) ([]map[string]string, error) {
func (g *GitGenerator) generateParamsForGitDirectories(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, useGoTemplate bool) ([]map[string]interface{}, error) {
// Directories, not files
allPaths, err := g.repos.GetDirectories(context.TODO(), appSetGenerator.Git.RepoURL, appSetGenerator.Git.Revision)
@@ -84,16 +85,17 @@ func (g *GitGenerator) generateParamsForGitDirectories(appSetGenerator *argoproj
"total": len(allPaths),
"repoURL": appSetGenerator.Git.RepoURL,
"revision": appSetGenerator.Git.Revision,
"pathParamPrefix": appSetGenerator.Git.PathParamPrefix,
}).Info("applications result from the repo service")
requestedApps := g.filterApps(appSetGenerator.Git.Directories, allPaths)
res := g.generateParamsFromApps(requestedApps, appSetGenerator)
res := g.generateParamsFromApps(requestedApps, appSetGenerator, useGoTemplate)
return res, nil
}
func (g *GitGenerator) generateParamsForGitFiles(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) ([]map[string]string, error) {
func (g *GitGenerator) generateParamsForGitFiles(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, useGoTemplate bool) ([]map[string]interface{}, error) {
// Get all files that match the requested path string, removing duplicates
allFiles := make(map[string][]byte)
@@ -116,11 +118,11 @@ func (g *GitGenerator) generateParamsForGitFiles(appSetGenerator *argoprojiov1al
sort.Strings(allPaths)
// Generate params from each path, and return
res := []map[string]string{}
res := []map[string]interface{}{}
for _, path := range allPaths {
// A JSON / YAML file path can contain multiple sets of parameters (ie it is an array)
paramsArray, err := g.generateParamsFromGitFile(path, allFiles[path])
paramsArray, err := g.generateParamsFromGitFile(path, allFiles[path], useGoTemplate, appSetGenerator.Git.PathParamPrefix)
if err != nil {
return nil, fmt.Errorf("unable to process file '%s': %v", path, err)
}
@@ -132,7 +134,7 @@ func (g *GitGenerator) generateParamsForGitFiles(appSetGenerator *argoprojiov1al
return res, nil
}
func (g *GitGenerator) generateParamsFromGitFile(filePath string, fileContent []byte) ([]map[string]string, error) {
func (g *GitGenerator) generateParamsFromGitFile(filePath string, fileContent []byte, useGoTemplate bool, pathParamPrefix string) ([]map[string]interface{}, error) {
objectsFound := []map[string]interface{}{}
// First, we attempt to parse as an array
@@ -147,34 +149,58 @@ func (g *GitGenerator) generateParamsFromGitFile(filePath string, fileContent []
objectsFound = append(objectsFound, singleObj)
}
res := []map[string]string{}
res := []map[string]interface{}{}
// Flatten all objects found, and return them
for _, objectFound := range objectsFound {
flat, err := flatten.Flatten(objectFound, "", flatten.DotStyle)
if err != nil {
return nil, err
}
params := map[string]string{}
for k, v := range flat {
params[k] = fmt.Sprintf("%v", v)
}
params["path"] = path.Dir(filePath)
params["path.basename"] = path.Base(params["path"])
params["path.filename"] = path.Base(filePath)
params["path.basenameNormalized"] = sanitizeName(path.Base(params["path"]))
params["path.filenameNormalized"] = sanitizeName(path.Base(params["path.filename"]))
for k, v := range strings.Split(params["path"], "/") {
if len(v) > 0 {
params["path["+strconv.Itoa(k)+"]"] = v
params := map[string]interface{}{}
if useGoTemplate {
for k, v := range objectFound {
params[k] = v
}
paramPath := map[string]interface{}{}
paramPath["path"] = path.Dir(filePath)
paramPath["basename"] = path.Base(paramPath["path"].(string))
paramPath["filename"] = path.Base(filePath)
paramPath["basenameNormalized"] = utils.SanitizeName(path.Base(paramPath["path"].(string)))
paramPath["filenameNormalized"] = utils.SanitizeName(path.Base(paramPath["filename"].(string)))
paramPath["segments"] = strings.Split(paramPath["path"].(string), "/")
if pathParamPrefix != "" {
params[pathParamPrefix] = map[string]interface{}{"path": paramPath}
} else {
params["path"] = paramPath
}
} else {
flat, err := flatten.Flatten(objectFound, "", flatten.DotStyle)
if err != nil {
return nil, err
}
for k, v := range flat {
params[k] = fmt.Sprintf("%v", v)
}
pathParamName := "path"
if pathParamPrefix != "" {
pathParamName = pathParamPrefix+"."+pathParamName
}
params[pathParamName] = path.Dir(filePath)
params[pathParamName+".basename"] = path.Base(params[pathParamName].(string))
params[pathParamName+".filename"] = path.Base(filePath)
params[pathParamName+".basenameNormalized"] = utils.SanitizeName(path.Base(params[pathParamName].(string)))
params[pathParamName+".filenameNormalized"] = utils.SanitizeName(path.Base(params[pathParamName+".filename"].(string)))
for k, v := range strings.Split(params[pathParamName].(string), "/") {
if len(v) > 0 {
params[pathParamName+"["+strconv.Itoa(k)+"]"] = v
}
}
}
res = append(res, params)
}
return res, nil
}
func (g *GitGenerator) filterApps(Directories []argoprojiov1alpha1.GitDirectoryGeneratorItem, allPaths []string) []string {
@@ -205,21 +231,38 @@ func (g *GitGenerator) filterApps(Directories []argoprojiov1alpha1.GitDirectoryG
return res
}
func (g *GitGenerator) generateParamsFromApps(requestedApps []string, _ *argoprojiov1alpha1.ApplicationSetGenerator) []map[string]string {
// TODO: At some point, the appicationSetGenerator param should be used
res := make([]map[string]string, len(requestedApps))
func (g *GitGenerator) generateParamsFromApps(requestedApps []string, appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, useGoTemplate bool) []map[string]interface{} {
res := make([]map[string]interface{}, len(requestedApps))
for i, a := range requestedApps {
params := make(map[string]string, 2)
params["path"] = a
params["path.basename"] = path.Base(a)
params["path.basenameNormalized"] = sanitizeName(path.Base(a))
for k, v := range strings.Split(params["path"], "/") {
if len(v) > 0 {
params["path["+strconv.Itoa(k)+"]"] = v
params := make(map[string]interface{}, 5)
if useGoTemplate {
paramPath := map[string]interface{}{}
paramPath["path"] = a
paramPath["basename"] = path.Base(a)
paramPath["basenameNormalized"] = utils.SanitizeName(path.Base(a))
paramPath["segments"] = strings.Split(paramPath["path"].(string), "/")
if appSetGenerator.Git.PathParamPrefix != "" {
params[appSetGenerator.Git.PathParamPrefix] = map[string]interface{}{"path": paramPath}
} else {
params["path"] = paramPath
}
} else {
pathParamName := "path"
if appSetGenerator.Git.PathParamPrefix != "" {
pathParamName = appSetGenerator.Git.PathParamPrefix+"."+pathParamName
}
params[pathParamName] = a
params[pathParamName+".basename"] = path.Base(a)
params[pathParamName+".basenameNormalized"] = utils.SanitizeName(path.Base(a))
for k, v := range strings.Split(params[pathParamName].(string), "/") {
if len(v) > 0 {
params[pathParamName+"["+strconv.Itoa(k)+"]"] = v
}
}
}
res[i] = params
}

View File

@@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/mock"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
// type clientSet struct {
@@ -51,11 +51,11 @@ func Test_generateParamsFromGitFile(t *testing.T) {
params, err := (*GitGenerator)(nil).generateParamsFromGitFile("path/dir/file_name.yaml", []byte(`
foo:
bar: baz
`))
`), false, "")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, []map[string]string{
assert.Equal(t, []map[string]interface{}{
{
"foo.bar": "baz",
"path": "path/dir",
@@ -69,15 +69,96 @@ foo:
}, params)
}
func Test_generatePrefixedParamsFromGitFile(t *testing.T) {
params, err := (*GitGenerator)(nil).generateParamsFromGitFile("path/dir/file_name.yaml", []byte(`
foo:
bar: baz
`), false, "myRepo")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, []map[string]interface{}{
{
"foo.bar": "baz",
"myRepo.path": "path/dir",
"myRepo.path.basename": "dir",
"myRepo.path.filename": "file_name.yaml",
"myRepo.path.basenameNormalized": "dir",
"myRepo.path.filenameNormalized": "file-name.yaml",
"myRepo.path[0]": "path",
"myRepo.path[1]": "dir",
},
}, params)
}
func Test_generateParamsFromGitFileGoTemplate(t *testing.T) {
params, err := (*GitGenerator)(nil).generateParamsFromGitFile("path/dir/file_name.yaml", []byte(`
foo:
bar: baz
`), true, "")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, []map[string]interface{}{
{
"foo": map[string]interface{}{
"bar": "baz",
},
"path": map[string]interface{}{
"path": "path/dir",
"basename": "dir",
"filename": "file_name.yaml",
"basenameNormalized": "dir",
"filenameNormalized": "file-name.yaml",
"segments": []string{
"path",
"dir",
},
},
},
}, params)
}
func Test_generatePrefixedParamsFromGitFileGoTemplate(t *testing.T) {
params, err := (*GitGenerator)(nil).generateParamsFromGitFile("path/dir/file_name.yaml", []byte(`
foo:
bar: baz
`), true, "myRepo")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, []map[string]interface{}{
{
"foo": map[string]interface{}{
"bar": "baz",
},
"myRepo": map[string]interface{}{
"path": map[string]interface{}{
"path": "path/dir",
"basename": "dir",
"filename": "file_name.yaml",
"basenameNormalized": "dir",
"filenameNormalized": "file-name.yaml",
"segments": []string{
"path",
"dir",
},
},
},
},
}, params)
}
func TestGitGenerateParamsFromDirectories(t *testing.T) {
cases := []struct {
name string
directories []argoprojiov1alpha1.GitDirectoryGeneratorItem
repoApps []string
repoError error
expected []map[string]string
expectedError error
name string
directories []argoprojiov1alpha1.GitDirectoryGeneratorItem
pathParamPrefix string
repoApps []string
repoError error
expected []map[string]interface{}
expectedError error
}{
{
name: "happy flow - created apps",
@@ -89,13 +170,31 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
"p1/app4",
},
repoError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"path": "app1", "path.basename": "app1", "path.basenameNormalized": "app1", "path[0]": "app1"},
{"path": "app2", "path.basename": "app2", "path.basenameNormalized": "app2", "path[0]": "app2"},
{"path": "app_3", "path.basename": "app_3", "path.basenameNormalized": "app-3", "path[0]": "app_3"},
},
expectedError: nil,
},
{
name: "It prefixes path parameters with PathParamPrefix",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
pathParamPrefix: "myRepo",
repoApps: []string{
"app1",
"app2",
"app_3",
"p1/app4",
},
repoError: nil,
expected: []map[string]interface{}{
{"myRepo.path": "app1", "myRepo.path.basename": "app1", "myRepo.path.basenameNormalized": "app1", "myRepo.path[0]": "app1"},
{"myRepo.path": "app2", "myRepo.path.basename": "app2", "myRepo.path.basenameNormalized": "app2", "myRepo.path[0]": "app2"},
{"myRepo.path": "app_3", "myRepo.path.basename": "app_3", "myRepo.path.basenameNormalized": "app-3", "myRepo.path[0]": "app_3"},
},
expectedError: nil,
},
{
name: "It filters application according to the paths",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "p1/*"}, {Path: "p1/*/*"}},
@@ -106,7 +205,7 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
"p1/p2/p3/app4",
},
repoError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"path": "p1/app2", "path.basename": "app2", "path[0]": "p1", "path[1]": "app2", "path.basenameNormalized": "app2"},
{"path": "p1/p2/app3", "path.basename": "app3", "path[0]": "p1", "path[1]": "p2", "path[2]": "app3", "path.basenameNormalized": "app3"},
},
@@ -123,7 +222,7 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
"p2/app3",
},
repoError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"path": "app1", "path.basename": "app1", "path[0]": "app1", "path.basenameNormalized": "app1"},
{"path": "app2", "path.basename": "app2", "path[0]": "app2", "path.basenameNormalized": "app2"},
{"path": "p2/app3", "path.basename": "app3", "path[0]": "p2", "path[1]": "app3", "path.basenameNormalized": "app3"},
@@ -141,7 +240,7 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
"p2/app3",
},
repoError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{"path": "app1", "path.basename": "app1", "path[0]": "app1", "path.basenameNormalized": "app1"},
{"path": "app2", "path.basename": "app2", "path[0]": "app2", "path.basenameNormalized": "app2"},
{"path": "p2/app3", "path.basename": "app3", "path[0]": "p2", "path[1]": "app3", "path.basenameNormalized": "app3"},
@@ -153,7 +252,7 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{},
repoError: nil,
expected: []map[string]string{},
expected: []map[string]interface{}{},
expectedError: nil,
},
{
@@ -161,7 +260,7 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{},
repoError: fmt.Errorf("error"),
expected: []map[string]string{},
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("error"),
},
}
@@ -184,15 +283,312 @@ func TestGitGenerateParamsFromDirectories(t *testing.T) {
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{{
Git: &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Directories: testCaseCopy.directories,
RepoURL: "RepoURL",
Revision: "Revision",
Directories: testCaseCopy.directories,
PathParamPrefix: testCaseCopy.pathParamPrefix,
},
}},
},
}
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], nil)
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], &applicationSetInfo)
if testCaseCopy.expectedError != nil {
assert.EqualError(t, err, testCaseCopy.expectedError.Error())
} else {
assert.NoError(t, err)
assert.Equal(t, testCaseCopy.expected, got)
}
argoCDServiceMock.mock.AssertExpectations(t)
})
}
}
func TestGitGenerateParamsFromDirectoriesGoTemplate(t *testing.T) {
cases := []struct {
name string
directories []argoprojiov1alpha1.GitDirectoryGeneratorItem
pathParamPrefix string
repoApps []string
repoError error
expected []map[string]interface{}
expectedError error
}{
{
name: "happy flow - created apps",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{
"app1",
"app2",
"app_3",
"p1/app4",
},
repoError: nil,
expected: []map[string]interface{}{
{
"path": map[string]interface{}{
"path": "app1",
"basename": "app1",
"basenameNormalized": "app1",
"segments": []string{
"app1",
},
},
},
{
"path": map[string]interface{}{
"path": "app2",
"basename": "app2",
"basenameNormalized": "app2",
"segments": []string{
"app2",
},
},
},
{
"path": map[string]interface{}{
"path": "app_3",
"basename": "app_3",
"basenameNormalized": "app-3",
"segments": []string{
"app_3",
},
},
},
},
expectedError: nil,
},
{
name: "It prefixes path parameters with PathParamPrefix",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
pathParamPrefix: "myRepo",
repoApps: []string{
"app1",
"app2",
"app_3",
"p1/app4",
},
repoError: nil,
expected: []map[string]interface{}{
{
"myRepo": map[string]interface{}{
"path": map[string]interface{}{
"path": "app1",
"basename": "app1",
"basenameNormalized": "app1",
"segments": []string{
"app1",
},
},
},
},
{
"myRepo": map[string]interface{}{
"path": map[string]interface{}{
"path": "app2",
"basename": "app2",
"basenameNormalized": "app2",
"segments": []string{
"app2",
},
},
},
},
{
"myRepo": map[string]interface{}{
"path": map[string]interface{}{
"path": "app_3",
"basename": "app_3",
"basenameNormalized": "app-3",
"segments": []string{
"app_3",
},
},
},
},
},
expectedError: nil,
},
{
name: "It filters application according to the paths",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "p1/*"}, {Path: "p1/*/*"}},
repoApps: []string{
"app1",
"p1/app2",
"p1/p2/app3",
"p1/p2/p3/app4",
},
repoError: nil,
expected: []map[string]interface{}{
{
"path": map[string]interface{}{
"path": "p1/app2",
"basename": "app2",
"basenameNormalized": "app2",
"segments": []string{
"p1",
"app2",
},
},
},
{
"path": map[string]interface{}{
"path": "p1/p2/app3",
"basename": "app3",
"basenameNormalized": "app3",
"segments": []string{
"p1",
"p2",
"app3",
},
},
},
},
expectedError: nil,
},
{
name: "It filters application according to the paths with Exclude",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "p1/*", Exclude: true}, {Path: "*"}, {Path: "*/*"}},
repoApps: []string{
"app1",
"app2",
"p1/app2",
"p1/app3",
"p2/app3",
},
repoError: nil,
expected: []map[string]interface{}{
{
"path": map[string]interface{}{
"path": "app1",
"basename": "app1",
"basenameNormalized": "app1",
"segments": []string{
"app1",
},
},
},
{
"path": map[string]interface{}{
"path": "app2",
"basename": "app2",
"basenameNormalized": "app2",
"segments": []string{
"app2",
},
},
},
{
"path": map[string]interface{}{
"path": "p2/app3",
"basename": "app3",
"basenameNormalized": "app3",
"segments": []string{
"p2",
"app3",
},
},
},
},
expectedError: nil,
},
{
name: "Expecting same exclude behavior with different order",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}, {Path: "*/*"}, {Path: "p1/*", Exclude: true}},
repoApps: []string{
"app1",
"app2",
"p1/app2",
"p1/app3",
"p2/app3",
},
repoError: nil,
expected: []map[string]interface{}{
{
"path": map[string]interface{}{
"path": "app1",
"basename": "app1",
"basenameNormalized": "app1",
"segments": []string{
"app1",
},
},
},
{
"path": map[string]interface{}{
"path": "app2",
"basename": "app2",
"basenameNormalized": "app2",
"segments": []string{
"app2",
},
},
},
{
"path": map[string]interface{}{
"path": "p2/app3",
"basename": "app3",
"basenameNormalized": "app3",
"segments": []string{
"p2",
"app3",
},
},
},
},
expectedError: nil,
},
{
name: "handles empty response from repo server",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{},
repoError: nil,
expected: []map[string]interface{}{},
expectedError: nil,
},
{
name: "handles error from repo server",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{},
repoError: fmt.Errorf("error"),
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("error"),
},
}
for _, testCase := range cases {
testCaseCopy := testCase
t.Run(testCaseCopy.name, func(t *testing.T) {
t.Parallel()
argoCDServiceMock := argoCDServiceMock{mock: &mock.Mock{}}
argoCDServiceMock.mock.On("GetDirectories", mock.Anything, mock.Anything, mock.Anything).Return(testCaseCopy.repoApps, testCaseCopy.repoError)
var gitGenerator = NewGitGenerator(argoCDServiceMock)
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{{
Git: &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Directories: testCaseCopy.directories,
PathParamPrefix: testCaseCopy.pathParamPrefix,
},
}},
},
}
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], &applicationSetInfo)
if testCaseCopy.expectedError != nil {
assert.EqualError(t, err, testCaseCopy.expectedError.Error())
@@ -217,7 +613,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
repoFileContents map[string][]byte
// if repoPathsError is non-nil, the call to GetPaths(...) will return this error value
repoPathsError error
expected []map[string]string
expected []map[string]interface{}
expectedError error
}{
{
@@ -248,7 +644,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
}`),
},
repoPathsError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
@@ -285,7 +681,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
repoFileContents: map[string][]byte{},
repoPathsError: fmt.Errorf("paths error"),
expected: []map[string]string{},
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("paths error"),
},
{
@@ -295,7 +691,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
"cluster-config/production/config.json": []byte(`invalid json file`),
},
repoPathsError: nil,
expected: []map[string]string{},
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("unable to process file 'cluster-config/production/config.json': unable to parse file: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}"),
},
{
@@ -324,7 +720,7 @@ func TestGitGenerateParamsFromFiles(t *testing.T) {
]`),
},
repoPathsError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
@@ -376,7 +772,7 @@ cluster:
`),
},
repoPathsError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
@@ -424,7 +820,7 @@ cluster:
address: https://kubernetes.default.svc`),
},
repoPathsError: nil,
expected: []map[string]string{
expected: []map[string]interface{}{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
@@ -481,7 +877,357 @@ cluster:
},
}
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], nil)
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], &applicationSetInfo)
fmt.Println(got, err)
if testCaseCopy.expectedError != nil {
assert.EqualError(t, err, testCaseCopy.expectedError.Error())
} else {
assert.NoError(t, err)
assert.ElementsMatch(t, testCaseCopy.expected, got)
}
argoCDServiceMock.mock.AssertExpectations(t)
})
}
}
func TestGitGenerateParamsFromFilesGoTemplate(t *testing.T) {
cases := []struct {
name string
// files is the list of paths/globs to match
files []argoprojiov1alpha1.GitFileGeneratorItem
// repoFileContents maps repo path to the literal contents of that path
repoFileContents map[string][]byte
// if repoPathsError is non-nil, the call to GetPaths(...) will return this error value
repoPathsError error
expected []map[string]interface{}
expectedError error
}{
{
name: "happy flow: create params from git files",
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
repoFileContents: map[string][]byte{
"cluster-config/production/config.json": []byte(`{
"cluster": {
"owner": "john.doe@example.com",
"name": "production",
"address": "https://kubernetes.default.svc"
},
"key1": "val1",
"key2": {
"key2_1": "val2_1",
"key2_2": {
"key2_2_1": "val2_2_1"
}
},
"key3": 123
}`),
"cluster-config/staging/config.json": []byte(`{
"cluster": {
"owner": "foo.bar@example.com",
"name": "staging",
"address": "https://kubernetes.default.svc"
}
}`),
},
repoPathsError: nil,
expected: []map[string]interface{}{
{
"cluster": map[string]interface{}{
"owner": "john.doe@example.com",
"name": "production",
"address": "https://kubernetes.default.svc",
},
"key1": "val1",
"key2": map[string]interface{}{
"key2_1": "val2_1",
"key2_2": map[string]interface{}{
"key2_2_1": "val2_2_1",
},
},
"key3": float64(123),
"path": map[string]interface{}{
"path": "cluster-config/production",
"basename": "production",
"filename": "config.json",
"basenameNormalized": "production",
"filenameNormalized": "config.json",
"segments": []string{
"cluster-config",
"production",
},
},
},
{
"cluster": map[string]interface{}{
"owner": "foo.bar@example.com",
"name": "staging",
"address": "https://kubernetes.default.svc",
},
"path": map[string]interface{}{
"path": "cluster-config/staging",
"basename": "staging",
"filename": "config.json",
"basenameNormalized": "staging",
"filenameNormalized": "config.json",
"segments": []string{
"cluster-config",
"staging",
},
},
},
},
expectedError: nil,
},
{
name: "handles error during getting repo paths",
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
repoFileContents: map[string][]byte{},
repoPathsError: fmt.Errorf("paths error"),
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("paths error"),
},
{
name: "test invalid JSON file returns error",
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
repoFileContents: map[string][]byte{
"cluster-config/production/config.json": []byte(`invalid json file`),
},
repoPathsError: nil,
expected: []map[string]interface{}{},
expectedError: fmt.Errorf("unable to process file 'cluster-config/production/config.json': unable to parse file: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}"),
},
{
name: "test JSON array",
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.json"}},
repoFileContents: map[string][]byte{
"cluster-config/production/config.json": []byte(`
[
{
"cluster": {
"owner": "john.doe@example.com",
"name": "production",
"address": "https://kubernetes.default.svc",
"inner": {
"one" : "two"
}
}
},
{
"cluster": {
"owner": "john.doe@example.com",
"name": "staging",
"address": "https://kubernetes.default.svc"
}
}
]`),
},
repoPathsError: nil,
expected: []map[string]interface{}{
{
"cluster": map[string]interface{}{
"owner": "john.doe@example.com",
"name": "production",
"address": "https://kubernetes.default.svc",
"inner": map[string]interface{}{
"one": "two",
},
},
"path": map[string]interface{}{
"path": "cluster-config/production",
"basename": "production",
"filename": "config.json",
"basenameNormalized": "production",
"filenameNormalized": "config.json",
"segments": []string{
"cluster-config",
"production",
},
},
},
{
"cluster": map[string]interface{}{
"owner": "john.doe@example.com",
"name": "staging",
"address": "https://kubernetes.default.svc",
},
"path": map[string]interface{}{
"path": "cluster-config/production",
"basename": "production",
"filename": "config.json",
"basenameNormalized": "production",
"filenameNormalized": "config.json",
"segments": []string{
"cluster-config",
"production",
},
},
},
},
expectedError: nil,
},
{
name: "Test YAML flow",
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.yaml"}},
repoFileContents: map[string][]byte{
"cluster-config/production/config.yaml": []byte(`
cluster:
owner: john.doe@example.com
name: production
address: https://kubernetes.default.svc
key1: val1
key2:
key2_1: val2_1
key2_2:
key2_2_1: val2_2_1
`),
"cluster-config/staging/config.yaml": []byte(`
cluster:
owner: foo.bar@example.com
name: staging
address: https://kubernetes.default.svc
`),
},
repoPathsError: nil,
expected: []map[string]interface{}{
{
"cluster": map[string]interface{}{
"owner": "john.doe@example.com",
"name": "production",
"address": "https://kubernetes.default.svc",
},
"key1": "val1",
"key2": map[string]interface{}{
"key2_1": "val2_1",
"key2_2": map[string]interface{}{
"key2_2_1": "val2_2_1",
},
},
"path": map[string]interface{}{
"path": "cluster-config/production",
"basename": "production",
"filename": "config.yaml",
"basenameNormalized": "production",
"filenameNormalized": "config.yaml",
"segments": []string{
"cluster-config",
"production",
},
},
},
{
"cluster": map[string]interface{}{
"owner": "foo.bar@example.com",
"name": "staging",
"address": "https://kubernetes.default.svc",
},
"path": map[string]interface{}{
"path": "cluster-config/staging",
"basename": "staging",
"filename": "config.yaml",
"basenameNormalized": "staging",
"filenameNormalized": "config.yaml",
"segments": []string{
"cluster-config",
"staging",
},
},
},
},
expectedError: nil,
},
{
name: "test YAML array",
files: []argoprojiov1alpha1.GitFileGeneratorItem{{Path: "**/config.yaml"}},
repoFileContents: map[string][]byte{
"cluster-config/production/config.yaml": []byte(`
- cluster:
owner: john.doe@example.com
name: production
address: https://kubernetes.default.svc
inner:
one: two
- cluster:
owner: john.doe@example.com
name: staging
address: https://kubernetes.default.svc`),
},
repoPathsError: nil,
expected: []map[string]interface{}{
{
"cluster": map[string]interface{}{
"owner": "john.doe@example.com",
"name": "production",
"address": "https://kubernetes.default.svc",
"inner": map[string]interface{}{
"one": "two",
},
},
"path": map[string]interface{}{
"path": "cluster-config/production",
"basename": "production",
"filename": "config.yaml",
"basenameNormalized": "production",
"filenameNormalized": "config.yaml",
"segments": []string{
"cluster-config",
"production",
},
},
},
{
"cluster": map[string]interface{}{
"owner": "john.doe@example.com",
"name": "staging",
"address": "https://kubernetes.default.svc",
},
"path": map[string]interface{}{
"path": "cluster-config/production",
"basename": "production",
"filename": "config.yaml",
"basenameNormalized": "production",
"filenameNormalized": "config.yaml",
"segments": []string{
"cluster-config",
"production",
},
},
},
},
expectedError: nil,
},
}
for _, testCase := range cases {
testCaseCopy := testCase
t.Run(testCaseCopy.name, func(t *testing.T) {
t.Parallel()
argoCDServiceMock := argoCDServiceMock{mock: &mock.Mock{}}
argoCDServiceMock.mock.On("GetFiles", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
Return(testCaseCopy.repoFileContents, testCaseCopy.repoPathsError)
var gitGenerator = NewGitGenerator(argoCDServiceMock)
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{{
Git: &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Files: testCaseCopy.files,
},
}},
},
}
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], &applicationSetInfo)
fmt.Println(got, err)
if testCaseCopy.expectedError != nil {
@@ -494,5 +1240,4 @@ cluster:
argoCDServiceMock.mock.AssertExpectations(t)
})
}
}

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"time"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
// Generator defines the interface implemented by all ApplicationSet generators.
@@ -12,9 +12,9 @@ type Generator interface {
// GenerateParams interprets the ApplicationSet and generates all relevant parameters for the application template.
// The expected / desired list of parameters is returned, it then will be render and reconciled
// against the current state of the Applications in the cluster.
GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error)
GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error)
// GetRequeueAfter is the the generator can controller the next reconciled loop
// GetRequeueAfter is the generator can controller the next reconciled loop
// In case there is more then one generator the time will be the minimum of the times.
// In case NoRequeueAfter is empty, it will be ignored
GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"time"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*ListGenerator)(nil)
@@ -26,7 +26,7 @@ func (g *ListGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.Applicat
return &appSetGenerator.List.Template
}
func (g *ListGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (g *ListGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
@@ -35,39 +35,42 @@ func (g *ListGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.Appli
return nil, EmptyAppSetGeneratorError
}
res := make([]map[string]string, len(appSetGenerator.List.Elements))
res := make([]map[string]interface{}, len(appSetGenerator.List.Elements))
for i, tmpItem := range appSetGenerator.List.Elements {
params := map[string]string{}
params := map[string]interface{}{}
var element map[string]interface{}
err := json.Unmarshal(tmpItem.Raw, &element)
if err != nil {
return nil, fmt.Errorf("error unmarshling list element %v", err)
}
for key, value := range element {
if key == "values" {
values, ok := (value).(map[string]interface{})
if !ok {
return nil, fmt.Errorf("error parsing values map")
}
for k, v := range values {
value, ok := v.(string)
if appSet.Spec.GoTemplate {
res[i] = element
} else {
for key, value := range element {
if key == "values" {
values, ok := (value).(map[string]interface{})
if !ok {
return nil, fmt.Errorf("error parsing values map")
}
for k, v := range values {
value, ok := v.(string)
if !ok {
return nil, fmt.Errorf("error parsing value as string %v", err)
}
params[fmt.Sprintf("values.%s", k)] = value
}
} else {
v, ok := value.(string)
if !ok {
return nil, fmt.Errorf("error parsing value as string %v", err)
}
params[fmt.Sprintf("values.%s", k)] = value
params[key] = v
}
} else {
v, ok := value.(string)
if !ok {
return nil, fmt.Errorf("error parsing value as string %v", err)
}
params[key] = v
res[i] = params
}
}
res[i] = params
}
return res, nil

View File

@@ -5,21 +5,22 @@ import (
"github.com/stretchr/testify/assert"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestGenerateListParams(t *testing.T) {
testCases := []struct {
elements []apiextensionsv1.JSON
expected []map[string]string
expected []map[string]interface{}
}{
{
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url"}`)}},
expected: []map[string]string{{"cluster": "cluster", "url": "url"}},
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url"}},
}, {
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url","values":{"foo":"bar"}}`)}},
expected: []map[string]string{{"cluster": "cluster", "url": "url", "values.foo": "bar"}},
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url", "values.foo": "bar"}},
},
}
@@ -27,13 +28,57 @@ func TestGenerateListParams(t *testing.T) {
var listGenerator = NewListGenerator()
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{},
}
got, err := listGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
List: &argoprojiov1alpha1.ListGenerator{
Elements: testCase.elements,
}}, nil)
}}, &applicationSetInfo)
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
}
func TestGenerateListParamsGoTemplate(t *testing.T) {
testCases := []struct {
elements []apiextensionsv1.JSON
expected []map[string]interface{}
}{
{
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url"}`)}},
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url"}},
}, {
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url","values":{"foo":"bar"}}`)}},
expected: []map[string]interface{}{{"cluster": "cluster", "url": "url", "values": map[string]interface{}{"foo": "bar"}}},
},
}
for _, testCase := range testCases {
var listGenerator = NewListGenerator()
applicationSetInfo := argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}
got, err := listGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
List: &argoprojiov1alpha1.ListGenerator{
Elements: testCase.elements,
}}, &applicationSetInfo)
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
}

View File

@@ -4,8 +4,10 @@ import (
"fmt"
"time"
"github.com/imdario/mergo"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*MatrixGenerator)(nil)
@@ -28,7 +30,7 @@ func NewMatrixGenerator(supportedGenerators map[string]Generator) Generator {
return m
}
func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator.Matrix == nil {
return nil, EmptyAppSetGeneratorError
@@ -42,38 +44,64 @@ func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.App
return nil, ErrMoreThanTwoGenerators
}
res := []map[string]string{}
res := []map[string]interface{}{}
g0, err := m.getParams(appSetGenerator.Matrix.Generators[0], appSet)
g0, err := m.getParams(appSetGenerator.Matrix.Generators[0], appSet, nil)
if err != nil {
return nil, err
}
g1, err := m.getParams(appSetGenerator.Matrix.Generators[1], appSet)
if err != nil {
return nil, err
}
for _, a := range g0 {
g1, err := m.getParams(appSetGenerator.Matrix.Generators[1], appSet, a)
if err != nil {
return nil, fmt.Errorf("failed to get params for second generator in the matrix generator: %w", err)
}
for _, b := range g1 {
val, err := utils.CombineStringMaps(a, b)
if err != nil {
return nil, err
if appSet.Spec.GoTemplate {
tmp := map[string]interface{}{}
if err := mergo.Merge(&tmp, a); err != nil {
return nil, fmt.Errorf("failed to merge params from the first generator in the matrix generator with temp map: %w", err)
}
if err := mergo.Merge(&tmp, b); err != nil {
return nil, fmt.Errorf("failed to merge params from the first generator in the matrix generator with the second: %w", err)
}
res = append(res, tmp)
} else {
val, err := utils.CombineStringMaps(a, b)
if err != nil {
return nil, fmt.Errorf("failed to combine string maps with merging params for the matrix generator: %w", err)
}
res = append(res, utils.ConvertToMapStringInterface(val))
}
res = append(res, val)
}
}
return res, nil
}
func (m *MatrixGenerator) getParams(appSetBaseGenerator argoprojiov1alpha1.ApplicationSetNestedGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
matrixGen, err := getMatrixGenerator(appSetBaseGenerator)
if err != nil {
return nil, err
func (m *MatrixGenerator) getParams(appSetBaseGenerator argoprojiov1alpha1.ApplicationSetNestedGenerator, appSet *argoprojiov1alpha1.ApplicationSet, params map[string]interface{}) ([]map[string]interface{}, error) {
var matrix *argoprojiov1alpha1.MatrixGenerator
if appSetBaseGenerator.Matrix != nil {
// Since nested matrix generator is represented as a JSON object in the CRD, we unmarshall it back to a Go struct here.
nestedMatrix, err := argoprojiov1alpha1.ToNestedMatrixGenerator(appSetBaseGenerator.Matrix)
if err != nil {
return nil, fmt.Errorf("unable to unmarshall nested matrix generator: %v", err)
}
if nestedMatrix != nil {
matrix = nestedMatrix.ToMatrixGenerator()
}
}
mergeGen, err := getMergeGenerator(appSetBaseGenerator)
if err != nil {
return nil, err
var mergeGenerator *argoprojiov1alpha1.MergeGenerator
if appSetBaseGenerator.Merge != nil {
// Since nested merge generator is represented as a JSON object in the CRD, we unmarshall it back to a Go struct here.
nestedMerge, err := argoprojiov1alpha1.ToNestedMergeGenerator(appSetBaseGenerator.Merge)
if err != nil {
return nil, fmt.Errorf("unable to unmarshall nested merge generator: %v", err)
}
if nestedMerge != nil {
mergeGenerator = nestedMerge.ToMergeGenerator()
}
}
t, err := Transform(
@@ -84,12 +112,14 @@ func (m *MatrixGenerator) getParams(appSetBaseGenerator argoprojiov1alpha1.Appli
SCMProvider: appSetBaseGenerator.SCMProvider,
ClusterDecisionResource: appSetBaseGenerator.ClusterDecisionResource,
PullRequest: appSetBaseGenerator.PullRequest,
Matrix: matrixGen,
Merge: mergeGen,
Matrix: matrix,
Merge: mergeGenerator,
Selector: appSetBaseGenerator.Selector,
},
m.supportedGenerators,
argoprojiov1alpha1.ApplicationSetTemplate{},
appSet)
appSet,
params)
if err != nil {
return nil, fmt.Errorf("child generator returned an error on parameter generation: %v", err)
@@ -113,15 +143,11 @@ func (m *MatrixGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.Ap
var found bool
for _, r := range appSetGenerator.Matrix.Generators {
matrixGen, _ := getMatrixGenerator(r)
mergeGen, _ := getMergeGenerator(r)
base := &argoprojiov1alpha1.ApplicationSetGenerator{
List: r.List,
Clusters: r.Clusters,
Git: r.Git,
PullRequest: r.PullRequest,
Matrix: matrixGen,
Merge: mergeGen,
}
generators := GetRelevantGenerators(base, m.supportedGenerators)
@@ -142,17 +168,6 @@ func (m *MatrixGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.Ap
}
func getMatrixGenerator(r argoprojiov1alpha1.ApplicationSetNestedGenerator) (*argoprojiov1alpha1.MatrixGenerator, error) {
if r.Matrix == nil {
return nil, nil
}
matrix, err := argoprojiov1alpha1.ToNestedMatrixGenerator(r.Matrix)
if err != nil {
return nil, err
}
return matrix.ToMatrixGenerator(), nil
}
func (m *MatrixGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate {
return &appSetGenerator.Matrix.Template
}

View File

@@ -1,14 +1,22 @@
package generators
import (
"context"
"testing"
"time"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
kubefake "k8s.io/client-go/kubernetes/fake"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestMatrixGenerate(t *testing.T) {
@@ -27,7 +35,7 @@ func TestMatrixGenerate(t *testing.T) {
name string
baseGenerators []argoprojiov1alpha1.ApplicationSetNestedGenerator
expectedErr error
expected []map[string]string
expected []map[string]interface{}
}{
{
name: "happy flow - generate params",
@@ -39,7 +47,7 @@ func TestMatrixGenerate(t *testing.T) {
List: listGenerator,
},
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"path": "app1", "path.basename": "app1", "path.basenameNormalized": "app1", "cluster": "Cluster", "url": "Url"},
{"path": "app2", "path.basename": "app2", "path.basenameNormalized": "app2", "cluster": "Cluster", "url": "Url"},
},
@@ -64,7 +72,7 @@ func TestMatrixGenerate(t *testing.T) {
},
},
},
expected: []map[string]string{
expected: []map[string]interface{}{
{"a": "1", "b": "1"},
{"a": "1", "b": "2"},
{"a": "2", "b": "1"},
@@ -127,8 +135,13 @@ func TestMatrixGenerate(t *testing.T) {
testCaseCopy := testCase // Since tests may run in parallel
t.Run(testCaseCopy.name, func(t *testing.T) {
mock := &generatorMock{}
appSet := &argoprojiov1alpha1.ApplicationSet{}
genMock := &generatorMock{}
appSet := &argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{},
}
for _, g := range testCaseCopy.baseGenerators {
@@ -136,7 +149,7 @@ func TestMatrixGenerate(t *testing.T) {
Git: g.Git,
List: g.List,
}
mock.On("GenerateParams", &gitGeneratorSpec, appSet).Return([]map[string]string{
genMock.On("GenerateParams", mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator"), appSet).Return([]map[string]interface{}{
{
"path": "app1",
"path.basename": "app1",
@@ -149,13 +162,13 @@ func TestMatrixGenerate(t *testing.T) {
},
}, nil)
mock.On("GetTemplate", &gitGeneratorSpec).
genMock.On("GetTemplate", &gitGeneratorSpec).
Return(&argoprojiov1alpha1.ApplicationSetTemplate{})
}
var matrixGenerator = NewMatrixGenerator(
map[string]Generator{
"Git": mock,
"Git": genMock,
"List": &ListGenerator{},
},
)
@@ -168,7 +181,202 @@ func TestMatrixGenerate(t *testing.T) {
}, appSet)
if testCaseCopy.expectedErr != nil {
assert.EqualError(t, err, testCaseCopy.expectedErr.Error())
assert.ErrorIs(t, err, testCaseCopy.expectedErr)
} else {
assert.NoError(t, err)
assert.Equal(t, testCaseCopy.expected, got)
}
})
}
}
func TestMatrixGenerateGoTemplate(t *testing.T) {
gitGenerator := &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
}
listGenerator := &argoprojiov1alpha1.ListGenerator{
Elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "Cluster","url": "Url"}`)}},
}
testCases := []struct {
name string
baseGenerators []argoprojiov1alpha1.ApplicationSetNestedGenerator
expectedErr error
expected []map[string]interface{}
}{
{
name: "happy flow - generate params",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
Git: gitGenerator,
},
{
List: listGenerator,
},
},
expected: []map[string]interface{}{
{
"path": map[string]string{
"path": "app1",
"basename": "app1",
"basenameNormalized": "app1",
},
"cluster": "Cluster",
"url": "Url",
},
{
"path": map[string]string{
"path": "app2",
"basename": "app2",
"basenameNormalized": "app2",
},
"cluster": "Cluster",
"url": "Url",
},
},
},
{
name: "happy flow - generate params from two lists",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
List: &argoprojiov1alpha1.ListGenerator{
Elements: []apiextensionsv1.JSON{
{Raw: []byte(`{"a": "1"}`)},
{Raw: []byte(`{"a": "2"}`)},
},
},
},
{
List: &argoprojiov1alpha1.ListGenerator{
Elements: []apiextensionsv1.JSON{
{Raw: []byte(`{"b": "1"}`)},
{Raw: []byte(`{"b": "2"}`)},
},
},
},
},
expected: []map[string]interface{}{
{"a": "1", "b": "1"},
{"a": "1", "b": "2"},
{"a": "2", "b": "1"},
{"a": "2", "b": "2"},
},
},
{
name: "returns error if there is less than two base generators",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
Git: gitGenerator,
},
},
expectedErr: ErrLessThanTwoGenerators,
},
{
name: "returns error if there is more than two base generators",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
List: listGenerator,
},
{
List: listGenerator,
},
{
List: listGenerator,
},
},
expectedErr: ErrMoreThanTwoGenerators,
},
{
name: "returns error if there is more than one inner generator in the first base generator",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
Git: gitGenerator,
List: listGenerator,
},
{
Git: gitGenerator,
},
},
expectedErr: ErrMoreThenOneInnerGenerators,
},
{
name: "returns error if there is more than one inner generator in the second base generator",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
List: listGenerator,
},
{
Git: gitGenerator,
List: listGenerator,
},
},
expectedErr: ErrMoreThenOneInnerGenerators,
},
}
for _, testCase := range testCases {
testCaseCopy := testCase // Since tests may run in parallel
t.Run(testCaseCopy.name, func(t *testing.T) {
genMock := &generatorMock{}
appSet := &argoprojiov1alpha1.ApplicationSet{
ObjectMeta: metav1.ObjectMeta{
Name: "set",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}
for _, g := range testCaseCopy.baseGenerators {
gitGeneratorSpec := argoprojiov1alpha1.ApplicationSetGenerator{
Git: g.Git,
List: g.List,
}
genMock.On("GenerateParams", mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator"), appSet).Return([]map[string]interface{}{
{
"path": map[string]string{
"path": "app1",
"basename": "app1",
"basenameNormalized": "app1",
},
},
{
"path": map[string]string{
"path": "app2",
"basename": "app2",
"basenameNormalized": "app2",
},
},
}, nil)
genMock.On("GetTemplate", &gitGeneratorSpec).
Return(&argoprojiov1alpha1.ApplicationSetTemplate{})
}
var matrixGenerator = NewMatrixGenerator(
map[string]Generator{
"Git": genMock,
"List": &ListGenerator{},
},
)
got, err := matrixGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
Matrix: &argoprojiov1alpha1.MatrixGenerator{
Generators: testCaseCopy.baseGenerators,
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
},
}, appSet)
if testCaseCopy.expectedErr != nil {
assert.ErrorIs(t, err, testCaseCopy.expectedErr)
} else {
assert.NoError(t, err)
assert.Equal(t, testCaseCopy.expected, got)
@@ -289,6 +497,344 @@ func TestMatrixGetRequeueAfter(t *testing.T) {
}
}
func TestInterpolatedMatrixGenerate(t *testing.T) {
interpolatedGitGenerator := &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Files: []argoprojiov1alpha1.GitFileGeneratorItem{
{Path: "examples/git-generator-files-discovery/cluster-config/dev/config.json"},
{Path: "examples/git-generator-files-discovery/cluster-config/prod/config.json"},
},
}
interpolatedClusterGenerator := &argoprojiov1alpha1.ClusterGenerator{
Selector: metav1.LabelSelector{
MatchLabels: map[string]string{"environment": "{{path.basename}}"},
MatchExpressions: nil,
},
}
testCases := []struct {
name string
baseGenerators []argoprojiov1alpha1.ApplicationSetNestedGenerator
expectedErr error
expected []map[string]interface{}
clientError bool
}{
{
name: "happy flow - generate interpolated params",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
Git: interpolatedGitGenerator,
},
{
Clusters: interpolatedClusterGenerator,
},
},
expected: []map[string]interface{}{
{"path": "examples/git-generator-files-discovery/cluster-config/dev/config.json", "path.basename": "dev", "path.basenameNormalized": "dev", "name": "dev-01", "nameNormalized": "dev-01", "server": "https://dev-01.example.com", "metadata.labels.environment": "dev", "metadata.labels.argocd.argoproj.io/secret-type": "cluster"},
{"path": "examples/git-generator-files-discovery/cluster-config/prod/config.json", "path.basename": "prod", "path.basenameNormalized": "prod", "name": "prod-01", "nameNormalized": "prod-01", "server": "https://prod-01.example.com", "metadata.labels.environment": "prod", "metadata.labels.argocd.argoproj.io/secret-type": "cluster"},
},
clientError: false,
},
}
clusters := []client.Object{
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "dev-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "dev",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("dev-01"),
"server": []byte("https://dev-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "prod-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "prod",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("prod-01"),
"server": []byte("https://prod-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
testCaseCopy := testCase // Since tests may run in parallel
t.Run(testCaseCopy.name, func(t *testing.T) {
genMock := &generatorMock{}
appSet := &argoprojiov1alpha1.ApplicationSet{}
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
var clusterGenerator = NewClusterGenerator(cl, context.Background(), appClientset, "namespace")
for _, g := range testCaseCopy.baseGenerators {
gitGeneratorSpec := argoprojiov1alpha1.ApplicationSetGenerator{
Git: g.Git,
Clusters: g.Clusters,
}
genMock.On("GenerateParams", mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator"), appSet).Return([]map[string]interface{}{
{
"path": "examples/git-generator-files-discovery/cluster-config/dev/config.json",
"path.basename": "dev",
"path.basenameNormalized": "dev",
},
{
"path": "examples/git-generator-files-discovery/cluster-config/prod/config.json",
"path.basename": "prod",
"path.basenameNormalized": "prod",
},
}, nil)
genMock.On("GetTemplate", &gitGeneratorSpec).
Return(&argoprojiov1alpha1.ApplicationSetTemplate{})
}
var matrixGenerator = NewMatrixGenerator(
map[string]Generator{
"Git": genMock,
"Clusters": clusterGenerator,
},
)
got, err := matrixGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
Matrix: &argoprojiov1alpha1.MatrixGenerator{
Generators: testCaseCopy.baseGenerators,
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
},
}, appSet)
if testCaseCopy.expectedErr != nil {
assert.ErrorIs(t, err, testCaseCopy.expectedErr)
} else {
assert.NoError(t, err)
assert.Equal(t, testCaseCopy.expected, got)
}
})
}
}
func TestInterpolatedMatrixGenerateGoTemplate(t *testing.T) {
interpolatedGitGenerator := &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Files: []argoprojiov1alpha1.GitFileGeneratorItem{
{Path: "examples/git-generator-files-discovery/cluster-config/dev/config.json"},
{Path: "examples/git-generator-files-discovery/cluster-config/prod/config.json"},
},
}
interpolatedClusterGenerator := &argoprojiov1alpha1.ClusterGenerator{
Selector: metav1.LabelSelector{
MatchLabels: map[string]string{"environment": "{{.path.basename}}"},
MatchExpressions: nil,
},
}
testCases := []struct {
name string
baseGenerators []argoprojiov1alpha1.ApplicationSetNestedGenerator
expectedErr error
expected []map[string]interface{}
clientError bool
}{
{
name: "happy flow - generate interpolated params",
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
{
Git: interpolatedGitGenerator,
},
{
Clusters: interpolatedClusterGenerator,
},
},
expected: []map[string]interface{}{
{
"path": map[string]string{
"path": "examples/git-generator-files-discovery/cluster-config/dev/config.json",
"basename": "dev",
"basenameNormalized": "dev",
},
"name": "dev-01",
"nameNormalized": "dev-01",
"server": "https://dev-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"environment": "dev",
"argocd.argoproj.io/secret-type": "cluster",
},
},
},
{
"path": map[string]string{
"path": "examples/git-generator-files-discovery/cluster-config/prod/config.json",
"basename": "prod",
"basenameNormalized": "prod",
},
"name": "prod-01",
"nameNormalized": "prod-01",
"server": "https://prod-01.example.com",
"metadata": map[string]interface{}{
"labels": map[string]string{
"environment": "prod",
"argocd.argoproj.io/secret-type": "cluster",
},
},
},
},
clientError: false,
},
}
clusters := []client.Object{
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "dev-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "dev",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("dev-01"),
"server": []byte("https://dev-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
&corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "prod-01",
Namespace: "namespace",
Labels: map[string]string{
"argocd.argoproj.io/secret-type": "cluster",
"environment": "prod",
},
},
Data: map[string][]byte{
"config": []byte("{}"),
"name": []byte("prod-01"),
"server": []byte("https://prod-01.example.com"),
},
Type: corev1.SecretType("Opaque"),
},
}
// convert []client.Object to []runtime.Object, for use by kubefake package
runtimeClusters := []runtime.Object{}
for _, clientCluster := range clusters {
runtimeClusters = append(runtimeClusters, clientCluster)
}
for _, testCase := range testCases {
testCaseCopy := testCase // Since tests may run in parallel
t.Run(testCaseCopy.name, func(t *testing.T) {
genMock := &generatorMock{}
appSet := &argoprojiov1alpha1.ApplicationSet{
Spec: argoprojiov1alpha1.ApplicationSetSpec{
GoTemplate: true,
},
}
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
cl := &possiblyErroringFakeCtrlRuntimeClient{
fakeClient,
testCase.clientError,
}
var clusterGenerator = NewClusterGenerator(cl, context.Background(), appClientset, "namespace")
for _, g := range testCaseCopy.baseGenerators {
gitGeneratorSpec := argoprojiov1alpha1.ApplicationSetGenerator{
Git: g.Git,
Clusters: g.Clusters,
}
genMock.On("GenerateParams", mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator"), appSet).Return([]map[string]interface{}{
{
"path": map[string]string{
"path": "examples/git-generator-files-discovery/cluster-config/dev/config.json",
"basename": "dev",
"basenameNormalized": "dev",
},
},
{
"path": map[string]string{
"path": "examples/git-generator-files-discovery/cluster-config/prod/config.json",
"basename": "prod",
"basenameNormalized": "prod",
},
},
}, nil)
genMock.On("GetTemplate", &gitGeneratorSpec).
Return(&argoprojiov1alpha1.ApplicationSetTemplate{})
}
var matrixGenerator = NewMatrixGenerator(
map[string]Generator{
"Git": genMock,
"Clusters": clusterGenerator,
},
)
got, err := matrixGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
Matrix: &argoprojiov1alpha1.MatrixGenerator{
Generators: testCaseCopy.baseGenerators,
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
},
}, appSet)
if testCaseCopy.expectedErr != nil {
assert.ErrorIs(t, err, testCaseCopy.expectedErr)
} else {
assert.NoError(t, err)
assert.Equal(t, testCaseCopy.expected, got)
}
})
}
}
type generatorMock struct {
mock.Mock
}
@@ -299,10 +845,10 @@ func (g *generatorMock) GetTemplate(appSetGenerator *argoprojiov1alpha1.Applicat
return args.Get(0).(*argoprojiov1alpha1.ApplicationSetTemplate)
}
func (g *generatorMock) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (g *generatorMock) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
args := g.Called(appSetGenerator, appSet)
return args.Get(0).([]map[string]string), args.Error(1)
return args.Get(0).([]map[string]interface{}), args.Error(1)
}
func (g *generatorMock) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration {

View File

@@ -5,8 +5,10 @@ import (
"fmt"
"time"
"github.com/imdario/mergo"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*MergeGenerator)(nil)
@@ -32,8 +34,8 @@ func NewMergeGenerator(supportedGenerators map[string]Generator) Generator {
// getParamSetsForAllGenerators generates params for each child generator in a MergeGenerator. Param sets are returned
// in slices ordered according to the order of the given generators.
func (m *MergeGenerator) getParamSetsForAllGenerators(generators []argoprojiov1alpha1.ApplicationSetNestedGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([][]map[string]string, error) {
var paramSets [][]map[string]string
func (m *MergeGenerator) getParamSetsForAllGenerators(generators []argoprojiov1alpha1.ApplicationSetNestedGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([][]map[string]interface{}, error) {
var paramSets [][]map[string]interface{}
for _, generator := range generators {
generatorParamSets, err := m.getParams(generator, appSet)
if err != nil {
@@ -46,7 +48,7 @@ func (m *MergeGenerator) getParamSetsForAllGenerators(generators []argoprojiov1a
}
// GenerateParams gets the params produced by the MergeGenerator.
func (m *MergeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (m *MergeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator.Merge == nil {
return nil, EmptyAppSetGeneratorError
}
@@ -73,16 +75,24 @@ func (m *MergeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.Appl
for mergeKeyValue, baseParamSet := range baseParamSetsByMergeKey {
if overrideParamSet, exists := paramSetsByMergeKey[mergeKeyValue]; exists {
overriddenParamSet, err := utils.CombineStringMapsAllowDuplicates(baseParamSet, overrideParamSet)
if err != nil {
return nil, err
if appSet.Spec.GoTemplate {
if err := mergo.Merge(&baseParamSet, overrideParamSet, mergo.WithOverride); err != nil {
return nil, fmt.Errorf("failed to merge base param set with override param set: %w", err)
}
baseParamSetsByMergeKey[mergeKeyValue] = baseParamSet
} else {
overriddenParamSet, err := utils.CombineStringMapsAllowDuplicates(baseParamSet, overrideParamSet)
if err != nil {
return nil, err
}
baseParamSetsByMergeKey[mergeKeyValue] = utils.ConvertToMapStringInterface(overriddenParamSet)
}
baseParamSetsByMergeKey[mergeKeyValue] = overriddenParamSet
}
}
}
mergedParamSets := make([]map[string]string, len(baseParamSetsByMergeKey))
mergedParamSets := make([]map[string]interface{}, len(baseParamSetsByMergeKey))
var i = 0
for _, mergedParamSet := range baseParamSetsByMergeKey {
mergedParamSets[i] = mergedParamSet
@@ -95,7 +105,7 @@ func (m *MergeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.Appl
// getParamSetsByMergeKey converts the given list of parameter sets to a map of parameter sets where the key is the
// unique key of the parameter set as determined by the given mergeKeys. If any two parameter sets share the same merge
// key, getParamSetsByMergeKey will throw NonUniqueParamSets.
func getParamSetsByMergeKey(mergeKeys []string, paramSets []map[string]string) (map[string]map[string]string, error) {
func getParamSetsByMergeKey(mergeKeys []string, paramSets []map[string]interface{}) (map[string]map[string]interface{}, error) {
if len(mergeKeys) < 1 {
return nil, ErrNoMergeKeys
}
@@ -105,9 +115,9 @@ func getParamSetsByMergeKey(mergeKeys []string, paramSets []map[string]string) (
deDuplicatedMergeKeys[mergeKey] = false
}
paramSetsByMergeKey := make(map[string]map[string]string, len(paramSets))
paramSetsByMergeKey := make(map[string]map[string]interface{}, len(paramSets))
for _, paramSet := range paramSets {
paramSetKey := make(map[string]string)
paramSetKey := make(map[string]interface{})
for mergeKey := range deDuplicatedMergeKeys {
paramSetKey[mergeKey] = paramSet[mergeKey]
}
@@ -126,14 +136,28 @@ func getParamSetsByMergeKey(mergeKeys []string, paramSets []map[string]string) (
}
// getParams get the parameters generated by this generator.
func (m *MergeGenerator) getParams(appSetBaseGenerator argoprojiov1alpha1.ApplicationSetNestedGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
matrixGen, err := getMatrixGenerator(appSetBaseGenerator)
if err != nil {
return nil, err
func (m *MergeGenerator) getParams(appSetBaseGenerator argoprojiov1alpha1.ApplicationSetNestedGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
var matrix *argoprojiov1alpha1.MatrixGenerator
if appSetBaseGenerator.Matrix != nil {
nestedMatrix, err := argoprojiov1alpha1.ToNestedMatrixGenerator(appSetBaseGenerator.Matrix)
if err != nil {
return nil, err
}
if nestedMatrix != nil {
matrix = nestedMatrix.ToMatrixGenerator()
}
}
mergeGen, err := getMergeGenerator(appSetBaseGenerator)
if err != nil {
return nil, err
var mergeGenerator *argoprojiov1alpha1.MergeGenerator
if appSetBaseGenerator.Merge != nil {
nestedMerge, err := argoprojiov1alpha1.ToNestedMergeGenerator(appSetBaseGenerator.Merge)
if err != nil {
return nil, err
}
if nestedMerge != nil {
mergeGenerator = nestedMerge.ToMergeGenerator()
}
}
t, err := Transform(
@@ -144,12 +168,14 @@ func (m *MergeGenerator) getParams(appSetBaseGenerator argoprojiov1alpha1.Applic
SCMProvider: appSetBaseGenerator.SCMProvider,
ClusterDecisionResource: appSetBaseGenerator.ClusterDecisionResource,
PullRequest: appSetBaseGenerator.PullRequest,
Matrix: matrixGen,
Merge: mergeGen,
Matrix: matrix,
Merge: mergeGenerator,
Selector: appSetBaseGenerator.Selector,
},
m.supportedGenerators,
argoprojiov1alpha1.ApplicationSetTemplate{},
appSet)
appSet,
map[string]interface{}{})
if err != nil {
return nil, fmt.Errorf("child generator returned an error on parameter generation: %v", err)
@@ -171,15 +197,10 @@ func (m *MergeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.App
var found bool
for _, r := range appSetGenerator.Merge.Generators {
matrixGen, _ := getMatrixGenerator(r)
mergeGen, _ := getMergeGenerator(r)
base := &argoprojiov1alpha1.ApplicationSetGenerator{
List: r.List,
Clusters: r.Clusters,
Git: r.Git,
PullRequest: r.PullRequest,
Matrix: matrixGen,
Merge: mergeGen,
List: r.List,
Clusters: r.Clusters,
Git: r.Git,
}
generators := GetRelevantGenerators(base, m.supportedGenerators)
@@ -200,17 +221,6 @@ func (m *MergeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.App
}
func getMergeGenerator(r argoprojiov1alpha1.ApplicationSetNestedGenerator) (*argoprojiov1alpha1.MergeGenerator, error) {
if r.Merge == nil {
return nil, nil
}
merge, err := argoprojiov1alpha1.ToNestedMergeGenerator(r.Merge)
if err != nil {
return nil, err
}
return merge.ToMergeGenerator(), nil
}
// GetTemplate gets the Template field for the MergeGenerator.
func (m *MergeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate {
return &appSetGenerator.Merge.Template

View File

@@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func getNestedListGenerator(json string) *argoprojiov1alpha1.ApplicationSetNestedGenerator {
@@ -35,7 +35,7 @@ func getTerminalListGeneratorMultiple(jsons []string) argoprojiov1alpha1.Applica
return generator
}
func listOfMapsToSet(maps []map[string]string) (map[string]bool, error) {
func listOfMapsToSet(maps []map[string]interface{}) (map[string]bool, error) {
set := make(map[string]bool, len(maps))
for _, paramMap := range maps {
paramMapAsJson, err := json.Marshal(paramMap)
@@ -55,7 +55,7 @@ func TestMergeGenerate(t *testing.T) {
baseGenerators []argoprojiov1alpha1.ApplicationSetNestedGenerator
mergeKeys []string
expectedErr error
expected []map[string]string
expected []map[string]interface{}
}{
{
name: "no generators",
@@ -79,7 +79,7 @@ func TestMergeGenerate(t *testing.T) {
*getNestedListGenerator(`{"a": "3_1","b": "different","c": "3_3"}`), // gets ignored because its merge key value isn't in the base params set
},
mergeKeys: []string{"b"},
expected: []map[string]string{
expected: []map[string]interface{}{
{"a": "2_1", "b": "same", "c": "1_3"},
},
},
@@ -90,7 +90,7 @@ func TestMergeGenerate(t *testing.T) {
*getNestedListGenerator(`{"a": "a"}`),
},
mergeKeys: []string{"b"},
expected: []map[string]string{
expected: []map[string]interface{}{
{"a": "a"},
},
},
@@ -101,7 +101,7 @@ func TestMergeGenerate(t *testing.T) {
*getNestedListGenerator(`{"b": "b"}`),
},
mergeKeys: []string{"b"},
expected: []map[string]string{
expected: []map[string]interface{}{
{"a": "a"},
},
},
@@ -119,7 +119,7 @@ func TestMergeGenerate(t *testing.T) {
*getNestedListGenerator(`{"a": "1", "b": "1", "c": "added"}`),
},
mergeKeys: []string{"a", "b"},
expected: []map[string]string{
expected: []map[string]interface{}{
{"a": "1", "b": "1", "c": "added"},
{"a": "1", "b": "2"},
{"a": "2", "b": "1"},
@@ -141,7 +141,7 @@ func TestMergeGenerate(t *testing.T) {
*getNestedListGenerator(`{"a": "1", "b": "3", "d": "added"}`),
},
mergeKeys: []string{"a", "b"},
expected: []map[string]string{
expected: []map[string]interface{}{
{"a": "1", "b": "3", "c": "added", "d": "added"},
{"a": "2", "b": "2"},
},
@@ -213,9 +213,9 @@ func TestParamSetsAreUniqueByMergeKeys(t *testing.T) {
testCases := []struct {
name string
mergeKeys []string
paramSets []map[string]string
paramSets []map[string]interface{}
expectedErr error
expected map[string]map[string]string
expected map[string]map[string]interface{}
}{
{
name: "no merge keys",
@@ -225,28 +225,37 @@ func TestParamSetsAreUniqueByMergeKeys(t *testing.T) {
{
name: "no paramSets",
mergeKeys: []string{"key"},
expected: make(map[string]map[string]string),
expected: make(map[string]map[string]interface{}),
},
{
name: "simple key, unique paramSets",
mergeKeys: []string{"key"},
paramSets: []map[string]string{{"key": "a"}, {"key": "b"}},
expected: map[string]map[string]string{
paramSets: []map[string]interface{}{{"key": "a"}, {"key": "b"}},
expected: map[string]map[string]interface{}{
`{"key":"a"}`: {"key": "a"},
`{"key":"b"}`: {"key": "b"},
},
},
{
name: "simple key object, unique paramSets",
mergeKeys: []string{"key"},
paramSets: []map[string]interface{}{{"key": map[string]interface{}{"hello": "world"}}, {"key": "b"}},
expected: map[string]map[string]interface{}{
`{"key":{"hello":"world"}}`: {"key": map[string]interface{}{"hello": "world"}},
`{"key":"b"}`: {"key": "b"},
},
},
{
name: "simple key, non-unique paramSets",
mergeKeys: []string{"key"},
paramSets: []map[string]string{{"key": "a"}, {"key": "b"}, {"key": "b"}},
paramSets: []map[string]interface{}{{"key": "a"}, {"key": "b"}, {"key": "b"}},
expectedErr: fmt.Errorf("%w. Duplicate key was %s", ErrNonUniqueParamSets, `{"key":"b"}`),
},
{
name: "simple key, duplicated key name, unique paramSets",
mergeKeys: []string{"key", "key"},
paramSets: []map[string]string{{"key": "a"}, {"key": "b"}},
expected: map[string]map[string]string{
paramSets: []map[string]interface{}{{"key": "a"}, {"key": "b"}},
expected: map[string]map[string]interface{}{
`{"key":"a"}`: {"key": "a"},
`{"key":"b"}`: {"key": "b"},
},
@@ -254,32 +263,46 @@ func TestParamSetsAreUniqueByMergeKeys(t *testing.T) {
{
name: "simple key, duplicated key name, non-unique paramSets",
mergeKeys: []string{"key", "key"},
paramSets: []map[string]string{{"key": "a"}, {"key": "b"}, {"key": "b"}},
paramSets: []map[string]interface{}{{"key": "a"}, {"key": "b"}, {"key": "b"}},
expectedErr: fmt.Errorf("%w. Duplicate key was %s", ErrNonUniqueParamSets, `{"key":"b"}`),
},
{
name: "compound key, unique paramSets",
mergeKeys: []string{"key1", "key2"},
paramSets: []map[string]string{
paramSets: []map[string]interface{}{
{"key1": "a", "key2": "a"},
{"key1": "a", "key2": "b"},
{"key1": "b", "key2": "a"},
},
expected: map[string]map[string]string{
expected: map[string]map[string]interface{}{
`{"key1":"a","key2":"a"}`: {"key1": "a", "key2": "a"},
`{"key1":"a","key2":"b"}`: {"key1": "a", "key2": "b"},
`{"key1":"b","key2":"a"}`: {"key1": "b", "key2": "a"},
},
},
{
name: "compound key object, unique paramSets",
mergeKeys: []string{"key1", "key2"},
paramSets: []map[string]interface{}{
{"key1": "a", "key2": map[string]interface{}{"hello": "world"}},
{"key1": "a", "key2": "b"},
{"key1": "b", "key2": "a"},
},
expected: map[string]map[string]interface{}{
`{"key1":"a","key2":{"hello":"world"}}`: {"key1": "a", "key2": map[string]interface{}{"hello": "world"}},
`{"key1":"a","key2":"b"}`: {"key1": "a", "key2": "b"},
`{"key1":"b","key2":"a"}`: {"key1": "b", "key2": "a"},
},
},
{
name: "compound key, duplicate key names, unique paramSets",
mergeKeys: []string{"key1", "key1", "key2"},
paramSets: []map[string]string{
paramSets: []map[string]interface{}{
{"key1": "a", "key2": "a"},
{"key1": "a", "key2": "b"},
{"key1": "b", "key2": "a"},
},
expected: map[string]map[string]string{
expected: map[string]map[string]interface{}{
`{"key1":"a","key2":"a"}`: {"key1": "a", "key2": "a"},
`{"key1":"a","key2":"b"}`: {"key1": "a", "key2": "b"},
`{"key1":"b","key2":"a"}`: {"key1": "b", "key2": "a"},
@@ -288,7 +311,7 @@ func TestParamSetsAreUniqueByMergeKeys(t *testing.T) {
{
name: "compound key, non-unique paramSets",
mergeKeys: []string{"key1", "key2"},
paramSets: []map[string]string{
paramSets: []map[string]interface{}{
{"key1": "a", "key2": "a"},
{"key1": "a", "key2": "a"},
{"key1": "b", "key2": "a"},
@@ -298,7 +321,7 @@ func TestParamSetsAreUniqueByMergeKeys(t *testing.T) {
{
name: "compound key, duplicate key names, non-unique paramSets",
mergeKeys: []string{"key1", "key1", "key2"},
paramSets: []map[string]string{
paramSets: []map[string]interface{}{
{"key1": "a", "key2": "a"},
{"key1": "a", "key2": "a"},
{"key1": "b", "key2": "a"},

View File

@@ -9,9 +9,11 @@ import (
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/gosimple/slug"
"github.com/argoproj/argo-cd/v2/applicationset/services/pull_request"
pullrequest "github.com/argoproj/argo-cd/v2/applicationset/services/pull_request"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*PullRequestGenerator)(nil)
@@ -23,11 +25,13 @@ const (
type PullRequestGenerator struct {
client client.Client
selectServiceProviderFunc func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error)
auth SCMAuthProviders
}
func NewPullRequestGenerator(client client.Client) Generator {
func NewPullRequestGenerator(client client.Client, auth SCMAuthProviders) Generator {
g := &PullRequestGenerator{
client: client,
auth: auth,
}
g.selectServiceProviderFunc = g.selectServiceProvider
return g
@@ -47,7 +51,7 @@ func (g *PullRequestGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.A
return &appSetGenerator.PullRequest.Template
}
func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
@@ -66,13 +70,39 @@ func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
if err != nil {
return nil, fmt.Errorf("error listing repos: %v", err)
}
params := make([]map[string]string, 0, len(pulls))
params := make([]map[string]interface{}, 0, len(pulls))
// In order to follow the DNS label standard as defined in RFC 1123,
// we need to limit the 'branch' to 50 to give room to append/suffix-ing it
// with 13 more characters. Also, there is the need to clean it as recommended
// here https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
slug.MaxLength = 50
// Converting underscores to dashes
slug.CustomSub = map[string]string{
"_": "-",
}
var shortSHALength int
for _, pull := range pulls {
params = append(params, map[string]string{
"number": strconv.Itoa(pull.Number),
"branch": pull.Branch,
"head_sha": pull.HeadSHA,
})
shortSHALength = 8
if len(pull.HeadSHA) < 8 {
shortSHALength = len(pull.HeadSHA)
}
paramMap := map[string]interface{}{
"number": strconv.Itoa(pull.Number),
"branch": pull.Branch,
"branch_slug": slug.Make(pull.Branch),
"head_sha": pull.HeadSHA,
"head_short_sha": pull.HeadSHA[:shortSHALength],
}
// PR lables will only be supported for Go Template appsets, since fasttemplate will be deprecated.
if applicationSetInfo != nil && applicationSetInfo.Spec.GoTemplate {
paramMap["labels"] = pull.Labels
}
params = append(params, paramMap)
}
return params, nil
}
@@ -80,12 +110,15 @@ func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
// selectServiceProvider selects the provider to get pull requests from the configuration
func (g *PullRequestGenerator) selectServiceProvider(ctx context.Context, generatorConfig *argoprojiov1alpha1.PullRequestGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
if generatorConfig.Github != nil {
providerConfig := generatorConfig.Github
return g.github(ctx, generatorConfig.Github, applicationSetInfo)
}
if generatorConfig.GitLab != nil {
providerConfig := generatorConfig.GitLab
token, err := g.getSecretRef(ctx, providerConfig.TokenRef, applicationSetInfo.Namespace)
if err != nil {
return nil, fmt.Errorf("error fetching Secret token: %v", err)
}
return pullrequest.NewGithubService(ctx, token, providerConfig.API, providerConfig.Owner, providerConfig.Repo, providerConfig.Labels)
return pullrequest.NewGitLabService(ctx, token, providerConfig.API, providerConfig.Project, providerConfig.Labels, providerConfig.PullRequestState)
}
if generatorConfig.Gitea != nil {
providerConfig := generatorConfig.Gitea
@@ -110,6 +143,24 @@ func (g *PullRequestGenerator) selectServiceProvider(ctx context.Context, genera
return nil, fmt.Errorf("no Pull Request provider implementation configured")
}
func (g *PullRequestGenerator) github(ctx context.Context, cfg *argoprojiov1alpha1.PullRequestGeneratorGithub, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
// use an app if it was configured
if cfg.AppSecretName != "" {
auth, err := g.auth.GitHubApps.GetAuthSecret(ctx, cfg.AppSecretName)
if err != nil {
return nil, fmt.Errorf("error getting GitHub App secret: %v", err)
}
return pullrequest.NewGithubAppService(*auth, cfg.API, cfg.Owner, cfg.Repo, cfg.Labels)
}
// always default to token, even if not set (public access)
token, err := g.getSecretRef(ctx, cfg.TokenRef, applicationSetInfo.Namespace)
if err != nil {
return nil, fmt.Errorf("error fetching Secret token: %v", err)
}
return pullrequest.NewGithubService(ctx, token, cfg.API, cfg.Owner, cfg.Repo, cfg.Labels)
}
// getSecretRef gets the value of the key for the specified Secret resource.
func (g *PullRequestGenerator) getSecretRef(ctx context.Context, ref *argoprojiov1alpha1.SecretRef, namespace string) (string, error) {
if ref == nil {

View File

@@ -11,15 +11,16 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
pullrequest "github.com/argoproj/argo-cd/v2/applicationset/services/pull_request"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestPullRequestGithubGenerateParams(t *testing.T) {
ctx := context.Background()
cases := []struct {
selectFunc func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error)
expected []map[string]string
expectedErr error
selectFunc func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error)
expected []map[string]interface{}
expectedErr error
applicationSet argoprojiov1alpha1.ApplicationSet
}{
{
selectFunc: func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
@@ -35,11 +36,63 @@ func TestPullRequestGithubGenerateParams(t *testing.T) {
nil,
)
},
expected: []map[string]string{
expected: []map[string]interface{}{
{
"number": "1",
"branch": "branch1",
"head_sha": "089d92cbf9ff857a39e6feccd32798ca700fb958",
"number": "1",
"branch": "branch1",
"branch_slug": "branch1",
"head_sha": "089d92cbf9ff857a39e6feccd32798ca700fb958",
"head_short_sha": "089d92cb",
},
},
expectedErr: nil,
},
{
selectFunc: func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
return pullrequest.NewFakeService(
ctx,
[]*pullrequest.PullRequest{
&pullrequest.PullRequest{
Number: 2,
Branch: "feat/areally+long_pull_request_name_to_test_argo_slugification_and_branch_name_shortening_feature",
HeadSHA: "9b34ff5bd418e57d58891eb0aa0728043ca1e8be",
},
},
nil,
)
},
expected: []map[string]interface{}{
{
"number": "2",
"branch": "feat/areally+long_pull_request_name_to_test_argo_slugification_and_branch_name_shortening_feature",
"branch_slug": "feat-areally-long-pull-request-name-to-test-argo",
"head_sha": "9b34ff5bd418e57d58891eb0aa0728043ca1e8be",
"head_short_sha": "9b34ff5b",
},
},
expectedErr: nil,
},
{
selectFunc: func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
return pullrequest.NewFakeService(
ctx,
[]*pullrequest.PullRequest{
&pullrequest.PullRequest{
Number: 1,
Branch: "a-very-short-sha",
HeadSHA: "abcd",
},
},
nil,
)
},
expected: []map[string]interface{}{
{
"number": "1",
"branch": "a-very-short-sha",
"branch_slug": "a-very-short-sha",
"head_sha": "abcd",
"head_short_sha": "abcd",
},
},
expectedErr: nil,
@@ -55,6 +108,71 @@ func TestPullRequestGithubGenerateParams(t *testing.T) {
expected: nil,
expectedErr: fmt.Errorf("error listing repos: fake error"),
},
{
selectFunc: func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
return pullrequest.NewFakeService(
ctx,
[]*pullrequest.PullRequest{
&pullrequest.PullRequest{
Number: 1,
Branch: "branch1",
HeadSHA: "089d92cbf9ff857a39e6feccd32798ca700fb958",
Labels: []string{"preview"},
},
},
nil,
)
},
expected: []map[string]interface{}{
{
"number": "1",
"branch": "branch1",
"branch_slug": "branch1",
"head_sha": "089d92cbf9ff857a39e6feccd32798ca700fb958",
"head_short_sha": "089d92cb",
"labels": []string{"preview"},
},
},
expectedErr: nil,
applicationSet: argoprojiov1alpha1.ApplicationSet{
Spec: argoprojiov1alpha1.ApplicationSetSpec{
// Application set is using Go Template.
GoTemplate: true,
},
},
},
{
selectFunc: func(context.Context, *argoprojiov1alpha1.PullRequestGenerator, *argoprojiov1alpha1.ApplicationSet) (pullrequest.PullRequestService, error) {
return pullrequest.NewFakeService(
ctx,
[]*pullrequest.PullRequest{
&pullrequest.PullRequest{
Number: 1,
Branch: "branch1",
HeadSHA: "089d92cbf9ff857a39e6feccd32798ca700fb958",
Labels: []string{"preview"},
},
},
nil,
)
},
expected: []map[string]interface{}{
{
"number": "1",
"branch": "branch1",
"branch_slug": "branch1",
"head_sha": "089d92cbf9ff857a39e6feccd32798ca700fb958",
"head_short_sha": "089d92cb",
},
},
expectedErr: nil,
applicationSet: argoprojiov1alpha1.ApplicationSet{
Spec: argoprojiov1alpha1.ApplicationSetSpec{
// Application set is using fasttemplate.
GoTemplate: false,
},
},
},
}
for _, c := range cases {
@@ -64,7 +182,8 @@ func TestPullRequestGithubGenerateParams(t *testing.T) {
generatorConfig := argoprojiov1alpha1.ApplicationSetGenerator{
PullRequest: &argoprojiov1alpha1.PullRequestGenerator{},
}
got, gotErr := gen.GenerateParams(&generatorConfig, nil)
got, gotErr := gen.GenerateParams(&generatorConfig, &c.applicationSet)
assert.Equal(t, c.expectedErr, gotErr)
assert.ElementsMatch(t, c.expected, got)
}

View File

@@ -9,8 +9,10 @@ import (
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/argoproj/argo-cd/v2/applicationset/services/github_app_auth"
"github.com/argoproj/argo-cd/v2/applicationset/services/scm_provider"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
var _ Generator = (*SCMProviderGenerator)(nil)
@@ -23,10 +25,23 @@ type SCMProviderGenerator struct {
client client.Client
// Testing hooks.
overrideProvider scm_provider.SCMProviderService
SCMAuthProviders
}
func NewSCMProviderGenerator(client client.Client) Generator {
return &SCMProviderGenerator{client: client}
type SCMAuthProviders struct {
GitHubApps github_app_auth.Credentials
}
func NewSCMProviderGenerator(client client.Client, providers SCMAuthProviders) Generator {
return &SCMProviderGenerator{
client: client,
SCMAuthProviders: providers,
}
}
// Testing generator
func NewTestSCMProviderGenerator(overrideProvider scm_provider.SCMProviderService) Generator {
return &SCMProviderGenerator{overrideProvider: overrideProvider}
}
func (g *SCMProviderGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration {
@@ -43,7 +58,7 @@ func (g *SCMProviderGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.A
return &appSetGenerator.SCMProvider.Template
}
func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) ([]map[string]interface{}, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
@@ -60,13 +75,10 @@ func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
if g.overrideProvider != nil {
provider = g.overrideProvider
} else if providerConfig.Github != nil {
token, err := g.getSecretRef(ctx, providerConfig.Github.TokenRef, applicationSetInfo.Namespace)
var err error
provider, err = g.githubProvider(ctx, providerConfig.Github, applicationSetInfo)
if err != nil {
return nil, fmt.Errorf("error fetching Github token: %v", err)
}
provider, err = scm_provider.NewGithubProvider(ctx, providerConfig.Github.Organization, token, providerConfig.Github.API, providerConfig.Github.AllBranches)
if err != nil {
return nil, fmt.Errorf("error initializing Github service: %v", err)
return nil, fmt.Errorf("scm provider: %w", err)
}
} else if providerConfig.Gitlab != nil {
token, err := g.getSecretRef(ctx, providerConfig.Gitlab.TokenRef, applicationSetInfo.Namespace)
@@ -101,6 +113,15 @@ func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
if scmError != nil {
return nil, fmt.Errorf("error initializing Bitbucket Server service: %v", scmError)
}
} else if providerConfig.AzureDevOps != nil {
token, err := g.getSecretRef(ctx, providerConfig.AzureDevOps.AccessTokenRef, applicationSetInfo.Namespace)
if err != nil {
return nil, fmt.Errorf("error fetching Azure Devops access token: %v", err)
}
provider, err = scm_provider.NewAzureDevOpsProvider(ctx, token, providerConfig.AzureDevOps.Organization, providerConfig.AzureDevOps.API, providerConfig.AzureDevOps.TeamProject, providerConfig.AzureDevOps.AllBranches)
if err != nil {
return nil, fmt.Errorf("error initializing Azure Devops service: %v", err)
}
} else if providerConfig.Bitbucket != nil {
appPassword, err := g.getSecretRef(ctx, providerConfig.Bitbucket.AppPasswordRef, applicationSetInfo.Namespace)
if err != nil {
@@ -119,15 +140,23 @@ func (g *SCMProviderGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
if err != nil {
return nil, fmt.Errorf("error listing repos: %v", err)
}
params := make([]map[string]string, 0, len(repos))
params := make([]map[string]interface{}, 0, len(repos))
var shortSHALength int
for _, repo := range repos {
params = append(params, map[string]string{
"organization": repo.Organization,
"repository": repo.Repository,
"url": repo.URL,
"branch": repo.Branch,
"sha": repo.SHA,
"labels": strings.Join(repo.Labels, ","),
shortSHALength = 8
if len(repo.SHA) < 8 {
shortSHALength = len(repo.SHA)
}
params = append(params, map[string]interface{}{
"organization": repo.Organization,
"repository": repo.Repository,
"url": repo.URL,
"branch": repo.Branch,
"sha": repo.SHA,
"short_sha": repo.SHA[:shortSHALength],
"labels": strings.Join(repo.Labels, ","),
"branchNormalized": utils.SanitizeName(repo.Branch),
})
}
return params, nil
@@ -155,3 +184,25 @@ func (g *SCMProviderGenerator) getSecretRef(ctx context.Context, ref *argoprojio
}
return string(tokenBytes), nil
}
func (g *SCMProviderGenerator) githubProvider(ctx context.Context, github *argoprojiov1alpha1.SCMProviderGeneratorGithub, applicationSetInfo *argoprojiov1alpha1.ApplicationSet) (scm_provider.SCMProviderService, error) {
if github.AppSecretName != "" {
auth, err := g.GitHubApps.GetAuthSecret(ctx, github.AppSecretName)
if err != nil {
return nil, fmt.Errorf("error fetching Github app secret: %v", err)
}
return scm_provider.NewGithubAppProviderFor(
*auth,
github.Organization,
github.API,
github.AllBranches,
)
}
token, err := g.getSecretRef(ctx, github.TokenRef, applicationSetInfo.Namespace)
if err != nil {
return nil, fmt.Errorf("error fetching Github token: %v", err)
}
return scm_provider.NewGithubProvider(ctx, github.Organization, token, github.API, github.AllBranches)
}

View File

@@ -10,7 +10,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"github.com/argoproj/argo-cd/v2/applicationset/services/scm_provider"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestSCMProviderGetSecretRef(t *testing.T) {
@@ -87,7 +87,7 @@ func TestSCMProviderGenerateParams(t *testing.T) {
Repository: "repo1",
URL: "git@github.com:myorg/repo1.git",
Branch: "main",
SHA: "abcd1234",
SHA: "0bc57212c3cbbec69d20b34c507284bd300def5b",
Labels: []string{"prod", "staging"},
},
{
@@ -95,7 +95,7 @@ func TestSCMProviderGenerateParams(t *testing.T) {
Repository: "repo2",
URL: "git@github.com:myorg/repo2.git",
Branch: "main",
SHA: "00000000",
SHA: "59d0",
},
},
}
@@ -109,7 +109,9 @@ func TestSCMProviderGenerateParams(t *testing.T) {
assert.Equal(t, "repo1", params[0]["repository"])
assert.Equal(t, "git@github.com:myorg/repo1.git", params[0]["url"])
assert.Equal(t, "main", params[0]["branch"])
assert.Equal(t, "abcd1234", params[0]["sha"])
assert.Equal(t, "0bc57212c3cbbec69d20b34c507284bd300def5b", params[0]["sha"])
assert.Equal(t, "0bc57212", params[0]["short_sha"])
assert.Equal(t, "59d0", params[1]["short_sha"])
assert.Equal(t, "prod,staging", params[0]["labels"])
assert.Equal(t, "repo2", params[1]["repository"])
}

View File

@@ -0,0 +1,19 @@
package github_app_auth
import "context"
// Authentication has the authentication information required to access the GitHub API and repositories.
type Authentication struct {
// Id specifies the ID of the GitHub app used to access the repo
Id int64
// InstallationId specifies the installation ID of the GitHub App used to access the repo
InstallationId int64
// EnterpriseBaseURL specifies the base URL of GitHub Enterprise installation. If empty will default to https://api.github.com
EnterpriseBaseURL string
// PrivateKey in PEM format.
PrivateKey string
}
type Credentials interface {
GetAuthSecret(ctx context.Context, secretName string) (*Authentication, error)
}

View File

@@ -0,0 +1,35 @@
package github_app
import (
"fmt"
"net/http"
"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/google/go-github/v35/github"
"github.com/argoproj/argo-cd/v2/applicationset/services/github_app_auth"
)
// Client builds a github client for the given app authentication.
func Client(g github_app_auth.Authentication, url string) (*github.Client, error) {
rt, err := ghinstallation.New(http.DefaultTransport, g.Id, g.InstallationId, []byte(g.PrivateKey))
if err != nil {
return nil, fmt.Errorf("failed to create github app install: %w", err)
}
if url == "" {
url = g.EnterpriseBaseURL
}
var client *github.Client
if url == "" {
httpClient := http.Client{Transport: rt}
client = github.NewClient(&httpClient)
} else {
rt.BaseURL = url
httpClient := http.Client{Transport: rt}
client, err = github.NewEnterpriseClient(url, url, &httpClient)
if err != nil {
return nil, fmt.Errorf("failed to create github enterprise client: %w", err)
}
}
return client, nil
}

View File

@@ -69,6 +69,7 @@ func (b *BitbucketService) List(_ context.Context) ([]*PullRequest, error) {
Number: pull.ID,
Branch: pull.FromRef.DisplayID, // ID: refs/heads/main DisplayID: main
HeadSHA: pull.FromRef.LatestCommit, // This is not defined in the official docs, but works in practice
Labels: []string{}, // Not supported by library
})
}

View File

@@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"
"github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
)
@@ -122,16 +122,19 @@ func TestListPullRequestPagination(t *testing.T) {
Number: 101,
Branch: "feature-101",
HeadSHA: "ab3cf2e4d1517c83e720d2585b9402dbef71f992",
Labels: []string{},
}, *pullRequests[0])
assert.Equal(t, PullRequest{
Number: 102,
Branch: "feature-102",
HeadSHA: "bb3cf2e4d1517c83e720d2585b9402dbef71f992",
Labels: []string{},
}, *pullRequests[1])
assert.Equal(t, PullRequest{
Number: 200,
Branch: "feature-200",
HeadSHA: "cb3cf2e4d1517c83e720d2585b9402dbef71f992",
Labels: []string{},
}, *pullRequests[2])
}
@@ -284,11 +287,13 @@ func TestListPullRequestBranchMatch(t *testing.T) {
Number: 101,
Branch: "feature-101",
HeadSHA: "ab3cf2e4d1517c83e720d2585b9402dbef71f992",
Labels: []string{},
}, *pullRequests[0])
assert.Equal(t, PullRequest{
Number: 102,
Branch: "feature-102",
HeadSHA: "bb3cf2e4d1517c83e720d2585b9402dbef71f992",
Labels: []string{},
}, *pullRequests[1])
regexp = `.*2$`
@@ -305,6 +310,7 @@ func TestListPullRequestBranchMatch(t *testing.T) {
Number: 102,
Branch: "feature-102",
HeadSHA: "bb3cf2e4d1517c83e720d2585b9402dbef71f992",
Labels: []string{},
}, *pullRequests[0])
regexp = `[\d{2}`

View File

@@ -0,0 +1,89 @@
[
{
"id": 35385049,
"iid": 15442,
"project_id": 278964,
"title": "Draft: Use structured logging for DB load balancer",
"description": "",
"state": "opened",
"created_at": "2019-08-20T10:58:54.413Z",
"updated_at": "2019-08-20T12:01:49.849Z",
"merged_by": null,
"merged_at": null,
"closed_by": null,
"closed_at": null,
"target_branch": "master",
"source_branch": "use-structured-logging-for-db-load-balancer",
"user_notes_count": 1,
"upvotes": 0,
"downvotes": 0,
"assignee": {
"id": 4088036,
"name": "Hordur Freyr Yngvason",
"username": "hfyngvason",
"state": "active",
"avatar_url": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/4088036/avatar.png",
"web_url": "https://gitlab.com/hfyngvason"
},
"author": {
"id": 4088036,
"name": "Hordur Freyr Yngvason",
"username": "hfyngvason",
"state": "active",
"avatar_url": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/4088036/avatar.png",
"web_url": "https://gitlab.com/hfyngvason"
},
"assignees": [
{
"id": 4088036,
"name": "Hordur Freyr Yngvason",
"username": "hfyngvason",
"state": "active",
"avatar_url": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/4088036/avatar.png",
"web_url": "https://gitlab.com/hfyngvason"
}
],
"reviewers": [
{
"id": 2535118,
"name": "Thong Kuah",
"username": "tkuah",
"state": "active",
"avatar_url": "https://secure.gravatar.com/avatar/f7b51bdd49a4914d29504d7ff4c3f7b9?s=80&d=identicon",
"web_url": "https://gitlab.com/tkuah"
}
],
"source_project_id": 278964,
"target_project_id": 278964,
"labels": [
"backend",
"backstage",
"database",
"database::review pending",
"group::autodevops and kubernetes"
],
"work_in_progress": true,
"milestone": null,
"merge_when_pipeline_succeeds": false,
"merge_status": "can_be_merged",
"sha": "2fc4e8b972ff3208ec63b6143e34ad67ff343ad7",
"merge_commit_sha": null,
"discussion_locked": null,
"should_remove_source_branch": null,
"force_remove_source_branch": true,
"reference": "!15442",
"web_url": "https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15442",
"time_stats": {
"time_estimate": 0,
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
},
"squash": true,
"task_completion_status": {
"count": 12,
"completed_count": 0
},
"approvals_before_merge": 1
}
]

View File

@@ -57,7 +57,17 @@ func (g *GiteaService) List(ctx context.Context) ([]*PullRequest, error) {
Number: int(pr.Index),
Branch: pr.Head.Ref,
HeadSHA: pr.Head.Sha,
Labels: getGiteaPRLabelNames(pr.Labels),
})
}
return list, nil
}
// Get the Gitea pull request label names.
func getGiteaPRLabelNames(giteaLabels []*gitea.Label) []string {
var labelNames []string
for _, giteaLabel := range giteaLabels {
labelNames = append(labelNames, giteaLabel.Name)
}
return labelNames
}

View File

@@ -8,6 +8,7 @@ import (
"net/http/httptest"
"testing"
"code.gitea.io/sdk/gitea"
"github.com/stretchr/testify/assert"
)
@@ -257,3 +258,32 @@ func TestGiteaList(t *testing.T) {
assert.Equal(t, prs[0].Branch, "test")
assert.Equal(t, prs[0].HeadSHA, "7bbaf62d92ddfafd9cc8b340c619abaec32bc09f")
}
func TestGetGiteaPRLabelNames(t *testing.T) {
Tests := []struct {
Name string
PullLabels []*gitea.Label
ExpectedResult []string
}{
{
Name: "PR has labels",
PullLabels: []*gitea.Label{
&gitea.Label{Name: "label1"},
&gitea.Label{Name: "label2"},
&gitea.Label{Name: "label3"},
},
ExpectedResult: []string{"label1", "label2", "label3"},
},
{
Name: "PR does not have labels",
PullLabels: []*gitea.Label{},
ExpectedResult: nil,
},
}
for _, test := range Tests {
t.Run(test.Name, func(t *testing.T) {
labels := getGiteaPRLabelNames(test.PullLabels)
assert.Equal(t, test.ExpectedResult, labels)
})
}
}

View File

@@ -58,7 +58,7 @@ func (g *GithubService) List(ctx context.Context) ([]*PullRequest, error) {
for {
pulls, resp, err := g.client.PullRequests.List(ctx, g.owner, g.repo, opts)
if err != nil {
return nil, fmt.Errorf("error listing pull requests for %s/%s: %v", g.owner, g.repo, err)
return nil, fmt.Errorf("error listing pull requests for %s/%s: %w", g.owner, g.repo, err)
}
for _, pull := range pulls {
if !containLabels(g.labels, pull.Labels) {
@@ -68,6 +68,7 @@ func (g *GithubService) List(ctx context.Context) ([]*PullRequest, error) {
Number: *pull.Number,
Branch: *pull.Head.Ref,
HeadSHA: *pull.Head.SHA,
Labels: getGithubPRLabelNames(pull.Labels),
})
}
if resp.NextPage == 0 {
@@ -97,3 +98,12 @@ func containLabels(expectedLabels []string, gotLabels []*github.Label) bool {
}
return true
}
// Get the Github pull request label names.
func getGithubPRLabelNames(gitHubLabels []*github.Label) []string {
var labelNames []string
for _, gitHubLabel := range gitHubLabels {
labelNames = append(labelNames, *gitHubLabel.Name)
}
return labelNames
}

View File

@@ -0,0 +1,19 @@
package pull_request
import (
"github.com/argoproj/argo-cd/v2/applicationset/services/github_app_auth"
"github.com/argoproj/argo-cd/v2/applicationset/services/internal/github_app"
)
func NewGithubAppService(g github_app_auth.Authentication, url, owner, repo string, labels []string) (PullRequestService, error) {
client, err := github_app.Client(g, url)
if err != nil {
return nil, err
}
return &GithubService{
client: client,
owner: owner,
repo: repo,
labels: labels,
}, nil
}

View File

@@ -4,6 +4,7 @@ import (
"testing"
"github.com/google/go-github/v35/github"
"github.com/stretchr/testify/assert"
)
func toPtr(s string) *string {
@@ -57,3 +58,32 @@ func TestContainLabels(t *testing.T) {
})
}
}
func TestGetGitHubPRLabelNames(t *testing.T) {
Tests := []struct {
Name string
PullLabels []*github.Label
ExpectedResult []string
}{
{
Name: "PR has labels",
PullLabels: []*github.Label{
&github.Label{Name: toPtr("label1")},
&github.Label{Name: toPtr("label2")},
&github.Label{Name: toPtr("label3")},
},
ExpectedResult: []string{"label1", "label2", "label3"},
},
{
Name: "PR does not have labels",
PullLabels: []*github.Label{},
ExpectedResult: nil,
},
}
for _, test := range Tests {
t.Run(test.Name, func(t *testing.T) {
labels := getGithubPRLabelNames(test.PullLabels)
assert.Equal(t, test.ExpectedResult, labels)
})
}
}

View File

@@ -0,0 +1,84 @@
package pull_request
import (
"context"
"fmt"
"os"
gitlab "github.com/xanzy/go-gitlab"
)
type GitLabService struct {
client *gitlab.Client
project string
labels []string
pullRequestState string
}
var _ PullRequestService = (*GitLabService)(nil)
func NewGitLabService(ctx context.Context, token, url, project string, labels []string, pullRequestState string) (PullRequestService, error) {
var clientOptionFns []gitlab.ClientOptionFunc
// Set a custom Gitlab base URL if one is provided
if url != "" {
clientOptionFns = append(clientOptionFns, gitlab.WithBaseURL(url))
}
if token == "" {
token = os.Getenv("GITLAB_TOKEN")
}
client, err := gitlab.NewClient(token, clientOptionFns...)
if err != nil {
return nil, fmt.Errorf("error creating Gitlab client: %v", err)
}
return &GitLabService{
client: client,
project: project,
labels: labels,
pullRequestState: pullRequestState,
}, nil
}
func (g *GitLabService) List(ctx context.Context) ([]*PullRequest, error) {
// Filter the merge requests on labels, if they are specified.
var labels *gitlab.Labels
if len(g.labels) > 0 {
labels = (*gitlab.Labels)(&g.labels)
}
opts := &gitlab.ListProjectMergeRequestsOptions{
ListOptions: gitlab.ListOptions{
PerPage: 100,
},
Labels: labels,
}
if g.pullRequestState != "" {
opts.State = &g.pullRequestState
}
pullRequests := []*PullRequest{}
for {
mrs, resp, err := g.client.MergeRequests.ListProjectMergeRequests(g.project, opts)
if err != nil {
return nil, fmt.Errorf("error listing merge requests for project '%s': %v", g.project, err)
}
for _, mr := range mrs {
pullRequests = append(pullRequests, &PullRequest{
Number: mr.IID,
Branch: mr.SourceBranch,
HeadSHA: mr.SHA,
Labels: mr.Labels,
})
}
if resp.NextPage == 0 {
break
}
opts.Page = resp.NextPage
}
return pullRequests, nil
}

View File

@@ -0,0 +1,122 @@
package pull_request
import (
"context"
"io"
"net/http"
"net/http/httptest"
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func writeMRListResponse(t *testing.T, w io.Writer) {
f, err := os.Open("fixtures/gitlab_mr_list_response.json")
if err != nil {
t.Fatalf("error opening fixture file: %v", err)
}
if _, err = io.Copy(w, f); err != nil {
t.Fatalf("error writing response: %v", err)
}
}
func TestGitLabServiceCustomBaseURL(t *testing.T) {
mux := http.NewServeMux()
server := httptest.NewServer(mux)
defer server.Close()
path := "/api/v4/projects/278964/merge_requests"
mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, path+"?per_page=100", r.URL.RequestURI())
writeMRListResponse(t, w)
})
svc, err := NewGitLabService(context.Background(), "", server.URL, "278964", nil, "")
assert.NoError(t, err)
_, err = svc.List(context.Background())
assert.NoError(t, err)
}
func TestGitLabServiceToken(t *testing.T) {
mux := http.NewServeMux()
server := httptest.NewServer(mux)
defer server.Close()
path := "/api/v4/projects/278964/merge_requests"
mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, "token-123", r.Header.Get("Private-Token"))
writeMRListResponse(t, w)
})
svc, err := NewGitLabService(context.Background(), "token-123", server.URL, "278964", nil, "")
assert.NoError(t, err)
_, err = svc.List(context.Background())
assert.NoError(t, err)
}
func TestList(t *testing.T) {
mux := http.NewServeMux()
server := httptest.NewServer(mux)
defer server.Close()
path := "/api/v4/projects/278964/merge_requests"
mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, path+"?per_page=100", r.URL.RequestURI())
writeMRListResponse(t, w)
})
svc, err := NewGitLabService(context.Background(), "", server.URL, "278964", []string{}, "")
assert.NoError(t, err)
prs, err := svc.List(context.Background())
assert.NoError(t, err)
assert.Len(t, prs, 1)
assert.Equal(t, prs[0].Number, 15442)
assert.Equal(t, prs[0].Branch, "use-structured-logging-for-db-load-balancer")
assert.Equal(t, prs[0].HeadSHA, "2fc4e8b972ff3208ec63b6143e34ad67ff343ad7")
}
func TestListWithLabels(t *testing.T) {
mux := http.NewServeMux()
server := httptest.NewServer(mux)
defer server.Close()
path := "/api/v4/projects/278964/merge_requests"
mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, path+"?labels=feature%2Cready&per_page=100", r.URL.RequestURI())
writeMRListResponse(t, w)
})
svc, err := NewGitLabService(context.Background(), "", server.URL, "278964", []string{"feature", "ready"}, "")
assert.NoError(t, err)
_, err = svc.List(context.Background())
assert.NoError(t, err)
}
func TestListWithState(t *testing.T) {
mux := http.NewServeMux()
server := httptest.NewServer(mux)
defer server.Close()
path := "/api/v4/projects/278964/merge_requests"
mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, path+"?per_page=100&state=opened", r.URL.RequestURI())
writeMRListResponse(t, w)
})
svc, err := NewGitLabService(context.Background(), "", server.URL, "278964", []string{}, "opened")
assert.NoError(t, err)
_, err = svc.List(context.Background())
assert.NoError(t, err)
}

Some files were not shown because too many files have changed in this diff Show More