Compare commits

...

881 Commits

Author SHA1 Message Date
rumstead
ac74bea647 fix: traverse generator tree when getting requeue time (#12407) (#12409)
* add unit test reproducing

Signed-off-by: rumstead <rjumstead@gmail.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat: Begin polishing top bar design (#12327)

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* chore: add dist to path to use our kustomize version (#12352)

* chore: add dist to path to use our kustomize version

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

* correct path

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>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* fix: when resource does not exist node menu and resource details shou… (#12360)

* fix: when resource does not exist node menu and resource details should still render

Signed-off-by: Joshua Helton <jdoghelton@gmail.com>

* Retrigger CI pipeline

Signed-off-by: Joshua Helton <jdoghelton@gmail.com>

---------

Signed-off-by: Joshua Helton <jdoghelton@gmail.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* fix: traverse generator tree when getting requeue time

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* fix: traverse generator tree when getting requeue time

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* remove duplicate code

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* revert gitignore

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* update from code review

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

---------

Signed-off-by: rumstead <rjumstead@gmail.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Joshua Helton <jdoghelton@gmail.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: jphelton <jdoghelton@gmail.com>
2023-02-24 16:31:22 -05:00
Justin Marquis
f102988793 chore: use registry.k8s.io instead of k8s.gcr.io (#12362)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-17 15:13:51 -05:00
dependabot[bot]
2c52907304 chore(deps): bump imjasonh/setup-crane from 0.2 to 0.3 (#12504)
Bumps [imjasonh/setup-crane](https://github.com/imjasonh/setup-crane) from 0.2 to 0.3.
- [Release notes](https://github.com/imjasonh/setup-crane/releases)
- [Commits](e82f1b9a80...00c9e93efa)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: imjasonh/setup-crane
  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-02-17 14:40:11 -05:00
Josh Soref
1d6f8b113c docs: FAQ improvements (#12146)
* docs: use more backticks in FAQ

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* docs: add FAQ entry

The order in patch list … doesn't match $setElementOrder list: …

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-02-17 14:24:33 -05:00
Dmitriy Mann
5bfcff8631 fix: valid username in webhook URL matching regex (#9055) (#12203)
This commit fixes incorrect regular expression used for URL matching.

Expected behavior: valid user info part is matched => webhook is sent.
Actual behavior: some valid user info is not matched, example: `ssh://user-name@example.com/org/repo` => webhook is not sent.

Context:
 - [RFC 3986 3.2.1 - User Information](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.1)
 - [Username validation regex in shadow Linux package](https://github.com/shadow-maint/shadow/blob/master/libmisc/chkname.c#L36)

Signed-off-by: mdsjip <2284562+mdsjip@users.noreply.github.com>
2023-02-17 14:11:30 -05:00
dependabot[bot]
55289991c6 chore(deps): bump docker/setup-buildx-action from 2.4.0 to 2.4.1 (#12308)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](15c905b16b...f03ac48505)

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

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  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-02-17 14:01:11 -05:00
atusy
b007073231 docs: fix typo (#12389)
Signed-off-by: atusy <30277794+atusy@users.noreply.github.com>
2023-02-17 13:57:48 -05:00
dependabot[bot]
536d1d0e10 chore(deps): bump actions/cache from 3.2.4 to 3.2.5 (#12433)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](627f0f41f6...6998d139dd)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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-02-17 13:52:50 -05:00
Wojtek Cichoń
dd44083d78 docs: Updated link to Jenkins and added GitHub Actions link (#12465)
Signed-off-by: Wojtek Cichoń <wojtek.cichon@protonmail.com>
2023-02-17 13:36:40 -05:00
Zadkiel Aharonian
db031bbe94 docs: fix typo in health documentation (#12497)
Signed-off-by: Zadkiel Aharonian <hello@zadkiel.fr>
2023-02-17 13:34:38 -05:00
Saumeya Katyal
ac0b3e76c0 fix(security): add url validation for help chat (#9956) (#10417)
* fix: add url validation for help chat

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

* lint check

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

* lint fix

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

* review comments

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

---------

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-17 13:19:47 -05:00
Michael Chen
a9289d2381 docs: Clarify cascade delete of resource and finalizer (#11064)
* Clarify cascade delete of resource and finalizer.

The wording of this warning was confusing.

Signed-off-by: Michael Chen <4326639+mcgitty@users.noreply.github.com>

* Update docs/operator-manual/declarative-setup.md

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

---------

Signed-off-by: Michael Chen <4326639+mcgitty@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>
Co-authored-by: Nicholas Morey <nicholas@morey.tech>
2023-02-17 13:18:06 -05:00
schakrad
4be0ce491d fix: show full event message in pod event view (#12104) (#12267)
* #11602 fix : Object options menu truncated when selected in ApplicationListView.

Signed-off-by: schakradari <saisindhu_chakradari@intuit.com>

* fix for the message to be fully shown under the events section.

Signed-off-by: schakradari <saisindhu_chakradari@intuit.com>

* fixing lint

Signed-off-by: schakradari <saisindhu_chakradari@intuit.com>

* Update application-resource-list.tsx

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

* fix for  lint error

Signed-off-by: schakradari <saisindhu_chakradari@intuit.com>

---------

Signed-off-by: schakradari <saisindhu_chakradari@intuit.com>
Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>
2023-02-17 11:58:14 -05:00
argo-bot
e86cf5d705 Bump version to 2.4.23 2023-02-16 14:40:28 +00:00
argo-bot
8f0d27705e Bump version to 2.4.23 2023-02-16 14:40:22 +00:00
Michael Crenshaw
5831a573aa Merge pull request from GHSA-3jfq-742w-xg8j
fix test name

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-02-16 09:07:57 -05:00
Michael Crenshaw
90869357fb chore: add dist to path to use our kustomize version (#12352)
* chore: add dist to path to use our kustomize version

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

* correct path

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>
2023-02-09 12:18:33 -05:00
Josh Soref
d0551e4c1a 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:29:27 -05:00
Thomas Decaux
402b38dc7d 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:56:27 -05:00
argo-bot
eadd25e7ed Bump version to 2.4.22 2023-02-02 14:58:52 +00:00
argo-bot
3f98ee249b Bump version to 2.4.22 2023-02-02 14:58:37 +00:00
Panagiotis Georgiadis
cafb09a8a5 fix: Upgrade gopkg.in/yaml.v2 to v2.2.4 (#12247)
Signed-off-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
2023-02-01 16:37:50 -05:00
Jaideep Rao
f7b9fa32e4 fix: Upgrade goutils to v1.1.1 [release-2.4] (#12219) (#12222)
* upgrade goutils to v1.1.1

Signed-off-by: Jaideep Rao <jaideep.r97@gmail.com>

* Update go.mod

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

---------

Signed-off-by: Jaideep Rao <jaideep.r97@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-02-01 14:25:55 -05:00
dependabot[bot]
8536a84775 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)

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

---
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:56:06 -05:00
dependabot[bot]
4bc13fbb25 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:48 -05:00
Adam Jensen
fe6472db05 docs: Fix copy that refers to a different CLI flag (#12236)
Signed-off-by: Adam Jensen <adam@acj.sh>
2023-01-31 16:52:10 -05:00
Kostis (Codefresh)
efb0ceca33 docs: Clarify directory recursion (#12037)
Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>
2023-01-31 16:29:47 -05:00
James Brady
717ac4eec1 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:46 -05:00
Nobuo Takizawa
6cb2a600b0 chore: Update dex's image tag that is forgotten to be updated (#12234)
Signed-off-by: nobuyo <longzechangsheng@gmail.com>
2023-01-31 15:44:13 -05:00
argo-bot
2eb5656842 Bump version to 2.4.21 2023-01-27 23:14:45 +00:00
argo-bot
5c6f8d5460 Bump version to 2.4.21 2023-01-27 23:14:40 +00:00
Eugen Friedland
45c089b48c 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:17:27 -05:00
Michael Crenshaw
11ba4834ad 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:43:21 -05:00
Leonardo Luz Almeida
8f4678ee1f 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-27 13:37:02 -05:00
argo-bot
68f58c956a Bump version to 2.4.20 2023-01-25 15:28:44 +00:00
argo-bot
5b3bfc746c Bump version to 2.4.20 2023-01-25 15:28:30 +00:00
Dan Garfield
20c63babca 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 unit tests

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: CI <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Vladimir Pouzanov <farcaller@gmail.com>
2023-01-25 09:15:04 -05:00
Justin Marquis
0775c6e726 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 10:04:20 -05:00
argo-bot
0ba9817cc2 Bump version to 2.4.19 2023-01-18 02:08:53 +00:00
argo-bot
cac46bf3a6 Bump version to 2.4.19 2023-01-18 02:08:46 +00:00
Michael Crenshaw
e89bf08452 chore: upgrade github.com/prometheus/client_golang to v1.11.1 to avoid CVE-2022-21698 (#12015)
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 17:05:12 -05:00
Michael Crenshaw
4fa0627dd8 chore: fix bad merge
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-17 17:00:56 -05:00
Aymen Ben Tanfous
4665f19f9a 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:54:22 -05:00
dependabot[bot]
32ab1d906f 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:52:10 -05:00
dependabot[bot]
64b3f0f1f4 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)

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

---
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:07:20 -05:00
Michael Crenshaw
70276136b1 chore: fix codegen
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-11 09:47:07 -05:00
Michael Crenshaw
0051144468 chore: fix codegen
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 16:58:51 -05:00
dependabot[bot]
df55641842 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:25:24 -05:00
dependabot[bot]
7cde38c52f 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:22:04 -05:00
Michael Crenshaw
e9a2102593 Revert "fix: ssa e2e tests failing after updating to kubectl 1.26 (#11753)"
This reverts commit a10a54782a.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 12:19:16 -05:00
Michael Crenshaw
56cba50d69 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:50:44 -05:00
jannfis
556565f167 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>
2023-01-10 10:44:32 -05:00
Michael Crenshaw
f625165b33 fix: upgrade qs to avoid CVE-2022-24999
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 10:22:46 -05:00
Alexander Matyushentsev
d11ee714b8 fix: upgrade superagent to resolve potential CVE (#9494)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2023-01-10 10:21:13 -05:00
dependabot[bot]
3aa191d777 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:12:14 -05:00
dependabot[bot]
3487d4789d 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:52:29 -05:00
Michael Crenshaw
9c9fd9685a 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:31:24 -05:00
dependabot[bot]
bda913c1f2 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:39:04 -05:00
Justin Marquis
e37feab905 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:14:15 -05:00
Justin Marquis
e380dd1ade 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:22:40 -05:00
Gaël Jourdan-Weil
6c88a166d8 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:52:09 -05:00
Matt Clegg
f007ddffc9 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:58:24 -05:00
Phil Wright- Christie
af7b29d922 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:55:26 -05:00
Leonardo Luz Almeida
a10a54782a 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:49:49 -05:00
Nicholas Morey
20e4b8806d 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:47:17 -05:00
dependabot[bot]
2626453cfc 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:41:16 -05:00
yanyx
5d6600ed9d 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:38:17 -05:00
Justin Marquis
0f3f8db000 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:46:16 -05:00
argo-bot
beef23b7a4 Bump version to 2.4.18 2022-12-16 15:57:45 +00:00
argo-bot
a97db48111 Bump version to 2.4.18 2022-12-16 15:57:36 +00:00
Leonardo Luz Almeida
69939d427a 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 08:33:29 -05:00
Michael Crenshaw
a7d22df297 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-16 02:11:59 +01:00
Michael Crenshaw
0f99cdd877 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:25:41 -05:00
dependabot[bot]
3c8c8adb37 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)

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

---
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:25:37 -05:00
Michael Crenshaw
e0b8b129a5 chore: fix flaky e2e test (#11670)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-12 17:45:06 -05:00
Michael Crenshaw
12c6cf3e8c 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:16:11 -05:00
Nicholas Morey
197e01b834 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:51 -05:00
asingh
27ff21643e 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:23:09 -05:00
Alex Eftimie
ecdea743c2 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:53:32 -05:00
Alex Eftimie
fca6271d38 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:43:58 -05:00
Michael Vittrup Larsen
186c4be175 docs: Add skipCrds and ignoreMissingValueFiles to application.yaml example (#11565)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-06 09:51:12 -05:00
dependabot[bot]
e46ae882f1 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-03 22:11:28 -05:00
Michael Crenshaw
30f25ce113 Revert "fix: application stuck in infinite reconciliation loop if using wrong project (#11246)"
This reverts commit 1e53a3adcb.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-02 09:25:13 -05:00
dependabot[bot]
72f8ff370a 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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 08:54:45 -05:00
dependabot[bot]
955417ae4f 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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 08:53:40 -05:00
Michael Merrill
e091a92f6c 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:04:35 -05:00
Alexander Matyushentsev
de7d35b069 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 11:10:53 -08:00
Michael Crenshaw
b6d33ba162 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 13:04:57 -05:00
Michael Crenshaw
e3ef547f16 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:36 -05:00
dependabot[bot]
2868c5aa0a 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:08:01 -05:00
dependabot[bot]
ba5bab807c 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:32 -05:00
dependabot[bot]
510e3a9557 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:51 -05:00
dependabot[bot]
e52895aead 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)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
---
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:33 -05:00
Alexander Matyushentsev
1e53a3adcb 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:58:54 -05:00
Alex Eftimie
7f4b644231 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:27:39 -08:00
Michael Crenshaw
9fc46d2a0f 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 10:47:07 -05:00
Edmund Rhudy
547f666fb2 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:56:12 -05:00
Shuai Zhang
41a2505bf8 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 18:10:14 -05:00
Justin Marquis
b8feaf4db9 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:26:14 -05:00
argo-bot
d330967960 Bump version to 2.4.17 2022-11-07 16:28:03 +00:00
argo-bot
158a580df0 Bump version to 2.4.17 2022-11-07 16:27:56 +00:00
Leonardo Luz Almeida
5e8ac1b2d6 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:45 -04:00
argo-bot
7b5899be33 Bump version to 2.4.16 2022-11-01 21:00:28 +00:00
argo-bot
efa96006cc Bump version to 2.4.16 2022-11-01 21:00:22 +00:00
Michael Crenshaw
b871316bba 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 16:21:34 -04:00
Chromo-residuum-opec
c8a1a8650e 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:13:36 -04:00
Michael Crenshaw
27af817afb 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:24:10 -04:00
Michael Crenshaw
c7dd9bc6d2 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-21 11:23:14 -04:00
Alex Eftimie
e41612927e docs: mention that OCI helm does not support version ranges (#11026)
* docs: mention that OCI helm does not support version ranges

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

* Apply suggestions from code review

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

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2022-10-21 11:19:00 -04:00
Allex
5c79556ab6 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:34 -04:00
Michael Crenshaw
03b2deec02 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:42:23 -04:00
34FathomBelow
c0774a0d21 chore: release signature of sbom (#10969)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-18 15:39:48 -04:00
Jessie Teng
2a47eafb5a 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:55 -04:00
argo-bot
05acf7a52e Bump version to 2.4.15 2022-10-17 20:15:50 +00:00
argo-bot
e290faa6c7 Bump version to 2.4.15 2022-10-17 20:15:42 +00:00
Michael Crenshaw
21a6025d72 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-17 15:47:57 -04:00
34FathomBelow
1a50f7944a 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-17 13:03:57 -04:00
34FathomBelow
92df7b877f 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-17 13:01:10 -04:00
Michael Crenshaw
bca4b1adfc 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:32:47 -04:00
Aiman Fatima
3f4b12ce0d 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:30:33 -04:00
Chris Davis
74b5492601 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:54:17 -07:00
Michael Crenshaw
187cd4337a 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 11:30:49 -04:00
Michael Crenshaw
b20ef3ecae 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 11:29:53 -04:00
Michael Crenshaw
3ce54d0b98 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 11:19:34 -04:00
Michael Crenshaw
0d882f6da2 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 11:17:10 -04:00
Mayursinh Sarvaiya
8b78e94e37 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:41 -04:00
Nir Shtein
8fc1f80c75 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:11:11 -04:00
Sakshi Jain
983a7b0536 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:05:32 -04:00
Michael Crenshaw
761636badf docs: fix examples for ArgoCD ApplicationSet Git Generator (#10857)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-08 14:48:56 -04:00
Michael Crenshaw
cb60ddc696 docs: remove unused plugin config fields (#10304)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-08 13:32:07 -04:00
Michael Crenshaw
814964f077 Revert "fix: add applicationset to crds generated by gen-crd-spec (#10833)"
This reverts commit 5cf1a6705b.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-07 20:23:53 -04:00
Matt Morrison
f360009ff5 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:49:39 -04:00
Minchao
7381470fbe 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:11:27 -04:00
Lars Kellogg-Stedman
c0ecf0271b 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:34:04 -04:00
Denis Krivenko
6686e43b4f 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 15:03:50 -04:00
Eddie Knight
d321825d9f 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:42:41 -04:00
Richard Jennings
5cf1a6705b 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:53:06 -04:00
jannfis
db7d8be912 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:07:27 -04:00
rumstead
4d31d46d4c 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:34 -04:00
argo-bot
029be590bf Bump version to 2.4.14 2022-10-05 17:01:30 +00:00
argo-bot
65abd05b60 Bump version to 2.4.14 2022-10-05 17:01:24 +00:00
Michael Crenshaw
b9fb7623ad 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:45:12 -04:00
argo-bot
19ec34e134 Bump version to 2.4.13 2022-10-03 20:44:25 +00:00
argo-bot
5f74aa5c24 Bump version to 2.4.13 2022-10-03 20:44:20 +00:00
Em Karisch
b350c11935 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 15:53:32 -04:00
Buk Bukowski
c271f1a6c1 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 15:52:53 -04:00
Michael Crenshaw
e6bd9469f8 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 15:45:55 -04:00
Michael Crenshaw
2bb180b3d9 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:51 -04:00
Ishita Sequeira
216b10e6d8 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-09-30 19:45:18 -04:00
Mohammad Abusaa
fc8f57a0b5 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:09:44 -04:00
Ahmed Mahmoud BACHIRI
56c2e3c81d 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:04:08 -04:00
Michael Crenshaw
83931b8515 chore: upgrade dex to v2.32.1-distroless (#10746)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-09-30 18:54:39 -04:00
cleverhu
712df99420 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:56:05 +00:00
argo-bot
41f54aa556 Bump version to 2.4.12 2022-09-16 00:26:31 +00:00
argo-bot
540fe1b762 Bump version to 2.4.12 2022-09-16 00:26:22 +00:00
Michael Crenshaw
66ebec630a 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:42:25 -04:00
msvechla
a6b5aa2766 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 11:59:08 -04:00
Minchao
1ac264e9a1 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:47 -04:00
Greg Knoblauch
128a261513 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:44 -04:00
Gerald Roncajolo
8552cc3f07 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-09-14 07:21:28 +00:00
Mickaël Canévet
cb05b8fb4a 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 11:24:12 -04:00
asingh
2ca18ab5fe 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:23:32 -04:00
rishabh625
e8d2d3a7e0 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-09-06 11:37:33 -04:00
Michael Crenshaw
6d348ce4a1 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-09-06 09:55:27 -04:00
rishabh625
3c2683dfe9 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-09-06 09:55:05 -04:00
Jesse Suen
8aa4df6f17 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:53:00 -04:00
Takumi Sue
7db5c5c589 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:52:14 -04:00
argo-bot
3d9e9f2f95 Bump version to 2.4.11 2022-08-22 08:58:21 +00:00
argo-bot
ca7d83f645 Bump version to 2.4.11 2022-08-22 08:58:04 +00:00
jannfis
e59f4889a4 Pin gitops-engine to v0.7.3
Signed-off-by: jannfis <jann@mistrust.net>
2022-08-22 08:27:03 +00:00
jannfis
fea6197af4 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:38:10 +00:00
Xijun Dai
5b576acf5d 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:36 -04:00
argo-bot
2ccc17afcb Bump version to 2.4.10 2022-08-17 20:48:21 +00:00
argo-bot
e7521ed7b8 Bump version to 2.4.10 2022-08-17 20:48:17 +00:00
Michael Crenshaw
f83bed0d4b fix: missing actions (#10327) (#10359)
Signed-off-by: CI <michael@crenshaw.dev>

Signed-off-by: CI <michael@crenshaw.dev>
2022-08-17 16:33:07 -04:00
JesseBot
88274b6870 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:12:09 -04:00
jsmcnair
431ee12282 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:56 -04:00
Tadayuki Onishi
3b17121d44 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:19:01 -04:00
Michael Crenshaw
f071b29b5f 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:47:02 -04:00
Michael Crenshaw
5ed749e827 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:50:12 -04:00
argo-bot
1ba9008536 Bump version to 2.4.9 2022-08-11 15:08:32 +00:00
argo-bot
2b873f0b3a Bump version to 2.4.9 2022-08-11 15:08:25 +00:00
Michael Crenshaw
3fdb6ae960 docs: fix version reference for logs UI fix (#10245)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-09 17:27:27 -04:00
Brandon High
d40ebce7b3 docs: Document ignoreAggregatedRoles setting (#10206)
Signed-off-by: Brandon High <highb@users.noreply.github.com>
2022-08-09 12:05:01 -04:00
César M. Cristóbal
d945e9f256 docs: fix microsoft user management mapping role (#10251)
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-09 10:17:18 -04:00
Sverre Boschman
fb75ada4c2 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:08:15 -04:00
Kerwood
05c9ba27e3 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:33:10 -04:00
reggie-k
77c972d27e 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-08-08 16:31:11 -04:00
jannfis
7e0ee5c449 fix: Ignore non-self-referencing resources while pruning (#10198)
* fix: Ignore non-self-referencing resources while pruning

Signed-off-by: jannfis <jann@mistrust.net>
2022-08-08 17:44:12 +00:00
Sahdev Zala
164284e329 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:53 -04:00
Renaud Guérin
ac2c1618b2 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 17:00:15 -04:00
my-git9
4ee796604a docs: improve Installation.md (#10173)
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-08-04 10:23:20 -04:00
Yves Richard
118d4d3c58 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:40:10 -04:00
Mohamed Iflan
912fe33009 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>
Signed-off-by: CI <michael@crenshaw.dev>
2022-08-01 10:40:08 -04:00
argo-bot
844f79eb9d Bump version to 2.4.8 2022-07-29 16:47:18 +00:00
argo-bot
ecfa0da491 Bump version to 2.4.8 2022-07-29 16:47:13 +00:00
Alexander Matyushentsev
fac8466e86 fix: extensions is not loading for ConfigMap/Pods (#10010)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-28 12:50:06 -07:00
Alexander Matyushentsev
ac34ff23c4 feat: support application level extensions (#9923)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-28 12:50:03 -07:00
Alexander Matyushentsev
a85d88d479 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-28 12:50:00 -07:00
dependabot[bot]
40075da70c 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)

Signed-off-by: CI <michael@crenshaw.dev>
---
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-28 15:37:25 -04:00
Snyk bot
779e383f64 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
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-28 15:36:47 -04:00
Michael Crenshaw
3e523dbab7 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 16:38:05 -04:00
Michael Crenshaw
4df892fecf docs: add OpenSSH breaking change notes (#10104)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 15:26:49 -04:00
Michael Crenshaw
670a1756d7 fix: avoid CVE-2022-28948 (#10093)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 15:03:09 -04:00
Michael Crenshaw
5721f559f0 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:57:06 -04:00
Sahdev Zala
e23178a8d1 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:31 -04:00
Hyeonmin Park
918e5eadf4 fix: Set HOST_ARCH for yarn build from platform (#10018)
Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>
2022-07-25 12:27:29 -04:00
34FathomBelow
55de2b9dab chore: update redis to 7.0.4 avoid CVE-2022-30065 (#10059)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-20 17:11:44 -04:00
Ashutosh
c48004f944 docs: add argocd-server grpc metric usage (#10007)
Signed-off-by: Ashutosh <mail.ashutosh8@gmail.com>

Co-authored-by: Ashutosh <mail.ashutosh8@gmail.com>
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-20 14:58:32 -04:00
Michael Crenshaw
f7b6a38041 chore: upgrade Dex to 2.32.0 (#10036) (#10042)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-20 10:45:24 -04:00
Michael Crenshaw
91eb9925ef 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 10:38:36 -04:00
34FathomBelow
6190964899 chore: update haproxy to 2.0.29 for redis-ha (#10045)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-19 15:05:40 -04:00
argo-bot
81630e6d50 Bump version to 2.4.7 2022-07-18 21:07:45 +00:00
argo-bot
e31fdb6105 Bump version to 2.4.7 2022-07-18 21:07:38 +00:00
Michael Crenshaw
2e194b1087 chore: upgrade parse-url to avoid SNYK-JS-PARSEURL-2936249 (#9826)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-18 14:13:15 -04:00
Jim Wright
cec5799d97 Support files in argocd.argoproj.io/manifest-generate-paths annotation (#9908)
Signed-off-by: Jim Wright <jmwri93@gmail.com>
2022-07-18 11:02:26 -04:00
Michael Crenshaw
7ab2ba361c docs: use quotes to emphasize that ConfigMap value is a string (#9995)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-16 12:21:39 -04:00
Michael Crenshaw
1d5e15c600 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 21:43:38 -04:00
Michael Crenshaw
f4f52212ba docs: document directory app include/exclude fields (#9997)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-15 21:42:58 -04:00
Michael Crenshaw
507c669259 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 11:51:48 -04:00
Soumya Ghosh Dastidar
993459aebc 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-07-15 10:17:53 -04:00
rishabh625
3293aa0bb7 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:22:34 -04:00
Hyeonmin Park
aafb6ce0a3 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:35 -04:00
Kostis (Codefresh)
d3d490632d 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:39 -04:00
argo-bot
a48bca03c7 Bump version to 2.4.6 2022-07-12 22:19:23 +00:00
argo-bot
6930ceb414 Bump version to 2.4.6 2022-07-12 22:19:14 +00:00
CI
01b7a73922 chore: fix build error
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-12 16:46:39 -04:00
taksenov
ff2d9b918d docs: fix typo in Generators-Git.md (#9949)
`ApplictionSet` --> `ApplicationSet`
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-12 16:29:03 -04:00
Jake
cea91ce935 docs: add terminal documentation (#9948)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-12 16:28:24 -04:00
Michael Crenshaw
51b73096f5 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-12 16:28:01 -04:00
Yuan Tang
2c166dac97 feat: Treat connection reset as a retryable error (#9739)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-07-12 16:25:08 -04:00
jannfis
16c015f0cb 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-12 16:24:41 -04:00
Xiao Yang
7ca60cb957 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>
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-12 16:24:23 -04:00
Jake
d0c80ee0bb 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-12 16:24:00 -04:00
yongguangl
9f1a33865a fix: NotAfter is not set when ValidFor is set (#9911)
Signed-off-by: yongguangl <1363186473@qq.com>
2022-07-12 16:21:21 -04:00
Hyeonmin Park
f09c84f30a fix: add missing download CLI tool link for ppc64le, s390x (#9649)
Signed-off-by: Hyeonmin Park <hyeonmin.park@kennysoft.kr>
2022-07-12 16:21:03 -04:00
jannfis
f7f7493e9f 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-12 16:20:21 -04:00
jannfis
c1ddb53d29 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-12 16:19:41 -04:00
Shunki
e04288482d 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-12 16:16:48 -04:00
YaytayAtWork
1f3e1ec803 #9429: Adding blank line so list is formatted correctly. (#9880)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-12 16:14:05 -04:00
Jake
c3423e8df3 docs: small fix for plugin stream filtering (#9871)
Signed-off-by: notfromstatefarm <86763948+notfromstatefarm@users.noreply.github.com>
2022-07-12 16:13:45 -04:00
Didrik Finnøy
5ef48c1123 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-12 16:13:22 -04:00
YaytayAtWork
e3ae286e2d 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-07-12 16:12:41 -04:00
Michael Crenshaw
7abf6713b4 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 15:31:44 -04:00
argo-bot
0232073ccf Bump version to 2.4.5 2022-07-12 16:08:04 +00:00
argo-bot
860d8fd7e1 Bump version to 2.4.5 2022-07-12 16:07:57 +00:00
Michael Crenshaw
147ff80543 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
3800a1e49d Merge pull request from GHSA-pmjg-52h9-72qv
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
argo-bot
fe80bdcfdc Bump version to 2.4.4 2022-07-07 06:57:43 +00:00
argo-bot
94c09dff59 Bump version to 2.4.4 2022-07-07 06:57:37 +00:00
jannfis
3d9e4d439e 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 19:18:51 +00:00
noah
4a955e25a0 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.
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-01 15:55:34 -04:00
noah
4f99f251bf 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:54:15 -04:00
Alexander Matyushentsev
fd418cec0d fix: make sure api server informer does not stop after setting change (#9842)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-30 15:30:33 -07:00
Xiao Yang
dc291a629f fix: support resource logs and exec (#9833)
Signed-off-by: Xiao Yang <muma.378@163.com>
2022-06-30 09:07:00 -04:00
Paulo Coelho
e23a1c6026 docs: update archlinux install with official package (#9718)
Signed-off-by: Paulo Coelho <prscoelho@protonmail.com>
2022-06-29 16:38:21 -04:00
Chris Reilly
aee88c6452 docs: explain rightmost git generator path parameter behavior (#9799)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-29 16:31:15 -04:00
KevinSnyderCodes
3f111cc640 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-29 16:28:51 -04:00
Jake
596038fc0f 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:41 -04:00
argo-bot
471685feae Bump version to 2.4.3 2022-06-27 20:53:14 +00:00
argo-bot
42e1f29117 Bump version to 2.4.3 2022-06-27 20:53:07 +00:00
Michael Crenshaw
c089f9a5e5 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-27 16:32:35 -04:00
TomHellier
1dc5e6aaf9 fix: websockets for terminal not working on subPath (#9795)
Signed-off-by: Tom Hellier <me@tomhellier.com>
2022-06-27 13:26:11 -07:00
Alexander Matyushentsev
82726fcbcf fix: avoid closing and re-opening port of api server settings change (#9778)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-24 10:17:20 -07:00
Nicolas Fillot
e715e085aa [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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-23 09:27:15 -04:00
Michael Crenshaw
7db5ab71b0 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-22 09:24:29 -04:00
argo-bot
c6d0c8baaa Bump version to 2.4.2 2022-06-21 20:32:13 +00:00
argo-bot
2115bf7746 Bump version to 2.4.2 2022-06-21 20:32:08 +00:00
Yaakov Selkowitz
0a2520f511 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 15:24:13 -04:00
Soumya Ghosh Dastidar
211e9f6127 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 15:09:48 -04:00
hritikch24
792e278080 Update sync-options.md (#9687)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 14:49:10 -04:00
Michael Crenshaw
93bf321002 fix: project filter (#9651) (#9709)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 14:39:34 -04:00
Joren Zandstra
48c2e0bf21 fix broken symlink in Dockerfile (#9674)
Signed-off-by: Joren Zandstra <jorenzandstra@yahoo.com>
2022-06-21 14:39:26 -04:00
Soumya Ghosh Dastidar
b4b893ca1c 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-21 10:39:12 -07:00
argo-bot
52e6025f8b Bump version to 2.4.1 2022-06-21 16:27:47 +00:00
argo-bot
b121b89c81 Bump version to 2.4.1 2022-06-21 16:27:40 +00:00
Michael Crenshaw
12149c0710 chore: fix docs gen
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 10:34:03 -04:00
Michael Crenshaw
9d67469428 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
04c3053964 Merge pull request from GHSA-q4w5-4gq2-98vm
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
17f7f4f462 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 tests

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

fix tests/lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:39:01 -04:00
Michael Crenshaw
8bc3ef690d Merge pull request from GHSA-h4w9-6x78-8vrj
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix tests/lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:36:38 -04:00
Michael Crenshaw
8fe9a58c21 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-06-14 16:12:12 -04:00
Leonardo Luz Almeida
269c61a9c8 chore: Implement tests to validate aws auth retry (#9627)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-06-14 10:11:38 -04:00
Leonardo Luz Almeida
9a08c123f9 chore: Implement a retry in aws auth command (#9618)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-06-14 10:10:43 -04:00
jannfis
971f0f1ff1 test: Remove temp directories from repo server tests (#9501)
Signed-off-by: jannfis <jann@mistrust.net>
2022-06-13 15:42:29 -04:00
jannfis
1ae2f97b05 test: Make context tests idempodent (#9502)
Signed-off-by: jannfis <jann@mistrust.net>
2022-06-13 15:41:55 -04:00
Michael Crenshaw
bb26cc207b test: fix plugin var test for OSX (#9590)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 15:37:00 -04:00
Christian Hernandez
77d3dcdc62 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:57:28 -04:00
Hari Sekhon
f414a8e985 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 10:38:39 -04:00
argo-bot
91aefabc5b Bump version to 2.4.0 2022-06-10 17:13:43 +00:00
argo-bot
56b8e2f356 Bump version to 2.4.0 2022-06-10 17:13:30 +00:00
Michael Crenshaw
101477a638 docs: document OpenSSH upgrade (#9598) (#9615)
docs: document OpenSSH upgrade (#9598) (#9615)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-09 15:59:59 -07:00
Alexander Matyushentsev
9bf7d1b95b fix: change repo-server command to expand 'ARGOCD_REDIS_SERVICE' env variable (#9628)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-09 15:59:54 -07:00
Daniel Helfand
da8e7b9697 fix: use serviceaccount name instead of struct (#9614) (#9617)
* 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 16:20:29 -04:00
Daniel Helfand
eb183dcde1 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 14:01:25 -04:00
Michael Crenshaw
ccecc693c2 docs: document argocd cluster add behavior for 1.24 clusters (#9611)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-08 13:54:38 -04:00
Yaakov Selkowitz
dc1d4b060d 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 17:31:33 +00:00
Michael Crenshaw
512233806c 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-06 17:48:42 -04:00
argo-bot
b84dd8bbfa Bump version to 2.4.0-rc5 2022-06-06 19:03:38 +00:00
argo-bot
e6f37d7245 Bump version to 2.4.0-rc5 2022-06-06 19:03:30 +00:00
Michael Crenshaw
57bac9ac75 chore: update changelog
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-06 14:59:46 -04:00
34FathomBelow
3034183791 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-06 14:52:10 -04:00
34FathomBelow
26c87b3f16 chore upgrade base image for test containers Ubuntu:22.04 (#9563)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-06-06 14:52:02 -04:00
34FathomBelow
bd8d26d444 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-06 14:51:54 -04:00
Michael Crenshaw
a6c58748cd 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:17:12 -04:00
Bjorn Stange
46af59e258 docs: fix cm typo (#9577)
Signed-off-by: Bjorn Stange <bjorn.stange@expel.io>
2022-06-03 13:21:08 -04:00
Alexander Matyushentsev
867660a709 chore: remove obsolete repo-server unit test (#9559)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-03 09:30:57 -04:00
margueritepd
b1addf5bf1 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-02 17:51:08 -04:00
Pierre Crégut
0a9d1607e2 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-06-02 17:50:29 -04:00
Michael Crenshaw
09fc32e6cb 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:46:50 -04:00
argo-bot
1be9296e6c Bump version to 2.4.0-rc4 2022-06-01 22:49:24 +00:00
argo-bot
76fad02f4a Bump version to 2.4.0-rc4 2022-06-01 22:49:15 +00:00
Alexander Matyushentsev
2f8eb04b84 fix: web terminal due to query parameters name mismatch (#9560)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-01 14:39:32 -07:00
argo-bot
66aa0e6e01 Bump version to 2.4.0-rc3 2022-05-31 19:24:04 +00:00
argo-bot
955270eb0d Bump version to 2.4.0-rc3 2022-05-31 19:23:57 +00:00
Michael Crenshaw
225a0af9f7 docs: security warning for plugins (#9547)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-31 11:49:36 -07:00
Leonardo Luz Almeida
5191cd077c 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-31 14:19:02 -04:00
Leonardo Luz Almeida
c6b928c830 fix: Ignore diff with schema (#9170) 2022-05-31 10:27:32 -07:00
Michael Crenshaw
4e73b3c7ee docs: document new repo-server ServiceAccount (#9484)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-31 12:28:38 -04:00
Michael Crenshaw
708c9e79b9 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-31 12:18:25 -04:00
ls0f
da2c249814 receiveFile memory optimization: do not use bytes.buffer but write directly to file (#9415)
Signed-off-by: ls0f <lovedboy.tk@qq.com>
2022-05-31 12:17:39 -04:00
smcavallo
c27cf3f95e 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-31 12:17:01 -04:00
Daniel Helfand
dbd3ce3133 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-31 12:11:53 -04:00
Pavel Savchenko
58062c45de 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-31 12:11:35 -04:00
reggie-k
3c61070411 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-31 12:11:09 -04:00
Michael Crenshaw
697fc77379 docs: more appset security docs (#9466)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-31 12:10:40 -04:00
Michael Crenshaw
6655a22b0a 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-31 12:07:56 -04:00
Michael Crenshaw
0d109279a8 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-31 12:07:32 -04:00
neosu
4c1e1e0ad6 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 19:19:27 -07:00
Michael Crenshaw
078cfe130b fix: test race (#9469)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-24 08:15:41 -07:00
Michael Crenshaw
cd098638f8 fix: lint (#9444)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-24 08:15:27 -07:00
Dan Garfield
2826a9215d refactor: Update notification engine (#9386)
refactor: Update notification engine  (#9386)

Signed-off-by: todaywasawesome <dan@codefresh.io>
2022-05-23 23:50:45 -07:00
Alexander Matyushentsev
13bef3a831 fix: api server should dynamically enabled terminal handler (#9497)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 23:49:56 -07:00
Alexander Matyushentsev
c6f80377a8 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:52:34 -07:00
Alexander Matyushentsev
a8a451a84b fix: make more proto fields optional (#9490)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-23 13:46:15 -07:00
argo-bot
cd5b2af358 Bump version to 2.4.0-rc2 2022-05-18 12:32:45 +00:00
argo-bot
f6f9fa2cd6 Bump version to 2.4.0-rc2 2022-05-18 12:32:41 +00:00
jannfis
c7749ca67e 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:22 +02:00
Michael Crenshaw
3399a81bed 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
jannfis
80e5c55ca0 Merge pull request from GHSA-xmg8-99r8-jc2j
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 13:06:31 +02:00
Saumeya Katyal
c4182aedc7 fix: update filter combo-box icon color (#9416)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-05-16 14:26:56 +00:00
Saumeya Katyal
e4404372af fix: favorite icon and overlapping app title (#9130)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-05-16 14:26:35 +00:00
Leonardo Luz Almeida
12140f8152 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 15:13:43 -04:00
Chetan Banavikalmutt
6cfd394445 fix: ListResourceActions() returns duplicate actions (#9360)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-05-13 15:09:33 -04:00
Michael Crenshaw
1998b016c0 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:14:10 -04:00
Michael Crenshaw
74bc1731f9 feat(manifests): Add service account for repo server (#9301) (#9355)
Signed-off-by: Hao Xin <haoxinst@gmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Hao Xin <haoxinst@qq.com>
2022-05-11 13:28:13 -04:00
Michael Crenshaw
bb28b3c697 docs: logs RBAC upgrate notes (#9345) (#9356)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-10 20:38:25 -04:00
Regina Scott
0ee9993369 fix: grouped node titles no longer wrap (#9340)
Signed-off-by: Regina Scott <rescott@redhat.com>
2022-05-09 19:34:14 -04:00
argo-bot
d8f845a126 Bump version to 2.4.0-rc1 2022-05-06 23:10:53 +00:00
argo-bot
5901b46785 Bump version to 2.4.0-rc1 2022-05-06 23:10:45 +00:00
David J. M. Karlsen
88542a616f 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 16:10:03 -07:00
Alexander Matyushentsev
cbe4f1b92e chore: add linux/s390x,linux/ppc64le platforms to release workflow (#9324)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-06 16:09:59 -07:00
Alexander Matyushentsev
a2b77983cd docs: add v2.4 changes to CHANGELOG.md (#9321)
* docs: add v2.4 changes to CHANGELOG.md

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* docs: update 2.3-2.4 upgrading instructions

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-06 13:34:41 -07:00
34FathomBelow
a94ca7fef1 chore: provide checksums for cli-binaries (#9260)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-05-06 13:33:32 -07:00
Alexander Matyushentsev
8b1804c1f6 fix: built-in admin should has exec permission (#9320)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-06 17:25:03 +00:00
Yuan Tang
5398314f4e docs: Re-arrange badges to be in one row (#9299)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-05-06 09:15:08 -07:00
Michael Crenshaw
0e2148e331 fix: make exec feature opt-in (#9259)
* fix(ui): missing manifests and logs (#9231)

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

* feat: make exec feature opt-in

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

* fix codegen

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

* use create instead of get for exec to match k8s

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

* add RBAC instructions for exec

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

* delete old line

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

* remove unnecessary caveat

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-06 09:13:07 -07:00
Saumeya Katyal
87cabed73f fix: make filter checkbox consistent (#9286)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>

Co-authored-by: Remington Breeze <remington@breeze.software>
2022-05-05 18:00:42 -07:00
Alexander Matyushentsev
b587e0cd3b chore: use bin mode to run e2e tests in CI (#9311)
* chore: use bin mode to run e2e tests in CI

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-05 17:54:09 +00:00
pasha-codefresh
194f0901fc chore: Select app resources tests (#9268)
* add to approvers

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

* application selected resources test

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

* change error

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-05-04 19:16:38 +00:00
pasha-codefresh
ee1e3f27ac chore: run notification locally (#9274)
* run notification locally

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

* run notification locally

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

* fix comments

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-05-04 14:39:14 -04:00
Jun Duan
14bd4fd781 docs: improve the formating of config-management-plugins.md (#9290) 2022-05-04 12:12:13 +03:00
Alexander Matyushentsev
d053952fb8 fix: fix grpc: error while marshaling: proto: required field "group" not set (#9289)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-03 19:09:43 -04:00
Michael Crenshaw
0e12c3de0d fix(ui): missing manifests and logs (#9231) (#9257)
* fix(ui): missing manifests and logs (#9231)

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

* more group fixes

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-03 15:57:52 -07:00
Michael Crenshaw
1d765a072c fix: don't include exec as part of the default read-only role (#9249)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-03 14:41:55 -04:00
Ishita Sequeira
19b98dd1a8 docs: proposal for backend support of ApplicationSets (#9016)
* intial commit

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* updated the proposal section

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* remove whitespace

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* Add implementation details

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* removing unwanted fields from the proposal doc

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* Update backend-support-appset.md

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

* updated the proposal section

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

* Update the proposal based on comments

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

Co-authored-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
Co-authored-by: Chetan Banavikalmutt <cbanavik@redhat.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-03 17:51:41 +00:00
Alexander Matyushentsev
1eabf99dac chore: disable webpack dev-server compression (#9285)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-05-03 10:05:10 -07:00
Daniel Helfand
216edee0af chore: remove final uses of repo List (#9275)
Replacing with ListRepositories()

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-05-03 00:16:01 +03:00
pasha-codefresh
0137651d71 chore: Remove test folder from codecov generation (#9265) 2022-05-02 22:39:47 +03:00
pasha-codefresh
62e49739d0 chore: Print application table test (#9266) 2022-05-02 22:39:11 +03:00
jannfis
0f22d57a66 fix: Prevent crash on server reload if opentelemetry is not enabled (#9270)
* fix: Prevent crash on server reload if opentelemtry is not enabled

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

* Move variable declaration into loop

Signed-off-by: jannfis <jann@mistrust.net>
2022-05-02 09:23:31 -04:00
jannfis
33376164d0 chore: Update dockerized toolchain to use Redis v7.0.0 (#9269)
Signed-off-by: jannfis <jann@mistrust.net>
2022-05-02 12:26:50 +03:00
Tsubasa Nagasawa
c35c28009c feat: add gke auth command to argocd-k8s-auth (#9190)
Signed-off-by: toVersus <toversus2357@gmail.com>
2022-05-01 21:55:32 -07:00
kulmam92
da47fbb329 fix numbering microsoft.md (#9267)
Changed indentation and newlines for correct rendering. Validated with readthedocs.io.

Signed-off-by: kulmam92 <kulmam92@gmail.com>
2022-05-01 13:01:04 +03:00
kulmam92
320407f1f6 Fix numbering in microsoft.md (#9263) 2022-04-30 21:27:47 +03:00
asper
ef91a8deb4 chore: add imaware to users (#9261)
We use argo extensively in production, appsets, notif controller, and now multi cluster, so figured add our name to the list

Signed-off-by: Michael Asper <asper@imaware.health>
2022-04-30 19:44:41 +03:00
Remington Breeze
40a406164d fix(ui): Unscrollable error message when saving YAML (#4152) (#4195)
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-29 18:45:55 +00:00
kulmam92
15336984fa docs: fix Microsoft SSO integration guide (#7699)
* Detailed steps for Azure AD App Registration Auth using OIDC

* Detailed steps for Azure AD App Registration Auth using OIDC
* Validation steps for both Web and CLI
Signed-off-by: kulmam92 <kulmam92@gmail.com>

* Images for Azure AD App Registration Auth using OIDC

Images for Azure AD App Registration Auth using OIDC
Signed-off-by: kulmam92 <kulmam92@gmail.com>

* add more context for scope

Signed-off-by: kulmam92 <kulmam92@gmail.com>
2022-04-29 18:56:33 +03:00
Mathieu Parent
cec18790ce build(deps): bump redis from 6.2.6 to 7.0.0 (#9250)
Bumps [redis](https://github.com/redis/redis) from 6.2.6 to 7.0.0
- [Release notes](https://github.com/redis/redis/blob/7.0/00-RELEASENOTES)
- [Commits](https://github.com/redis/redis/compare/v6.2.6..v7.0.0)

Signed-off-by: Mathieu Parent <math.parent@gmail.com>
2022-04-29 17:57:16 +03:00
dependabot[bot]
f99e5b9667 build(deps): bump node-fetch from 2.6.1 to 2.6.7 in /ui (#9246)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-28 14:18:26 -04:00
Regina Scott
9ddadb0cec feat: close sliding panel on escape key (#8465)
Signed-off-by: Regina Scott <rescott@redhat.com>
2022-04-28 09:51:49 -07:00
Yi Cai
d315a82414 feat: show sync wave in ui (#8902)
* feat: show sync wave in ui

Signed-off-by: ciiay <yicai@redhat.com>

* Code improvement updates

Signed-off-by: ciiay <yicai@redhat.com>

* Retrigger CI pipeline

Signed-off-by: ciiay <yicai@redhat.com>

* Added showSyncOrder boolean for display/hide syncOrder

Signed-off-by: ciiay <yicai@redhat.com>

* Fixed lint issue

Signed-off-by: ciiay <yicai@redhat.com>

* Code improvement

Signed-off-by: ciiay <yicai@redhat.com>

* Fixed lint issues

Signed-off-by: ciiay <yicai@redhat.com>

* Moved dataLoader block

Signed-off-by: ciiay <yicai@redhat.com>

* Code improvement

Signed-off-by: ciiay <yicai@redhat.com>

* Retrigger CI pipeline

Signed-off-by: ciiay <yicai@redhat.com>

* Fixed lint errors

Signed-off-by: ciiay <yicai@redhat.com>

* Code improvement

Signed-off-by: ciiay <yicai@redhat.com>

* Added hyphen for empty Sync Order

Signed-off-by: ciiay <yicai@redhat.com>

* Removed comment out

Signed-off-by: ciiay <yicai@redhat.com>

* Retrigger CI pipeline

Signed-off-by: ciiay <yicai@redhat.com>

* Retrigger CI pipeline

Signed-off-by: ciiay <yicai@redhat.com>
2022-04-28 08:41:53 -07:00
Michael Crenshaw
e2c9548b2c fix: add writable /tmp mount for the applicationset controller (#9183)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-28 10:32:15 +02:00
rishabh625
fc06da0150 fix: ensure appset git generator works with private repo (#9179)
* fix: ensure appset git generator works with private repo

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Added env variable for sock file

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Retrigger CI pipeline

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-28 10:31:06 +02:00
Michael Crenshaw
5f0e58d5f0 fix: throw better error if default branch is missing in gitea (#9228)
* fix: fall back to only branch if default branch is missing in gitea

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

* throw meaningful error, use different org for test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-27 13:29:29 -04:00
Michael Crenshaw
721798e016 fix: fall back to only branch if default branch is missing in gitea (#9228)
* fix: fall back to only branch if default branch is missing in gitea

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

* throw meaningful error, use different org for test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-27 16:54:35 +00:00
Alex Collins
e07b3e7492 ci: Cancel redundant builds. Fixes #9222 (#9223)
Signed-off-by: Alex Collins <alex_collins@intuit.com>
2022-04-27 12:21:08 -04:00
Pluggi
b9bc3f9278 ui: Fix delete radio labels/ids (#9218)
* ui: Fix delete radio labels/ids

Signed-off-by: Antoine Bardoux <antoine.b@padoa-group.com>

* Fix linter

Signed-off-by: Antoine Bardoux <antoine.b@padoa-group.com>

Co-authored-by: pasha-codefresh <pavel@codefresh.io>
2022-04-27 17:39:59 +03:00
Daniel Helfand
530b007a2f chore: update repo client to use updated methods (#9208)
Also correcting some comments for cobra commands

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-04-27 15:19:24 +03:00
Snyk bot
a8dd613927 fix: upgrade react-ga from 2.6.0 to 2.7.0 (#9225)
Snyk has created this PR to upgrade react-ga from 2.6.0 to 2.7.0.

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-04-27 15:12:20 +03:00
Ben Ye
d75c826622 fix: rename CMP server trace env var (#9224)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-04-27 13:45:20 +03:00
Michael Crenshaw
6866bae2fc test: tests for SSHCreds env var generation (#9169)
* test: tests for SSHCreds env var generation

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

* chore: sort imports

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-26 22:23:17 +03:00
Michael Crenshaw
385dec96f9 test: add tests for app command (#9156)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-26 22:22:16 +03:00
Michael Crenshaw
6d776b00e8 chore: remove orphaned code (#9171)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-26 22:00:35 +03:00
Snyk bot
029655236b fix: upgrade react-svg-piechart from 2.4.0 to 2.4.2 (#9188)
Snyk has created this PR to upgrade react-svg-piechart from 2.4.0 to 2.4.2.

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-04-26 19:40:37 +03:00
Snyk bot
f600c1443e fix: upgrade dagre from 0.8.4 to 0.8.5 (#9189)
Snyk has created this PR to upgrade dagre from 0.8.4 to 0.8.5.

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-04-26 19:31:51 +03:00
Ben Ye
09e5b60519 feat: support opentelemetry for grpc tracing (#7539)
* feat: add support for otel grpc tracing

Signed-off-by: Ben Ye <ben.ye@bytedance.com>

* chore: rebase code to master

Signed-off-by: Ben Ye <ben.ye@bytedance.com>

* feat: add otelgrpc to cmpserver

Signed-off-by: Ben Ye <ben.ye@bytedance.com>

* feat: add util trace package

Signed-off-by: Ben Ye <ben.ye@bytedance.com>

* fix: fix tracer context

Signed-off-by: Ben Ye <ben.ye@bytedance.com>

* chore: move tracer initialization part to the loop

Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-04-26 10:02:53 -04:00
Alexander Matyushentsev
6cfd81b9f9 docs: add missing helm passCredentials to reference application.yaml (#9209)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-04-26 09:02:59 -04:00
Zach Aller
1957fb48e3 fix: add sh256 hashes for arm on osx for m1 cpus (#9186)
Signed-off-by: zachaller <zachaller@hotmail.com>
2022-04-25 09:57:16 -04:00
Sam Ding
b760a2786f chore: Support build on s390x and ppc64le (follow #6441) (#8890)
* Support build on s390x and ppc64le

Signed-off-by: Sam Ding <samding@ca.ibm.com>
2022-04-22 13:26:10 -07:00
d7volker
e5e3b0f579 docs: keycloak doc update (#9174)
* updated keycloak docs, changed the issuer URL

Signed-off-by: Volker Dormeyer <vd@d7informatics.de>

* changed comment on keycloak /auth

Signed-off-by: Volker Dormeyer <vd@d7informatics.de>
2022-04-22 13:40:03 -04:00
Jesse Antoszyk
87d7710175 docs: fix spelling mistakes in many docs files (#9168)
* docs: fix spelling mistakes in many docs files

Signed-off-by: Jesse Antoszyk <22500761+jcantosz@users.noreply.github.com>

* Update other instance of ksane -> kasane

Signed-off-by: Jesse Antoszyk <22500761+jcantosz@users.noreply.github.com>

* ran make codegen
2022-04-22 15:19:16 +00:00
Ken Kaizu
acfc396ac0 feat: dex subcommand logformat/loglevel flags (#8542)
Signed-off-by: krrrr38 <k.kaizu38@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-22 05:36:21 +00:00
Michael Crenshaw
5b29320bf2 docs: 2.4 upgrade notes cmp changes (#9166)
* docs: upgrade notes for new RBAC resource in 2.4

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

* docs: use resources, not verbs

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

* docs: better phrasing

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

* docs: add header to emphasize that the RBAC is just an example

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

* docs: upgrade notes for CMP changes in 2.4

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-21 22:22:51 -04:00
rishabh625
185e580317 feat: Added option for cascading deletion while creation of app (#8645)
* feat: Added option to set finalizer while creation of app for cascading deletion.

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Fixed UI to be aligned with Yaml,fixed linting docs

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* moved React component SetFinalizerOnApplication into new file, as per keiths suggestion

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* changed class name to remove some spaces,moved HelpIcon to right of text

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* changed variable into camelCase,fixed to pass PR check

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Made finalizer to be appended into array instead of replacing

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Changed Variable names

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* renamed file as per suggestions

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Added comment changes

Signed-off-by: rishabh625 43094970+rishabh625@users.noreply.github.com
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-21 17:48:34 -04:00
Snyk bot
697636eb69 fix: upgrade prop-types from 15.7.2 to 15.8.1 (#9159)
Snyk has created this PR to upgrade prop-types from 15.7.2 to 15.8.1.

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-04-21 17:12:19 -04:00
Snyk bot
044598197d fix: upgrade js-yaml from 3.13.1 to 3.14.1 (#9158)
Snyk has created this PR to upgrade js-yaml from 3.13.1 to 3.14.1.

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-04-21 17:08:00 -04:00
Wazbat
5131b02d15 Corrected misspelling (#9162)
Corrected spelling inconsistency
2022-04-21 13:28:05 -04:00
rishabh625
b777a76ae8 Increase test applicationset scm (#9151)
* test: Added Test for Get/list branches github

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* test: Added Test for Get all branches github to increase codecov.

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Added token

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-21 13:20:39 -04:00
rishabh625
4265746298 feat: Add filter pathdoesntexist in scm generator (#9150)
* feat: Added Filter for Path Does not Exist is SCM Generator

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Added manifest and autogenerated code

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* added comment changes

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-20 16:48:22 -04:00
Michael Crenshaw
248929cacd chore: simplify test tempdir (#9152)
* chore: simplify test tempdir

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

* test: add test for traversal

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-20 15:12:39 +00:00
jannfis
d2f5060103 fix: Helm OCI repositories with custom CAs (#8508)
Signed-off-by: jannfis <jann@mistrust.net>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-20 10:07:56 -04:00
Domonkos Cinke
86d04de0aa fix: Remove orphan static-files volume from ArgoCD server deployment manifest - Fixes #8714 (#9013)
* fix: Remove orphan static-files volume from ArgoCD server deployment manifest

Signed-off-by: Domonkos Cinke <seayou@gmail.com>

* fix: Make codegen

Signed-off-by: Domonkos Cinke <seayou@gmail.com>

Co-authored-by: Domonkos Cinke <domonkos.cinke@namecheap.com>
2022-04-20 09:51:46 -04:00
Michael Crenshaw
fdcaa550cc test: add tests for HTTPSCreds (#9136)
test: add tests for HTTPSCreds (#9136)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-19 11:43:21 -07:00
Ben Ye
67cbe12f0b feat: support pod exec terminal via websockets (#8905)
feat: support pod exec terminal via websockets (#8905)

Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-04-19 18:36:05 +00:00
rishabh625
c7ff388b84 test: Added Test for Get/list branches github (#9140)
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-19 09:23:41 -04:00
Alex Collins
7594cad051 fix: upgrade react-form from 2.16.0 to 2.16.3 (#9138)
Snyk has created this PR to upgrade react-form from 2.16.0 to 2.16.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

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2022-04-19 09:17:53 -04:00
Michael Crenshaw
2738358df5 fix: do not unset passCredentials when it's not specified (#9102) (#9104)
* fix: do not unset passCredentials when it's not specified (#9102)

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

* chore: codegen

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

* chore: more tests, no-update detection for kustomize

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

* chore: fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-19 00:01:20 +03:00
Michael Crenshaw
99b6a72555 chore: delete flaky e2e test (#9046) (#9128)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-18 10:42:06 -07:00
Michael Crenshaw
c742563384 chore: don't give applicationset write access to projects (#9134)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-18 10:41:45 -07:00
Leonardo Luz Almeida
bcc69bdca4 chore: update grpc runtime library (#8929)
* chore: update grpc POC

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

* fix: register gogo codec (#1)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* Remove gogo annotations from application.proto

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

* Fix unit tests

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

* Fix e2e test

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

* Fix lint

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

* Fix lint

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

* Fix unit-test

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

* Fix LogEntry.Last required field not populated

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

* Fix LogEntry required fields

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

* Fix get log content

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

* Fix app actions list

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

* Fix ApplicationPodLogsQuery

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

* Fix RunResourceAction

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

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-04-18 10:47:13 -04:00
Dan Molik
712d9fee72 docs: add ApplicationSet PR Generator Kustomize example (#9118)
This is for convenience, so operators don't have to skip around the
documentation.

Closes [ISSUE #9072]

Signed-off-by: Dan Molik <dan@danmolik.com>
2022-04-18 08:48:36 -04:00
pasha-codefresh
74940907a8 fix: remove cookie module from ui (#9088)
* add to approvers

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

* remove cookie module

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-04-17 20:52:11 -04:00
Eng Zer Jun
60de0b697f test: use T.TempDir to create temporary test directory (#9126)
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-17 20:43:57 -04:00
Michael Crenshaw
b208d376fe docs: be emphatic about admin-level Projects (#9096)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-17 12:49:51 -04:00
dependabot[bot]
7a79458419 build(deps): bump async from 2.6.3 to 2.6.4 in /ui (#9111)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-16 22:47:59 -07:00
Ron Gimpelevich
f936c6ed1f Update USERS.md (#9119)
Added RapidAPI to users
2022-04-16 21:58:57 -07:00
Alexander Matyushentsev
655be25f87 refactor: replace aws CLI with argocd-k8s-auth (#8032)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-04-14 17:25:08 -07:00
Michael Crenshaw
a7214a0985 docs: document Python removal on upgrade guide (#9090)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-14 15:19:44 -07:00
rishabh625
6de5516da1 fix!: added security contexts in manifests to secure argocd component configurations (#9087)
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-14 15:22:43 -04:00
Michael Crenshaw
67e45d825e fix: (revert) cleanup func being called too early (#9105)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-14 15:20:27 +00:00
Leonardo Luz Almeida
db547567b9 fix: Correctly calculate diffs for CRDs with ignore overrides (#9092)
* fix: Correctly calculate diffs for CRDs with ignore overrides

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

* Fix unit-test

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

* Fix typo

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

* Better test-case description

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-04-13 17:58:59 -04:00
Adrian Gąsior
cc6c625401 chore: refactor Dockerfiles to reduce build time (#9081)
Signed-off-by: Adrian <colid.bondzio@gmail.com>
2022-04-13 16:03:34 -04:00
Snyk bot
fa46ac178f fix: upgrade react-diff-view from 2.4.7 to 2.4.10 (#9074)
Snyk has created this PR to upgrade react-diff-view from 2.4.7 to 2.4.10.

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-04-13 14:20:00 +03:00
michael12312
84519086db docs: fix missing type helm in doc (#7074) (#9085)
Signed-off-by: Wang, Mike <Jun.Wang@fmr.com>
2022-04-13 12:39:49 +03:00
34FathomBelow
bf690d0548 chore: fix release workflow failing for >=2.4 (#9082)
* chore: fix release workflow failing for >=2.4

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

* Retrigger CI pipeline

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-04-12 19:15:08 -04:00
Leonardo Luz Almeida
2e0b2a17fb docs: Clarify BeforeHookCreation as default (#9068)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-04-11 17:13:57 +00:00
Yuan Tang
0a549a414f chore: Upgrade to Golang 1.18 (#9066)
* chore: Upgrade to Golang 1.18

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* tidy up

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-04-11 16:57:45 +00:00
Michael Crenshaw
45272a18b4 docs: wording improvement (#9036)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-11 08:07:10 -07:00
Michael Crenshaw
edcd57a0ed chore: upgrade ui dependencies (#9060)
* chore: upgrade ui dependencies

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

* chore: upgrade ui dependencies

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-11 10:45:17 -04:00
Michael Crenshaw
33386df879 chore: eliminate go-mpatch dependency (#9045)
* chore: eliminate go-mpatch dependency

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

* chore: abstract out resource list function

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

* chore: don't exit the program in anything but the main function

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

* chore: better error messages

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

* chore: better error messages

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-11 09:49:48 -04:00
mlosicki
c305a02541 feat: add support for Bitbucket Server (SCM + PR); add filters for PR (#9049)
Signed-off-by: mlosicki <mlosicki@users.noreply.github.com>
2022-04-11 09:29:17 -04:00
Ashutosh
3c0854f7ea chore: add permission check to argocd-cli (#9057)
* add permission check to argocd-cli

Signed-off-by: asingh51 <Ashutosh_Singh@intuit.com>

* Retrigger CI pipeline

Signed-off-by: asingh51 <Ashutosh_Singh@intuit.com>

Co-authored-by: asingh51 <Ashutosh_Singh@intuit.com>
2022-04-10 10:55:19 -04:00
Regina Scott
60eb2afdde feat: support swapping direction of truncation on resource names (#8671)
Signed-off-by: Regina Scott <rescott@redhat.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-09 15:26:46 -04:00
Shyukri Shyukriev
6b783af5c6 chore!: Helm2 removal (#8313)
* chore: remove helm2

Reorder test/container/Dockerfile to mitigate issue of being unable to create
.gitconfig since the homedir is not present

chore: cleanup helm2 and tests related to it
Remove helm2 init. Fix unused import
Use helm 3 structure for CRDs
Remove helm2-dependency testdata
Address PR comments
Add back values-production and value.yaml on helm tests
Remove helm2 from openapi.

Signed-off-by: Shyukri Shyukriev <shyukri.shyukriev@mariadb.com>

	modified:   util/helm/cmd_test.go

* fix: generated openapi

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

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-09 19:17:44 +00:00
Daniel Helfand
1a47fa2b03 chore: make timeout configurable for Expect func (#9054)
This was motivated by the TestCustomToolWithSSHGitCreds being flakey with timeouts.

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-04-09 17:59:16 +00:00
Daniel Helfand
322c950be4 fix: allow cli/ui to follow logs (#8987)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-04-09 13:05:56 -04:00
Daniel Helfand
f9cbaa30fc feat: remove rbac when using argocd cluster rm (#8969)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-04-09 12:58:21 -04:00
Ishita Sequeira
89c9c62776 proposal: support multiple sources for an Application (#8322)
* proposal: support multiple sources for an Application

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* addressed PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* update summary

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* feat: move watch params to struct  (#8819)

* add to approvers

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

* watch opts move to struct

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

* watch opts move to struct

Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: ishitasequeira <isequeir@redhat.com>

* Merge pull request from GHSA-2f5v-8r3f-8pww

* fix: application resource APIs must enforce project restrictions

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* Fix unit tests

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

Co-authored-by: jannfis <jann@mistrust.net>
Signed-off-by: ishitasequeira <isequeir@redhat.com>

* chore: fix imports and unit tests (#8857)

* chore: fix imports

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

* chore: fix unit test

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

* chore: keep changes minimal

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

* chore: fix another test

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

* feat: operation result and history table tests (#8887)

* add to approvers

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

* print tables additional tests

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

* move to %q

Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: ishitasequeira <isequeir@redhat.com>

* fix: corrected applicationset binary name in manifests (#8954)

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
Signed-off-by: ishitasequeira <isequeir@redhat.com>

* Update proposed design to add 'ref' field instead of externalValuesField

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* remove unwanted changes from PR added while rebase

Signed-off-by: ishitasequeira <isequeir@redhat.com>

Co-authored-by: pasha-codefresh <pavel@codefresh.io>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: jannfis <jann@mistrust.net>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Co-authored-by: rishabh625 <43094970+rishabh625@users.noreply.github.com>
2022-04-08 17:55:57 -04:00
D. Ryan Hild
aa0944dc88 fix: cleanup func being called too early (#8389)
The io.Closer returned from the call to creds.Environ() removes the
underlying file. The desired behavior here is to clean up the
credentials files only after the plugin code has been run, which now
happens one level up in the call stack.

Fixes #7995

Signed-off-by: D. Ryan Hild <rhild@starbucks.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-08 16:03:00 -04:00
Leonardo Luz Almeida
7fe25c3d3a chore: Integrate kustomize installation in localized toolchain (#9027)
* chore: fix kustomize installation in MacOS

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

* Install Kustomize in dist folder

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

* Create $BIN folder if does not exist

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

* Change dist just for kustomize

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

* display kustomize binary used

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

* Fix kustomize used for manifest generation

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

* Fix kustomize installation in docker

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

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-08 15:42:21 -04:00
Miguel A. Alvarado V
2cdfafee4b chore: bump helm version to 3.8.1 (#8804)
* chore: bump helm version to 3.8.1

Signed-off-by: Miguel A. Alvarado V <alvaradoma@gmail.com>

* fix: Adding simple sanitize for repo name

Signed-off-by: Miguel A. Alvarado V <alvaradoma@gmail.com>
2022-04-08 13:19:41 -04:00
pasha-codefresh
1fe8a9b2b6 chore: cluster generator retry (#9035)
chore: cluster generator retry (#9035)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-04-08 09:38:27 -07:00
Snyk bot
509b5501bf [Snyk] Upgrade monaco-editor from 0.27.0 to 0.33.0 (#9038)
* fix: upgrade monaco-editor from 0.27.0 to 0.33.0

Snyk has created this PR to upgrade monaco-editor from 0.27.0 to 0.33.0.

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

* update monaco editor webpack

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

Co-authored-by: pashavictorovich <pavel@codefresh.io>
2022-04-08 13:38:48 +03:00
Snyk bot
45b95bafbe fix: upgrade foundation-sites from 6.5.3 to 6.7.4 (#9039)
Snyk has created this PR to upgrade foundation-sites from 6.5.3 to 6.7.4.

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-04-08 11:54:08 +03:00
Jonas Hecht
4ce1091169 docs: fix Traefik IngressRoute CRD to prevent missing required field name (#8951)
Signed-off-by: Jonas Hecht <jonas.hecht@codecentric.de>
2022-04-07 13:37:25 -04:00
ksch84
0a7dc06d8c fix: Prevent cluster privilege warning for cluster add cmd (#8972)
Fixes #8957

Signed-off-by: ksch84 <ksch84@protonmail.com>
2022-04-07 13:20:14 -04:00
Sverre Boschman
24e24328c3 fix: detect applicationset webhook events for Matrix and Merge generators (#8998)
Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
2022-04-07 13:18:53 -04:00
Hüseyin Celal Öner
21f0aa3ccc feat: Exposing Default Metric Port for ApplicationSet Controller in Manifest Files. #8999 (#9000)
* feat: expose default metrics port in manifest definitions.

Out of the box, Applicationset presents some controller-runtime metrics on port 8080. However, the metric port is not defined as a container port in manifest files, therefore, they are not accessible. This
commit aims to make it accessible.

Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
Signed-off-by: Celal Öner <celal.oner@trendyol.com>

* chore: add Trendyol to the list of users.

Signed-off-by: Celal Öner <celal.oner@trendyol.com>

* chore(docs): add ServiceMonitor manifest example for newly added metrics.

Signed-off-by: Celal Öner <celal.oner@trendyol.com>

* fix: regenerate manifest file via make file.

Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
Signed-off-by: Celal Öner <celal.oner@trendyol.com>

Co-authored-by: Erkan Zileli <erkan.zileli@trendyol.com>
2022-04-07 13:00:53 -04:00
Jonah Back
14cdfc77da feat: add caching to application js bundle since it has a unique name (#9008)
* feat: add caching to application js bundle since it has a unique name

Signed-off-by: Jonah Back <jonah@jonahback.com>

* chore: simplify check and add tests

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

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-07 10:15:23 -04:00
Elad Laor
5c2391f71f feature: adding kube-context flag (#8849)
* feature: adding support for kube-context flag to override kubeconfig if wanted. #8829

Signed-off-by: elad-codefresh <elad.laor@codefresh.io>

* feat: fixed lint

Signed-off-by: elad-codefresh <elad.laor@codefresh.io>

* feat: codegen

Signed-off-by: elad-codefresh <elad.laor@codefresh.io>
2022-04-07 16:54:46 +03:00
Dan Molik
d00fa536e2 feat: New SCM and pull request ApplicationSet generators for Gitea (#8989)
* feat: New SCM and pull request ApplicationSet generators for Gitea

An initial implementation of Pull Request and SCM generators for Gitea.

API paging, and repo labels have not been implemented.

Signed-off-by: Dan Molik <dan@danmolik.com>

* chore: white space in hack/test.sh

re-trigger linting check

Signed-off-by: Dan Molik <dan@danmolik.com>

* chore: add gitea_scm and gitea_pr tests

Signed-off-by: Dan Molik <dan@danmolik.com>

* bug: ensure gitea scm haspath detects directories correctly

Signed-off-by: Dan Molik <dan@danmolik.com>
2022-04-07 09:08:54 -04:00
Michael Crenshaw
5921e2a73b chore: ignore irrelevant moment vulnerability (#9006)
* chore: ignore irrelevant moment.js vulnerability

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-05 19:24:42 +00:00
Alexander Matyushentsev
409f03ee51 chore: upgrade moment to latest version to fix CVE (#9005)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-04-05 17:24:09 +00:00
jannfis
4ef0eb7b9e chore: Make unit tests run on platforms other than amd64 (#8995)
Signed-off-by: jannfis <jann@mistrust.net>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-05 16:38:43 +00:00
Michael Crenshaw
b0cd653f94 chore: update golangci-lint (#8988)
* chore: update golangci-lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-05 07:49:53 -07:00
David Schneider
af16a6fa2d fix: Gitlab Generator PathExists for files (#8997)
This is a fix for https://github.com/argoproj/applicationset/issues/386

Signed-off-by: David Schneider <david.schneider@chargepoint.com>

Co-authored-by: David Schneider <david.schneider@chargepoint.com>
2022-04-05 10:12:54 -04:00
Saumeya Katyal
e53a3f89f0 fix: consistent forms for UI (#8922)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Co-authored-by: Remington Breeze <remington@breeze.software>
2022-04-04 16:02:52 -07:00
Michael Crenshaw
a5933db842 chore: setup go 1.17 before lint (#8994)
* chore: setup go 1.17 before lint

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

* chore: use specific golang version

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-04-04 13:04:09 -07:00
rishabh625
86a646f941 feat: Merge applicationset docs and examples (#8955)
* feat: Migrate applicationset docs,examples into argocd

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* corrected applicationset binary name in manifest present in doc

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* corrected autogenerated file

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Included gettimg started page, added relative lookup from applicationset to argocd,removed unused file

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* commiting michael suggestion of text

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-04-04 11:22:42 -04:00
pasha-codefresh
f11da56381 feat: add --app-hard-resync flag to controller (#8928)
* feat: add --app-hard-resync flag to controller

Signed-off-by: darshanime <deathbullet@gmail.com>

* add to approvers

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

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

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

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

* merge

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

* merge

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

* regenerate docs

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

* regenerate docs

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

* fix tests

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

* read variable from cm

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

* reconciliation variable

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

* manifest

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

Co-authored-by: darshanime <deathbullet@gmail.com>
2022-04-04 10:44:35 -04:00
Reinier Timmer
27d4edd423 fix: return revision from getGitGeneratorInfo (#8979)
Signed-off-by: Reinier Timmer <reinier.timmer@ah.nl>
2022-04-04 09:24:52 -04:00
go_vargo
3c00de86ea docs: Add notice about GKE version 1.21.3-gke.1600 and sample for pathType: ImplementationSpecific (#8765) (#8766)
Signed-off-by: Kent Iso <kentaiso@google.com>
2022-04-02 21:43:25 +03:00
Vinícius Gajo
f782384dbc chore: Update USERS.md (#8973)
Add Datarisk to the USERS.md,
Signed-off-by: Vinícius Gajo <vinigaio97@gmail.com>
2022-04-02 21:22:13 +03:00
Sahdev Zala
022697375d docs: update meeting time and agenda (#8971)
Provide the updated meeting time and fix the agenda links.

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-04-01 17:51:49 +00:00
Ragnar Paide
3659b7bb7d fix: improve timeout.reconciliation error handling (#8964)
Signed-off-by: Ragnar Paide <ragnar.paide@gmail.com>
2022-04-01 09:38:52 -04:00
Zach Aller
e9fae0df37 fix: Add Content-Security-Policy configuration option (#8943)
* fix: Add Content-Security-Policy configuration

This should finish up the work on issue #2706 by adding a configurable
Content-Security-Policy header which defaults to frame-ancestors 'self';

This matches what we do with X-Frame-Options=sameorigin some reference information found
here https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors

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

* Run codegen

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

* fix: add ARGOCD_SERVER_CONTENT_SECURITY_POLICY env var to be configured via configmap

Signed-off-by: zachaller <zachaller@hotmail.com>
2022-03-31 14:48:35 -04:00
Michael Crenshaw
d003f3a60f fix: update error message for test (#8942)
* fix: update error message for test

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

* fix: use message that's common to different k8s versions

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-31 19:58:02 +02:00
Michael Crenshaw
b17414b301 fix: use markdown include to fix broken docs (#8913) (#8956)
* fix: use markdown include to fix broken docs (#8913)

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

* chore: trigger CI

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-31 19:53:00 +02:00
Regina Scott
f1e0c8487b feat: add printout of what has been deleted (#8894)
Signed-off-by: Regina Scott <rescott@redhat.com>
2022-03-31 13:20:38 -04:00
Chetan Banavikalmutt
ba0c249457 docs: update Ingress examples (#8369)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-03-31 10:11:08 -04:00
rishabh625
f892110318 fix: corrected applicationset binary name in manifests (#8954)
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-03-31 15:40:41 +02:00
Saumeya Katyal
0ff1ada720 fix: hide managed fields by default in UI (#8932)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-03-30 11:02:55 -07:00
Michael Crenshaw
59672fb9eb fix: use new applicationset controller command (#8940)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-30 10:27:37 -07:00
rishabh625
0f07dec74d fix: Added github and gitlab token into env (#8933)
* fix: Added github and gitlab token into env

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* changed secret name as E2E

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Retrigger CI pipeline

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
2022-03-30 09:21:40 -07:00
Alexander Matyushentsev
e86465251a docs: reflect v2.3 release changes in roadmap.md (#8747)
docs: reflect v2.3 release changes in roadmap.md (#8747)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-29 23:47:35 +00:00
Michael Crenshaw
3f51d92dc6 fix: prevent excessive repo-server disk usage for large repos (#8845) (#8897)
fix: prevent excessive repo-server disk usage for large repos (#8845) (#8897)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-29 15:13:48 -07:00
rishabh625
c77cf66aa1 feat: Merge applicationset into argocd (#8864)
feat: Merge applicationset into argocd (#8864)

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
Co-authored-by: jannfis <jann@mistrust.net>
2022-03-29 15:11:02 -07:00
dependabot[bot]
8847a310ad build(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /ui-test (#8919)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 20:53:41 +00:00
Michael Crenshaw
17f60b5166 fix: don't run codeql for push events from dependabot (#8924)
* fix: codeql check should run on merge commit

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

* chore: trigger CI

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

* fix: don't run codeql on push event for dependabot branches

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-29 15:37:34 -04:00
dependabot[bot]
ad3c315e0c build(deps): bump minimist from 1.2.5 to 1.2.6 in /ui (#8878)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
2022-03-29 13:46:08 -04:00
Daniel Helfand
9d76dd4494 chore: remove tab from argocd cluster rm example (#8926)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-03-29 13:40:47 -04:00
pasha-codefresh
0e927053a4 chore: tests for app cmd (#8918)
* add to approvers

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

* application tests

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

* application tests

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-29 09:29:01 -04:00
Lukonde Mwila
7600163eff docs: added links to two video resources for Argo CD (#8917)
Signed-off-by: Lukonde Mwila <outlier.developer@gmail.com>
2022-03-29 09:46:12 +03:00
jannfis
d3220b909f fix: Set QPS and burst rate for resource ops client (#8915)
* fix: Set QPS and burst rate for resource ops client

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

* Pin to latest gitops-engine

Signed-off-by: jannfis <jann@mistrust.net>
2022-03-28 14:35:50 -07:00
Daniel Helfand
f21336cb4c feat: allow cli to remove cluster by name (#8823)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-03-28 14:35:39 -07:00
Daniel Helfand
c59b8ea51d fix: generate manifests to include bitbucket properties (#8912)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-03-28 16:02:08 -04:00
pasha-codefresh
5b44356147 chore: Print app tables test (#8901)
* add to approvers

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

* app table tests

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-27 19:04:49 -07:00
wei
0ac0112a78 fix: Update account.proto annotaion for gen grpc gateway (#6684)
* 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>
2022-03-26 21:46:57 +02:00
Alexander Matyushentsev
8be24f577f chore: remove unused protobuf imports - part 2 (#8899)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-25 13:26:30 -04:00
KS
b50c82d552 docs: Fix k3d example command (#8874)
The k3d flag --k3s-server-arg changed to --k3s-arg and '--disable=traefik' does not work without a node filter: '--disable=traefik@server:*'

Signed-off-by: ksch84 <ksch84@protonmail.com>
2022-03-25 11:00:36 -04:00
dependabot[bot]
b1ff9dbe1e build(deps): bump minimist from 1.2.5 to 1.2.6 in /ui-test (#8877)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 16:33:13 -07:00
pasha-codefresh
2e65b42f05 fix: Format condition incosistent test (#8895)
* add to approvers

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

* fix issue with format condition test

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

* Trigger Build

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

* work with specific jinja version

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-24 23:42:34 +02:00
Evgeny Goldin
32d33dedcc fix: Fixes #8880 - Argo CD build fails on M1 Pro Mac (arm) (#8884)
Frontend dependencies update, switching from "node-sass" to "sass".

Signed-off-by: Evgeny Goldin <evgeny@akuity.io>

Co-authored-by: Evgeny Goldin <evgeny@akuity.io>
2022-03-24 11:23:54 -07:00
34FathomBelow
32be020af0 fix: enable buildkit for make image (#8873) (#8883)
* fix: enable buildkit for make image (#8873)

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

* Retrigger CI pipeline

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-03-24 08:56:21 -07:00
pasha-codefresh
497e53b020 feat: operation result and history table tests (#8887)
* add to approvers

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

* print tables additional tests

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

* move to %q

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-24 11:53:16 -04:00
jeunii
d7608ecc44 docs: Update application.yaml (#8876)
The application object can have labels so that its easier to group together certain applications in the ArgoCD UI. Although labels can be specified, there is no mention of that in the documentation.

Signed-off-by: jeunii <46089687+jeunii@users.noreply.github.com>
2022-03-23 20:16:05 -07:00
pasha-codefresh
faa8869e91 feat: tests for build policy and conditions in app cmd (#8875) 2022-03-23 23:17:49 +02:00
Zach Aller
a10b28ed90 fix: Support podman and older version of docker (#8870)
Podman and older versions of docker do not support multiple args
on a single line. It was recently added to docker in this commit
https://github.com/moby/buildkit/pull/1692 and podman still dose not have support
for it.

Signed-off-by: zachaller <zachaller@hotmail.com>
2022-03-23 17:09:08 -04:00
Michael Crenshaw
f313db9d9f chore: upgrade to go 1.17.8 (#8866)
* chore: upgrade to go 1.17.8

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

* chore: use 1.17 so it's always latest in the series

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-23 13:53:28 -07:00
pasha-codefresh
d71cdddd21 feat: Add tests for app cmd (#8872)
* add to approvers

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

* test filter resources in app cmd

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-23 16:12:20 -04:00
cskh
e370813646 docs: Correct description in overriding random data in helm (#8847)
Signed-off-by: Hui Kang <hui.kang@salesforce.com>
2022-03-23 11:25:31 -04:00
Ilya Lesikov
19cff7f828 fix: env var values with equal sign ignored (#8793)
Environment variable with "=" in its value is not passed to sidecar
config management plugin, but ignored.

Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
2022-03-23 10:00:36 -04:00
Ole-Martin Bratteng
595b82546b docs: fixes the YAML codefence for Slack notification service #8776 (#8777)
* docs: fixes the YAML codefence for `Slack` notification service

Signed-off-by: Ole-Martin Bratteng <1681525+omBratteng@users.noreply.github.com>

* chore: update `notifications-engine` to get latest 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>
2022-03-23 12:37:28 +02:00
Alexander Matyushentsev
8b17abc77e chore: fix flaky TestPermissions e2e test (#8863)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-23 09:45:20 +02:00
Michael Crenshaw
b144fbb5a1 chore: fix imports and unit tests (#8857)
* chore: fix imports

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

* chore: fix unit test

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

* chore: keep changes minimal

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

* chore: fix another test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-22 12:52:48 -07:00
Alexander Matyushentsev
af03b291d4 Merge pull request from GHSA-2f5v-8r3f-8pww
* fix: application resource APIs must enforce project restrictions

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* Fix unit tests

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

Co-authored-by: jannfis <jann@mistrust.net>
2022-03-22 10:57:30 -07:00
pasha-codefresh
a6c664b2ae feat: move watch params to struct (#8819)
* add to approvers

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

* watch opts move to struct

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

* watch opts move to struct

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-21 15:54:19 -07:00
Michael Crenshaw
58341ea934 chore: use correct working directory for Snyk scans (#8837)
* chore: add snyk scan to image build workflow

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

* chore: remove yaml accidentally left in file

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

* chore: run container scan after push

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

* chore: no separate push step

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

* chore: revert unnecessary change

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

* chore: fix working dir for Snyk scans

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-21 10:22:06 -04:00
Michael Crenshaw
fb47accad6 chore: add snyk scan to image build (#8824)
* chore: add snyk scan to image build workflow

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

* chore: remove yaml accidentally left in file

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

* chore: run container scan after push

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

* chore: no separate push step

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

* chore: revert unnecessary change

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-21 09:28:16 -04:00
Daniel Helfand
9bf565787b docs: mention alternatives to using ttl properites with Jobs/Workflows (#8736)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-03-21 12:05:41 +02:00
34FathomBelow
f923cbe5fc chore: Improve image build speed by 8x (#8831)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-03-20 21:05:18 -07:00
Ramin A
1ce3c28256 docs: corrected argocd app set command (#8827)
Signed-off-by: Ramin Akhbari <ramin@akhbari.us>
2022-03-19 23:37:21 +02:00
Meng-Yuan Huang
ac6f9062db docs: Add the CoreDNS requirement. (#7701)
Signed-off-by: Meng-Yuan Huang <myh@live.com>
2022-03-19 16:15:38 +02:00
Daniel Helfand
9186bad4e0 fix: cleanup argocd unknown flag errors (#8723)
* Remove extra print of error message
* Enable SilenceUsage to not display full help message with error

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-03-19 12:08:00 +02:00
Roeland van Batenburg
c569158853 docs: the commands are executed in path (#8739)
Signed-off-by: Roeland van Batenburg <roelandvanbatenburg@gmail.com>

Signed-off-by: Roeland van Batenburg <roeland@enrise.com>
2022-03-18 23:18:22 +02:00
reggie-k
af5f234bdb feat: Introduce RBAC based approach to pod logs #7211 (#8353)
* initial changes in settings, app, account, admin, rbac, doc and tests

Signed-off-by: reggie-k <reginakagan@gmail.com>

* rbac.md docs and better comments in account and app

Signed-off-by: reggie-k <reginakagan@gmail.com>

* initial changes in settings, app, account, admin, rbac, doc and tests

Signed-off-by: reggie-k <reginakagan@gmail.com>

* rbac.md docs and better comments in account and app

Signed-off-by: reggie-k <reginakagan@gmail.com>

* initial changes in settings, app, account, admin, rbac, doc and tests

Signed-off-by: reggie-k <reginakagan@gmail.com>

* rbac.md docs and better comments in account and app

Signed-off-by: reggie-k <reginakagan@gmail.com>

* rebase fix

Signed-off-by: reggie-k <reginakagan@gmail.com>

* updated docs for argocd-cm.yaml

Signed-off-by: reggie-k <reginakagan@gmail.com>
2022-03-18 14:40:48 -04:00
Michael Crenshaw
34bcaee8f6 chore: sort users (#8817)
* chore: sort users

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

* chore: sort, ignore case

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-18 11:21:25 -07:00
Leonardo Luz Almeida
7c0a3618c3 fix: Improve CMP zipslip protection (#8789)
* fix: Improve CMP zipslip protection

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

* Add files.Inbound unit tests

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

* test codeql false positive

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

* add lgtm tag to ignore false-positive

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

* Remove lgtm tag from the code

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-03-18 10:20:08 -04:00
Snyk bot
30415e0b0b [Snyk] Security upgrade node-sass from 6.0.1 to 7.0.1 (#8039)
* fix: ui/package.json & ui/yarn.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ANSIREGEX-1583908

* add to approvers

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

* fix dependencies

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

* Update package.json

Co-authored-by: pashavictorovich <pavel@codefresh.io>
2022-03-17 22:19:53 +02:00
Yi Cai
51bab9c77f fix: Move pod logs containers to dropdown in pod logs toolbar (#8607)
* fix: Move pod logs containers to dropdown in pod logs toolbar

Signed-off-by: ciiay <yicai@redhat.com>
2022-03-17 12:26:04 -07:00
Alexander Matyushentsev
edc85a3aa8 chore: remove unused protobuf imports (#8815)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-17 12:25:43 -07:00
Chetan Banavikalmutt
687fe4049b fix: allow URLs with encoded path (#8809)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-03-17 15:23:43 -04:00
giangnh92
737589ca66 Add Spores Labs adopter (#8807) 2022-03-17 09:58:14 -07:00
pasha-codefresh
0869116609 docs: Add myself to approver (#8803)
* add to approvers

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

* add to approver section

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

* Trigger Build

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

* Trigger Build

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-16 16:03:01 -07:00
Michael Crenshaw
89c05ec831 docs: add parameterized CMPs proposal (#8103)
docs: add parameterized CMPs proposal (#8103)

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

Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-03-16 14:52:43 -07:00
Yuan Tang
2888a9dc84 chore: Add myself to reviewers (#8802)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-16 14:05:48 -07:00
Michael Crenshaw
cb0df2a1b0 docs: add leolouz and crenshaw-dev to approvers (#8798)
* docs: add crenshaw-dev to approvers

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

* docs: add leoluz as approver

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-16 13:50:53 -07:00
Keith Chong
9e9bab2ac9 docs: I'd be honored to be added to the approvers list (#8796)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-03-16 12:35:32 -07:00
34FathomBelow
969c7a1735 chore: improve image build speed (#8772)
* chore: improve image build speed

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

* chore: improve image build speed

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-03-15 21:34:07 -07:00
David Parsley
cf08916928 docs: Bootstrapping waves doc, fixes #7228 (#7229)
* Document changes needed to upgrade in waves.

Signed-off-by: David Parsley <david@welldhealth.com>

* Add info on patching argocd-cm

Signed-off-by: David Parsley <david@welldhealth.com>
2022-03-15 16:44:19 -07:00
Wei Cheng
92956d50e4 chore(docs): fix docs for GitHub App declarative setup (#7493)
Signed-off-by: Wei Cheng <calvinpohwc@gmail.com>
2022-03-15 16:42:32 -07:00
pasha-codefresh
3193a0b795 fix: typo in namespace param (#8770)
* typo in namespace param

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-15 16:42:17 -07:00
mortya
0336dc2f48 docs: argocd-operator overrides resource.customizations (#7398)
Signed-off-by: Morty Abzug <morty+gitlab@frakir.org>
2022-03-15 16:41:35 -07:00
Leonardo Luz Almeida
41db812474 feat: remove shared repo volume between repo-server and cmp-server (#8600)
feat: remove shared repo volume between repo-server and cmp-server (#8600)

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-03-15 12:06:21 -07:00
Edgar Magana
48cf001461 fix: Minor cleanup for app errors #5273 (#8623)
First timer commit to fix a gramma issue

Signed-off-by: Edgar Magana <emagana@gmail.com>
2022-03-15 17:42:15 +01:00
David Shepard
cc53920e1c docs: type must be lower case (#8780) 2022-03-14 16:11:39 -07:00
Alexander Matyushentsev
f8390c940a fix: use deepMerge to populate partial user settings with default values (#8749)
* fix: use deepMerge to populate partial user settings with default values

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-11 15:36:04 -08:00
Paco Guzmán
11d09a262d docs: Stuart added to users (#8757)
Signed-off-by: Paco Guzmán <pacoguzman@users.noreply.github.com>
2022-03-11 10:18:51 -08:00
Alexander Matyushentsev
7cf6a5b190 docs: update version in v2.4.0 version (#8748)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-10 14:40:13 -08:00
Keith Chong
f0b51daf36 fix: Make zoom level a user preference (#7183) (#8460)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-03-10 13:45:26 -08:00
Alexander Matyushentsev
006dc80664 chore: remove lint-docs CI task (#8722)
* chore: remove lint-docs CI task

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* chore: remove not longer necessary url-allow-list

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-10 13:10:06 -08:00
Michael Crenshaw
334521a046 chore: add .snyk file to declaratively ignore irrelevant issues (#8599)
chore: add .snyk file to declaratively ignore irrelevant issues (#8599)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-10 12:53:52 -08:00
Alexander Matyushentsev
57d822f35e chore: Bump stable version of application set addon (#8744)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-10 11:27:26 -08:00
Bryan A. S
bbbb3c3939 fix: remove duplicate line in Makefile (#8735)
Remove extra `-X ${PACKAGE}.gitTreeState=${GIT_TREE_STATE}\` at line `138`.

Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
2022-03-10 10:18:13 -08:00
dependabot[bot]
f90514587b build(deps): bump follow-redirects from 1.14.7 to 1.14.9 in /ui-test (#8724)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.9.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.9)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-09 00:19:34 -08:00
dependabot[bot]
dafd182f49 build(deps): bump follow-redirects from 1.14.7 to 1.14.9 in /ui (#8638)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.9.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.9)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-08 22:38:42 -08:00
Keith Chong
7943533da7 fix: Retry checkbox unchecked unexpectedly; Sync up with YAML (#8682) (#8720)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-03-08 22:38:08 -08:00
msuthar-splunk
5a502199f1 docs: Update okta instructions (#6388)
- data.oicd has no effect on the integration
- SSO flow did not initiate without putting the URL for argocd at `data.url` in `argocd-cm.yaml`. This is specified in the keycloak integration instructions as well.

Signed-off-by: Mit Suthar <msuthar@splunk.com>
2022-03-08 16:53:13 -08:00
Alexander Matyushentsev
3754052054 fix: correct jsonnet paths resolution (#8721)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-08 15:58:24 -08:00
Yuan Tang
6d19813c46 fix(ui): Applications page incorrectly resets to tiles view. Fixes #8702 (#8718)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-08 10:59:13 -08:00
Alexander Matyushentsev
dab15e99ec fix: fix broken monaco editor collapse icons (#8709)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-07 16:10:34 -08:00
Yuan Tang
bc52cdeaf2 chore: Pin GitOps engine to v0.6.0 (#8706)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-07 14:21:20 -08:00
Johan Sandström
d3198e2cda docs: Boozt added to users (#8700) 2022-03-07 12:21:53 -08:00
Michael Crenshaw
f36510200c chore: use regexp.QuoteMeta (#8608)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-07 09:40:51 -08:00
Keith Chong
5b78654f60 fix: Horizontal Scrolling doesn't appear until page end (#8298) (#8462)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-03-04 15:45:07 -08:00
Daniel Helfand
777ac0b9ba feat: populate Server field with destination name when destination server is empty (#8609)
For app get and app list commands with argocd cli

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-03-04 15:33:34 -08:00
descrepes
466ca3c244 docs: Yubo added to users (#8637)
Signed-off-by: descrepes <alexandre.lemao@yubo.live>

Co-authored-by: descrepes <alexandre.lemao@yubo.live>
2022-03-04 13:37:23 -08:00
Ishita Sequeira
7fac91022f docs: update v2.4+ roadmap items (#8593)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-03-04 13:36:36 -08:00
cskh
f5bdce0706 docs: clarify argo cd api server (#8670)
Signed-off-by: Hui Kang <hui.kang@salesforce.com>
2022-03-04 12:09:01 -08:00
Yuan Tang
637cee4017 docs: Add link to Twitter in README (#8685)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-04 10:44:49 -08:00
Soumya Ghosh Dastidar
3ea72eb489 feat: add support for redis acl username/password flow (#8676)
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-03-04 10:29:19 -08:00
jannfis
f9b7384bf4 fix: Allow quoted RBAC group names in API (#8650)
Signed-off-by: jannfis <jann@mistrust.net>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-04 08:30:18 +01:00
Yuan Tang
4e51b746e2 fix: Health status bar button does not re-render properly. Fixes #8569 (#8668)
fix: Health status bar button does not re-render properly. Fixes #8569 (#8668)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-03 21:30:46 -08:00
abhishek pareek
e9d4ae8504 Fix a small typo in cluster-bootstrapping.md (#8672) 2022-03-03 21:29:09 -08:00
Boris Djurdjevic
51f15f14a6 docs: Fix bullet point formatting in roadmap.md (#8667)
Signed-off-by: Boris Djurdjevic <boris@djurdjevic.ch>
2022-03-03 12:52:44 -08:00
Leonardo Luz Almeida
6df2abbcb3 docs: Add group field context (#8658)
* docs: Add group field context

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

* Address code review comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-03-03 20:17:08 +01:00
Keith Chong
f29151eab7 fix: Increase y-margin in resource tree view (#7183) (#8597)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-03-03 15:29:23 +01:00
Soumya Ghosh Dastidar
df2d649751 feat: remove ksonnet from codebase (#8621)
feat: remove ksonnet from codebase (#8621)

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2022-03-02 10:09:47 -08:00
Yuan Tang
67f551a579 docs: Added missing notifications reference docs (#8652)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-02 08:52:27 -08:00
pasha-codefresh
d180fc69ed docs: Add Rubin Observatory (#8640)
docs: Add Rubin Observatory (#8640)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-02 08:47:03 -08:00
rishabh625
80bb21e02a feat: diff changes and wait for user confirmation if not confirmed automatically before app sync in cli (#8412)
* feat: For ```app diff``` cli refactored code to calculate and Print diff in to function findandPrintDiff to support diff functionality while syncing app, Added yes/no prompt to take confirmation while syncing app after previewing diffchanges

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* feat: diff changes initialized diffoption struct at declaration and removed nil checks and yesNo prompt as commented in review

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* feat: Incorporated review changes, changed flag names and text,made printdiff function to return bool,added texts while previewing diff

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

* Update cmd/argocd/commands/app.go

Correcting prompt text

Co-authored-by: jannfis <jann@mistrust.net>
Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>

Co-authored-by: jannfis <jann@mistrust.net>
2022-03-02 15:29:06 +01:00
pasha-codefresh
70e55c8628 fix: git url parse update version due to security issue (#8639)
fix: git url parse update version due to security issue (#8639)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-01 18:49:17 -08:00
Chetan Banavikalmutt
ae60b1749a chore: update dependencies before starting e2e server (#5517)
* chore: update dependencies before starting e2e server

The e2e test server will show errors if there are irregular vendor and UI dependencies. This PR updates the Makefile to update the dependencies before starting the e2e server.

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* increase timeout while checking for e2e server

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-03-01 18:48:40 -08:00
Saumeya Katyal
fcb9f75607 fix: add tooltips for pod logs view (#8455)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-03-01 08:44:02 -08:00
Michael Crenshaw
82ed5ea94c chore: bump go-git version to help avoid CVE-2020-9283 (#8624)
* chore: bump go-git version to help avoid CVE-2020-9283

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

* chore: tidy

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-01 10:57:19 +01:00
Saumeya Katyal
b0bbfc63a9 feat: ui resource filter showing count (#7885)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Co-authored-by: ciiay <yicai@redhat.com>
2022-02-28 21:50:15 -08:00
Yuan Tang
b7912ac96d fix: Add missing ARGOCD_CONTROLLER_REPLICAS in manifests (#8605) 2022-02-28 08:05:41 -08:00
Yuan Tang
0a46d37fc6 feat: Support additional retryable errors (#8578)
* feat: Support additional retryable errors

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Concise conditions

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-26 09:21:16 +01:00
Yuan Tang
662435fc2c fix: Remove empty fields and added missing fields in ApplicationSet CRD (#8612)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-25 11:57:03 -08:00
Yuan Tang
a02f35e9e6 feat: Add identifiable user agents in various Argo commands (#8566)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-25 18:27:05 +01:00
Alexander Matyushentsev
76eddafd1c fix: prevent file traversal using helm file values param and application details api (#8606)
* fix: prevent file traversal using helm file values param and application details api

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* apply reviewer notes: move resolve.go into separate package; use uuid to generate random file

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-24 12:58:38 -08:00
Alexander Matyushentsev
c7da148978 Unique repo path and permissions (#8517)
Unique repo path and permissions (#8517)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-24 11:45:26 -08:00
Yuan Tang
ffa74bb9b6 feat(ui): Add warning and confirmation popup when force/replace sync is selected (#8574)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-24 11:31:25 -08:00
Michael Crenshaw
0f560c417c chore: bump redoc vesion to avoid CVE-2021-23820 (#8604)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-24 10:33:16 -08:00
Yuan Tang
bfe5ef48b4 build: Bump up network timeout during yarn install (#8601)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-23 20:47:08 -08:00
Yuan Tang
9631667545 fix: CronWorkflow should be healthy when not executing workflows (#8594)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-23 15:12:29 -08:00
Ryota
ebc89ce107 docs: Correct typo to match with YAML input in Ingress documentation (#8392)
* docs: Correct typo to match with YAML input in Ingress documentation

Signed-off-by: Ryota <rytswd@gmail.com>

* Retrigger CI pipeline

Signed-off-by: Ryota <rytswd@gmail.com>
2022-02-23 09:10:31 +01:00
Alexander Matyushentsev
764b7a627d refactor: use argocd-git-ask-pass to pass git credentials to git/kustomize (#8516)
refactor: use argocd-git-ask-pass to pass git credentials to git/kustomize  (#8516)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-22 17:57:11 -08:00
Jesse Suen
ac47a42a84 fix!: enforce app create/update privileges when getting repo details (#8558)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-02-22 14:02:27 -08:00
neilcampbe11
46d61044f5 docs: be clear that port forwarding on port 443 should be accessed over https (#8581)
Signed-off-by: Neil Campbell <neilmail84@gmail.com>
2022-02-22 13:33:58 -08:00
Yuan Tang
53090f103b feat(cli): Allow to view previously terminated container logs (#8582)
* feat(cli): Allow to view previously terminated container logs

This is useful when we want to see the snapshot of previously terminated container logs.

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* chore: Generate docs

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-22 11:41:45 -08:00
Yuan Tang
f219888d96 chore(ui): Refactor code for rendering CLI download buttons (#8587)
* chore(ui): Refactor code for rendering CLI download buttons

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Fix spacing and add linux

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-22 11:39:55 -08:00
Michael Crenshaw
c504742263 chore: move dependencies to dev dependencies (#8541)
chore: move dependencies to dev dependencies (#8541)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-22 10:48:05 -08:00
Remington Breeze
badc828888 feat(ui): Add option to wrap lines for pod logs viewer (#6889)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-02-22 09:22:39 -08:00
pasha-codefresh
a4a97f0e42 feat: print scoped resources in get proj cmd (#8550)
feat: print scoped resources in get proj cmd (#8550)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-22 09:21:18 -08:00
pasha-codefresh
1d88f03abb chore(deps): bump mkdocs from 1.1.2 to 1.2.3 in /docs (#8588)
chore(deps): bump mkdocs from 1.1.2 to 1.2.3 in /docs (#8588)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-22 09:07:32 -08:00
pasha-codefresh
b5bdc8e437 fix: Upgrade monaco-editor from 0.15.6 to 0.27.0 (#8590)
fix: Upgrade monaco-editor from 0.15.6 to 0.27.0 (#8590)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-22 09:05:47 -08:00
Remington Breeze
13614e8981 fix(ui): Navigate to selected app in table view on Enter press (#6859)
Signed-off-by: Remington Breeze <remington@breeze.software>
2022-02-21 16:05:24 -08:00
Ben Ye
52ba42389a feat: expose cluster sync retry duration (#8481)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-02-21 22:44:22 +01:00
Yuan Tang
d738e3be61 chore: Update k3s to v1.23.3 in values example for generator tool (#8577)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-20 16:24:29 -08:00
Yuan Tang
a0a7315080 chore: Remove custom resource actions for extensions APIs (#8572)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-18 16:01:02 -08:00
Yi Cai
de4ac14c9f fix: UI: Favorite star icon is cut off (#8556)
* fix: UI: Favorite star icon is cut off

Signed-off-by: ciiay <yicai@redhat.com>

* fixed lint error

Signed-off-by: ciiay <yicai@redhat.com>
2022-02-18 14:42:12 -08:00
pasha-codefresh
483367c555 docs: Clarify instructions to run locally (#8564)
docs: Clarify instructions to run locally (#8564)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-18 14:41:16 -08:00
Michael Crenshaw
ae3d6be76a chore: upgrade redoc (#8573)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-18 14:40:35 -08:00
Yuan Tang
e2a2881a42 docs: Add instruction on running tests for custom health checks (#8571)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-18 13:39:47 -08:00
Yuan Tang
e94890685f feat: Support health check on Argo CronWorkflows (#8570)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-18 12:14:51 -08:00
dependabot[bot]
d7fbc91006 build(deps): bump url-parse from 1.5.3 to 1.5.7 in /ui (#8557)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-18 09:17:55 -08:00
Leonardo Luz Almeida
5b907c13eb chore: configure cmp-server in goreman (#8495)
chore: configure cmp-server in goreman (#8495)

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-18 08:46:55 -08:00
Alexander Matyushentsev
902b6aa9bb feat: support custom helm values file schemes (#8535)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-17 11:51:17 -08:00
Regina Scott
1faa9b04a4 feat: add timestamp view to pod logs viewer (#8532)
Signed-off-by: Regina Scott <rescott@redhat.com>
2022-02-17 12:28:02 +01:00
Alexander Matyushentsev
1ee126d75b feat: support disabling manifest generation using config management tools (#8514)
* feat: support disabling manifest generation using config management tools

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* rename EnableManifestGenerationForSourceType to EnableSourceTypes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-16 21:03:04 -08:00
Alexander Matyushentsev
a84e993deb fix: build ui as part of 'make release-cli' command (#8536)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-16 19:08:28 -08:00
Michael Crenshaw
f462240520 chore: pass submodulesEnabled explicitly to avoid implicit parameter (#8337)
* chore: pass submodulesEnabled explicitly to avoid implicit parameter

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

* fix: update mock

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

* chore: lint

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

* fix: mock checkout invocations w/ 2 params

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

* chore: remove unnecessary comment

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-16 12:55:14 -08:00
Michael Crenshaw
40d05dd080 fix: add labels to sidecar CMP manifests (#8243) (#8367)
fix: add labels to sidecar CMP manifests (#8243) (#8367)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-16 12:52:55 -08:00
Alexander Matyushentsev
28d426e33a fix: refreshing label is hidden by resource tree (#8391)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-16 09:53:21 -08:00
jannfis
920aaced63 fix: Return early on error when updating clusters (#8526)
Signed-off-by: jannfis <jann@mistrust.net>
2022-02-16 09:27:28 -08:00
jannfis
f059c99aa7 feat: Make cluster cache sync more robust (#8438)
* feat: Support retry for list operations in cluster cache sync

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

* Fix default retries

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

* Pull in latest gitops-engine

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

* Default retry limit should be 1

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

* Make type conversion earlier

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

* Rename limit to attempt

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

* Revert Makefile change

Signed-off-by: jannfis <jann@mistrust.net>
2022-02-16 12:52:38 +01:00
Christian Roth
f1c972cae0 docs: Using Dex with OIDC needs the config element in yaml (#8510)
In order to get Dex working with an OIDC provider, I had to structure the Dex config according to the [Dex Documentation](https://dexidp.io/docs/connectors/oidc/#configuration).
This means placing the OIDC configuration within their own `config` element in the `dex.config`, rather than listing them on the same level as the generic connector settings.
2022-02-16 11:02:12 +01:00
Yuan Tang
09a4a5f44f docs: Clarify sync wave precedence by kind and add note on delay between waves (#8518)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-16 10:59:38 +01:00
Yuan Tang
c86a2dd364 feat: Ability to disable in-cluster server address. Fixes #7571 (#7620)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-15 19:09:40 -08:00
Yuan Tang
6081ed3612 test: Support e2e tests and improve robustness on k8s v1.21-v1.23 (#8431)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Co-authored-by: Jesse Suen <jesse@akuity.io>
2022-02-15 18:01:51 -08:00
Yuan Tang
4fc7177ce4 fix: Upgrade gitops-engine to fix compatibility with v1 CRDs (#8515)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-15 16:54:00 -08:00
Yuan Tang
9bdf0bae2d docs: Correct link to UI and add username/password for e2e tests (#8498)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-15 13:05:05 +01:00
Daniel Helfand
5676ab5c9b docs: update ApplicationSet controller getting started link (#8482)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-02-12 20:13:00 -08:00
Panagiotis Georgiadis
36cff3758f refactor: rename 'appclientset' to not collide with pkg (#8476)
Signed-off-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
2022-02-12 18:54:13 +01:00
Jesse Suen
4f27789453 chore: update protoc to 3.17.3 and make install portable (#7932)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-02-11 15:20:12 -08:00
Alexander Matyushentsev
427cde08a7 docs: update chagelog - add v2.3.0, v2.2.1 ~ v2.2.3 releases (#8310)
docs: update chagelog - add v2.3.0, v2.2.1 ~ v2.2.3 releases (#8310)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-11 15:19:17 -08:00
Jesse Suen
131eea6d2a docs: add security documentation related to git repositories (#8463)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-02-11 12:33:37 -08:00
Soumya Ghosh Dastidar
c078bbb5cd fix: argocd in core mode unnecessarily tries to connect to server (#8341)
Signed-off-by: Soumya Ghosh Dastidar <soumya@akuity.io>
2022-02-10 14:55:38 -08:00
Keith Chong
52b13c288b feat: Make hostname for status badges configurable (#8024) (#8436)
* feat: Make hostname for status badges configurable #8024

Signed-off-by: Keith Chong <kykchong@redhat.com>

* Update docs/operator-manual/argocd-cm.yaml

Co-authored-by: jannfis <jann@mistrust.net>
Signed-off-by: Keith Chong <kykchong@redhat.com>

* Update ui/src/app/shared/components/badge-panel/badge-panel.tsx

Co-authored-by: jannfis <jann@mistrust.net>
Signed-off-by: Keith Chong <kykchong@redhat.com>

Co-authored-by: jannfis <jann@mistrust.net>
2022-02-10 19:17:26 +01:00
Bastien Dronneau
f411ecf3bd docs(high availability): fix formating (#8450)
Signed-off-by: bdronneau <basti1.dr@gmail.com>
2022-02-10 16:44:06 +01:00
Rick
12590cddb8 chore: Re-orgnize the controllers package (#8426)
Signed-off-by: rick <1450685+LinuxSuRen@users.noreply.github.com>
2022-02-09 16:40:58 -08:00
jannfis
e01ab05d55 feat: Allow fine-tuning of K8s rest client connection properties (#8404)
* feat: Allow fine-tuning of K8s rest client connection properties

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

* Move initialization

Signed-off-by: jannfis <jann@mistrust.net>
2022-02-08 22:57:49 +01:00
Michael Crenshaw
3953caa5c6 chore: make link relative (#8435)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-08 11:48:33 -08:00
Keith Chong
fd36de0b05 fix: Adjust z-index for newly added tree view toolbar (#8422) (#8423)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-02-08 08:48:15 -08:00
Rick
c5efbf4474 chore: Fix the wrong go method sign of GetJWTTokenFromSpec (#8427)
Signed-off-by: rick <1450685+LinuxSuRen@users.noreply.github.com>
2022-02-08 13:07:54 +01:00
Chetan Banavikalmutt
c5061a0d66 docs: fix broken link (#8430)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-02-08 13:04:37 +01:00
Alexander Matyushentsev
d0cbb1597c feat: add RespectIgnoreDifferences sync option to UI (#8390)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-06 14:47:12 -08:00
Ishita Sequeira
7178eff5c7 fix: fix deployment config health status (#8376)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-02-06 11:19:46 -08:00
Michael Crenshaw
d4e9bdb032 docs: add comment to clarify how destination.namespace works (#8383)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-04 17:32:47 -08:00
Soumya Ghosh Dastidar
af270add89 fix(cli): argo app diff passes --api-versions to helm template (#8371)
Signed-off-by: Soumya Ghosh Dastidar <soumya@akuity.io>
2022-02-04 16:35:06 -08:00
jannfis
bb77664b6f fix: Resolve symlinked value files correctly (#8387)
* fix: Resolve symlinked value files correctly

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

* fix: Resolve symlinked value files correctly

Signed-off-by: jannfis <jann@mistrust.net>
2022-02-04 15:07:55 -08:00
fredericfran-gds
0e7371dc26 fix: reload ArgoCD config if OIDC config changes (#8350)
fix: reload ArgoCD config if OIDC config changes (#8350)

Signed-off-by: Frederic Francois <frederic.francois@digital.cabinet-office.gov.uk>
2022-02-04 14:20:54 -08:00
Michael Crenshaw
b7519fafea chore: new gif (#8366)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-04 13:36:34 -08:00
Leonardo Luz Almeida
4c255bb71a chore: Generate spdx for the UI project (#8385)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-04 13:33:45 -08:00
Alexander Matyushentsev
ac1254017f chore: fix broken TestHelmIgnoreMissingValueFiles test (#8368)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-04 07:15:59 +01:00
Yuan Tang
1c7cddbdf4 docs: Remove the mention of CLA in toolchain guide (#8362)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-03 16:21:08 -08:00
Jonah Back
b6ac9ba9f6 fix: check for issuing condition on Certificate (#7217)
Signed-off-by: Jonah Back <jonah@jonahback.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-03 16:01:16 -08:00
jannfis
78c2084f0f Merge pull request from GHSA-63qx-x74g-jcr7
Signed-off-by: jannfis <jann@mistrust.net>
2022-02-03 20:37:46 +01:00
pasha-codefresh
f4ced4670a fix: fix example in project scoped repositories (#8357)
fix: fix example in project scoped repositories (#8357)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-03 09:04:50 -08:00
pasha-codefresh
6735066945 fix: applications page is crashing if nothing marked as favorites (#8356)
fix: applications page is crashing if nothing marked as favorites (#8356)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-03 09:04:23 -08:00
Leonardo Luz Almeida
f391256516 chore: update actions/setup-go to v2 (#8349)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-02 18:38:53 -08:00
Michael Crenshaw
8903851ed4 docs: fix malformatted note (#8348)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-02 13:53:35 -08:00
Leonardo Luz Almeida
4d82b3e426 chore: Use go install to add spdx-sbom-generator (#8346)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-02 13:50:01 -08:00
Michael Crenshaw
d2b5697dbd chore: use go install instead of deprecated go get (#8333)
* chore: use go install instead of deprecated go get

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

* docs: readme fixes

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-01 18:59:58 -08:00
Alexander Matyushentsev
b009cdb57d chore: automate bundling argocd addons during release process (#8336)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-01 17:06:53 -08:00
Leonardo Luz Almeida
ee97b7d96d chore: generate sbom for the released docker image (#8338)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-01 15:52:49 -08:00
Ben Ye
98bec43aaa fix: register controller workqueue metrics correctly (#8318)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-02-01 10:57:20 -08:00
Chetan Banavikalmutt
38f1f8e8a9 chore: upgrade Helm to v3.8.0 (#8301)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-02-01 10:44:31 -08:00
Alexander Matyushentsev
f9df915141 fix: make sure release workflow publish image with "v" in front of version (#8335)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-01 10:17:09 -08:00
Leonardo Luz Almeida
e901174a71 chore: generate and upload sbom during release (#8332)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-01 08:32:50 -08:00
pasha-codefresh
86ba98a0ba chore: add values example and gcp support to generator tool (#8330)
* add values example and gcp support

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

* add values example and gcp support

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-02-01 08:17:43 -08:00
Alexander Matyushentsev
596a643c58 docs: mention argocd notifications and applicationset changes in upgrade instructions (#8312)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-31 17:26:46 -08:00
Alexander Matyushentsev
580a6960fc fix: argocd build fails on windows (#8319)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-30 13:01:13 -08:00
Saumeya Katyal
85c114d2ef feat: favourite ui feature (#8210)
* feat: favourite ui feature (#8210)

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-01-28 12:19:30 -08:00
Alexander Matyushentsev
d2a3a4db19 fix: add missing steps in release workflow to setup docker buildx (#8311)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-28 12:04:04 -08:00
Yujun Zhang
4aa614dafb fix: fetch revision only then fallback to default refspec (#5605)
* fix: fallback to fetch default only on error

Ignoring commit SHA breaks gerrit when the commit is not merged

Signed-off-by: Yujun Zhang <yujunz@nvidia.com>

* revert util/git/client.go changes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-28 10:58:36 -08:00
Yuan Tang
6abccea3f0 docs: Add link to new blog (#8308)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-01-28 09:06:05 -08:00
Guilhem Lettron
5ffc60f88d chore(bug_report): put instructions in comment (#8283)
Users reporting a bug will see instructions, can keep it, it will be ignored in final issue

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
2022-01-28 10:08:31 +01:00
Keisuke Wada
04e05c5106 docs: Add ZOZO to list of users (#8300)
Signed-off-by: keisuke.wada <keisuke.wada@zozo.com>
2022-01-28 10:05:12 +01:00
Keith Chong
f387ab846b feat: Zoom in and out on resource view (#7183) (#8290)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-01-27 15:59:53 -08:00
pasha-codefresh
6dc544db99 chore: update slack version (#8299)
chore: update slack version (#8299)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-27 12:09:14 -08:00
Michael Crenshaw
061e575d82 chore: fix docs formatting (#8293)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-27 10:01:48 -08:00
Snaipe
d9c1af9f25 docs: update ambassador mappings to avoid --grpc-web-root-path (#8028)
I found it non-intuitive to have to tell our users to use `--grpc-web-root-path /`
when logging in when the defaults should have just worked.

This commit updates the Host-based ambassador mappings to avoid that, making
plain `argocd login <host>` calls work.

Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
2022-01-27 08:18:46 -08:00
Alexander Matyushentsev
6abc85a3a5 Revert "chore: Run dex reverse proxy only when dex is configured (#7999)" (#8291)
This reverts commit 303cc4613b.

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-27 07:09:10 +01:00
Alexander Matyushentsev
a16471b8a5 chore: upgrade gitops engine (#8288)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-26 19:04:41 -08:00
Alexander Matyushentsev
ecc3ab3cab feat: Use encrypted cookie to store OAuth2 state nonce (instead of redis) (#8241)
feat: Use encrypted cookie to store OAuth2 state nonce (instead of redis) (#8241)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-26 10:59:50 -08:00
Dong Wang
0aeda4366d feat: Expose ARGOCD_APP_NAME to the kustomize build command (#8096)
Signed-off-by: Dong Wang <wd@wdicc.com>
2022-01-26 08:18:14 -08:00
Ishita Sequeira
cf601c96d3 feat: bundle applicationset-controller with argocd (#8148)
* feat: bundle applicationset-controller with argocd

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* point applicationset to master branch

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-01-26 06:18:23 -05:00
Michael Crenshaw
96f95ca1c1 Use gRPC timeout for sidecar CMPs (#8131) (#8236)
Use gRPC timeout for sidecar CMPs (#8131) (#8236)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-25 15:45:37 -08:00
dependabot[bot]
0b2e585373 build(deps): bump nanoid from 3.1.23 to 3.2.0 in /ui (#8253)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-25 09:35:31 -08:00
Keith Chong
83458e0bd9 feat: Allow external links on Application (#3487) (#8231)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-01-25 09:34:36 -08:00
pasha-codefresh
4aa7cbfb91 chore: go version inside mod file (#8275)
* update go version

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

* update go version

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

* change version in docs

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-25 15:23:43 +01:00
Michael Crenshaw
26db08931e docs: add chart field to application.yaml (#8239)
* docs: add chart field to application.yaml

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

* docs: more clarification

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-25 09:16:13 +01:00
Alexander Matyushentsev
3ae9bffa30 fix: argocd CLI fails in core mode (#8270)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-25 09:15:33 +01:00
jannfis
4c7651b5f8 chore: Update security policy (#8258)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-24 22:56:15 -08:00
pasha-codefresh
feaf949968 chore: update notifications version (#8267)
chore: update notifications version (#8267)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-24 13:43:23 -08:00
pasha-codefresh
b7bdb8ffe7 feat: Application generation strategies and clusters generation (#8263)
feat: Application generation strategies and clusters generation (#8263)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-24 09:24:39 -08:00
Patrick Jahns
c3b3521f59 fix: provide a semantic version parsed version for KUBE_VERSION (#8250)
Signed-off-by: Patrick Jahns <github@patrickjahns.de>
2022-01-23 13:01:12 +01:00
Ishita Sequeira
285454f011 chore: remove additional 'to' from description in swagger.json (#8254)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-01-23 12:51:58 +01:00
Saumeya Katyal
134f880aae docs: add saumeya to reviewers (#8248)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-01-21 09:52:45 -08:00
Michael Crenshaw
9ac935d59f docs: fix nested code block formatting (#8240)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-21 11:21:40 +01:00
Yi Cai
8c2cef6f28 docs: added ciiay to reviewers (#8242)
Signed-off-by: ciiay <yicai@redhat.com>

Co-authored-by: jannfis <jann@mistrust.net>
2022-01-21 11:12:28 +01:00
jannfis
26b9ba3dc6 chore: Publish latest build to quay instead of Docker Hub (#8238)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-21 10:08:32 +01:00
Leonardo Luz Almeida
de496d6b4b docs: add Leo and Michael as reviewers (#8244)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-01-21 09:25:53 +01:00
Chetan Banavikalmutt
ae71475869 chore: exclude argocd-server rbac for core-install (#8234)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-01-20 16:29:19 -08:00
Alexander Matyushentsev
ef8ae570bf chore: upgrade dex to v2.30.2 (https://github.com/dexidp/dex/issues/2326) (#8237)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-20 14:07:49 -08:00
Alexander Matyushentsev
6962fc22ee chore: upgrade base image to ubuntu:21.10 (#8230)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-20 08:29:47 +01:00
Alexander Matyushentsev
25698fd9f5 chore: upgrade k8s client to v1.23 (#8213)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-20 08:28:11 +01:00
Alexander Matyushentsev
44d596f0ee chore: upgrade kustomize to most recent version (v4.4.1) (#8227)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-19 15:33:29 -08:00
Leonardo Luz Almeida
1547b44ffc feat: Allow configuring system wide ignore differences for all resources (#8224)
* feat: Allow configuring system wide ignore differences for all resources

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

* Add example config to argocd-cm.yaml

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-01-19 14:57:43 -08:00
Alexander Matyushentsev
9155d14f9a chore: upgrade golang to 1.17.6 (#8229)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-19 14:44:31 -08:00
Alexander Matyushentsev
2fc0a25c0a chore: upgrade helm to most recent version (v3.7.2) (#8226)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-19 14:17:57 -08:00
Yujun Zhang
988d760474 chore: fix typo in description (#8217)
Signed-off-by: Yujun Zhang <yujunz@nvidia.com>
2022-01-19 08:18:04 +01:00
Alexander Matyushentsev
a17c77e238 feat: allow selecting application on detail page (#8176)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-18 14:43:43 -08:00
Michael Crenshaw
dc24d05a31 chore: make lint-docs less flakey (#8182)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-18 12:03:32 -08:00
Vladimir Avdoshka
113b3da691 docs: Specifying the value format to avoid ambiguity due to mentioned default "90 seconds timeout" (#8029)
Signed-off-by: Vladimir Avdoshka <vova.avdoshka@gmail.com>
Signed-off-by: Vladimir Avdoshka <vavdoshka@kyriba.com>
2022-01-18 11:51:12 -08:00
Leonardo Luz Almeida
8608a3192a docs: Add RespectIgnoreDifferences sync option documentation (#8212)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-01-18 09:54:54 -08:00
Tristan Keen
2fb3986386 fix: Allow all resources to add external links (#7923)
Signed-off-by: Tristan Keen <tristan.keen@gmail.com>
2022-01-18 08:23:58 -08:00
jannfis
8b95052720 chore: redis:alpine is incompatible with Dockerized toolchain (#8193)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-18 08:22:46 +01:00
jannfis
010411012f chore: Log out the resource triggering reconciliation (#8192)
* chore: Log out the resource triggering reconciliation

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

* chore: Log out the resource triggering reconciliation

Signed-off-by: jannfis <jann@mistrust.net>
2022-01-18 08:22:26 +01:00
Song Song Li
22f4a936cc fix invalid cmd (#8026)
Signed-off-by: Song Song Li <ssli@redhat.com>
2022-01-17 19:41:04 -08:00
Denis Krivenko
41fc70d17e fix: Add "Restarting MinIO" status to MiniO Tenant health check (#8191)
Signed-off-by: dnskr <dnskrv88@gmail.com>
2022-01-15 17:32:43 +01:00
Marco Kilchhofer
303cc4613b chore: Run dex reverse proxy only when dex is configured (#7999)
Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2022-01-15 16:18:47 +01:00
pasha-codefresh
2072d1a4b0 chore: upsert application e2e (#8190)
* move projects

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

* Revert "move projects"

This reverts commit d0e21353

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

* covering regression #8184 with e2e

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

* empty commit

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

* change semver

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

* fix test

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

* empty commit

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

* empty commit

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-15 15:41:08 +01:00
jannfis
d33caacb9b fix: Prevent possible out-of-bounds access when loading policies (#8186)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-15 07:30:40 +01:00
jannfis
3c5033c6bf refactor: Make user agent enforcer testable (#8174)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-15 07:30:14 +01:00
pasha-codefresh
978162fdee fix: application exist panic when execute api call (#8188)
fix: application exist panic when execute api call (#8188)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-14 17:19:43 -08:00
Alexander Matyushentsev
4f62aa4398 docs: update roadmap based on v2.3 progress (#8187)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-14 15:55:32 -08:00
Keith Chong
6f59fe660f feat: Add app list and details page views to navigation history (#7776) (#7937)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-01-14 14:46:53 -08:00
patst
0dfc125d95 feat: add skipCrds flag for helm charts (#8012)
* feat: add skipCrds flag for helm charts

* replace additionalTemplateArgs with includeCrds flag
* add testcase for skip crds

Signed-off-by: patst <patrick.steinig@googlemail.com>

* feat: add skipCrds flag for helm charts

* replace additionalTemplateArgs with includeCrds flag
* add testcase for skip crds

Signed-off-by: patst <patrick.steinig@googlemail.com>

* feat: add skipCrds flag for helm charts

* replace additionalTemplateArgs with includeCrds flag
* add testcase for skip crds

Signed-off-by: patst <patrick.steinig@googlemail.com>

* feat: add skipCrds flag for helm charts

* make sure include crds is not added for helm2

Signed-off-by: patst <patrick.steinig@googlemail.com>
2022-01-14 13:56:34 -08:00
pasha-codefresh
f65289748a feat: tool for generate argocd resources (#8037)
feat: tool for generate argocd resources  (#8037)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-14 12:53:51 -08:00
jannfis
47187bd30e fix: Prevent possible nil-pointer deref in normalizer (#8185)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-14 21:37:31 +01:00
pasha-codefresh
4f155b539b fix: argocd notifications troubleshooting cmd (#8183)
fix: argocd notifications troubleshooting cmd (#8183)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-01-14 11:45:02 -08:00
jannfis
cb47740d62 chore(deps): Update github.com/Masterminds/semver to v3.1.1 (#8180)
* chore(deps): Upgrade Masterminds/semver to v3.1.1

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

* Do not anchor regexp

Signed-off-by: jannfis <jann@mistrust.net>
2022-01-14 19:28:34 +01:00
jannfis
0b9b7c31f8 fix: Parse to correct uint32 type (#8177)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-14 10:17:30 -08:00
dependabot[bot]
35f5b32f53 build(deps): bump follow-redirects from 1.14.1 to 1.14.7 in /ui (#8161)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.1 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.1...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 15:22:02 +01:00
inductor(Kohei)
2f83312800 docs: Update Ingress with GKE (#8163)
Signed-off-by: inductor <kohei.ota@hpe.com>
2022-01-14 12:43:33 +01:00
34FathomBelow
074db0cf28 docs: Update tls.md (#8169)
Signed-off-by: 34fathombelow <34fathombelow@protonmail.com>
2022-01-14 12:42:45 +01:00
dependabot[bot]
502762acc0 build(deps-dev): bump postcss from 8.2.10 to 8.2.13 in /ui (#8118)
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.10 to 8.2.13.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.10...8.2.13)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 10:26:42 +01:00
Ishita Sequeira
55ea34292a fix: route health check stuck in 'Progressing' (#8170)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-01-14 10:02:51 +01:00
jannfis
7ff5f0755b chore: Update ghinstallation to v2.0.4 (#8171)
* chore: Update ghinstallation to v2.0.4

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

* Update go.sum

Signed-off-by: jannfis <jann@mistrust.net>
2022-01-14 10:01:48 +01:00
dependabot[bot]
4a04bb9096 build(deps): bump follow-redirects from 1.14.4 to 1.14.7 in /ui-test (#8173)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 10:01:33 +01:00
pavan kumar ceemala
fb30f1bd03 Update USERS.md (#8166) 2022-01-13 15:58:56 -08:00
Yuan Tang
d6f3f87c69 chore: Migrate to use golang-jwt/jwt v4.2.0 (#8136)
chore: Migrate to use golang-jwt/jwt v4.2.0 (#8136)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-01-13 13:12:21 -08:00
Leonardo Luz Almeida
6240ef00e7 feat: new sync option to use ignore diff configs during sync (#8078)
feat: new sync option to use ignore diff configs during sync (#8078)

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-01-13 13:00:17 -08:00
jannfis
5c85df90d5 fix: Fix a possible crash when parsing RBAC (#8165)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-13 16:28:08 +01:00
Ishita Sequeira
07cc533896 chore: move resolveRevision from api-server to repo-server (#7966)
* chore: move resolveRevision to repo-server

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* fix unit tests

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* Retrigger CI pipeline

Signed-off-by: ishitasequeira <isequeir@redhat.com>

* Address PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-01-12 22:06:00 +01:00
jannfis
d511fb8deb chore: Update to Redis 6.2.4 (#8157)
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-12 12:37:10 -08:00
Michael Crenshaw
99583c74c3 docs: document fileParameters (#8156)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-12 19:43:34 +01:00
Michael Crenshaw
c92922e3d6 docs: reorganize and clarify CMP docs (#8130)
* docs: reorganize and clarify CMP docs

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

* docs: note that an empty plugin block is acceptable

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-12 19:42:58 +01:00
Tanmay_Bhat
5e6aee5961 docs: add Skit to users list (#8152) 2022-01-12 14:46:01 +01:00
Márk Sági-Kazár
57e0ffceb7 feat: Support XDG Base directory standard (#7638) (#7791)
* feat: support XDG Base directory standard

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>

* chore: set XDG_CONFIG_HOME env var for docs generation

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>

* chore: regenerate cli docs

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2022-01-12 09:05:01 +01:00
Thomas Dy
c8bcabeba5 feat: Allow escaping dollar in Envsubst (#7961)
* feat: allow escaping dollar in Envsubst

Signed-off-by: Thomas Dy <thatsmydoing@gmail.com>

* docs: add variable escape documentation

Signed-off-by: Thomas Dy <thatsmydoing@gmail.com>
2022-01-12 08:09:41 +01:00
Chetan Banavikalmutt
4b5df692d7 docs: update the ARGOCD_SESSION_FAILURE_MAX_FAIL_COUNT variable in the docs (#8140)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-01-11 12:21:34 -08:00
Alexander Matyushentsev
5d770d6c54 chore: fix broken TestValidatePermissions unit test (#8147)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-11 12:17:11 -08:00
J. Mark Pim
dfd40efb93 fix: always call ValidateDestination (#7976)
* fix: always call ValidateDestination

Signed-off-by: Mark Pim <j.mark.pim@gmail.com>

* Revert part of the change to fix tests

Signed-off-by: Mark Pim <j.mark.pim@gmail.com>

* Fix linting

Signed-off-by: Mark Pim <j.mark.pim@gmail.com>
2022-01-11 09:02:23 -08:00
Alexander Matyushentsev
27af0b4924 refactor: introduce 'byClusterName' secret index to speedup cluster server URL lookup (#8133)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-10 12:38:44 -08:00
Alexander Matyushentsev
5d1fb9f775 chore: stop publishing image on every commit to dockerhub (#8135)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-10 12:38:26 -08:00
Alexander Matyushentsev
03c5d20d58 fix: fix broken image build and release workflows (#8119)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-10 10:24:23 -08:00
Brad Solomon
3fe924ebd6 docs: Add Deloitte to list of users (#8126) 2022-01-09 20:12:39 -08:00
Alexander Matyushentsev
5da1522b17 chore: build images on PR and conditionally build arm64 image on push (#8108)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-07 13:22:26 -08:00
Avinash Upadhyaya K R
8b57bc990c Provide address flag for admin dashboard command (#8095)
* feat: address flag for admin dashboard

Signed-off-by: Avinash Upadhyaya <avinashupadhya99@gmail.com>

* docs: address flag for admin dashboard

Signed-off-by: Avinash Upadhyaya <avinashupadhya99@gmail.com>
2022-01-06 23:25:38 -08:00
Alexander Matyushentsev
37851b165e refactor: move project filtering to server side (#8102)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-06 09:39:37 -08:00
Michael Crenshaw
722fe9273a chore: fix list depth (#8101)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-05 09:15:05 -08:00
icecoffee531
f1d4166a7c docs: Add Gllue to list of users (#8092)
Signed-off-by: icecoffee <2335250710@qq.com>
2022-01-04 23:39:41 -08:00
Mubarak Jama
d00e112791 docs: Add Ibotta to the list of users (#8087)
Signed-off-by: Mubarak Jama <mubarak.jama@gmail.com>
2022-01-04 22:57:46 -08:00
Alexander Matyushentsev
6cd0d97e23 docs: update roadmap document with v2.2 release changes (#8089)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-04 19:10:00 -08:00
Michael Crenshaw
2547176b29 chore: fix typo (#8088)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-01-04 16:00:08 -08:00
Yi Cai
9530b38f7a fix: Trailing line in Filter Dropdown Menus #7821 (#8001)
Signed-off-by: ciiay <yicai@redhat.com>
2022-01-04 11:09:16 -08:00
Sebastián Blázquez
4a55b13d66 docs: fix link (#8080)
Fix link in docs/user-guide/private-repositories.md

Signed-off-by: seblaz <sebastian.blazquez96@gmail.com>
2022-01-03 17:21:10 -08:00
Saumeya Katyal
c0349f3795 fix: network line colors and menu icon alignment (#8059)
* fix: network line colors and menu icon alignment

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

* change color order

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-01-03 16:07:50 -08:00
Alexander Matyushentsev
48d46e395f feat: support specifying cluster by name in addition to API server URL in Cluster API (#8077)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-03 15:26:36 -08:00
Ayrton Araújo Santana
9cb9a380da docs: Newly created Arch Linux package (#8058)
Signed-off-by: Ayrton Santana <ayrton@linux.com>
2022-01-03 14:49:56 -08:00
Thomas Decaux
399d2a830b docs: fix swagger description typo (#8065)
Signed-off-by: Thomas Decaux <ebuildy@gmail.com>
2022-01-03 14:08:07 -08:00
Alexander Matyushentsev
3247090838 feat: store "Group Nodes" button state in application details preferences (#8036)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-03 11:31:12 -08:00
ocraviotto
99d1dcad03 feat: added a new Helm option ignoreMissingValueFiles (#7767) (#8003)
so as to allow operators to prevent Argo CD from passing valueFiles
to helm template if they don't exist in the source under the specified path.

Signed-off-by: Oscar Craviotto <craviotto@avellaneda.com>
2022-01-03 09:51:31 -08:00
Pablo Aguilar
8e6fcde4d6 Add omegaUp to the list of argocd users (#8062) 2022-01-03 09:51:15 -08:00
Gusty Sapto Ady Prakoso
160a4fda5e docs: add Flip to USERS.md (#8070)
Signed-off-by: Gusty Sapto Ady Prakoso <gusty.prakoso@flip.id>
2022-01-03 09:50:58 -08:00
pasha-codefresh
cb1f06c72a fix: issue with project scoped resources (#8048)
fix: issue with project scoped resources (#8048)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-30 09:09:57 -08:00
plakyda-codefresh
62f29865e7 fix: Default value for retry validation #8055 (#8064)
fix: Default value for retry validation #8055 (#8064)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-12-30 09:04:18 -08:00
Saumeya Katyal
ae9abe5175 fix: application-icons-alignment (#8054)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-12-29 11:17:07 -08:00
pasha-codefresh
b558579f28 fix: sync window panel is crashed if resource name not contain letters (#8053)
fix: sync window panel is crashed if resource name not contain letters (#8053)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-29 11:07:23 -08:00
Alexander Matyushentsev
b3ea0a38bb chore: add argocd-notifications to 'dev' image (#8034)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-27 14:46:56 -08:00
Yi Cai
32838b1f71 fix: adding pagination to grouped nodes sliding panel#7837 (#7915)
fix: adding pagination to grouped nodes sliding panel#7837 (#7915)

Signed-off-by: ciiay <yicai@redhat.com>
2021-12-24 22:08:26 -08:00
Moulick Aggarwal
e822437eb3 chore: bump go-jsonnet to v0.18.0 (#8011)
Signed-off-by: Moulick Aggarwal <moulickaggarwal@gmail.com>
2021-12-24 21:44:28 -08:00
Saumeya Katyal
de582e0bd5 fix: refreshing label toast (#7979)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-12-23 09:12:50 -08:00
Alexander Matyushentsev
26f83501ad fix: Controller panics if resource manifest has incorrect annotation (#8022)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-23 08:14:06 -08:00
plakyda-codefresh
000f951b9c fix: retry disabled text (#8004)
fix: retry disabled text (#8004)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-12-22 11:40:11 -08:00
Yi Cai
129e9ea89e fix: Grouped node list missing resources on Compact resources view #8014 (#8018)
Signed-off-by: ciiay <yicai@redhat.com>
2021-12-22 11:38:55 -08:00
Regina Scott
d1d82c6d6f feat: add visual indicator for newly created pods (#8006)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-12-22 11:26:36 -08:00
Niklas Steiner
d8c3113c06 fix: Opening app details shows UI error on some apps (#8016) (#8019)
Signed-off-by: Niklas Steiner <niklas@sbg.at>
2021-12-22 11:06:11 -08:00
Leonardo Luz Almeida
7bac2c151a fix: Inconsistent normalization logic during diff (#7980)
fix: Inconsistent normalization logic during diff (#7980)

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-12-22 08:57:48 -08:00
Yi Cai
800b1093e7 fix: Nested Refresh dropdown does not work on Application Details page #1524 (#7950)
* fix: Nested Refresh dropdown does not work on Application Details page #1524

Signed-off-by: ciiay <yicai@redhat.com>

* Removed unnecessary changes

Signed-off-by: ciiay <yicai@redhat.com>
2021-12-22 14:10:28 +01:00
jannfis
18f7b416a8 chore: Some minor changes to the docs linter (#7996)
chore: Some minor changes to the docs linter (#7996)

Signed-off-by: jannfis <jann@mistrust.net>
2021-12-21 09:22:54 -08:00
Jesse Suen
63dfc78917 fix: remove vendor dependency in virtualized toolchain (#8000)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2021-12-20 17:24:27 -08:00
Alexander Matyushentsev
487db973d3 fix: correctly handle project field during partial cluster update (#7994)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-20 12:52:34 -08:00
Clive Jevons
fcaa8abd01 feat: enable specifying root ca for oidc (#6712)
When configuring an external OIDC provider which uses a private PKI
for its certificates it was not possible to properly verify the certificate
being served. Also, when using ArgoCD in insecure mode, e.g. when running
behind istio for providing mTLS, this resulted in errors.

Signed-off-by: Clive Jevons <clive@jevons-it.net>
2021-12-20 09:57:20 +01:00
Didrik Finnøy
e32c07007c docs: Helm plugins via initContainers (#7815)
* Docs: Helm plugins via initContainers

Related: #7066

Include an alternative method for installing Helm plugins that don't require users to maintain their own version of the ArgoCD container image.

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>

* add codeblock

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>

* change helm repo name in example code

Signed-off-by: Didrik Finnøy <djfinnoy@protonmail.com>
2021-12-19 20:43:02 +01:00
Zadkiel
e50d03eb61 fix(ui): use consistent case for diff modes (#7945)
Signed-off-by: GitHub <noreply@github.com>
2021-12-19 19:54:00 +01:00
Michael Crenshaw
e15c8a58a6 docs: Add a link to docs/operator-manual/security.md from root-level security.md (#7840)
* docs: add a link from the base security doc to the operator manual security page

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

* chore: better copy

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

* chore: bump doc version

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2021-12-19 19:53:08 +01:00
Michael Crenshaw
3bd8688004 chore: escape proj in regex (#7985)
* chore: escape proj in regex

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

* chore: test normal cases

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

* chore: typo

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2021-12-19 17:09:36 +01:00
Michael Crenshaw
ad1ed1d51b chore: add target revision tests (#7963)
* fix: add nil check, add revision tests, add docs about webhook behavior

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

* chore: move single-use function into test

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

* chore: add comment about why some tests are absent

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

* chore: fix text names

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2021-12-17 13:33:57 -08:00
Michael Crenshaw
914fb8337e fix: webhook URL matching edge cases (#7981)
* fix: webhook URL matching edge cases

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

* docs: docstring

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

* chore: lint

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

* chore: move logging to non-utility function

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2021-12-17 20:47:55 +01:00
Alexander Matyushentsev
0676b65f7e fix: add aws cli into final argocd image (#7973)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-16 18:46:59 -08:00
Michael Crenshaw
2e494689cd chore: lint docs + CI job (#7959)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2021-12-16 15:52:18 -08:00
Shyukri Shyukriev
561a44d0a8 chore: upgrade awscli to 2.4.6 and remove python deps (#7947)
Remove python3-pip and deps
Use hack/installers since AWS doesn't provide pip packages for v2

Side effect: image downsize 842 MB -> 483MB

Signed-off-by: Shyukri Shyukriev <shyukri.shyukriev@mariadb.com>
2021-12-16 15:37:10 -08:00
Jesse Suen
63e70a9f71 chore: portable and simpler toolchain install (#7920)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2021-12-16 15:16:36 -08:00
Alexander Matyushentsev
656f790aed fix: resource details page crashes when resource is not deployed and hide managed fields is selected (#7971)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-16 14:42:29 -08:00
Alexander Matyushentsev
7f09331e3f fix: notifications controller manifests shuold use argocd image (#7970)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-16 13:58:42 -08:00
pasha-codefresh
f9ba9e9811 fix: issue with headless installation (#7958)
fix: issue with headless installation (#7958)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-16 10:17:16 -08:00
jomenxiao
17c6daa9ea fix: targetervision compatible without prefix refs/heads or refs/tags (#7939)
fix: targetervision compatible without prefix refs/heads or refs/tags (#7939)

Signed-off-by: jomen.xiao <jomenxiao@gmail.com>
2021-12-15 10:56:31 -08:00
Alexander Matyushentsev
f89d40c9e0 fix: add missing notifications base to Argo CD HA (#7934)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-14 15:22:32 -08:00
Xabier Larrakoetxea Gallego
6a1472371f Fix Kubernetes labels normalization for Prometheus (#7925)
* When adding Kubernetes labels as Prometheus labels, replace with  all the invalid Prometheus label chars

Signed-off-by: Xabier Larrakoetxea <me@slok.dev>

* Add Fonoa company to users doc

Signed-off-by: Xabier Larrakoetxea <me@slok.dev>

* Add comment and link to the Prometheus label valid characters

Signed-off-by: Xabier Larrakoetxea <me@slok.dev>
2021-12-14 12:38:25 -08:00
Alexander Matyushentsev
3ea2ba06f5 docs: update CHANGELOG: mention v2.2.0 release and v2.1.8 releases (#7930)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-14 12:28:08 -08:00
Leonardo Luz Almeida
29a6be4afe Feat: Ignore differences owned by trusted managers from managedFields (#7869)
* feat: implement managed fields normalizer

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-12-14 10:49:55 -08:00
Saumeya Katyal
bed36e2027 fix: add all resources in list view (#7295)
* fix: add all resources in list view

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

add resources from applicationTree

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

minor spacing fixes

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

changes

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

* merge conflicts and improvement

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

* change variable name

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

* review comments

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

* lint-fix

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-12-14 09:32:54 +01:00
Jesse Suen
9ff7c0b9c7 feat: update gitops-engine to v0.5.1 and add additional tuning options (#7917)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2021-12-13 18:39:25 -08:00
May Zhang
cf78fe429a fix: during import, if stop-operation flag is provided, then nil oper… (#7916)
* fix: during import, if stop-operation flag is provided, then nil operation field of application

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix: during import, if stop-operation flag is provided, then nil operation field of application

Signed-off-by: May Zhang <may_zhang@intuit.com>

* run goimports -local

Signed-off-by: May Zhang <may_zhang@intuit.com>

* updated docs

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-12-13 15:30:43 -08:00
Yi Cai
5b17fc36d4 feat: Added toggle button for compact view #7836 (#7900)
feat: Added toggle button for compact view #7836 (#7900)

Signed-off-by: ciiay <yicai@redhat.com>
2021-12-13 13:39:57 -08:00
Alexander Matyushentsev
5978dfa167 fix: resource tracking normalization should not always drop old label (#7911)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-13 08:25:46 -08:00
Sho Iizuka
ddb90ab496 docs: fix flag name to use external variables in Jsonnet (#7659)
Signed-off-by: sho-iizuka <sho-iizuka@cybozu.co.jp>
2021-12-12 23:47:34 -08:00
Alexander Matyushentsev
0a792fefac fix: resource tracking normalization shuold drop empty labels (#7909)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-11 11:16:45 -08:00
jomenxiao
e48350756b fix nil point (#7905)
Signed-off-by: jomenxiao <jomenxiao@gmail.com>
2021-12-10 21:23:37 -08:00
Alexander Matyushentsev
6d8ff61b16 fix: improve migration from label to annotation tracking (#7899)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-10 16:14:38 -08:00
Michael Weibel
238ff275c4 docs: add Helio (#7902)
Signed-off-by: Michael Weibel <michael@helio.exchange>
2021-12-10 15:20:42 -08:00
Saumeya Katyal
7eccd21b47 fix: css warning icon color change (#7903)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-12-10 14:06:11 -08:00
Keith Chong
c9ddaabf08 fix: Event timestamp incorrectly shows unix epoch (#7879) (#7892)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2021-12-10 10:32:56 -08:00
May Zhang
a51169e8c0 fix: Cluster API does not support updating labels and annotations (#7901)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-12-09 16:39:34 -08:00
Alexander Matyushentsev
bea379b036 refactor: add indexes to secret informers to speedup settings parsing (#7882)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-07 14:15:11 -08:00
jannfis
b813301ed6 chore: Upgrade to golang 1.16.11 (#7874)
* chore: Upgrade to golang 1.16.11

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

* Missed this one

Signed-off-by: jannfis <jann@mistrust.net>
2021-12-07 12:59:25 -08:00
Alan Clucas
458a10310c docs: Add argocd-vault-replacer (#7814)
Adding argocd-vault-replacer as another hashicorp vault tool with different abilities from the IBM version. Primary differences:
* Ability to use kubernetes authentication
* Textual replacement rather than understanding the YAML so secrets can be anywhere, not just in limited locations.
* Ability to process the secrets into other forms (e.g. base64 encode)

Signed-off-by: Alan Clucas <alan@clucas.org>

Co-authored-by: jannfis <jann@mistrust.net>
2021-12-07 15:37:11 +01:00
Alexandre Gaudreault
6221ef20af feat(health): support of external-secrets.io/ExternalSecret (#7798)
* feat(health): support of external-secrets.io/ExternalSecret

Signed-off-by: Alexandre Gaudreault <alexandre.gaudreault@logmein.com>

* move to folder

Signed-off-by: Alexandre Gaudreault <alexandre.gaudreault@logmein.com>
2021-12-07 14:47:47 +01:00
pasha-codefresh
2087eaa4c7 fix: Resource tracking typo (#7873)
* move projects

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

* Revert "move projects"

This reverts commit d0e21353

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

* fix typo in resource tracking

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-07 14:05:23 +01:00
Saumeya Katyal
7d59cbb5be fix: css change for clear button in filters (#7868)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-12-06 15:44:39 -08:00
pasha-codefresh
dae43a23f9 fix: issue with keepalive (#7861)
* fix issue with keepalive

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

* empty commit

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-06 10:16:14 -08:00
Alexander Matyushentsev
78e256eef3 fix: fix UI build failure: use correct monaco editor setting name (#7856)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-03 14:29:51 -08:00
Alexander Matyushentsev
ccd15d1151 feat: allow hiding managed fields in resource manifest viewer (#7855)
* fix: remove double scroll in editor

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* feat: add Hide Managed Fields checkbox

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-03 13:46:18 -08:00
Alexander Matyushentsev
05935a9d7e refactor: avoid loading project in frequently executed controller methods (#7853)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-03 13:18:08 -08:00
Jacob Wernette
891d9b2f38 docs: update argocd-vault-plugin repo (#7834)
Signed-off-by: Jacob Wernette <werne2j@gmail.com>
2021-12-02 09:26:26 -08:00
Chetan Banavikalmutt
0f845a0416 fix: admin dashboard doesn't use the right context (#7826)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-12-02 08:38:06 -08:00
Yuan Tang
a456a92493 build: Disable non-testing CI builds on forks (#7832)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-12-02 08:37:45 -08:00
Alexander Matyushentsev
e967f8836a fix: resource custom actions are not visible in resource actions dropdown (#7823)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-12-02 08:31:19 -08:00
Yi Cai
a8ed010921 feat: Compact application resources tree #7349 (#7632)
* feat: Compact application resources tree #7349 #7632

Signed-off-by: ciiay <yicai@redhat.com>

* Updates for comments

Signed-off-by: ciiay <yicai@redhat.com>
2021-12-02 08:01:03 -08:00
Yi Cai
0c352f8bd6 feat: add refresh/hard refresh apps button #7256 (#7411)
feat: add refresh/hard refresh apps button #7256 (#7411)

Signed-off-by: ciiay <yicai@redhat.com>
2021-12-01 15:28:48 -08:00
Regina Scott
e81f25026d feat: add quick-start buttons (#7292)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-12-01 15:21:33 -08:00
Phil Wright- Christie
cd497c4eec Fix secret key name (#7763) 2021-12-01 14:27:06 -08:00
Jonas Janz
7490ee483e docs: mention finalizer in app-of-apps doc (#7753)
* docs: mention finalizer in app-of-apps doc

As it's easy to overlook the need for a specific finalizer in the Application CR to ensure cascading deletion I added an extra section describing the need and linking to the ArgoCD Docs for further information about App deletion.

Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com>

* doc: fix typo in cluster-bootstrappring docs

small typo fix

Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com>
2021-12-01 14:26:29 -08:00
pasha-codefresh
ced5c1deed fix: notifications link (#7807)
fix: notifications link (#7807)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-01 14:15:48 -08:00
Yuan Tang
b977813e9a docs: Add 2.2-2.3 upgrading notes on ArgoCD binaries (#7812)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-12-01 09:42:34 -08:00
pasha-codefresh
a2f97af2e4 feat: resolve sync window for cluster name also, not only server (#7817)
* resolve sync window for clsuter name also, not only server

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-01 08:58:51 -08:00
pasha-codefresh
6b4a13c4bd feat: ToUpper and ToLower expression (#7816)
* ToUpper and ToLower expression

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-12-01 08:58:11 -08:00
ln3333
d64014364c fix: SyncWindow link not honoring basehref (#7811)
* fix SyncWindow link when using baseherf

Signed-off-by: ln3333 <liangxu@outlook.com>

* fix: SyncWindow link not honoring basehref

Signed-off-by: ln3333 <liangxu@outlook.com>
2021-11-30 14:10:11 -08:00
Alexander Matyushentsev
0f75eecbd2 chore: increase e2e tests timeout (#7803)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-30 10:58:43 -08:00
Márk Sági-Kazár
335becebb1 docs: add Cisco ETI to users (#7808)
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-11-30 10:58:29 -08:00
Alexander Matyushentsev
d89c708399 refactor: upgrade casbin to latest stable version (v2.39.1) (#7802)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-30 10:51:05 -08:00
Yuan Tang
d8cfafbd92 feat: Configurable ArgoCD binary download links on Help page. Fixes #7698 (#7755)
feat: Configurable ArgoCD binary download links on Help page. Fixes #7698 (#7755)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-30 10:10:43 -08:00
Marco Kilchhofer
394a2c8318 docs: Add Swiss Post to USERS.md (#7771)
Signed-off-by: Marco Kilchhofer <marco.kilchhofer.2@post.ch>
2021-11-30 10:03:05 -08:00
pasha-codefresh
faee047081 fix: flaky test (#7809)
* fix flaky test

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

* fix flaky test

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

* fix linter

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

* empty commit

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-11-30 09:54:42 -08:00
Takumasa Sakao
a05a2633ba docs: Fix invalid example manifest (#7792)
Signed-off-by: Takumasa Sakao <tsakao@zlab.co.jp>
2021-11-30 09:52:41 -08:00
pasha-codefresh
0f2f9a97e3 feat: Migrate argocd notifications to argocd (#7744)
feat: Migrate argocd notifications to argocd (#7744)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-11-29 18:47:46 -08:00
Moshe Avni
d346fceea9 Add critical part-of label (#7642) 2021-11-29 15:36:00 -08:00
Ardi Mehist
b40508323b Add Nitro to users list (#7789) 2021-11-29 14:26:01 -08:00
Greg
8851842d8e docs: update users in order to add Casavo (#7777)
Signed-off-by: Alessandro Gregori <alessandro.gregori@casavo.com>
2021-11-29 02:43:09 -08:00
pasha-codefresh
70a08a0aa6 chore: Remove deprecated action from CI (#7785)
* group diff should set resource id use new interface

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

* remove redundant

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

* remove eof

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

* update python version

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

* remove gh pages step

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

* remove gh pages step

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-11-26 13:01:56 +01:00
Jesse Suen
9cb9ef6752 fix: env vars to tune cluster cache were broken (#7779)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2021-11-24 18:16:46 -08:00
Alexander Matyushentsev
23967f8717 Revert "chore: upgrade node-sass (#7631)" (#7765)
This reverts commit 012268d619.

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-22 09:36:16 -08:00
Gyorgy Hrabovszki
475bea599d docs: Add Allianz Direct to ArgoCD users (#7751)
Signed-off-by: Gyorgy Hrabovszki <gyoergy.hrabovszki@allianzdirect.de>
2021-11-19 21:36:05 -08:00
Yuan Tang
8e8a1ded27 build!: Remove non-Linux binaries from the image and fix image building on Mac ARM (#7668)
* build: Support image building on Mac ARM

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Pass GOOS and GOARCH explicitly

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Retrigger CI pipeline

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Remove windows and mac binaries in the image

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Update download handler registration

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Inject arch to env var via webpack

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Fix lint

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Add BUILD_ALL_CLIS env flag for make release-cli

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

* Run in release-cli target directly

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-18 21:42:14 -08:00
Alexander Matyushentsev
0c0bc1f769 refactor: use cached project while calculating resource tree (#7747)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-18 15:45:19 -08:00
Alexander Matyushentsev
8bbf8887d2 docs: add v2.2 changelog (#7681)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-18 08:41:49 -08:00
Remington Breeze
012268d619 chore: upgrade node-sass (#7631)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-11-18 08:40:48 -08:00
Matteo Ruina
af3fb9a4d0 docs: Add Skyscanner as ArgoCD user (#7730)
Signed-off-by: Matteo Ruina <matteo.ruina@gmail.com>
2021-11-18 08:13:06 -08:00
Kostis (Codefresh)
2370164c98 docs: clarify Helm application deployment (#7713)
Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>
2021-11-17 07:51:06 -08:00
Mark Sarcevicz
18a1b07d1a Fix: Kuberenetes manifest to have new Github.com ssh known host keys for ArgoCD deployments (#7722)
* Kuberenetes manifest to have new ssh known host keys for ArgoCD deployments

https://github.blog/2021-09-01-improving-git-protocol-security-github/
Signed-off-by: smark88 <msarcevicz@influxdata.com>

* added to docs

Signed-off-by: smark88 <msarcevicz@influxdata.com>

* fix: regenerate manifests using 'make manifests'

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-16 22:49:21 -08:00
Michael Crenshaw
fafa79fac1 feat: add health check for applicationset (#7695)
Signed-off-by: Michael Crenshaw <michael_crenshaw@intuit.com>
2021-11-16 16:54:26 -08:00
Oscar
8a5b34581a feat: only ask for confirmation when creating argocd-manager service account (#7720)
Signed-off-by: Oscar Chen <oscar.chen.btw@gmail.com>
2021-11-16 16:51:30 -08:00
Keith Chong
27928d0dc6 fix: Use binary units in pod view (#7649) (#7726)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2021-11-16 16:13:16 -08:00
Remington Breeze
0c91f65e67 chore(ui): Switch to esbuild instead of ts-loader for performance (#7336)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-11-16 13:00:52 -08:00
Jan Domanski
09c5d5f42a Add Devopsi Company (#7687)
Adding my software house company
2021-11-12 08:59:55 -08:00
1230 changed files with 116051 additions and 18011 deletions

View File

@@ -7,6 +7,7 @@ ignore:
- "pkg/apis/client/.*"
- "pkg/client/.*"
- "vendor/.*"
- "test/.*"
coverage:
status:
# we've found this not to be useful

View File

@@ -6,7 +6,7 @@ labels: 'bug'
assignees: ''
---
If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack [channel](https://argoproj.github.io/community/join-slack).
<!-- If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack [channel](https://argoproj.github.io/community/join-slack). -->
Checklist:
@@ -16,19 +16,19 @@ Checklist:
**Describe the bug**
A clear and concise description of what the bug is.
<!-- A clear and concise description of what the bug is. -->
**To Reproduce**
A list of the steps required to reproduce the issue. Best of all, give us the URL to a repository that exhibits this issue.
<!-- A list of the steps required to reproduce the issue. Best of all, give us the URL to a repository that exhibits this issue. -->
**Expected behavior**
A clear and concise description of what you expected to happen.
<!-- A clear and concise description of what you expected to happen. -->
**Screenshots**
If applicable, add screenshots to help explain your problem.
<!-- If applicable, add screenshots to help explain your problem. -->
**Version**

View File

@@ -12,27 +12,24 @@ on:
env:
# Golang version to use across CI steps
GOLANG_VERSION: '1.16.5'
GOLANG_VERSION: '1.18'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
if: github.head_ref != ''
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker image
run: |
make image
check-go:
name: Ensure Go modules synchronicity
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Download all Go modules
@@ -48,13 +45,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -65,31 +62,41 @@ jobs:
run: make build-local
lint-go:
permissions:
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
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Golang
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
version: v1.38.0
args: --timeout 10m --exclude SA5011
go-version: ${{ env.GOLANG_VERSION }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # v3.3.1
with:
version: v1.45.2
args: --timeout 10m --exclude SA5011 --verbose
test-go:
name: Run unit tests for Go packages
runs-on: ubuntu-latest
needs:
- build-go
env:
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Create checkout directory
run: mkdir -p ~/go/src/github.com/argoproj
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Create symlink in GOPATH
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
@@ -109,13 +116,17 @@ jobs:
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
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"
@@ -126,12 +137,12 @@ jobs:
- name: Run all unit tests
run: make test-local
- name: Generate code coverage artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: code-coverage
path: coverage.out
- name: Generate test results artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: test-results
path: test-results/
@@ -141,15 +152,18 @@ jobs:
runs-on: ubuntu-latest
needs:
- build-go
env:
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Create checkout directory
run: mkdir -p ~/go/src/github.com/argoproj
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Create symlink in GOPATH
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
@@ -169,13 +183,17 @@ jobs:
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
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"
@@ -186,7 +204,7 @@ jobs:
- name: Run all unit tests
run: make test-race-local
- name: Generate test results artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: race-results
path: test-results/
@@ -196,9 +214,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Create symlink in GOPATH
@@ -222,9 +240,10 @@ jobs:
make install-codegen-tools-local
make install-go-tools-local
working-directory: /home/runner/go/src/github.com/argoproj/argo-cd
- name: Initialize local Helm
# We install kustomize in the dist directory
- name: Add dist to PATH
run: |
helm2 init --client-only
echo "/home/runner/work/argo-cd/argo-cd/dist" >> $GITHUB_PATH
- name: Run codegen
run: |
set -x
@@ -243,14 +262,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup NodeJS
uses: actions/setup-node@v1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '12.18.4'
- name: Restore node dependency cache
id: cache-dependencies
uses: actions/cache@v1
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -264,6 +283,7 @@ jobs:
env:
NODE_ENV: production
NODE_ONLINE_ENV: online
HOST_ARCH: amd64
working-directory: ui/
- name: Run ESLint
run: yarn lint
@@ -279,12 +299,12 @@ jobs:
sonar_secret: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0
- name: Restore node dependency cache
id: cache-dependencies
uses: actions/cache@v1
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -295,16 +315,16 @@ jobs:
run: |
mkdir -p test-results
- name: Get code coverage artifiact
uses: actions/download-artifact@v2
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: code-coverage
- name: Get test result artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: test-results
path: test-results
- name: Upload code coverage information to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
with:
file: coverage.out
- name: Perform static code analysis using SonarCloud
@@ -340,7 +360,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
k3s-version: [v1.21.2, v1.20.2, v1.19.2, v1.18.9, v1.17.11]
k3s-version: [v1.23.3, v1.22.6, v1.21.2]
needs:
- build-go
env:
@@ -353,16 +373,26 @@ jobs:
ARGOCD_IN_CI: "true"
ARGOCD_E2E_APISERVER_PORT: "8088"
ARGOCD_SERVER: "127.0.0.1:8088"
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- 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
@@ -375,7 +405,7 @@ jobs:
sudo chown runner $HOME/.kube/config
kubectl version
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -385,10 +415,13 @@ jobs:
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Add ./dist to PATH
run: |
echo "$(pwd)/dist" >> $GITHUB_PATH
- name: Download Go dependencies
run: |
go mod download
go get github.com/mattn/goreman
go install github.com/mattn/goreman@latest
- name: Install all tools required for building & testing
run: |
make install-test-tools-local
@@ -398,9 +431,9 @@ jobs:
git config --global user.email "john.doe@example.com"
- name: Pull Docker image required for tests
run: |
docker pull quay.io/dexidp/dex:v2.25.0
docker pull ghcr.io/dexidp/dex:v2.35.3
docker pull argoproj/argo-cd-ci-builder:v1.0.0
docker pull redis:6.2.4-alpine
docker pull redis:7.0.7-alpine
- name: Create target directory for binaries in the build-process
run: |
mkdir -p dist
@@ -417,7 +450,7 @@ jobs:
count=1
until curl -f http://127.0.0.1:8088/healthz; do
sleep 10;
if test $count -ge 60; then
if test $count -ge 180; then
echo "Timeout"
exit 1
fi
@@ -428,7 +461,7 @@ jobs:
set -x
make test-e2e-local
- name: Upload e2e-server logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: e2e-server-k8s${{ matrix.k3s-version }}.log
path: /tmp/e2e-server.log

View File

@@ -2,32 +2,38 @@ name: "Code scanning - action"
on:
push:
# Secrets aren't available for dependabot on push. https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#error-403-resource-not-accessible-by-integration-when-using-dependabot
branches-ignore:
- 'dependabot/**'
pull_request:
schedule:
- cron: '0 19 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
CodeQL-Build:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
if: github.repository == 'argoproj/argo-cd'
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@8aff97f12c99086bdb92ff62ae06dbbcdf07941b # v2.1.33
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
@@ -35,7 +41,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@8aff97f12c99086bdb92ff62ae06dbbcdf07941b # v2.1.33
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -49,4 +55,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@8aff97f12c99086bdb92ff62ae06dbbcdf07941b # v2.1.33

View File

@@ -1,23 +0,0 @@
name: Deploy
on:
push:
branches:
- master
pull_request:
branches:
- 'master'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9.8
- name: build
run: |
pip install -r docs/requirements.txt
mkdocs build

View File

@@ -4,50 +4,143 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
types: [ labeled, unlabeled, opened, synchronize, reopened ]
env:
GOLANG_VERSION: '1.16.5'
GOLANG_VERSION: '1.18'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
publish:
permissions:
contents: write # for git to push upgrade commit if not already deployed
if: github.repository == 'argoproj/argo-cd'
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/work/argo-cd/argo-cd
steps:
- uses: actions/setup-go@v1
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- uses: actions/checkout@master
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
path: src/github.com/argoproj/argo-cd
# get image tag
- run: echo ::set-output name=tag::$(cat ./VERSION)-${GITHUB_SHA::8}
- run: echo "tag=$(cat ./VERSION)-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
working-directory: ./src/github.com/argoproj/argo-cd
id: image
# build
# login
- run: |
docker images -a --format "{{.ID}}" | xargs -I {} docker rmi {}
make image DEV_IMAGE=true DOCKER_PUSH=false IMAGE_NAMESPACE=ghcr.io/argoproj IMAGE_TAG=${{ steps.image.outputs.tag }}
working-directory: ./src/github.com/argoproj/argo-cd
# publish
- run: |
docker login ghcr.io --username $USERNAME --password $PASSWORD
docker push ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }}
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
docker tag ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} argoproj/argocd:latest
docker push argoproj/argocd:latest
docker login ghcr.io --username $USERNAME --password-stdin <<< "$PASSWORD"
docker login quay.io --username "$DOCKER_USERNAME" --password-stdin <<< "$DOCKER_TOKEN"
if: github.event_name == 'push'
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.TOKEN }}
DOCKER_USERNAME: ${{ secrets.RELEASE_DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_DOCKERHUB_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
- run: |
IMAGE_PLATFORMS=linux/amd64
if [[ "${{ github.event_name }}" == "push" || "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]
then
IMAGE_PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
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 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
with:
cosign-release: 'v1.13.1'
- name: Install crane to get digest of image
uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c
- name: Get digest of image
run: |
echo "IMAGE_DIGEST=$(crane digest quay.io/argoproj/argocd:latest)" >> $GITHUB_ENV
- name: Sign Argo CD latest image
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY quay.io/argoproj/argocd@${{ env.IMAGE_DIGEST }}
# Displays the public key to share.
cosign public-key --key env://COSIGN_PRIVATE_KEY
env:
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
if: ${{ github.event_name == 'push' }}
# deploy
- run: git clone "https://$TOKEN@github.com/argoproj/argoproj-deployments"
if: github.event_name == 'push'
env:
TOKEN: ${{ secrets.TOKEN }}
- run: |
@@ -55,5 +148,6 @@ jobs:
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)
if: github.event_name == 'push'
working-directory: argoproj-deployments/argocd
# TODO: clean up old images once github supports it: https://github.community/t5/How-to-use-Git-and-GitHub/Deleting-images-from-GitHub-Package-Registry/m-p/41202/thread-id/9811

View File

@@ -2,21 +2,27 @@ name: Create ArgoCD release
on:
push:
tags:
- 'release-v*'
- '!release-v1.5*'
- '!release-v1.4*'
- '!release-v1.3*'
- '!release-v1.2*'
- '!release-v1.1*'
- '!release-v1.0*'
- '!release-v0*'
- "release-v*"
- "!release-v1.5*"
- "!release-v1.4*"
- "!release-v1.3*"
- "!release-v1.2*"
- "!release-v1.1*"
- "!release-v1.0*"
- "!release-v0*"
env:
GOLANG_VERSION: '1.16.5'
GOLANG_VERSION: '1.18'
permissions:
contents: read
jobs:
prepare-release:
permissions:
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
env:
# The name of the tag as supplied by the GitHub event
@@ -37,7 +43,7 @@ jobs:
GIT_EMAIL: argoproj@gmail.com
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@@ -94,7 +100,7 @@ jobs:
echo "=========== BEGIN COMMIT MESSAGE ============="
git show ${SOURCE_TAG}
echo "============ END COMMIT MESSAGE =============="
# Quite dirty hack to get the release notes from the annotated tag
# into a temporary file.
RELEASE_NOTES=$(mktemp -p /tmp release-notes.XXXXXX)
@@ -141,7 +147,7 @@ jobs:
echo "RELEASE_NOTES=${RELEASE_NOTES}" >> $GITHUB_ENV
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ env.GOLANG_VERSION }}
@@ -171,7 +177,10 @@ jobs:
run: |
set -ue
make install-codegen-tools-local
helm2 init --client-only
# 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}"
@@ -182,18 +191,7 @@ jobs:
echo "Creating release ${RELEASE_TAG}"
git tag ${RELEASE_TAG}
- name: Build Docker image for release
run: |
set -ue
git clean -fd
mkdir -p dist/
make image IMAGE_TAG="${TARGET_VERSION}" DOCKER_PUSH=false
make release-cli
chmod +x ./dist/argocd-linux-amd64
./dist/argocd-linux-amd64 version --client
if: ${{ env.DRY_RUN != 'true' }}
- name: Push docker image to repository
- name: Login to docker repositories
env:
DOCKER_USERNAME: ${{ secrets.RELEASE_DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
@@ -201,18 +199,52 @@ jobs:
QUAY_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
run: |
set -ue
docker login quay.io --username "${QUAY_USERNAME}" --password "${QUAY_TOKEN}"
docker push ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
docker login quay.io --username "${QUAY_USERNAME}" --password-stdin <<< "${QUAY_TOKEN}"
# Remove the following when Docker Hub is gone
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
docker tag ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION} argoproj/argocd:v${TARGET_VERSION}
docker push argoproj/argocd:v${TARGET_VERSION}
docker login --username "${DOCKER_USERNAME}" --password-stdin <<< "${DOCKER_TOKEN}"
if: ${{ env.DRY_RUN != 'true' }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
- name: Build and push Docker image for release
run: |
set -ue
git clean -fd
mkdir -p dist/
docker buildx build --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le --sbom=false --provenance=false --push -t ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION} -t argoproj/argocd:v${TARGET_VERSION} .
make release-cli
make checksums
chmod +x ./dist/argocd-linux-amd64
./dist/argocd-linux-amd64 version --client
if: ${{ env.DRY_RUN != 'true' }}
- name: Install cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v2.8.1
with:
cosign-release: 'v1.13.1'
- name: Install crane to get digest of image
uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c
- name: Get digest of image
run: |
echo "IMAGE_DIGEST=$(crane digest quay.io/argoproj/argocd:v${TARGET_VERSION})" >> $GITHUB_ENV
- name: Sign Argo CD container images and assets
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY ${IMAGE_NAMESPACE}/argocd@${{ env.IMAGE_DIGEST }}
cosign sign-blob --key env://COSIGN_PRIVATE_KEY ./dist/argocd-${TARGET_VERSION}-checksums.txt > ./dist/argocd-${TARGET_VERSION}-checksums.sig
# Retrieves the public key to release as an asset
cosign public-key --key env://COSIGN_PRIVATE_KEY > ./dist/argocd-cosign.pub
env:
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
if: ${{ env.DRY_RUN != 'true' }}
- name: Read release notes file
id: release-notes
uses: juliangruber/read-file-action@v1
with:
uses: juliangruber/read-file-action@02bbba9876a8f870efd4ad64e3b9088d3fb94d4b # v1.1.6
with:
path: ${{ env.RELEASE_NOTES }}
- name: Push changes to release branch
@@ -221,8 +253,8 @@ jobs:
git push origin ${TARGET_BRANCH}
git push origin ${RELEASE_TAG}
- name: Create GitHub release
uses: actions/create-release@v1
- name: Dry run GitHub release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: create_release
@@ -232,44 +264,67 @@ jobs:
draft: ${{ env.DRAFT_RELEASE }}
prerelease: ${{ env.PRE_RELEASE }}
body: ${{ steps.release-notes.outputs.content }}
if: ${{ env.DRY_RUN == 'true' }}
- name: Upload argocd-linux-amd64 binary to release assets
uses: actions/upload-release-asset@v1
- name: Generate SBOM (spdx)
id: spdx-builder
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/argocd-linux-amd64
asset_name: argocd-linux-amd64
asset_content_type: application/octet-stream
# defines the spdx/spdx-sbom-generator version to use.
SPDX_GEN_VERSION: v0.0.13
# defines the sigs.k8s.io/bom version to use.
SIGS_BOM_VERSION: v0.2.1
# comma delimited list of project relative folders to inspect for package
# managers (gomod, yarn, npm).
PROJECT_FOLDERS: ".,./ui"
# full qualified name of the docker image to be inspected
DOCKER_IMAGE: ${{env.IMAGE_NAMESPACE}}/argocd:v${{env.TARGET_VERSION}}
run: |
yarn install --cwd ./ui
go install github.com/spdx/spdx-sbom-generator/cmd/generator@$SPDX_GEN_VERSION
go install sigs.k8s.io/bom/cmd/bom@$SIGS_BOM_VERSION
# Generate SPDX for project dependencies analyzing package managers
for folder in $(echo $PROJECT_FOLDERS | sed "s/,/ /g")
do
generator -p $folder -o /tmp
done
# Generate SPDX for binaries analyzing the docker image
if [[ ! -z $DOCKER_IMAGE ]]; then
bom generate -o /tmp/bom-docker-image.spdx -i $DOCKER_IMAGE
fi
cd /tmp && tar -zcf sbom.tar.gz *.spdx
if: ${{ env.DRY_RUN != 'true' }}
- name: Upload argocd-darwin-amd64 binary to release assets
uses: actions/upload-release-asset@v1
- name: Sign sbom
run: |
cosign sign-blob --key env://COSIGN_PRIVATE_KEY /tmp/sbom.tar.gz > /tmp/sbom.tar.gz.sig
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/argocd-darwin-amd64
asset_name: argocd-darwin-amd64
asset_content_type: application/octet-stream
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
if: ${{ env.DRY_RUN != 'true' }}
- name: Upload argocd-windows-amd64 binary to release assets
uses: actions/upload-release-asset@v1
- name: Create GitHub release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/argocd-windows-amd64.exe
asset_name: argocd-windows-amd64.exe
asset_content_type: application/octet-stream
name: ${{ env.RELEASE_TAG }}
tag_name: ${{ env.RELEASE_TAG }}
draft: ${{ env.DRAFT_RELEASE }}
prerelease: ${{ env.PRE_RELEASE }}
body: ${{ steps.release-notes.outputs.content }} # Pre-pended to the generated notes
files: |
dist/argocd-*
/tmp/sbom.tar.gz
/tmp/sbom.tar.gz.sig
if: ${{ env.DRY_RUN != 'true' }}
- name: Update homebrew formula
env:
HOMEBREW_TOKEN: ${{ secrets.RELEASE_HOMEBREW_TOKEN }}
uses: dawidd6/action-homebrew-bump-formula@v3
uses: dawidd6/action-homebrew-bump-formula@02e79d9da43d79efa846d73695b6052cbbdbf48a # v3.8.3
with:
token: ${{env.HOMEBREW_TOKEN}}
formula: argocd

3
.gitignore vendored
View File

@@ -16,9 +16,10 @@ test-results
.scratch
node_modules/
.kube/
./test/cmp/*.sock
# ignore built binaries
cmd/argocd/argocd
cmd/argocd-application-controller/argocd-application-controller
cmd/argocd-repo-server/argocd-repo-server
cmd/argocd-server/argocd-server
cmd/argocd-server/argocd-server

2
.gitpod.Dockerfile vendored
View File

@@ -9,7 +9,7 @@ RUN curl -L https://go.kubebuilder.io/dl/2.3.1/$(go env GOOS)/$(go env GOARCH) |
tar -xz -C /tmp/ && mv /tmp/kubebuilder_2.3.1_$(go env GOOS)_$(go env GOARCH) /usr/local/kubebuilder
RUN apt-get install redis-server -y
RUN go get github.com/mattn/goreman
RUN go install github.com/mattn/goreman@latest
USER gitpod

View File

@@ -2,5 +2,5 @@ image:
file: .gitpod.Dockerfile
tasks:
- init: make mod-download-local dep-ui-local && GO111MODULE=off go get github.com/mattn/goreman
- init: make mod-download-local dep-ui-local && GO111MODULE=off go install github.com/mattn/goreman@latest
command: make start-test-k8s

View File

@@ -1,22 +0,0 @@
run:
timeout: 2m
skip-files:
- ".*\\.pb\\.go"
skip-dirs:
- pkg/client/
- vendor/
linters:
enable:
- vet
- deadcode
- goimports
- varcheck
- structcheck
- ineffassign
- unconvert
- unparam
linters-settings:
goimports:
local-prefixes: github.com/argoproj/argo-cd
service:
golangci-lint-version: 1.21.0

22
.snyk Normal file
View File

@@ -0,0 +1,22 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.22.1
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-ANSIREGEX-1583908:
- '*':
reason: >-
Code is only run client-side in the swagger-ui endpoint. No risk of
server-side DoS.
SNYK-CC-K8S-44:
- 'manifests/core-install.yaml > *':
reason: >-
Argo CD needs wide permissions to manage resources.
- 'manifests/install.yaml > *':
reason: >-
Argo CD needs wide permissions to manage resources.
SNYK-JS-MOMENT-2440688:
- '*':
reason: >-
Code is only run client-side. No risk of directory traversal.
patch: {}

View File

@@ -1,5 +1,281 @@
# Changelog
## v2.4.0 (Unreleased)
### 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
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.
#### Pod Logs UI
Since 2.4.9, the LOGS tab in pod view is visible in the UI only for users with explicit allow get logs policy.
#### Known pod logs UI issue prior to 2.4.9
Upon pressing the "LOGS" tab in pod view by users who don't have an explicit allow get logs policy, the red "unable to load data: Internal error" is received in the bottom of the screen, and "Failed to load data, please try again" is displayed.
### OpenTelemetry Tracing Integration
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
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
Overall v2.4 release includes more than 300 hundred commits from nearly 90 contributors. Here is a short sample of the contributions:
* Enforce the deployment to remote clusters only
* Native support of GCP authentication for GKE
* Secured Redis connection
* ApplicationSet Gitea support
## v2.3.3 (2022-03-29)
- fix: prevent excessive repo-server disk usage for large repos (#8845) (#8897)
- fix: Set QPS and burst rate for resource ops client (#8915)
## v2.3.2 (2022-03-22)
- fix: application resource APIs must enforce project restrictions
## v2.3.1 (2022-03-10)
- fix: Retry checkbox unchecked unexpectedly; Sync up with YAML (#8682) (#8720)
- chore: Bump stable version of application set addon (#8744)
- fix: correct jsonnet paths resolution (#8721)
- fix(ui): Applications page incorrectly resets to tiles view. Fixes #8702 (#8718)
## v2.3.0 (2022-03-05)
### Argo CD ApplicationSet and Notifications are now part of Argo CD
Two popular [Argoproj Labs](https://github.com/argoproj-labs) projects [Argo CD ApplicationSet](https://github.com/argoproj/applicationset) and
[Argo CD Notifications](https://github.com/argoproj-labs/argocd-notifications) are now part of Argo CD! The default Argo CD installation manifests now
bundle both projects out of the box. Going forward you can expect more tightened integration of these projects into Argo CD.
### New sync and diff strategies
Users can now configure the Application resource to instruct Argo CD to consider the ignore difference setup during the sync process.
In order to do so, add the new sync option RespectIgnoreDifferences=true in the Application resource. Once the sync option is added,
Argo CD won't change ignored fields during the syncing process.
Configuring ignored fields is also easier now. Instead of listing fields one by one users can now leverage the
managedFields metadata to instruct Argo CD about trusted managers and automatically ignore any fields owned by them. A new diff customization
(managedFieldsManagers) is now available allowing users to specify managers the application should trust and to ignore all fields owned by those managers.
Read more about these changes at [New sync and diff strategies in ArgoCD](https://blog.argoproj.io/new-sync-and-diff-strategies-in-argocd-44195d3f8b8c) blog post.
### ARM Images
An officially supported ARM 64 image is now available. Enjoy running Argo CD on your Raspberry Pi! Additionally, the image size was reduced by nearly ~50%
and is only 200MB now. The ARM version of `argocd` CLI is also available and published as a Github release artifact.
### Compact Tree View And Click Application Navigation
The application details page now supports compact application resources tree visualization. Using the "Group Nodes" button, you can collapse the similar resources
into a single group node to remove the clutter and make it easier to understand the state of application resources. You still can get detailed information about the collapsed resources by clicking on the group node. The list of collapsed resources will be available in a sliding panel. Compact resource tree is still too big?
You can use the zoom in and zoom out feature to make it smaller - or even larger!
You no longer need to move back and forth between the application details page and the application list page. Instead you can navigate directly to the required application by clicking the search icon in the application details page title.
### Upgraded Config Management Tools
Both bundled Helm and Kustomize binaries have been upgraded to the latest versions. Kustomize has been upgraded from 4.2.0 to 4.4.1 and Helm has been upgraded from 3.7.1 to 3.8.0.
### Bug Fixes and Performance Enhancements
* Config management tools enhancements:
* The skipCrds flag and ability to ignore missing values files for Helm (#8012, #8003)
* Additional environment variables for Kustomize (#8096)
* Argo CD CLI follows the XDG Base directory standard (#7638)
* Redis is no longer used during SSO login (#8241)
### Features
- feat: Add app list and details page views to navigation history (#7776) (#7937)
- feat: Add skipCrds flag for helm charts (#8012)
- feat: Add visual indicator for newly created pods (#8006)
- feat: Added a new Helm option ignoreMissingValueFiles (#7767) (#8003)
- feat: Allow configuring system wide ignore differences for all resources (#8224)
- feat: Allow escaping dollar in Envsubst (#7961)
- feat: Allow external links on Application (#3487) (#8231)
- feat: Allow selecting application on detail page (#8176)
- feat: Bundle applicationset-controller with argocd (#8148)
- feat: Enable specifying root ca for oidc (#6712)
- feat: Expose ARGOCD_APP_NAME to the `kustomize build` command (#8096)
- feat: Ignore differences owned by trusted managers from managedFields (#7869)
- feat: New sync option to use ignore diff configs during sync (#8078)
- feat: Provide address flag for admin dashboard command (#8095)
- feat: Store "Group Nodes" button state in application details preferences (#8036)
- feat: Support specifying cluster by name in addition to API server URL in Cluster API (#8077)
- feat: Support XDG Base directory standard (#7638) (#7791)
- feat: Use encrypted cookie to store OAuth2 state nonce (instead of redis) (#8241)
- feat: Build images on PR and conditionally build arm64 image on push (#8108)
### Bug Fixes
- fix: Add "Restarting MinIO" status to MiniO Tenant health check (#8191)
- fix: Add all resources in list view (#7295)
- fix: Adding pagination to grouped nodes sliding panel#7837 (#7915)
- fix: Allow all resources to add external links (#7923)
- fix: Always call ValidateDestination (#7976)
- fix: Application exist panic when execute api call (#8188)
- fix: Application-icons-alignment (#8054)
- fix: Controller panics if resource manifest has incorrect annotation (#8022)
- fix: Correctly handle project field during partial cluster update (#7994)
- fix: Default value for retry validation #8055 (#8064)
- fix: Fix a possible crash when parsing RBAC (#8165)
- fix: Grouped node list missing resources on Compact resources view #8014 (#8018)
- fix: Issue with headless installation (#7958)
- fix: Issue with project scoped resources (#8048)
- fix: Kubernetes labels normalization for Prometheus (#7925)
- fix: Nested Refresh dropdown does not work on Application Details page #1524 (#7950)
- fix: Network line colors and menu icon alignment (#8059)
- fix: Opening app details shows UI error on some apps (#8016) (#8019)
- fix: Parse to correct uint32 type (#8177)
- fix: Prevent possible nil-pointer deref in normalizer (#8185)
- fix: Prevent possible out-of-bounds access when loading policies (#8186)
- fix: Provide a semantic version parsed version for KUBE_VERSION (#8250)
- fix: Refreshing label toast (#7979)
- fix: Resource details page crashes when resource is not deployed and hide managed fields is selected (#7971)
- fix: Retry disabled text (#8004)
- fix: Route health check stuck in 'Progressing' (#8170)
- fix: Sync window panel is crashed if resource name not contain letters (#8053)
- fix: Targetervision compatible without prefix refs/heads or refs/tags (#7939)
- fix: Trailing line in Filter Dropdown Menus #7821 (#8001)
- fix: Webhook URL matching edge cases (#7981)
- fix(ui): Use consistent case for diff modes (#7945)
- fix: Use gRPC timeout for sidecar CMPs (#8131) (#8236)
### Other
- chore: Bump go-jsonnet to v0.18.0 (#8011)
- chore: Escape proj in regex (#7985)
- chore: Exclude argocd-server rbac for core-install (#8234)
- chore: Log out the resource triggering reconciliation (#8192)
- chore: Migrate to use golang-jwt/jwt v4.2.0 (#8136)
- chore: Move resolveRevision from api-server to repo-server (#7966)
- chore: Update notifications version (#8267)
- chore: Update slack version (#8299)
- chore: Update to Redis 6.2.4 (#8157)
- chore: Upgrade awscli to 2.4.6 and remove python deps (#7947)
- chore: Upgrade base image to ubuntu:21.10 (#8230)
- chore: Upgrade dex to v2.30.2 (https://github.com/dexidp/dex/issues/2326) (#8237)
- chore: Upgrade gitops engine (#8288)
- chore: Upgrade golang to 1.17.6 (#8229)
- chore: Upgrade helm to most recent version (v3.7.2) (#8226)
- chore: Upgrade k8s client to v1.23 (#8213)
- chore: Upgrade kustomize to most recent version (v4.4.1) (#8227)
- refactor: Introduce 'byClusterName' secret index to speedup cluster server URL lookup (#8133)
- refactor: Move project filtering to server side (#8102)
## v2.2.3 (2022-01-18)
- fix: Application exist panic when execute api call (#8188)
- fix: Route health check stuck in 'Progressing' (#8170)
- refactor: Introduce 'byClusterName' secret index to speedup cluster server URL lookup (#8133)
- chore: Update to Redis 6.2.4 (#8157) (#8158)
## v2.2.2 (2021-12-31)
- fix: Issue with project scoped resources (#8048)
- fix: Escape proj in regex (#7985)
- fix: Default value for retry validation #8055 (#8064)
- fix: Sync window panel is crashed if resource name not contain letters (#8053)
- fix: Upgrade github.com/argoproj/gitops-engine to v0.5.2
- fix: Retry disabled text (#8004)
- fix: Opening app details shows UI error on some apps (#8016) (#8019)
- fix: Correctly handle project field during partial cluster update (#7994)
- fix: Cluster API does not support updating labels and annotations (#7901)
## v2.2.1 (2021-12-16)
- fix: Resource details page crashes when resource is not deployed and hide managed fields is selected (#7971)
- fix: Issue with headless installation (#7958)
- fix: Nil pointer (#7905)
## v2.2.0 (2021-12-14)
> [Upgrade instructions](./docs/operator-manual/upgrading/2.1-2.2.md)
### Project Scoped repositories and clusters
The project scoped repositories and clusters is a feature that simplifies registering the repositories and cluster credentials.
Instead of requiring operators to set up in advance all clusters and git repositories that can be used, developers can now do
this on their own in a self-service manner.
### Config Management Plugins V2
The Config Management Plugins V2 is set of enhancement of the existing config management plugins feature.
The list includes improved installation experience, ability to package plugin into a separate image and
improved plugin manifests discovery.
### Resource tracking
Argo CD has traditionally tracked the resources it manages by the well-known "app.kubernetes.io/instance" property.
While using this property works ok in simple scenarios, it also has several limitations. ArgoCD now allows you to use
a new annotation (argocd.argoproj.io/tracking-id) for tracking your resources. Using this annotation is a much more flexible approach
as there are no conflicts with other Kubernetes tools, and you can easily install multiple Argo CD instances on the same clusters.
### Bug Fixes and Performance Enhancements
* Argo CD API server caches RBAC checks that significantly improves the GET /api/v1/applications API performance (#7587)
* Argo CD RBAC supports regex matches (#7165)
* Health check support for KubeVirt (#7176), Cassandra (#7017), Openshift Route (#7112), DeploymentConfig (#7114), Confluent (#6957) and SparkApplication (#7434) CRDs.
* Persistent banner (#7312) with custom positioning (#7462)
* Cluster name support in project destinations (#7198)
* around 30 more features and a total of 84 bug fixes
## v2.1.7 (2021-12-14)
- 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.6 (2021-11-16)
- fix: don't use revision caching during app creation (#7508)
- fix: supporting OCI dependencies. Fixes #6062 (#6994)
## v2.1.5 (2021-11-16)
- fix: Invalid memory address or nil pointer dereference in processRequestedAppOperation (#7501)
## v2.1.4 (2021-11-15)
- fix: Operation has completed with phase: Running (#7482)
- fix: Application status panel shows Syncing instead of Deleting (#7486)
- fix(ui): Add Error Boundary around Extensions and comply with new Extensions API (#7215)
## v2.1.3 (2021-10-29)
- fix: core-install.yaml always refers to latest argocd image (#7321)
- fix: handle applicationset backup forbidden error (#7306)
- fix: Argo CD should not use cached git/helm revision during app creation/update validation (#7244)
## v2.1.2 (2021-10-02)
- fix: cluster filter popping out of box (#7135)
- fix: gracefully shutdown metrics server when dex config changes (#7138)
- fix: upgrade gitops engine version to v0.4.1 (#7088)
- fix: repository name already exists when multiple helm dependencies (#7096)
## v2.1.1 (2021-08-25)
### Bug Fixes
@@ -753,7 +1029,7 @@ More documentation and tools are coming in patch releases.
The Argo CD deletes all **in-flight** hooks if you terminate running sync operation. The hook state assessment change implemented in this release the Argo CD enables detection of
an in-flight state for all Kubernetes resources including `Deployment`, `PVC`, `StatefulSet`, `ReplicaSet` etc. So if you terminate the sync operation that has, for example,
`StatefulSet` hook that is `Progressing` it will be deleted. The long-running jobs are not supposed to be used as a sync hook and you should consider using
[Sync Waves](https://argoproj.github.io/argo-cd/user-guide/sync-waves/) instead.
[Sync Waves](https://argo-cd.readthedocs.io/en/stable/user-guide/sync-waves/) instead.
#### Enhancements
* feat: Add custom health checks for cert-manager v0.11.0 (#2689)

View File

@@ -1,16 +1,17 @@
ARG BASE_IMAGE=docker.io/library/ubuntu:21.04
ARG BASE_IMAGE=docker.io/library/ubuntu:22.04
####################################################################################################
# Builder image
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################
FROM docker.io/library/golang:1.16.5 as builder
FROM docker.io/library/golang:1.18 AS builder
RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install --no-install-recommends -y \
openssh-server \
nginx \
unzip \
fcgiwrap \
git \
git-lfs \
@@ -24,19 +25,16 @@ RUN apt-get update && apt-get install -y \
WORKDIR /tmp
ADD hack/install.sh .
ADD hack/installers installers
ADD hack/tool-versions.sh .
COPY hack/install.sh hack/tool-versions.sh ./
COPY hack/installers installers
RUN ./install.sh ksonnet-linux
RUN ./install.sh helm2-linux
RUN ./install.sh helm-linux
RUN ./install.sh kustomize-linux
RUN ./install.sh helm-linux && \
INSTALL_PATH=/usr/local/bin ./install.sh kustomize
####################################################################################################
# Argo CD Base - used as the base for both the release and dev argocd images
####################################################################################################
FROM $BASE_IMAGE as argocd-base
FROM $BASE_IMAGE AS argocd-base
USER root
@@ -49,16 +47,13 @@ RUN groupadd -g 999 argocd && \
chmod g=u /home/argocd && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y git git-lfs python3-pip tini gpg tzdata && \
apt-get install -y \
git git-lfs tini gpg tzdata && \
apt-get clean && \
pip3 install awscli==1.18.80 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY hack/git-ask-pass.sh /usr/local/bin/git-ask-pass.sh
COPY hack/gpg-wrapper.sh /usr/local/bin/gpg-wrapper.sh
COPY hack/git-verify-wrapper.sh /usr/local/bin/git-verify-wrapper.sh
COPY --from=builder /usr/local/bin/ks /usr/local/bin/ks
COPY --from=builder /usr/local/bin/helm2 /usr/local/bin/helm2
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm
COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/kustomize
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
@@ -66,17 +61,17 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN ln -s /usr/local/bin/entrypoint.sh /usr/local/bin/uid_entrypoint.sh
# support for mounting configuration from a configmap
RUN mkdir -p /app/config/ssh && \
touch /app/config/ssh/ssh_known_hosts && \
ln -s /app/config/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts
WORKDIR /app/config/ssh
RUN touch ssh_known_hosts && \
ln -s /app/config/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts
RUN mkdir -p /app/config/tls
RUN mkdir -p /app/config/gpg/source && \
mkdir -p /app/config/gpg/keys && \
chown argocd /app/config/gpg/keys && \
chmod 0700 /app/config/gpg/keys
WORKDIR /app/config
RUN mkdir -p tls && \
mkdir -p gpg/source && \
mkdir -p gpg/keys && \
chown argocd gpg/keys && \
chmod 0700 gpg/keys
# workaround ksonnet issue https://github.com/ksonnet/ksonnet/issues/298
ENV USER=argocd
USER 999
@@ -85,41 +80,37 @@ WORKDIR /home/argocd
####################################################################################################
# Argo CD UI stage
####################################################################################################
FROM docker.io/library/node:12.18.4 as argocd-ui
FROM --platform=$BUILDPLATFORM docker.io/library/node:12.18.4 AS argocd-ui
WORKDIR /src
ADD ["ui/package.json", "ui/yarn.lock", "./"]
COPY ["ui/package.json", "ui/yarn.lock", "./"]
RUN yarn install
RUN yarn install --network-timeout 200000 && \
yarn cache clean
ADD ["ui/", "."]
COPY ["ui/", "."]
ARG ARGO_VERSION=latest
ENV ARGO_VERSION=$ARGO_VERSION
RUN NODE_ENV='production' NODE_ONLINE_ENV='online' yarn build
ARG TARGETARCH
RUN HOST_ARCH=$TARGETARCH NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OPTIONS=--max_old_space_size=8192 yarn build
####################################################################################################
# Argo CD Build stage which performs the actual build of Argo CD binaries
####################################################################################################
FROM golang:1.16.5 as argocd-build
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.18 AS argocd-build
WORKDIR /go/src/github.com/argoproj/argo-cd
COPY go.mod go.mod
COPY go.sum go.sum
COPY go.* ./
RUN go mod download
# Perform the build
COPY . .
COPY --from=argocd-ui /src/dist/app /go/src/github.com/argoproj/argo-cd/ui/dist/app
RUN make argocd-all
ARG BUILD_ALL_CLIS=true
RUN if [ "$BUILD_ALL_CLIS" = "true" ] ; then \
make BIN_NAME=argocd-darwin-amd64 GOOS=darwin argocd-all && \
make BIN_NAME=argocd-windows-amd64.exe GOOS=windows argocd-all \
; fi
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make argocd-all
####################################################################################################
# Final image
@@ -128,10 +119,13 @@ FROM argocd-base
COPY --from=argocd-build /go/src/github.com/argoproj/argo-cd/dist/argocd* /usr/local/bin/
USER root
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-cmp-server
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-cmp-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-notifications && \
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

View File

@@ -3,12 +3,13 @@
####################################################################################################
FROM argocd-base
COPY argocd /usr/local/bin/
COPY argocd-darwin-amd64 /usr/local/bin/
COPY argocd-windows-amd64.exe /usr/local/bin/
USER root
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-notifications && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-applicationset-controller
USER 999

View File

@@ -4,6 +4,8 @@ DIST_DIR=${CURRENT_DIR}/dist
CLI_NAME=argocd
BIN_NAME=argocd
GEN_RESOURCES_CLI_NAME=argocd-resources-gen
HOST_OS:=$(shell go env GOOS)
HOST_ARCH:=$(shell go env GOARCH)
@@ -13,7 +15,7 @@ GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_TAG=$(shell if [ -z "`git status --porcelain`" ]; then git describe --exact-match --tags HEAD 2>/dev/null; fi)
GIT_TREE_STATE=$(shell if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)
VOLUME_MOUNT=$(shell if test "$(go env GOOS)" = "darwin"; then echo ":delegated"; elif test selinuxenabled; then echo ":delegated"; else echo ""; fi)
KUBECTL_VERSION=$(shell go list -m all | grep k8s.io/client-go | cut -d ' ' -f5)
KUBECTL_VERSION=$(shell go list -m k8s.io/client-go | head -n 1 | rev | cut -d' ' -f1 | rev)
GOPATH?=$(shell if test -x `which go`; then go env GOPATH; else echo "$(HOME)/go"; fi)
GOCACHE?=$(HOME)/.cache/go-build
@@ -23,7 +25,7 @@ DOCKER_WORKDIR?=/go/src/github.com/argoproj/argo-cd
ARGOCD_PROCFILE?=Procfile
# Strict mode has been disabled in latest versions of mkdocs-material.
# Strict mode has been disabled in latest versions of mkdocs-material.
# Thus pointing to the older image of mkdocs-material matching the version used by argo-cd.
MKDOCS_DOCKER_IMAGE?=squidfunk/mkdocs-material:4.1.1
MKDOCS_RUN_ARGS?=
@@ -45,10 +47,11 @@ ARGOCD_E2E_DEX_PORT?=5556
ARGOCD_E2E_YARN_HOST?=localhost
ARGOCD_E2E_DISABLE_AUTH?=
ARGOCD_E2E_TEST_TIMEOUT?=20m
ARGOCD_E2E_TEST_TIMEOUT?=30m
ARGOCD_IN_CI?=false
ARGOCD_TEST_E2E?=true
ARGOCD_BIN_MODE?=true
ARGOCD_LINT_GOGC?=20
@@ -111,7 +114,7 @@ define run-in-test-client
bash -c "$(1)"
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)
endef
@@ -133,7 +136,6 @@ override LDFLAGS += \
-X ${PACKAGE}.buildDate=${BUILD_DATE} \
-X ${PACKAGE}.gitCommit=${GIT_COMMIT} \
-X ${PACKAGE}.gitTreeState=${GIT_TREE_STATE}\
-X ${PACKAGE}.gitTreeState=${GIT_TREE_STATE}\
-X ${PACKAGE}.kubectlVersion=${KUBECTL_VERSION}
ifeq (${STATIC_BUILD}, true)
@@ -177,7 +179,7 @@ gogen: ensure-gopath
go generate ./util/argo/...
.PHONY: protogen
protogen: ensure-gopath
protogen: ensure-gopath mod-vendor-local
export GO111MODULE=off
./hack/generate-proto.sh
@@ -186,6 +188,16 @@ openapigen: ensure-gopath
export GO111MODULE=off
./hack/update-openapi.sh
.PHONY: notification-catalog
notification-catalog:
go run ./hack/gen-catalog catalog
.PHONY: notification-docs
notification-docs:
go run ./hack/gen-docs
go run ./hack/gen-catalog docs
.PHONY: clientgen
clientgen: ensure-gopath
export GO111MODULE=off
@@ -193,10 +205,11 @@ clientgen: ensure-gopath
.PHONY: clidocsgen
clidocsgen: ensure-gopath
go run tools/cmd-docs/main.go
go run tools/cmd-docs/main.go
.PHONY: codegen-local
codegen-local: ensure-gopath mod-vendor-local gogen protogen clientgen openapigen clidocsgen manifests-local
codegen-local: ensure-gopath mod-vendor-local notification-docs notification-catalog gogen protogen clientgen openapigen clidocsgen manifests-local
rm -rf vendor/
.PHONY: codegen
@@ -211,13 +224,19 @@ cli: test-tools-image
cli-local: clean-debug
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${CLI_NAME} ./cmd
.PHONY: gen-resources-cli-local
gen-resources-cli-local: clean-debug
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${GEN_RESOURCES_CLI_NAME} ./hack/gen-resources/cmd
.PHONY: release-cli
release-cli: clean-debug image
docker create --name tmp-argocd-linux $(IMAGE_PREFIX)argocd:$(IMAGE_TAG)
docker cp tmp-argocd-linux:/usr/local/bin/argocd ${DIST_DIR}/argocd-linux-amd64
docker cp tmp-argocd-linux:/usr/local/bin/argocd-darwin-amd64 ${DIST_DIR}/argocd-darwin-amd64
docker cp tmp-argocd-linux:/usr/local/bin/argocd-windows-amd64.exe ${DIST_DIR}/argocd-windows-amd64.exe
docker rm tmp-argocd-linux
release-cli: clean-debug build-ui
make BIN_NAME=argocd-darwin-amd64 GOOS=darwin argocd-all
make BIN_NAME=argocd-darwin-arm64 GOOS=darwin GOARCH=arm64 argocd-all
make BIN_NAME=argocd-linux-amd64 GOOS=linux argocd-all
make BIN_NAME=argocd-linux-arm64 GOOS=linux GOARCH=arm64 argocd-all
make BIN_NAME=argocd-linux-ppc64le GOOS=linux GOARCH=ppc64le argocd-all
make BIN_NAME=argocd-linux-s390x GOOS=linux GOARCH=s390x argocd-all
make BIN_NAME=argocd-windows-amd64.exe GOOS=windows argocd-all
.PHONY: test-tools-image
test-tools-image:
@@ -235,7 +254,7 @@ manifests: test-tools-image
# consolidated binary for cli, util, server, repo-server, controller
.PHONY: argocd-all
argocd-all: clean-debug
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${BIN_NAME} ./cmd
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${BIN_NAME} ./cmd
.PHONY: server
server: clean-debug
@@ -249,20 +268,21 @@ repo-server:
controller:
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-application-controller ./cmd
.PHONY: build-ui
build-ui:
DOCKER_BUILDKIT=1 docker build -t argocd-ui --target argocd-ui .
find ./ui/dist -type f -not -name gitkeep -delete
docker run -v ${CURRENT_DIR}/ui/dist/app:/tmp/app --rm -t argocd-ui sh -c 'cp -r ./dist/app/* /tmp/app/'
.PHONY: image
ifeq ($(DEV_IMAGE), true)
# The "dev" image builds the binaries from the users desktop environment (instead of in Docker)
# which speeds up builds. Dockerfile.dev needs to be copied into dist to perform the build, since
# the dist directory is under .dockerignore.
IMAGE_TAG="dev-$(shell git describe --always --dirty)"
image:
docker build -t argocd-base --target argocd-base .
docker build -t argocd-ui --target argocd-ui .
find ./ui/dist -type f -not -name gitkeep -delete
docker run -v ${CURRENT_DIR}/ui/dist/app:/tmp/app --rm -t argocd-ui sh -c 'cp -r ./dist/app/* /tmp/app/'
image: build-ui
DOCKER_BUILDKIT=1 docker build -t argocd-base --target argocd-base .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-darwin-amd64 ./cmd
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-windows-amd64.exe ./cmd
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-application-controller
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-repo-server
@@ -272,15 +292,13 @@ image:
docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) -f dist/Dockerfile.dev dist
else
image:
docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) .
DOCKER_BUILDKIT=1 docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) .
endif
@if [ "$(DOCKER_PUSH)" = "true" ] ; then docker push $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) ; fi
.PHONY: armimage
# The "BUILD_ALL_CLIS" argument is to skip building the CLIs for darwin and windows
# which would take a really long time.
armimage:
docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG)-arm . --build-arg BUILD_ALL_CLIS="false"
docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG)-arm .
.PHONY: builder-image
builder-image:
@@ -402,10 +420,11 @@ start-e2e: test-tools-image
# Starts e2e server locally (or within a container)
.PHONY: start-e2e-local
start-e2e-local:
start-e2e-local: mod-vendor-local dep-ui-local cli-local
kubectl create ns argocd-e2e || 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
# Create GPG keys and source directories
if test -d /tmp/argo-e2e/app/config/gpg; then rm -rf /tmp/argo-e2e/app/config/gpg/*; fi
mkdir -p /tmp/argo-e2e/app/config/gpg/keys && chmod 0700 /tmp/argo-e2e/app/config/gpg/keys
@@ -418,9 +437,11 @@ start-e2e-local:
ARGOCD_GNUPGHOME=/tmp/argo-e2e/app/config/gpg/keys \
ARGOCD_GPG_ENABLED=$(ARGOCD_GPG_ENABLED) \
ARGOCD_PLUGINCONFIGFILEPATH=/tmp/argo-e2e/app/config/plugin \
ARGOCD_PLUGINSOCKFILEPATH=/tmp/argo-e2e/app/config/plugin \
ARGOCD_E2E_DISABLE_AUTH=false \
ARGOCD_ZJWT_FEATURE_FLAG=always \
ARGOCD_IN_CI=$(ARGOCD_IN_CI) \
BIN_MODE=$(ARGOCD_BIN_MODE) \
ARGOCD_E2E_TEST=true \
goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START}
@@ -493,10 +514,6 @@ serve-docs-local:
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
.PHONY: lint-docs
lint-docs:
# https://github.com/dkhamsing/awesome_bot
find docs -name '*.md' -exec grep -l http {} + | xargs docker run --rm -v $(PWD):/mnt:ro dkhamsing/awesome_bot -t 3 --allow-dupe --allow-redirect --white-list `cat white-list | grep -v "#" | tr "\n" ','` --skip-save-results --
# Verify that kubectl can connect to your K8s cluster from Docker
.PHONY: verify-kube-connect
@@ -518,9 +535,7 @@ install-tools-local: install-test-tools-local install-codegen-tools-local instal
# Installs all tools required for running unit & end-to-end tests (Linux packages)
.PHONY: install-test-tools-local
install-test-tools-local:
./hack/install.sh kustomize-linux
./hack/install.sh ksonnet-linux
./hack/install.sh helm2-linux
./hack/install.sh kustomize
./hack/install.sh helm-linux
# Installs all tools required for running codegen (Linux packages)
@@ -542,3 +557,15 @@ dep-ui-local:
start-test-k8s:
go run ./hack/k8s
.PHONY: list
list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
.PHONY: applicationset-controller
applicationset-controller:
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-applicationset-controller ./cmd
.PHONY: checksums
checksums:
sha256sum ./dist/$(BIN_NAME)-* | awk -F './dist/' '{print $$1 $$2}' > ./dist/$(BIN_NAME)-$(TARGET_VERSION)-checksums.txt

8
OWNERS
View File

@@ -8,16 +8,22 @@ approvers:
- jannfis
- jessesuen
- jgwest
- keithchong
- mayzhang2000
- rbreeze
- leoluz
- crenshaw-dev
- pasha-codefresh
reviewers:
- dthomson25
- tetchel
- terrytangyuan
- wtam2018
- ishitasequeira
- reginapizza
- hblixt
- chetan-rns
- wanghong230
- pasha-codefresh
- ciiay
- saumeya

View File

@@ -1,9 +1,12 @@
controller: 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 go run ./cmd/main.go --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
api-server: 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 go run ./cmd/main.go --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} "
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.0 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:6.2.4-alpine --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; fi"
repo-server: sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-/tmp/argo-e2e/app/config/plugin} 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} go run ./cmd/main.go --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379}"
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"
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'
git-server: test/fixture/testrepos/start-git.sh
helm-registry: test/fixture/testrepos/start-helm-registry.sh
dev-mounter: [[ "$ARGOCD_E2E_TEST" != "true" ]] && go run hack/dev-mounter/main.go --configmap argocd-ssh-known-hosts-cm=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} --configmap argocd-tls-certs-cm=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} --configmap argocd-gpg-keys-cm=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source}
applicationset-controller: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_ASK_PASS_SOCK=/tmp/applicationset-ask-pass.sock ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-applicationset-controller $COMMAND --loglevel debug --metrics-addr localhost:12345 --probe-addr localhost:12346 --argocd-repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
notification: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_BINARY_NAME=argocd-notifications $COMMAND --loglevel debug"

View File

@@ -1,8 +1,4 @@
[![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)
[![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)
# Argo CD - Declarative Continuous Delivery for Kubernetes
@@ -36,8 +32,8 @@ Check live demo at https://cd.apps.argoproj.io/.
* Q & A : [Github Discussions](https://github.com/argoproj/argo-cd/discussions)
* Chat : [The #argo-cd Slack channel](https://argoproj.github.io/community/join-slack)
* Contributors Office Hours: [Every Thursday](https://calendar.google.com/calendar/u/0/embed?src=argoproj@gmail.com) | [Agenda](https://docs.google.com/document/d/1ttgw98MO45Dq7ZUHpIiOIEfbyeitKHNfMjbY5dLLMKQ)
* User Community meeting: [Every other Wednesday](https://calendar.google.com/calendar/u/0/embed?src=argoproj@gmail.com) | [Agenda](https://docs.google.com/document/d/1xkoFkVviB70YBzSEa4bDnu-rUZ1sIFtwKKG1Uw8XsY8)
* Contributors Office Hours: [Every Thursday](https://calendar.google.com/calendar/u/0/embed?src=argoproj@gmail.com) | [Agenda](https://docs.google.com/document/d/1xkoFkVviB70YBzSEa4bDnu-rUZ1sIFtwKKG1Uw8XsY8)
* User Community meeting: [First Wednesday of the month](https://calendar.google.com/calendar/u/0/embed?src=argoproj@gmail.com) | [Agenda](https://docs.google.com/document/d/1ttgw98MO45Dq7ZUHpIiOIEfbyeitKHNfMjbY5dLLMKQ)
Participation in the Argo CD project is governed by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md)
@@ -46,6 +42,7 @@ Participation in the Argo CD project is governed by the [CNCF Code of Conduct](h
### Blogs and Presentations
1. [Awesome-Argo: A Curated List of Awesome Projects and Resources Related to Argo](https://github.com/terrytangyuan/awesome-argo)
1. [Unveil the Secret Ingredients of Continuous Delivery at Enterprise Scale with Argo CD](https://blog.akuity.io/unveil-the-secret-ingredients-of-continuous-delivery-at-enterprise-scale-with-argo-cd-7c5b4057ee49)
1. [GitOps Without Pipelines With ArgoCD Image Updater](https://youtu.be/avPUQin9kzU)
1. [Combining Argo CD (GitOps), Crossplane (Control Plane), And KubeVela (OAM)](https://youtu.be/eEcgn_gU3SM)
1. [How to Apply GitOps to Everything - Combining Argo CD and Crossplane](https://youtu.be/yrj4lmScKHQ)
@@ -72,3 +69,6 @@ Participation in the Argo CD project is governed by the [CNCF Code of Conduct](h
1. [Solving configuration drift using GitOps with Argo CD](https://www.cncf.io/blog/2020/12/17/solving-configuration-drift-using-gitops-with-argo-cd/)
1. [Decentralized GitOps over environments](https://blogs.sap.com/2021/05/06/decentralized-gitops-over-environments/)
1. [How GitOps and Operators mark the rise of Infrastructure-As-Software](https://paytmlabs.com/blog/2021/10/how-to-improve-operational-work-with-operators-and-gitops/)
1. [Getting Started with ArgoCD for GitOps Deployments](https://youtu.be/AvLuplh1skA)
1. [Using Argo CD & Datree for Stable Kubernetes CI/CD Deployments](https://youtu.be/17894DTru2Y)

View File

@@ -1,12 +1,12 @@
# Security Policy for Argo CD
Version: **v1.2 (2020-08-07)**
Version: **v1.4 (2022-01-23)**
## Preface
As a deployment tool, Argo CD needs to have production access which makes
security a very important topic. The Argoproj team takes security very
seriously and is continuously working on improving it.
seriously and is continuously working on improving it.
## A word about security scanners
@@ -26,8 +26,12 @@ are well aware of the issues that may affect Argo CD and are constantly
working on the remediation of those that affect Argo CD and our users.
If you believe that we might have missed an issue that we should take a look
at (that can happen), then please discuss it with us. But please, do validate
that assumption before at least roughly.
at (that can happen), then please discuss it with us. If there is a CVE
assigned to the issue, please do open an issue on our GitHub tracker instead
of writing to the security contact e-mail, since things reported by scanners
are public already and the discussion that might emerge is of benefit to the
general community. However, please validate your scanner results and its
impact on Argo CD before opening an issue at least roughly.
## Supported Versions
@@ -56,11 +60,17 @@ We will do our best to react quickly on your inquiry, and to coordinate a fix
and disclosure with you. Sometimes, it might take a little longer for us to
react (e.g. out of office conditions), so please bear with us in these cases.
We will publish security advisiories using the
We will publish security advisories using the
[Git Hub Security Advisories](https://github.com/argoproj/argo-cd/security/advisories)
feature to keep our community well informed, and will credit you for your
findings (unless you prefer to stay anonymous, of course).
Please report vulnerabilities by e-mail to the following address:
Please report vulnerabilities by e-mail to the following address:
* cncf-argo-security@lists.cncf.io
## Securing your Argo CD Instance
See the [operator manual security page](docs/operator-manual/security.md) for
additional information about Argo CD's security features and how to make your
Argo CD production ready.

View File

@@ -11,9 +11,10 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Adventure](https://jp.adventurekk.com/)
1. [Akuity](https://akuity.io/)
1. [Alibaba Group](https://www.alibabagroup.com/)
1. [Allianz Direct](https://www.allianzdirect.de/)
1. [Ambassador Labs](https://www.getambassador.io/)
1. [Ant Group](https://www.antgroup.com/)
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/)
@@ -22,23 +23,32 @@ Currently, the following organizations are **officially** using Argo CD:
1. [BCDevExchange DevOps Platform](https://bcdevexchange.org/DevOpsPlatform)
1. [Beat](https://thebeat.co/en/)
1. [Beez Innovation Labs](https://www.beezlabs.com/)
1. [BioBox Analytics](https://biobox.io)
1. [Beleza Na Web](https://www.belezanaweb.com.br/)
1. [BigPanda](https://bigpanda.io)
1. [BioBox Analytics](https://biobox.io)
1. [BMW Group](https://www.bmwgroup.com/)
1. [Boozt](https://www.booztgroup.com/)
1. [Boticario](https://www.boticario.com.br/)
1. [Camptocamp](https://camptocamp.com)
1. [Capital One](https://www.capitalone.com)
1. [CARFAX](https://www.carfax.com)
1. [Casavo](https://casavo.com)
1. [Celonis](https://www.celonis.com/)
1. [Chargetrip](https://chargetrip.com)
1. [Chime](https://www.chime.com)
1. [Cisco ET&I](https://eti.cisco.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. [Crédit Agricole CIB](https://www.ca-cib.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/)
1. [Cybozu](https://cybozu-global.com)
1. [Chargetrip](https://chargetrip.com)
1. [D2iQ](https://www.d2iq.com)
1. [Datarisk](https://www.datarisk.io/)
1. [Deloitte](https://www.deloitte.com/)
1. [Devopsi - Poland Software/DevOps Consulting](https://devopsi.pl/)
1. [Devtron Labs](https://github.com/devtron-labs/devtron)
1. [EDF Renewables](https://www.edf-re.com/)
1. [edX](https://edx.org)
@@ -46,42 +56,58 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Elium](https://www.elium.com)
1. [END.](https://www.endclothing.com/)
1. [Energisme](https://energisme.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. [Future PLC](https://www.futureplc.com/)
1. [Garner](https://www.garnercorp.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. [Gitpod](https://www.gitpod.io)
1. [Gllue](https://gllue.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. [Handelsbanken](https://www.handelsbanken.se)
1. [Healy](https://www.healyworld.net)
1. [Helio](https://helio.exchange)
1. [hipages](https://hipages.com.au/)
1. [Hiya](https://hiya.com)
1. [Honestbank](https://honestbank.com)
1. [IBM](https://www.ibm.com/)
1. [Ibotta](https://home.ibotta.com)
1. [IITS-Consulting](https://iits-consulting.de)
1. [imaware](https://imaware.health)
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. [Karrot](https://www.daangn.com/)
1. [Kaltura](https://corp.kaltura.com/)
1. [KarrotPay](https://www.daangnpay.com/)
1. [Karrot](https://www.daangn.com/)
1. [Kasa](https://kasa.co.kr/)
1. [Keeeb](https://www.keeeb.com/)
1. [Keptn](https://keptn.sh)
1. [Kinguin](https://www.kinguin.net/)
1. [KintoHub](https://www.kintohub.com/)
1. [KompiTech GmbH](https://www.kompitech.com/)
1. [KubeSphere](https://github.com/kubesphere)
1. [LexisNexis](https://www.lexisnexis.com/)
1. [Lightricks](https://www.lightricks.com/)
1. [LINE](https://linecorp.com/en/)
1. [Lytt](https://www.lytt.co/)
1. [Majid Al Futtaim](https://www.majidalfuttaim.com/)
1. [Major League Baseball](https://mlb.com)
1. [Mambu](https://www.mambu.com/)
1. [MariaDB](https://mariadb.com)
1. [Mattermost](https://www.mattermost.com)
1. [Max Kelsen](https://www.maxkelsen.com/)
1. [MeDirect](https://medirect.com.mt/)
1. [Metanet](http://www.metanet.co.kr/en/)
1. [MindSpore](https://mindspore.cn)
1. [Mirantis](https://mirantis.com/)
1. [mixi Group](https://mixi.co.jp/)
@@ -93,7 +119,9 @@ Currently, the following organizations are **officially** using Argo CD:
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. [Octadesk](https://octadesk.com)
1. [omegaUp](https://omegaUp.com)
1. [openEuler](https://openeuler.org)
1. [openGauss](https://opengauss.org/)
1. [openLooKeng](https://openlookeng.io)
@@ -101,6 +129,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Opensurvey](https://www.opensurvey.co.kr/)
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. [PayPay](https://paypay.ne.jp/)
1. [Peloton Interactive](https://www.onepeloton.com/)
@@ -114,21 +143,34 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Quipper](https://www.quipper.com/)
1. [Recreation.gov](https://www.recreation.gov/)
1. [Red Hat](https://www.redhat.com/)
1. [RightRev](https://rightrev.com/)
1. [Rise](https://www.risecard.eu/)
1. [Riskified](https://www.riskified.com/)
1. [Robotinfra](https://www.robotinfra.com)
1. [Rubin Observatory](https://www.lsst.org)
1. [Saildrone](https://www.saildrone.com/)
1. [Saloodo! GmbH](https://www.saloodo.com)
1. [Sap Labs](http://sap.com)
1. [Schwarz IT](https://jobs.schwarz/it-mission)
1. [Skit](https://skit.ai/)
1. [Skyscanner](https://www.skyscanner.net/)
1. [Smilee.io](https://smilee.io)
1. [Snapp](https://snapp.ir/)
1. [Snyk](https://snyk.io/)
1. [Speee](https://speee.jp/)
1. [Spendesk](https://spendesk.com/)
1. [Spores Labs](https://spores.app)
1. [Stuart](https://stuart.com/)
1. [Sumo Logic](https://sumologic.com/)
1. [Sutpc](http://www.sutpc.com/)
1. [Swiss Post](https://github.com/swisspost)
1. [Swisscom](https://www.swisscom.ch)
1. [Swissquote](https://github.com/swissquote)
1. [Syncier](https://syncier.com/)
1. [TableCheck](https://tablecheck.com/)
1. [Tailor Brands](https://www.tailorbrands.com)
1. [Tamkeen Technologies](https://tamkeentech.sa/)
1. [Technacy](https://www.technacy.it/)
1. [Tesla](https://tesla.com/)
1. [ThousandEyes](https://www.thousandeyes.com/)
1. [Ticketmaster](https://ticketmaster.com)
@@ -138,9 +180,10 @@ Currently, the following organizations are **officially** using Argo CD:
1. [tru.ID](https://tru.id)
1. [Twilio SendGrid](https://sendgrid.com)
1. [tZERO](https://www.tzero.com/)
1. [ungleich.ch](https://ungleich.ch/)
1. [UBIO](https://ub.io/)
1. [UFirstGroup](https://www.ufirstgroup.com/en/)
1. [ungleich.ch](https://ungleich.ch/)
1. [Unifonic Inc](https://www.unifonic.com/)
1. [Universidad Mesoamericana](https://www.umes.edu.gt/)
1. [Viaduct](https://www.viaduct.ai/)
1. [Virtuo](https://www.govirtuo.com/)
@@ -148,33 +191,18 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Volvo Cars](https://www.volvocars.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. [WeMo Scooter](https://www.wemoscooter.com/)
1. [Webstores](https://www.webstores.nl)
1. [Whitehat Berlin](https://whitehat.berlin) by Guido Maria Serra +Fenaroli
1. [Witick](https://witick.io/)
1. [WooliesX](https://wooliesx.com.au/)
1. [Woolworths Group](https://www.woolworthsgroup.com.au/)
1. [WSpot](https://www.wspot.com.br/)
1. [Yieldlab](https://www.yieldlab.de/)
1. [Zimpler](https://www.zimpler.com/)
1. [Sap Labs](http://sap.com)
1. [Smilee.io](https://smilee.io)
1. [Metanet](http://www.metanet.co.kr/en/)
1. [Unifonic Inc](https://www.unifonic.com/)
1. [Tamkeen Technologies](https://tamkeentech.sa/)
1. [Kaltura](https://corp.kaltura.com/)
1. [Boticario](https://www.boticario.com.br/)
1. [Beleza Na Web](https://www.belezanaweb.com.br/)
1. [MariaDB](https://mariadb.com)
1. [Lightricks](https://www.lightricks.com/)
1. [RightRev](https://rightrev.com/)
1. [MeDirect](https://medirect.com.mt/)
1. [Snapp](https://snapp.ir/)
1. [Technacy](https://www.technacy.it/)
1. [freee](https://corp.freee.co.jp/en/company/)
1. [Youverify](https://youverify.co/)
1. [Keeeb](https://www.keeeb.com/)
1. [p3r](https://www.p3r.one/)
1. [Faro](https://www.faro.com/)
1. [Rise](https://www.risecard.eu/)
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.2.0
2.4.23

View File

@@ -0,0 +1,732 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package controllers
import (
"context"
"fmt"
"time"
"github.com/go-logr/logr"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
apierr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/record"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/source"
"github.com/argoproj/argo-cd/v2/applicationset/generators"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
"github.com/argoproj/argo-cd/v2/common"
argov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
argoutil "github.com/argoproj/argo-cd/v2/util/argo"
"github.com/argoproj/argo-cd/v2/util/db"
)
const (
// Rather than importing the whole argocd-notifications controller, just copying the const here
// https://github.com/argoproj-labs/argocd-notifications/blob/33d345fa838829bb50fca5c08523aba380d2c12b/pkg/controller/subscriptions.go#L12
// https://github.com/argoproj-labs/argocd-notifications/blob/33d345fa838829bb50fca5c08523aba380d2c12b/pkg/controller/state.go#L17
NotifiedAnnotationKey = "notified.notifications.argoproj.io"
ReconcileRequeueOnValidationError = time.Minute * 3
)
var (
preservedAnnotations = []string{
NotifiedAnnotationKey,
argov1alpha1.AnnotationKeyRefresh,
}
)
// ApplicationSetReconciler reconciles a ApplicationSet object
type ApplicationSetReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
Generators map[string]generators.Generator
ArgoDB db.ArgoDB
ArgoAppClientset appclientset.Interface
KubeClientset kubernetes.Interface
utils.Policy
utils.Renderer
}
// +kubebuilder:rbac:groups=argoproj.io,resources=applicationsets,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=argoproj.io,resources=applicationsets/status,verbs=get;update;patch
func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = r.Log.WithValues("applicationset", req.NamespacedName)
_ = log.WithField("applicationset", req.NamespacedName)
var applicationSetInfo argoprojiov1alpha1.ApplicationSet
parametersGenerated := false
if err := r.Get(ctx, req.NamespacedName, &applicationSetInfo); err != nil {
if client.IgnoreNotFound(err) != nil {
log.WithError(err).Infof("unable to get ApplicationSet: '%v' ", err)
}
return ctrl.Result{}, client.IgnoreNotFound(err)
}
// Do not attempt to further reconcile the ApplicationSet if it is being deleted.
if applicationSetInfo.ObjectMeta.DeletionTimestamp != nil {
return ctrl.Result{}, nil
}
// Log a warning if there are unrecognized generators
utils.CheckInvalidGenerators(&applicationSetInfo)
// desiredApplications is the main list of all expected Applications from all generators in this appset.
desiredApplications, applicationSetReason, err := r.generateApplications(applicationSetInfo)
if err != nil {
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: err.Error(),
Reason: string(applicationSetReason),
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
return ctrl.Result{}, err
}
parametersGenerated = true
validateErrors, err := r.validateGeneratedApplications(ctx, desiredApplications, applicationSetInfo, req.Namespace)
if err != nil {
// While some generators may return an error that requires user intervention,
// other generators reference external resources that may change to cause
// the error to no longer occur. We thus log the error and requeue
// with a timeout to give this another shot at a later time.
//
// Changes to watched resources will cause this to be reconciled sooner than
// the RequeueAfter time.
log.Errorf("error occurred during application validation: %s", err.Error())
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: err.Error(),
Reason: argoprojiov1alpha1.ApplicationSetReasonApplicationValidationError,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
return ctrl.Result{RequeueAfter: ReconcileRequeueOnValidationError}, nil
}
var validApps []argov1alpha1.Application
for i := range desiredApplications {
if validateErrors[i] == nil {
validApps = append(validApps, desiredApplications[i])
}
}
if len(validateErrors) > 0 {
var message string
for _, v := range validateErrors {
message = v.Error()
log.Errorf("validation error found during application validation: %s", message)
}
if len(validateErrors) > 1 {
// Only the last message gets added to the appset status, to keep the size reasonable.
message = fmt.Sprintf("%s (and %d more)", message, len(validateErrors)-1)
}
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: message,
Reason: argoprojiov1alpha1.ApplicationSetReasonApplicationValidationError,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
}
if r.Policy.Update() {
err = r.createOrUpdateInCluster(ctx, applicationSetInfo, validApps)
if err != nil {
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: err.Error(),
Reason: argoprojiov1alpha1.ApplicationSetReasonUpdateApplicationError,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
return ctrl.Result{}, err
}
} else {
err = r.createInCluster(ctx, applicationSetInfo, validApps)
if err != nil {
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: err.Error(),
Reason: argoprojiov1alpha1.ApplicationSetReasonCreateApplicationError,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
return ctrl.Result{}, err
}
}
if r.Policy.Delete() {
err = r.deleteInCluster(ctx, applicationSetInfo, desiredApplications)
if err != nil {
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionResourcesUpToDate,
Message: err.Error(),
Reason: argoprojiov1alpha1.ApplicationSetReasonDeleteApplicationError,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
return ctrl.Result{}, err
}
}
if applicationSetInfo.RefreshRequired() {
delete(applicationSetInfo.Annotations, common.AnnotationApplicationSetRefresh)
err := r.Client.Update(ctx, &applicationSetInfo)
if err != nil {
log.Warnf("error occurred while updating ApplicationSet: %v", err)
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: err.Error(),
Reason: argoprojiov1alpha1.ApplicationSetReasonRefreshApplicationError,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
return ctrl.Result{}, err
}
}
requeueAfter := r.getMinRequeueAfter(&applicationSetInfo)
log.WithField("requeueAfter", requeueAfter).Info("end reconcile")
if len(validateErrors) == 0 {
if err := r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionResourcesUpToDate,
Message: "All applications have been generated successfully",
Reason: argoprojiov1alpha1.ApplicationSetReasonApplicationSetUpToDate,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
); err != nil {
return ctrl.Result{}, err
}
}
return ctrl.Result{
RequeueAfter: requeueAfter,
}, nil
}
func getParametersGeneratedCondition(parametersGenerated bool, message string) argoprojiov1alpha1.ApplicationSetCondition {
var paramtersGeneratedCondition argoprojiov1alpha1.ApplicationSetCondition
if parametersGenerated {
paramtersGeneratedCondition = argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionParametersGenerated,
Message: "Successfully generated parameters for all Applications",
Reason: argoprojiov1alpha1.ApplicationSetReasonParametersGenerated,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}
} else {
paramtersGeneratedCondition = argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionParametersGenerated,
Message: message,
Reason: argoprojiov1alpha1.ApplicationSetReasonErrorOccurred,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusFalse,
}
}
return paramtersGeneratedCondition
}
func getResourceUpToDateCondition(errorOccurred bool, message string, reason string) argoprojiov1alpha1.ApplicationSetCondition {
var resourceUpToDateCondition argoprojiov1alpha1.ApplicationSetCondition
if errorOccurred {
resourceUpToDateCondition = argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionResourcesUpToDate,
Message: message,
Reason: reason,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusFalse,
}
} else {
resourceUpToDateCondition = argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionResourcesUpToDate,
Message: "ApplicationSet up to date",
Reason: argoprojiov1alpha1.ApplicationSetReasonApplicationSetUpToDate,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusTrue,
}
}
return resourceUpToDateCondition
}
func (r *ApplicationSetReconciler) setApplicationSetStatusCondition(ctx context.Context, applicationSet *argoprojiov1alpha1.ApplicationSet, condition argoprojiov1alpha1.ApplicationSetCondition, paramtersGenerated bool) error {
// check if error occurred during reconcile process
errOccurred := condition.Type == argoprojiov1alpha1.ApplicationSetConditionErrorOccurred
var errOccurredCondition argoprojiov1alpha1.ApplicationSetCondition
if errOccurred {
errOccurredCondition = condition
} else {
errOccurredCondition = argoprojiov1alpha1.ApplicationSetCondition{
Type: argoprojiov1alpha1.ApplicationSetConditionErrorOccurred,
Message: "Successfully generated parameters for all Applications",
Reason: argoprojiov1alpha1.ApplicationSetReasonApplicationSetUpToDate,
Status: argoprojiov1alpha1.ApplicationSetConditionStatusFalse,
}
}
paramtersGeneratedCondition := getParametersGeneratedCondition(paramtersGenerated, condition.Message)
resourceUpToDateCondition := getResourceUpToDateCondition(errOccurred, condition.Message, condition.Reason)
newConditions := []argoprojiov1alpha1.ApplicationSetCondition{errOccurredCondition, paramtersGeneratedCondition, resourceUpToDateCondition}
needToUpdateConditions := false
for _, condition := range newConditions {
// do nothing if appset already has same condition
for _, c := range applicationSet.Status.Conditions {
if c.Type == condition.Type && (c.Reason != condition.Reason || c.Status != condition.Status || c.Message != condition.Message) {
needToUpdateConditions = true
break
}
}
}
evaluatedTypes := map[argoprojiov1alpha1.ApplicationSetConditionType]bool{
argoprojiov1alpha1.ApplicationSetConditionErrorOccurred: true,
argoprojiov1alpha1.ApplicationSetConditionParametersGenerated: true,
argoprojiov1alpha1.ApplicationSetConditionResourcesUpToDate: true,
}
if needToUpdateConditions || len(applicationSet.Status.Conditions) < 3 {
// fetch updated Application Set object before updating it
namespacedName := types.NamespacedName{Namespace: applicationSet.Namespace, Name: applicationSet.Name}
if err := r.Get(ctx, namespacedName, applicationSet); err != nil {
if client.IgnoreNotFound(err) != nil {
return nil
}
return fmt.Errorf("error fetching updated application set: %v", err)
}
applicationSet.Status.SetConditions(
newConditions, evaluatedTypes,
)
// Update the newly fetched object with new set of conditions
err := r.Client.Status().Update(ctx, applicationSet)
if err != nil && !apierr.IsNotFound(err) {
return fmt.Errorf("unable to set application set condition: %v", err)
}
}
return nil
}
// validateGeneratedApplications uses the Argo CD validation functions to verify the correctness of the
// generated applications.
func (r *ApplicationSetReconciler) validateGeneratedApplications(ctx context.Context, desiredApplications []argov1alpha1.Application, applicationSetInfo argoprojiov1alpha1.ApplicationSet, namespace string) (map[int]error, error) {
errorsByIndex := map[int]error{}
namesSet := map[string]bool{}
for i, app := range desiredApplications {
if !namesSet[app.Name] {
namesSet[app.Name] = true
} else {
errorsByIndex[i] = fmt.Errorf("ApplicationSet %s contains applications with duplicate name: %s", applicationSetInfo.Name, app.Name)
continue
}
proj, err := r.ArgoAppClientset.ArgoprojV1alpha1().AppProjects(namespace).Get(ctx, app.Spec.GetProject(), metav1.GetOptions{})
if err != nil {
if apierr.IsNotFound(err) {
errorsByIndex[i] = fmt.Errorf("application references project %s which does not exist", app.Spec.Project)
continue
}
return nil, err
}
if err := utils.ValidateDestination(ctx, &app.Spec.Destination, r.KubeClientset, namespace); err != nil {
errorsByIndex[i] = fmt.Errorf("application destination spec is invalid: %s", err.Error())
continue
}
conditions, err := argoutil.ValidatePermissions(ctx, &app.Spec, proj, r.ArgoDB)
if err != nil {
return nil, err
}
if len(conditions) > 0 {
errorsByIndex[i] = fmt.Errorf("application spec is invalid: %s", argoutil.FormatAppConditions(conditions))
continue
}
}
return errorsByIndex, nil
}
func (r *ApplicationSetReconciler) getMinRequeueAfter(applicationSetInfo *argoprojiov1alpha1.ApplicationSet) time.Duration {
var res time.Duration
for _, requestedGenerator := range applicationSetInfo.Spec.Generators {
relevantGenerators := generators.GetRelevantGenerators(&requestedGenerator, r.Generators)
for _, g := range relevantGenerators {
t := g.GetRequeueAfter(&requestedGenerator)
if res == 0 {
res = t
} else if t != 0 && t < res {
res = t
}
}
}
return res
}
func getTempApplication(applicationSetTemplate argoprojiov1alpha1.ApplicationSetTemplate) *argov1alpha1.Application {
var tmplApplication argov1alpha1.Application
tmplApplication.Annotations = applicationSetTemplate.Annotations
tmplApplication.Labels = applicationSetTemplate.Labels
tmplApplication.Namespace = applicationSetTemplate.Namespace
tmplApplication.Name = applicationSetTemplate.Name
tmplApplication.Spec = applicationSetTemplate.Spec
tmplApplication.Finalizers = applicationSetTemplate.Finalizers
return &tmplApplication
}
func (r *ApplicationSetReconciler) generateApplications(applicationSetInfo argoprojiov1alpha1.ApplicationSet) ([]argov1alpha1.Application, argoprojiov1alpha1.ApplicationSetReasonType, error) {
var res []argov1alpha1.Application
var firstError error
var applicationSetReason argoprojiov1alpha1.ApplicationSetReasonType
for _, requestedGenerator := range applicationSetInfo.Spec.Generators {
t, err := generators.Transform(requestedGenerator, r.Generators, applicationSetInfo.Spec.Template, &applicationSetInfo)
if err != nil {
log.WithError(err).WithField("generator", requestedGenerator).
Error("error generating application from params")
if firstError == nil {
firstError = err
applicationSetReason = argoprojiov1alpha1.ApplicationSetReasonApplicationParamsGenerationError
}
continue
}
for _, a := range t {
tmplApplication := getTempApplication(a.Template)
for _, p := range a.Params {
app, err := r.Renderer.RenderTemplateParams(tmplApplication, applicationSetInfo.Spec.SyncPolicy, p)
if err != nil {
log.WithError(err).WithField("params", a.Params).WithField("generator", requestedGenerator).
Error("error generating application from params")
if firstError == nil {
firstError = err
applicationSetReason = argoprojiov1alpha1.ApplicationSetReasonRenderTemplateParamsError
}
continue
}
res = append(res, *app)
}
}
log.WithField("generator", requestedGenerator).Infof("generated %d applications", len(res))
log.WithField("generator", requestedGenerator).Debugf("apps from generator: %+v", res)
}
return res, applicationSetReason, firstError
}
func (r *ApplicationSetReconciler) SetupWithManager(mgr ctrl.Manager) error {
if err := mgr.GetFieldIndexer().IndexField(context.TODO(), &argov1alpha1.Application{}, ".metadata.controller", func(rawObj client.Object) []string {
// grab the job object, extract the owner...
app := rawObj.(*argov1alpha1.Application)
owner := metav1.GetControllerOf(app)
if owner == nil {
return nil
}
// ...make sure it's a application set...
if owner.APIVersion != argoprojiov1alpha1.GroupVersion.String() || owner.Kind != "ApplicationSet" {
return nil
}
// ...and if so, return it
return []string{owner.Name}
}); err != nil {
return err
}
return ctrl.NewControllerManagedBy(mgr).
For(&argoprojiov1alpha1.ApplicationSet{}).
Owns(&argov1alpha1.Application{}).
Watches(
&source.Kind{Type: &corev1.Secret{}},
&clusterSecretEventHandler{
Client: mgr.GetClient(),
Log: log.WithField("type", "createSecretEventHandler"),
}).
// TODO: also watch Applications and respond on changes if we own them.
Complete(r)
}
// createOrUpdateInCluster will create / update application resources in the cluster.
// - For new applications, it will call create
// - For existing application, it will call update
// The function also adds owner reference to all applications, and uses it to delete them.
func (r *ApplicationSetReconciler) createOrUpdateInCluster(ctx context.Context, applicationSet argoprojiov1alpha1.ApplicationSet, desiredApplications []argov1alpha1.Application) error {
var firstError error
// Creates or updates the application in appList
for _, generatedApp := range desiredApplications {
appLog := log.WithFields(log.Fields{"app": generatedApp.Name, "appSet": applicationSet.Name})
generatedApp.Namespace = applicationSet.Namespace
found := &argov1alpha1.Application{
ObjectMeta: metav1.ObjectMeta{
Name: generatedApp.Name,
Namespace: generatedApp.Namespace,
},
TypeMeta: metav1.TypeMeta{
Kind: "Application",
APIVersion: "argoproj.io/v1alpha1",
},
}
action, err := utils.CreateOrUpdate(ctx, r.Client, found, func() error {
// Copy only the Application/ObjectMeta fields that are significant, from the generatedApp
found.Spec = generatedApp.Spec
// Preserve specially treated argo cd annotations:
// * https://github.com/argoproj/applicationset/issues/180
// * https://github.com/argoproj/argo-cd/issues/10500
for _, key := range preservedAnnotations {
if state, exists := found.ObjectMeta.Annotations[key]; exists {
if generatedApp.Annotations == nil {
generatedApp.Annotations = map[string]string{}
}
generatedApp.Annotations[key] = state
}
}
found.ObjectMeta.Annotations = generatedApp.Annotations
found.ObjectMeta.Finalizers = generatedApp.Finalizers
found.ObjectMeta.Labels = generatedApp.Labels
return controllerutil.SetControllerReference(&applicationSet, found, r.Scheme)
})
if err != nil {
appLog.WithError(err).WithField("action", action).Errorf("failed to %s Application", action)
if firstError == nil {
firstError = err
}
continue
}
r.Recorder.Eventf(&applicationSet, corev1.EventTypeNormal, fmt.Sprint(action), "%s Application %q", action, generatedApp.Name)
appLog.Logf(log.InfoLevel, "%s Application", action)
}
return firstError
}
// createInCluster will filter from the desiredApplications only the application that needs to be created
// Then it will call createOrUpdateInCluster to do the actual create
func (r *ApplicationSetReconciler) createInCluster(ctx context.Context, applicationSet argoprojiov1alpha1.ApplicationSet, desiredApplications []argov1alpha1.Application) error {
var createApps []argov1alpha1.Application
current, err := r.getCurrentApplications(ctx, applicationSet)
if err != nil {
return err
}
m := make(map[string]bool) // Will holds the app names that are current in the cluster
for _, app := range current {
m[app.Name] = true
}
// filter applications that are not in m[string]bool (new to the cluster)
for _, app := range desiredApplications {
_, exists := m[app.Name]
if !exists {
createApps = append(createApps, app)
}
}
return r.createOrUpdateInCluster(ctx, applicationSet, createApps)
}
func (r *ApplicationSetReconciler) getCurrentApplications(_ context.Context, applicationSet argoprojiov1alpha1.ApplicationSet) ([]argov1alpha1.Application, error) {
// TODO: Should this use the context param?
var current argov1alpha1.ApplicationList
err := r.Client.List(context.Background(), &current, client.MatchingFields{".metadata.controller": applicationSet.Name})
if err != nil {
return nil, err
}
return current.Items, nil
}
// deleteInCluster will delete Applications that are currently on the cluster, but not in appList.
// The function must be called after all generators had been called and generated applications
func (r *ApplicationSetReconciler) deleteInCluster(ctx context.Context, applicationSet argoprojiov1alpha1.ApplicationSet, desiredApplications []argov1alpha1.Application) error {
// settingsMgr := settings.NewSettingsManager(context.TODO(), r.KubeClientset, applicationSet.Namespace)
// argoDB := db.NewDB(applicationSet.Namespace, settingsMgr, r.KubeClientset)
// clusterList, err := argoDB.ListClusters(ctx)
clusterList, err := utils.ListClusters(ctx, r.KubeClientset, applicationSet.Namespace)
if err != nil {
return err
}
// Save current applications to be able to delete the ones that are not in appList
current, err := r.getCurrentApplications(ctx, applicationSet)
if err != nil {
return err
}
m := make(map[string]bool) // Will holds the app names in appList for the deletion process
for _, app := range desiredApplications {
m[app.Name] = true
}
// Delete apps that are not in m[string]bool
var firstError error
for _, app := range current {
appLog := log.WithFields(log.Fields{"app": app.Name, "appSet": applicationSet.Name})
_, exists := m[app.Name]
if !exists {
// Removes the Argo CD resources finalizer if the application contains an invalid target (eg missing cluster)
err := r.removeFinalizerOnInvalidDestination(ctx, applicationSet, &app, clusterList, appLog)
if err != nil {
appLog.WithError(err).Error("failed to update Application")
if firstError != nil {
firstError = err
}
continue
}
err = r.Client.Delete(ctx, &app)
if err != nil {
appLog.WithError(err).Error("failed to delete Application")
if firstError != nil {
firstError = err
}
continue
}
r.Recorder.Eventf(&applicationSet, corev1.EventTypeNormal, "Deleted", "Deleted Application %q", app.Name)
appLog.Log(log.InfoLevel, "Deleted application")
}
}
return firstError
}
// removeFinalizerOnInvalidDestination removes the Argo CD resources finalizer if the application contains an invalid target (eg missing cluster)
func (r *ApplicationSetReconciler) removeFinalizerOnInvalidDestination(ctx context.Context, applicationSet argoprojiov1alpha1.ApplicationSet, app *argov1alpha1.Application, clusterList *argov1alpha1.ClusterList, appLog *log.Entry) error {
// Only check if the finalizers need to be removed IF there are finalizers to remove
if len(app.Finalizers) == 0 {
return nil
}
var validDestination bool
// Detect if the destination is invalid (name doesn't correspond to a matching cluster)
if err := utils.ValidateDestination(ctx, &app.Spec.Destination, r.KubeClientset, applicationSet.Namespace); err != nil {
appLog.Warnf("The destination cluster for %s couldn't be found: %v", app.Name, err)
validDestination = false
} else {
// Detect if the destination's server field does not match an existing cluster
matchingCluster := false
for _, cluster := range clusterList.Items {
// Server fields must match. Note that ValidateDestination ensures that the server field is set, if applicable.
if app.Spec.Destination.Server != cluster.Server {
continue
}
// The name must match, if it is not empty
if app.Spec.Destination.Name != "" && cluster.Name != app.Spec.Destination.Name {
continue
}
matchingCluster = true
break
}
if !matchingCluster {
appLog.Warnf("A match for the destination cluster for %s, by server url, couldn't be found.", app.Name)
}
validDestination = matchingCluster
}
// If the destination is invalid (for example the cluster is no longer defined), then remove
// the application finalizers to avoid triggering Argo CD bug #5817
if !validDestination {
// Filter out the Argo CD finalizer from the finalizer list
var newFinalizers []string
for _, existingFinalizer := range app.Finalizers {
if existingFinalizer != argov1alpha1.ResourcesFinalizerName { // only remove this one
newFinalizers = append(newFinalizers, existingFinalizer)
}
}
// If the finalizer length changed (due to filtering out an Argo finalizer), update the finalizer list on the app
if len(newFinalizers) != len(app.Finalizers) {
app.Finalizers = newFinalizers
r.Recorder.Eventf(&applicationSet, corev1.EventTypeNormal, "Updated", "Updated Application %q finalizer before deletion, because application has an invalid destination", app.Name)
appLog.Log(log.InfoLevel, "Updating application finalizer before deletion, because application has an invalid destination")
err := r.Client.Update(ctx, app, &client.UpdateOptions{})
if err != nil {
return err
}
}
}
return nil
}
var _ handler.EventHandler = &clusterSecretEventHandler{}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
package controllers
import (
"context"
log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/workqueue"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"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"
)
// clusterSecretEventHandler is used when watching Secrets to check if they are ArgoCD Cluster Secrets, and if so
// requeue any related ApplicationSets.
type clusterSecretEventHandler struct {
//handler.EnqueueRequestForOwner
Log log.FieldLogger
Client client.Client
}
func (h *clusterSecretEventHandler) Create(e event.CreateEvent, q workqueue.RateLimitingInterface) {
h.queueRelatedAppGenerators(q, e.Object)
}
func (h *clusterSecretEventHandler) Update(e event.UpdateEvent, q workqueue.RateLimitingInterface) {
h.queueRelatedAppGenerators(q, e.ObjectNew)
}
func (h *clusterSecretEventHandler) Delete(e event.DeleteEvent, q workqueue.RateLimitingInterface) {
h.queueRelatedAppGenerators(q, e.Object)
}
func (h *clusterSecretEventHandler) Generic(e event.GenericEvent, q workqueue.RateLimitingInterface) {
h.queueRelatedAppGenerators(q, e.Object)
}
// addRateLimitingInterface defines the Add method of workqueue.RateLimitingInterface, allow us to easily mock
// it for testing purposes.
type addRateLimitingInterface interface {
Add(item interface{})
}
func (h *clusterSecretEventHandler) queueRelatedAppGenerators(q addRateLimitingInterface, object client.Object) {
// Check for label, lookup all ApplicationSets that might match the cluster, queue them all
if object.GetLabels()[generators.ArgoCDSecretTypeLabel] != generators.ArgoCDSecretTypeCluster {
return
}
h.Log.WithFields(log.Fields{
"namespace": object.GetNamespace(),
"name": object.GetName(),
}).Info("processing event for cluster secret")
appSetList := &argoprojiov1alpha1.ApplicationSetList{}
err := h.Client.List(context.Background(), appSetList)
if err != nil {
h.Log.WithError(err).Error("unable to list ApplicationSets")
return
}
h.Log.WithField("count", len(appSetList.Items)).Info("listed ApplicationSets")
for _, appSet := range appSetList.Items {
foundClusterGenerator := false
for _, generator := range appSet.Spec.Generators {
if generator.Clusters != nil {
foundClusterGenerator = true
break
}
}
if foundClusterGenerator {
// TODO: only queue the AppGenerator if the labels match this cluster
req := ctrl.Request{NamespacedName: types.NamespacedName{Namespace: appSet.Namespace, Name: appSet.Name}}
q.Add(req)
}
}
}

View File

@@ -0,0 +1,234 @@
package controllers
import (
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"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)
assert.Nil(t, err)
err = argov1alpha1.AddToScheme(scheme)
assert.Nil(t, err)
tests := []struct {
name string
items []argoprojiov1alpha1.ApplicationSet
secret corev1.Secret
expectedRequests []ctrl.Request
}{
{
name: "no application sets should mean no requests",
items: []argoprojiov1alpha1.ApplicationSet{},
secret: corev1.Secret{
ObjectMeta: v1.ObjectMeta{
Namespace: "argocd",
Name: "my-secret",
Labels: map[string]string{
generators.ArgoCDSecretTypeLabel: generators.ArgoCDSecretTypeCluster,
},
},
},
expectedRequests: []reconcile.Request{},
},
{
name: "a cluster generator should produce a request",
items: []argoprojiov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
},
},
},
},
},
secret: corev1.Secret{
ObjectMeta: v1.ObjectMeta{
Namespace: "argocd",
Name: "my-secret",
Labels: map[string]string{
generators.ArgoCDSecretTypeLabel: generators.ArgoCDSecretTypeCluster,
},
},
},
expectedRequests: []reconcile.Request{{
NamespacedName: types.NamespacedName{Namespace: "argocd", Name: "my-app-set"},
}},
},
{
name: "multiple cluster generators should produce multiple requests",
items: []argoprojiov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
},
},
},
},
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set2",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
},
},
},
},
},
secret: corev1.Secret{
ObjectMeta: v1.ObjectMeta{
Namespace: "argocd",
Name: "my-secret",
Labels: map[string]string{
generators.ArgoCDSecretTypeLabel: generators.ArgoCDSecretTypeCluster,
},
},
},
expectedRequests: []reconcile.Request{
{NamespacedName: types.NamespacedName{Namespace: "argocd", Name: "my-app-set"}},
{NamespacedName: types.NamespacedName{Namespace: "argocd", Name: "my-app-set2"}},
},
},
{
name: "non-cluster generator should not match",
items: []argoprojiov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "another-namespace",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
},
},
},
},
{
ObjectMeta: v1.ObjectMeta{
Name: "app-set-non-cluster",
Namespace: "argocd",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
{
List: &argoprojiov1alpha1.ListGenerator{},
},
},
},
},
},
secret: corev1.Secret{
ObjectMeta: v1.ObjectMeta{
Namespace: "argocd",
Name: "my-secret",
Labels: map[string]string{
generators.ArgoCDSecretTypeLabel: generators.ArgoCDSecretTypeCluster,
},
},
},
expectedRequests: []reconcile.Request{
{NamespacedName: types.NamespacedName{Namespace: "another-namespace", Name: "my-app-set"}},
},
},
{
name: "non-argo cd secret should not match",
items: []argoprojiov1alpha1.ApplicationSet{
{
ObjectMeta: v1.ObjectMeta{
Name: "my-app-set",
Namespace: "another-namespace",
},
Spec: argoprojiov1alpha1.ApplicationSetSpec{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{
{
Clusters: &argoprojiov1alpha1.ClusterGenerator{},
},
},
},
},
},
secret: corev1.Secret{
ObjectMeta: v1.ObjectMeta{
Namespace: "argocd",
Name: "my-non-argocd-secret",
},
},
expectedRequests: []reconcile.Request{},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
appSetList := argoprojiov1alpha1.ApplicationSetList{
Items: test.items,
}
fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithLists(&appSetList).Build()
handler := &clusterSecretEventHandler{
Client: fakeClient,
Log: log.WithField("type", "createSecretEventHandler"),
}
mockAddRateLimitingInterface := mockAddRateLimitingInterface{}
handler.queueRelatedAppGenerators(&mockAddRateLimitingInterface, &test.secret)
assert.False(t, mockAddRateLimitingInterface.errorOccurred)
assert.ElementsMatch(t, mockAddRateLimitingInterface.addedItems, test.expectedRequests)
})
}
}
// Add checks the type, and adds it to the internal list of received additions
func (obj *mockAddRateLimitingInterface) Add(item interface{}) {
if req, ok := item.(ctrl.Request); ok {
obj.addedItems = append(obj.addedItems, req)
} else {
obj.errorOccurred = true
}
}
type mockAddRateLimitingInterface struct {
errorOccurred bool
addedItems []ctrl.Request
}

View File

@@ -0,0 +1,180 @@
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

@@ -0,0 +1,57 @@
# How the Cluster Decision Resource generator works for clusterDecisionResource
1. The Cluster Decision Resource generator reads a configurable status format:
```yaml
status:
clusters:
- name: cluster-01
- name: cluster-02
```
This is a common status format. Another format that could be read looks like this:
```yaml
status:
decisions:
- clusterName: cluster-01
namespace: cluster-01
- clusterName: cluster-02
namespace: cluster-02
```
2. Any resource that has a list of key / value pairs, where the value matches ArgoCD cluster names can be used.
3. The key / value pairs found in each element of the list will be available to the template. As well, `name` and `server` will still be available to the template.
4. The Service Account used by the ApplicationSet controller must have access to `Get` the resource you want to retrieve the duck type definition from
5. A configMap is used to identify the resource to read status of generated ArgoCD clusters from. You can use multiple resources by creating a ConfigMap for each one in the ArgoCD namespace.
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
apiVersion: group.io/v1
kind: mykinds
statusListKey: clusters
matchKey: name
```
* `apiVersion` - This is the apiVersion of your resource
* `kind` - This is the plural kind of your resource
* `statusListKey` - Default is 'clusters', this is the key found in your resource's status that is a list of ArgoCD clusters.
* `matchKey` - Is the key name found in the cluster list, `name` and `clusterName` are the keys in the examples above.
# Applying the example
1. Connect to a cluster with the ApplicationSet controller running
2. Edit the Role for the ApplicationSet service account, and grant it permission to `list` the `placementdecisions` resources, from apiGroups `cluster.open-cluster-management.io/v1alpha1`
```yaml
- apiGroups:
- "cluster.open-cluster-management.io/v1alpha1"
resources:
- placementdecisions
verbs:
- list
```
3. Apply the following controller and associated ManagedCluster CRD's:
https://github.com/open-cluster-management/placement
4. Now apply the PlacementDecision and an ApplicationSet:
```bash
kubectl apply -f ./placementdecision.yaml
kubectl apply -f ./configMap.yaml
kubectl apply -f ./ducktype-example.yaml
```
5. For now this won't do anything until you create a controller that populates the `Status.Decisions` array.

View File

@@ -0,0 +1,11 @@
# To generate a Status.Decisions from this CRD, requires https://github.com/open-cluster-management/multicloud-operators-placementrule be deployed
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ocm-placement
data:
apiVersion: apps.open-cluster-management.io/v1
kind: placementrules
statusListKey: decisions
matchKey: clusterName

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

@@ -0,0 +1,18 @@
---
apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
name: test-placement
spec:
clusterReplicas: 1 # Availability choice, maximum number of clusters to provision at once
clusterSelector:
matchLabels:
'usage': 'development'
clusterConditions:
- type: ManagedClusterConditionAvailable
status: "True"
# Below is sample output the generator can consume.
status:
decisions:
- clusterName: cluster-01
- clusterName: cluster-02

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

@@ -0,0 +1,33 @@
# The cluster generator produces an items list from all clusters registered to Argo CD.
# It automatically provides the following fields as values to the app template:
# - name
# - server
# - metadata.labels.<key>
# - metadata.annotations.<key>
# - values.<key>
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
- clusters:
selector:
matchLabels:
argocd.argoproj.io/secret-type: cluster
values:
project: default
template:
metadata:
name: '{{name}}-guestbook'
labels:
environment: '{{metadata.labels.environment}}'
spec:
project: '{{values.project}}'
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: HEAD
chart: guestbook
destination:
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

@@ -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

@@ -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

@@ -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

@@ -0,0 +1,3 @@
# Proposal Examples
This directory contains examples that are not yet implemented.
They are part of the project to indicate future progress, and we are welcome any contribution that will add an implementation

View File

@@ -0,0 +1,48 @@
# For all generators, filters can be applied to reduce the generated items to a smaller subset.
# A powerful set of filter expressions are supported using syntax provided by the
# https://github.com/antonmedv/expr library. Examples expressions are demonstrated below
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
spec:
generators:
# Match all clusters who meet ALL of the following conditions:
# 1. name matches the regex `sales-.*`
# 2. environment label is either 'staging' or 'prod'
- clusters:
filters:
- expr: '{{name}} matches "sales-.*"'
- expr: '{{metadata.labels.environment}} in [staging, prod]'
values:
version: '2.0.0'
# Filter items from `config/clusters.json` in the `cluster-deployments` git repo,
# to only those having the `cluster.enabled == true` property. e.g.:
# {
# ...
# "cluster": {
# "enabled": true,
# ...
# }
# }
- git:
repoURL: https://github.com/infra-team/cluster-deployments.git
files:
- path: config/clusters.json
filters:
- expr: '{{cluster.enabled}} == true'
template:
metadata:
name: '{{name}}-guestbook'
spec:
source:
repoURL: https://github.com/infra-team/cluster-deployments.git
targetRevision: "{{values.version}}"
chart: guestbook
helm:
parameters:
- name: foo
value: "{{metadata.annotations.foo}}"
destination:
server: '{{server}}'
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

@@ -0,0 +1,6 @@
#namePrefix: kustomize-
resources:
- https://github.com/argoproj/argo-workflows/releases/download/v3.4.0/namespace-install.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -0,0 +1,14 @@
apiVersion: v2
name: helm-prometheus-operator
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "1.0"

View File

@@ -0,0 +1,4 @@
dependencies:
- name: kube-prometheus-stack
version: 40.5.0
repository: https://prometheus-community.github.io/helm-charts

View File

@@ -0,0 +1,6 @@
#namePrefix: kustomize-
resources:
- https://github.com/argoproj/argo-workflows/releases/download/v3.4.0/namespace-install.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -0,0 +1,23 @@
apiVersion: v2
name: helm-guestbook
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "1.0"

View File

@@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "helm-guestbook.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "helm-guestbook.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "helm-guestbook.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "helm-guestbook.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "helm-guestbook.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "helm-guestbook.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "helm-guestbook.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "helm-guestbook.fullname" . }}
labels:
app: {{ template "helm-guestbook.name" . }}
chart: {{ template "helm-guestbook.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: 3
selector:
matchLabels:
app: {{ template "helm-guestbook.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "helm-guestbook.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "helm-guestbook.fullname" . }}
labels:
app: {{ template "helm-guestbook.name" . }}
chart: {{ template "helm-guestbook.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "helm-guestbook.name" . }}
release: {{ .Release.Name }}

View File

@@ -0,0 +1,45 @@
# Default values for helm-guestbook.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: gcr.io/heptio-images/ks-guestbook-demo
tag: 0.1
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -0,0 +1,14 @@
apiVersion: v2
name: helm-prometheus-operator
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "1.0"

View File

@@ -0,0 +1,4 @@
dependencies:
- name: kube-prometheus-stack
version: 40.5.0
repository: https://prometheus-community.github.io/helm-charts

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

@@ -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

@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui

View File

@@ -0,0 +1,7 @@
namePrefix: kustomize-
resources:
- guestbook-ui-deployment.yaml
- guestbook-ui-svc.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -0,0 +1,9 @@
{
"aws_account": "123456",
"asset_id": "11223344",
"cluster": {
"owner": "cluster-admin@company.com",
"name": "engineering-dev",
"address": "http://1.2.3.4"
}
}

View File

@@ -0,0 +1,9 @@
{
"aws_account": "123456",
"asset_id": "11223344",
"cluster": {
"owner": "cluster-admin@company.com",
"name": "engineering-prod",
"address": "http://1.2.3.4"
}
}

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

@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui

View File

@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui

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

@@ -0,0 +1,6 @@
#namePrefix: kustomize-
resources:
- namespace-install.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -0,0 +1,417 @@
# This is an auto-generated file. DO NOT EDIT
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusterworkflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: ClusterWorkflowTemplate
listKind: ClusterWorkflowTemplateList
plural: clusterworkflowtemplates
shortNames:
- clusterwftmpl
- cwft
singular: clusterworkflowtemplate
scope: Cluster
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cronworkflows.argoproj.io
spec:
group: argoproj.io
names:
kind: CronWorkflow
listKind: CronWorkflowList
plural: cronworkflows
shortNames:
- cwf
- cronwf
singular: cronworkflow
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workfloweventbindings.argoproj.io
spec:
group: argoproj.io
names:
kind: WorkflowEventBinding
listKind: WorkflowEventBindingList
plural: workfloweventbindings
shortNames:
- wfeb
singular: workfloweventbinding
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workflows.argoproj.io
spec:
additionalPrinterColumns:
- JSONPath: .status.phase
description: Status of the workflow
name: Status
type: string
- JSONPath: .status.startedAt
description: When the workflow was started
format: date-time
name: Age
type: date
group: argoproj.io
names:
kind: Workflow
listKind: WorkflowList
plural: workflows
shortNames:
- wf
singular: workflow
scope: Namespaced
subresources: {}
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: WorkflowTemplate
listKind: WorkflowTemplateList
plural: workflowtemplates
shortNames:
- wftmpl
singular: workflowtemplate
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-server
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-role
rules:
- apiGroups:
- ""
resources:
- pods
- pods/exec
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- create
- apiGroups:
- argoproj.io
resources:
- workflowtemplates
- workflowtemplates/finalizers
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- argoproj.io
resources:
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-server-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- create
- apiGroups:
- ""
resources:
- pods
- pods/exec
- pods/log
verbs:
- get
- list
- watch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- watch
- create
- patch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- argoproj.io
resources:
- workflows
- workfloweventbindings
- workflowtemplates
- cronworkflows
- cronworkflows/finalizers
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-role
subjects:
- kind: ServiceAccount
name: argo
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-server-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-server-role
subjects:
- kind: ServiceAccount
name: argo-server
---
apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-controller-configmap
---
apiVersion: v1
kind: Service
metadata:
name: argo-server
spec:
ports:
- name: web
port: 2746
targetPort: 2746
selector:
app: argo-server
---
apiVersion: v1
kind: Service
metadata:
name: workflow-controller-metrics
spec:
ports:
- name: metrics
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: workflow-controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-server
spec:
selector:
matchLabels:
app: argo-server
template:
metadata:
labels:
app: argo-server
spec:
containers:
- args:
- server
- --namespaced
image: argoproj/argocli:v2.12.5
name: argo-server
ports:
- containerPort: 2746
name: web
readinessProbe:
httpGet:
path: /
port: 2746
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 20
volumeMounts:
- mountPath: /tmp
name: tmp
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo-server
volumes:
- emptyDir: {}
name: tmp
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
spec:
selector:
matchLabels:
app: workflow-controller
template:
metadata:
labels:
app: workflow-controller
spec:
containers:
- args:
- --configmap
- workflow-controller-configmap
- --executor-image
- argoproj/argoexec:v2.12.5
- --namespaced
command:
- workflow-controller
image: argoproj/workflow-controller:v2.12.5
livenessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 30
periodSeconds: 30
name: workflow-controller
ports:
- containerPort: 9090
name: metrics
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo

View File

@@ -0,0 +1,14 @@
apiVersion: v2
name: helm-prometheus-operator
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "1.0"

View File

@@ -0,0 +1,4 @@
dependencies:
- name: kube-prometheus-stack
version: 9.4.10
repository: https://prometheus-community.github.io/helm-charts

View File

@@ -0,0 +1 @@
# Blank values.yaml

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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui

View File

@@ -0,0 +1,7 @@
namePrefix: kustomize-
resources:
- guestbook-ui-deployment.yaml
- guestbook-ui-svc.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui

View File

@@ -0,0 +1,7 @@
namePrefix: kustomize-
resources:
- guestbook-ui-deployment.yaml
- guestbook-ui-svc.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

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

@@ -0,0 +1,186 @@
package generators
import (
"context"
"fmt"
"regexp"
"strings"
"time"
log "github.com/sirupsen/logrus"
"github.com/argoproj/argo-cd/v2/util/settings"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"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"
)
const (
ArgoCDSecretTypeLabel = "argocd.argoproj.io/secret-type"
ArgoCDSecretTypeCluster = "cluster"
)
var _ Generator = (*ClusterGenerator)(nil)
// ClusterGenerator generates Applications for some or all clusters registered with ArgoCD.
type ClusterGenerator struct {
client.Client
ctx context.Context
clientset kubernetes.Interface
// namespace is the Argo CD namespace
namespace string
settingsManager *settings.SettingsManager
}
func NewClusterGenerator(c client.Client, ctx context.Context, clientset kubernetes.Interface, namespace string) Generator {
settingsManager := settings.NewSettingsManager(ctx, clientset, namespace)
g := &ClusterGenerator{
Client: c,
ctx: ctx,
clientset: clientset,
namespace: namespace,
settingsManager: settingsManager,
}
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
}
func (g *ClusterGenerator) GetTemplate(appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator) *argoappsetv1alpha1.ApplicationSetTemplate {
return &appSetGenerator.Clusters.Template
}
func (g *ClusterGenerator) GenerateParams(
appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator, _ *argoappsetv1alpha1.ApplicationSet) ([]map[string]string, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
if appSetGenerator.Clusters == nil {
return nil, EmptyAppSetGeneratorError
}
// Do not include the local cluster in the cluster parameters IF there is a non-empty selector
// - Since local clusters do not have secrets, they do not have labels to match against
ignoreLocalClusters := len(appSetGenerator.Clusters.Selector.MatchExpressions) > 0 || len(appSetGenerator.Clusters.Selector.MatchLabels) > 0
// ListCluster from Argo CD's util/db package will include the local cluster in the list of clusters
clustersFromArgoCD, err := utils.ListClusters(g.ctx, g.clientset, g.namespace)
if err != nil {
return nil, err
}
if clustersFromArgoCD == nil {
return nil, nil
}
clusterSecrets, err := g.getSecretsByClusterName(appSetGenerator)
if err != nil {
return nil, err
}
res := []map[string]string{}
secretsFound := []corev1.Secret{}
for _, cluster := range clustersFromArgoCD.Items {
// If there is a secret for this cluster, then it's a non-local cluster, so it will be
// handled by the next step.
if secretForCluster, exists := clusterSecrets[cluster.Name]; exists {
secretsFound = append(secretsFound, secretForCluster)
} 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["name"] = cluster.Name
params["server"] = cluster.Server
for key, value := range appSetGenerator.Clusters.Values {
params[fmt.Sprintf("values.%s", key)] = value
}
log.WithField("cluster", "local cluster").Info("matched local cluster")
res = append(res, params)
}
}
// For each matching cluster secret (non-local clusters only)
for _, cluster := range secretsFound {
params := map[string]string{}
params["name"] = string(cluster.Data["name"])
params["nameNormalized"] = 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
}
for key, value := range cluster.ObjectMeta.Labels {
params[fmt.Sprintf("metadata.labels.%s", key)] = value
}
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)
}
return res, nil
}
func (g *ClusterGenerator) getSecretsByClusterName(appSetGenerator *argoappsetv1alpha1.ApplicationSetGenerator) (map[string]corev1.Secret, error) {
// List all Clusters:
clusterSecretList := &corev1.SecretList{}
selector := metav1.AddLabelToSelector(&appSetGenerator.Clusters.Selector, ArgoCDSecretTypeLabel, ArgoCDSecretTypeCluster)
secretSelector, err := metav1.LabelSelectorAsSelector(selector)
if err != nil {
return nil, err
}
if err := g.Client.List(context.Background(), clusterSecretList, client.MatchingLabelsSelector{Selector: secretSelector}); err != nil {
return nil, err
}
log.Debug("clusters matching labels", "count", len(clusterSecretList.Items))
res := map[string]corev1.Secret{}
for _, cluster := range clusterSecretList.Items {
clusterName := string(cluster.Data["name"])
res[clusterName] = cluster
}
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

@@ -0,0 +1,254 @@
package generators
import (
"context"
"fmt"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"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/stretchr/testify/assert"
)
type possiblyErroringFakeCtrlRuntimeClient struct {
client.Client
shouldError bool
}
func (p *possiblyErroringFakeCtrlRuntimeClient) List(ctx context.Context, secretList client.ObjectList, opts ...client.ListOption) error {
if p.shouldError {
return fmt.Errorf("could not list Secrets")
}
return p.Client.List(ctx, secretList, opts...)
}
func TestGenerateParams(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]string
// clientError is true if a k8s client error should be simulated
clientError bool
expectedError error
}{
{
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",
"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",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "staging"},
{"name": "in-cluster", "server": "https://kubernetes.default.svc"},
},
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]string{
{"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",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.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]string{
{"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"},
},
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]string{
{"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",
"metadata.labels.argocd.argoproj.io/secret-type": "cluster", "metadata.annotations.foo.argoproj.io": "production"},
},
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]string{
{"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"},
},
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")
got, err := clusterGenerator.GenerateParams(&argoappsetv1alpha1.ApplicationSetGenerator{
Clusters: &argoappsetv1alpha1.ClusterGenerator{
Selector: testCase.selector,
Values: testCase.values,
},
}, nil)
if testCase.expectedError != nil {
assert.EqualError(t, err, testCase.expectedError.Error())
} else {
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
})
}
}
func TestSanitizeClusterName(t *testing.T) {
t.Run("valid DNS-1123 subdomain name", func(t *testing.T) {
assert.Equal(t, "cluster-name", sanitizeName("cluster-name"))
})
t.Run("invalid DNS-1123 subdomain name", func(t *testing.T) {
invalidName := "-.--CLUSTER/name -./.-"
assert.Equal(t, "cluster-name", sanitizeName(invalidName))
})
}

View File

@@ -0,0 +1,229 @@
package generators
import (
"context"
"fmt"
"strings"
"time"
log "github.com/sirupsen/logrus"
"github.com/argoproj/argo-cd/v2/util/settings"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
var _ Generator = (*DuckTypeGenerator)(nil)
// DuckTypeGenerator generates Applications for some or all clusters registered with ArgoCD.
type DuckTypeGenerator struct {
ctx context.Context
dynClient dynamic.Interface
clientset kubernetes.Interface
namespace string // namespace is the Argo CD namespace
settingsManager *settings.SettingsManager
}
func NewDuckTypeGenerator(ctx context.Context, dynClient dynamic.Interface, clientset kubernetes.Interface, namespace string) Generator {
settingsManager := settings.NewSettingsManager(ctx, clientset, namespace)
g := &DuckTypeGenerator{
ctx: ctx,
dynClient: dynClient,
clientset: clientset,
namespace: namespace,
settingsManager: settingsManager,
}
return g
}
func (g *DuckTypeGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration {
// Return a requeue default of 3 minutes, if no override is specified.
if appSetGenerator.ClusterDecisionResource.RequeueAfterSeconds != nil {
return time.Duration(*appSetGenerator.ClusterDecisionResource.RequeueAfterSeconds) * time.Second
}
return DefaultRequeueAfterSeconds
}
func (g *DuckTypeGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate {
return &appSetGenerator.ClusterDecisionResource.Template
}
func (g *DuckTypeGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
// Not likely to happen
if appSetGenerator.ClusterDecisionResource == nil {
return nil, EmptyAppSetGeneratorError
}
// ListCluster from Argo CD's util/db package will include the local cluster in the list of clusters
clustersFromArgoCD, err := utils.ListClusters(g.ctx, g.clientset, g.namespace)
if err != nil {
return nil, err
}
if clustersFromArgoCD == nil {
return nil, nil
}
// Read the configMapRef
cm, err := g.clientset.CoreV1().ConfigMaps(g.namespace).Get(g.ctx, appSetGenerator.ClusterDecisionResource.ConfigMapRef, metav1.GetOptions{})
if err != nil {
return nil, err
}
// Extract GVK data for the dynamic client to use
versionIdx := strings.Index(cm.Data["apiVersion"], "/")
kind := cm.Data["kind"]
resourceName := appSetGenerator.ClusterDecisionResource.Name
labelSelector := appSetGenerator.ClusterDecisionResource.LabelSelector
log.WithField("kind.apiVersion", kind+"."+cm.Data["apiVersion"]).Info("Kind.Group/Version Reference")
// Validate the fields
if kind == "" || versionIdx < 1 {
log.Warningf("kind=%v, resourceName=%v, versionIdx=%v", kind, resourceName, versionIdx)
return nil, fmt.Errorf("There is a problem with the apiVersion, kind or resourceName provided")
}
if (resourceName == "" && labelSelector.MatchLabels == nil && labelSelector.MatchExpressions == nil) ||
(resourceName != "" && (labelSelector.MatchExpressions != nil || labelSelector.MatchLabels != nil)) {
log.Warningf("You must choose either resourceName=%v, labelSelector.matchLabels=%v or labelSelect.matchExpressions=%v", resourceName, labelSelector.MatchLabels, labelSelector.MatchExpressions)
return nil, fmt.Errorf("There is a problem with the definition of the ClusterDecisionResource generator")
}
// Split up the apiVersion
group := cm.Data["apiVersion"][0:versionIdx]
version := cm.Data["apiVersion"][versionIdx+1:]
log.WithField("kind.group.version", kind+"."+group+"/"+version).Debug("decoded Ref")
duckGVR := schema.GroupVersionResource{Group: group, Version: version, Resource: kind}
listOptions := metav1.ListOptions{}
if resourceName == "" {
listOptions.LabelSelector = metav1.FormatLabelSelector(&labelSelector)
log.WithField("listOptions.LabelSelector", listOptions.LabelSelector).Info("selection type")
} else {
listOptions.FieldSelector = fields.OneTermEqualSelector("metadata.name", resourceName).String()
//metav1.Convert_fields_Selector_To_string(fields.).Sprintf("metadata.name=%s", resourceName)
log.WithField("listOptions.FieldSelector", listOptions.FieldSelector).Info("selection type")
}
duckResources, err := g.dynClient.Resource(duckGVR).Namespace(g.namespace).List(g.ctx, listOptions)
if err != nil {
log.WithField("GVK", duckGVR).Warning("resources were not found")
return nil, err
}
if len(duckResources.Items) == 0 {
log.Warning("no resource found, make sure you clusterDecisionResource is defined correctly")
return nil, fmt.Errorf("no clusterDecisionResources found")
}
// Override the duck type in the status of the resource
statusListKey := "clusters"
matchKey := cm.Data["matchKey"]
if cm.Data["statusListKey"] != "" {
statusListKey = cm.Data["statusListKey"]
}
if matchKey == "" {
log.WithField("matchKey", matchKey).Warning("matchKey not found in " + cm.Name)
return nil, nil
}
res := []map[string]string{}
clusterDecisions := []interface{}{}
// Build the decision slice
for _, duckResource := range duckResources.Items {
log.WithField("duckResourceName", duckResource.GetName()).Debug("found resource")
if duckResource.Object["status"] == nil || len(duckResource.Object["status"].(map[string]interface{})) == 0 {
log.Warningf("clusterDecisionResource: %s, has no status", duckResource.GetName())
continue
}
log.WithField("duckResourceStatus", duckResource.Object["status"]).Debug("found resource")
clusterDecisions = append(clusterDecisions, duckResource.Object["status"].(map[string]interface{})[statusListKey].([]interface{})...)
}
log.Infof("Number of decisions found: %v", len(clusterDecisions))
// Read this outside the loop to improve performance
argoClusters := clustersFromArgoCD.Items
if len(clusterDecisions) > 0 {
for _, cluster := range clusterDecisions {
// generated instance of cluster params
params := map[string]string{}
log.Infof("cluster: %v", cluster)
matchValue := cluster.(map[string]interface{})[matchKey]
if matchValue == nil || matchValue.(string) == "" {
log.Warningf("matchKey=%v not found in \"%v\" list: %v\n", matchKey, statusListKey, cluster.(map[string]interface{}))
continue
}
strMatchValue := matchValue.(string)
log.WithField(matchKey, strMatchValue).Debug("validate against ArgoCD")
found := false
for _, argoCluster := range argoClusters {
if argoCluster.Name == strMatchValue {
log.WithField(matchKey, argoCluster.Name).Info("matched cluster in ArgoCD")
params["name"] = argoCluster.Name
params["server"] = argoCluster.Server
found = true
break // Stop looking
}
}
if !found {
log.WithField(matchKey, strMatchValue).Warning("unmatched cluster in ArgoCD")
continue
}
for key, value := range cluster.(map[string]interface{}) {
params[key] = value.(string)
}
for key, value := range appSetGenerator.ClusterDecisionResource.Values {
params[fmt.Sprintf("values.%s", key)] = value
}
res = append(res, params)
}
} else {
log.Warningf("clusterDecisionResource status." + statusListKey + " missing")
return nil, nil
}
return res, nil
}

View File

@@ -0,0 +1,315 @@
package generators
import (
"context"
"fmt"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/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"
"sigs.k8s.io/controller-runtime/pkg/client"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
"testing"
)
const resourceApiVersion = "mallard.io/v1"
const resourceKind = "ducks"
const resourceName = "quak"
func TestGenerateParamsForDuckType(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]string
expectedError error
}{
{
name: "no duck resource",
resourceName: "",
resource: duckType,
values: nil,
expected: []map[string]string{},
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]string{
{"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]string{
{"clusterName": "production-01", "values.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]string{
{"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]string{
{"clusterName": "production-01", "values.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]string{
{"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")
got, err := duckTypeGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
ClusterDecisionResource: &argoprojiov1alpha1.DuckTypeGenerator{
ConfigMapRef: "my-configmap",
Name: testCase.resourceName,
LabelSelector: testCase.labelSelector,
Values: testCase.values,
},
}, nil)
if testCase.expectedError != nil {
assert.EqualError(t, err, testCase.expectedError.Error())
} else {
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
})
}
}

View File

@@ -0,0 +1,83 @@
package generators
import (
"reflect"
"github.com/imdario/mergo"
log "github.com/sirupsen/logrus"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
type TransformResult struct {
Params []map[string]string
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) {
res := []TransformResult{}
var firstError error
generators := GetRelevantGenerators(&requestedGenerator, allGenerators)
for _, g := range generators {
// we call mergeGeneratorTemplate first because GenerateParams might be more costly so we want to fail fast if there is an error
mergedTemplate, err := mergeGeneratorTemplate(g, &requestedGenerator, baseTemplate)
if err != nil {
log.WithError(err).WithField("generator", g).
Error("error generating params")
if firstError == nil {
firstError = err
}
continue
}
params, err := g.GenerateParams(&requestedGenerator, appSet)
if err != nil {
log.WithError(err).WithField("generator", g).
Error("error generating params")
if firstError == nil {
firstError = err
}
continue
}
res = append(res, TransformResult{
Params: params,
Template: mergedTemplate,
})
}
return res, firstError
}
func GetRelevantGenerators(requestedGenerator *argoprojiov1alpha1.ApplicationSetGenerator, generators map[string]Generator) []Generator {
var res []Generator
v := reflect.Indirect(reflect.ValueOf(requestedGenerator))
for i := 0; i < v.NumField(); i++ {
field := v.Field(i)
if !field.CanInterface() {
continue
}
if !reflect.ValueOf(field.Interface()).IsNil() {
res = append(res, generators[v.Type().Field(i).Name])
}
}
return res
}
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()
err := mergo.Merge(dest, applicationSetTemplate)
return *dest, err
}

View File

@@ -0,0 +1,227 @@
package generators
import (
"context"
"fmt"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/jeremywohl/flatten"
log "github.com/sirupsen/logrus"
"sigs.k8s.io/yaml"
"github.com/argoproj/argo-cd/v2/applicationset/services"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
var _ Generator = (*GitGenerator)(nil)
type GitGenerator struct {
repos services.Repos
}
func NewGitGenerator(repos services.Repos) Generator {
g := &GitGenerator{
repos: repos,
}
return g
}
func (g *GitGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate {
return &appSetGenerator.Git.Template
}
func (g *GitGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration {
// Return a requeue default of 3 minutes, if no default is specified.
if appSetGenerator.Git.RequeueAfterSeconds != nil {
return time.Duration(*appSetGenerator.Git.RequeueAfterSeconds) * time.Second
}
return DefaultRequeueAfterSeconds
}
func (g *GitGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
if appSetGenerator.Git == nil {
return nil, EmptyAppSetGeneratorError
}
var err error
var res []map[string]string
if appSetGenerator.Git.Directories != nil {
res, err = g.generateParamsForGitDirectories(appSetGenerator)
} else if appSetGenerator.Git.Files != nil {
res, err = g.generateParamsForGitFiles(appSetGenerator)
} else {
return nil, EmptyAppSetGeneratorError
}
if err != nil {
return nil, err
}
return res, nil
}
func (g *GitGenerator) generateParamsForGitDirectories(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) ([]map[string]string, error) {
// Directories, not files
allPaths, err := g.repos.GetDirectories(context.TODO(), appSetGenerator.Git.RepoURL, appSetGenerator.Git.Revision)
if err != nil {
return nil, err
}
log.WithFields(log.Fields{
"allPaths": allPaths,
"total": len(allPaths),
"repoURL": appSetGenerator.Git.RepoURL,
"revision": appSetGenerator.Git.Revision,
}).Info("applications result from the repo service")
requestedApps := g.filterApps(appSetGenerator.Git.Directories, allPaths)
res := g.generateParamsFromApps(requestedApps, appSetGenerator)
return res, nil
}
func (g *GitGenerator) generateParamsForGitFiles(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) ([]map[string]string, error) {
// Get all files that match the requested path string, removing duplicates
allFiles := make(map[string][]byte)
for _, requestedPath := range appSetGenerator.Git.Files {
files, err := g.repos.GetFiles(context.TODO(), appSetGenerator.Git.RepoURL, appSetGenerator.Git.Revision, requestedPath.Path)
if err != nil {
return nil, err
}
for filePath, content := range files {
allFiles[filePath] = content
}
}
// Extract the unduplicated map into a list, and sort by path to ensure a deterministic
// processing order in the subsequent step
allPaths := []string{}
for path := range allFiles {
allPaths = append(allPaths, path)
}
sort.Strings(allPaths)
// Generate params from each path, and return
res := []map[string]string{}
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])
if err != nil {
return nil, fmt.Errorf("unable to process file '%s': %v", path, err)
}
for index := range paramsArray {
res = append(res, paramsArray[index])
}
}
return res, nil
}
func (g *GitGenerator) generateParamsFromGitFile(filePath string, fileContent []byte) ([]map[string]string, error) {
objectsFound := []map[string]interface{}{}
// First, we attempt to parse as an array
err := yaml.Unmarshal(fileContent, &objectsFound)
if err != nil {
// If unable to parse as an array, attempt to parse as a single object
singleObj := make(map[string]interface{})
err = yaml.Unmarshal(fileContent, &singleObj)
if err != nil {
return nil, fmt.Errorf("unable to parse file: %v", err)
}
objectsFound = append(objectsFound, singleObj)
}
res := []map[string]string{}
// 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
}
}
res = append(res, params)
}
return res, nil
}
func (g *GitGenerator) filterApps(Directories []argoprojiov1alpha1.GitDirectoryGeneratorItem, allPaths []string) []string {
res := []string{}
for _, appPath := range allPaths {
appInclude := false
appExclude := false
// Iterating over each appPath and check whether directories object has requestedPath that matches the appPath
for _, requestedPath := range Directories {
match, err := path.Match(requestedPath.Path, appPath)
if err != nil {
log.WithError(err).WithField("requestedPath", requestedPath).
WithField("appPath", appPath).Error("error while matching appPath to requestedPath")
continue
}
if match && !requestedPath.Exclude {
appInclude = true
}
if match && requestedPath.Exclude {
appExclude = true
}
}
// Whenever there is a path with exclude: true it wont be included, even if it is included in a different path pattern
if appInclude && !appExclude {
res = append(res, appPath)
}
}
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))
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
}
}
res[i] = params
}
return res
}

View File

@@ -0,0 +1,498 @@
package generators
import (
"context"
"fmt"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
// type clientSet struct {
// RepoServerServiceClient apiclient.RepoServerServiceClient
// }
// func (c *clientSet) NewRepoServerClient() (io.Closer, apiclient.RepoServerServiceClient, error) {
// return io.NewCloser(func() error { return nil }), c.RepoServerServiceClient, nil
// }
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)
}
func Test_generateParamsFromGitFile(t *testing.T) {
params, err := (*GitGenerator)(nil).generateParamsFromGitFile("path/dir/file_name.yaml", []byte(`
foo:
bar: baz
`))
if err != nil {
t.Fatal(err)
}
assert.Equal(t, []map[string]string{
{
"foo.bar": "baz",
"path": "path/dir",
"path.basename": "dir",
"path.filename": "file_name.yaml",
"path.basenameNormalized": "dir",
"path.filenameNormalized": "file-name.yaml",
"path[0]": "path",
"path[1]": "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: "happy flow - created apps",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{
"app1",
"app2",
"app_3",
"p1/app4",
},
repoError: nil,
expected: []map[string]string{
{"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 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]string{
{"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"},
},
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]string{
{"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"},
},
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]string{
{"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"},
},
expectedError: nil,
},
{
name: "handles empty response from repo server",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{},
repoError: nil,
expected: []map[string]string{},
expectedError: nil,
},
{
name: "handles error from repo server",
directories: []argoprojiov1alpha1.GitDirectoryGeneratorItem{{Path: "*"}},
repoApps: []string{},
repoError: fmt.Errorf("error"),
expected: []map[string]string{},
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{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{{
Git: &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Directories: testCaseCopy.directories,
},
}},
},
}
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], nil)
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 TestGitGenerateParamsFromFiles(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]string
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]string{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
"cluster.address": "https://kubernetes.default.svc",
"key1": "val1",
"key2.key2_1": "val2_1",
"key2.key2_2.key2_2_1": "val2_2_1",
"key3": "123",
"path": "cluster-config/production",
"path.basename": "production",
"path[0]": "cluster-config",
"path[1]": "production",
"path.basenameNormalized": "production",
"path.filename": "config.json",
"path.filenameNormalized": "config.json",
},
{
"cluster.owner": "foo.bar@example.com",
"cluster.name": "staging",
"cluster.address": "https://kubernetes.default.svc",
"path": "cluster-config/staging",
"path.basename": "staging",
"path[0]": "cluster-config",
"path[1]": "staging",
"path.basenameNormalized": "staging",
"path.filename": "config.json",
"path.filenameNormalized": "config.json",
},
},
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]string{},
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]string{},
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]string{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
"cluster.address": "https://kubernetes.default.svc",
"cluster.inner.one": "two",
"path": "cluster-config/production",
"path.basename": "production",
"path[0]": "cluster-config",
"path[1]": "production",
"path.basenameNormalized": "production",
"path.filename": "config.json",
"path.filenameNormalized": "config.json",
},
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "staging",
"cluster.address": "https://kubernetes.default.svc",
"path": "cluster-config/production",
"path.basename": "production",
"path[0]": "cluster-config",
"path[1]": "production",
"path.basenameNormalized": "production",
"path.filename": "config.json",
"path.filenameNormalized": "config.json",
},
},
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]string{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
"cluster.address": "https://kubernetes.default.svc",
"key1": "val1",
"key2.key2_1": "val2_1",
"key2.key2_2.key2_2_1": "val2_2_1",
"path": "cluster-config/production",
"path.basename": "production",
"path[0]": "cluster-config",
"path[1]": "production",
"path.basenameNormalized": "production",
"path.filename": "config.yaml",
"path.filenameNormalized": "config.yaml",
},
{
"cluster.owner": "foo.bar@example.com",
"cluster.name": "staging",
"cluster.address": "https://kubernetes.default.svc",
"path": "cluster-config/staging",
"path.basename": "staging",
"path[0]": "cluster-config",
"path[1]": "staging",
"path.basenameNormalized": "staging",
"path.filename": "config.yaml",
"path.filenameNormalized": "config.yaml",
},
},
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]string{
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "production",
"cluster.address": "https://kubernetes.default.svc",
"cluster.inner.one": "two",
"path": "cluster-config/production",
"path.basename": "production",
"path[0]": "cluster-config",
"path[1]": "production",
"path.basenameNormalized": "production",
"path.filename": "config.yaml",
"path.filenameNormalized": "config.yaml",
},
{
"cluster.owner": "john.doe@example.com",
"cluster.name": "staging",
"cluster.address": "https://kubernetes.default.svc",
"path": "cluster-config/production",
"path.basename": "production",
"path[0]": "cluster-config",
"path[1]": "production",
"path.basenameNormalized": "production",
"path.filename": "config.yaml",
"path.filenameNormalized": "config.yaml",
},
},
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{
Generators: []argoprojiov1alpha1.ApplicationSetGenerator{{
Git: &argoprojiov1alpha1.GitGenerator{
RepoURL: "RepoURL",
Revision: "Revision",
Files: testCaseCopy.files,
},
}},
},
}
got, err := gitGenerator.GenerateParams(&applicationSetInfo.Spec.Generators[0], nil)
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)
})
}
}

View File

@@ -0,0 +1,32 @@
package generators
import (
"fmt"
"time"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
// Generator defines the interface implemented by all ApplicationSet generators.
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)
// GetRequeueAfter is the 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
// GetTemplate returns the inline template from the spec if there is any, or an empty object otherwise
GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate
}
var EmptyAppSetGeneratorError = fmt.Errorf("ApplicationSet is empty")
var NoRequeueAfter time.Duration
// DefaultRequeueAfterSeconds is used when GetRequeueAfter is not specified, it is the default time to wait before the next reconcile loop
const (
DefaultRequeueAfterSeconds = 3 * time.Minute
)

View File

@@ -0,0 +1,74 @@
package generators
import (
"encoding/json"
"fmt"
"time"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
var _ Generator = (*ListGenerator)(nil)
type ListGenerator struct {
}
func NewListGenerator() Generator {
g := &ListGenerator{}
return g
}
func (g *ListGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration {
return NoRequeueAfter
}
func (g *ListGenerator) GetTemplate(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) *argoprojiov1alpha1.ApplicationSetTemplate {
return &appSetGenerator.List.Template
}
func (g *ListGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, _ *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
if appSetGenerator == nil {
return nil, EmptyAppSetGeneratorError
}
if appSetGenerator.List == nil {
return nil, EmptyAppSetGeneratorError
}
res := make([]map[string]string, len(appSetGenerator.List.Elements))
for i, tmpItem := range appSetGenerator.List.Elements {
params := map[string]string{}
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 !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[key] = v
}
}
res[i] = params
}
return res, nil
}

View File

@@ -0,0 +1,39 @@
package generators
import (
"testing"
"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"
)
func TestGenerateListParams(t *testing.T) {
testCases := []struct {
elements []apiextensionsv1.JSON
expected []map[string]string
}{
{
elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "cluster","url": "url"}`)}},
expected: []map[string]string{{"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"}},
},
}
for _, testCase := range testCases {
var listGenerator = NewListGenerator()
got, err := listGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
List: &argoprojiov1alpha1.ListGenerator{
Elements: testCase.elements,
}}, nil)
assert.NoError(t, err)
assert.ElementsMatch(t, testCase.expected, got)
}
}

View File

@@ -0,0 +1,158 @@
package generators
import (
"fmt"
"time"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/applicationset/v1alpha1"
)
var _ Generator = (*MatrixGenerator)(nil)
var (
ErrMoreThanTwoGenerators = fmt.Errorf("found more than two generators, Matrix support only two")
ErrLessThanTwoGenerators = fmt.Errorf("found less than two generators, Matrix support only two")
ErrMoreThenOneInnerGenerators = fmt.Errorf("found more than one generator in matrix.Generators")
)
type MatrixGenerator struct {
// The inner generators supported by the matrix generator (cluster, git, list...)
supportedGenerators map[string]Generator
}
func NewMatrixGenerator(supportedGenerators map[string]Generator) Generator {
m := &MatrixGenerator{
supportedGenerators: supportedGenerators,
}
return m
}
func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator, appSet *argoprojiov1alpha1.ApplicationSet) ([]map[string]string, error) {
if appSetGenerator.Matrix == nil {
return nil, EmptyAppSetGeneratorError
}
if len(appSetGenerator.Matrix.Generators) < 2 {
return nil, ErrLessThanTwoGenerators
}
if len(appSetGenerator.Matrix.Generators) > 2 {
return nil, ErrMoreThanTwoGenerators
}
res := []map[string]string{}
g0, err := m.getParams(appSetGenerator.Matrix.Generators[0], appSet)
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 {
for _, b := range g1 {
val, err := utils.CombineStringMaps(a, b)
if err != nil {
return nil, err
}
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
}
mergeGen, err := getMergeGenerator(appSetBaseGenerator)
if err != nil {
return nil, err
}
t, err := Transform(
argoprojiov1alpha1.ApplicationSetGenerator{
List: appSetBaseGenerator.List,
Clusters: appSetBaseGenerator.Clusters,
Git: appSetBaseGenerator.Git,
SCMProvider: appSetBaseGenerator.SCMProvider,
ClusterDecisionResource: appSetBaseGenerator.ClusterDecisionResource,
PullRequest: appSetBaseGenerator.PullRequest,
Matrix: matrixGen,
Merge: mergeGen,
},
m.supportedGenerators,
argoprojiov1alpha1.ApplicationSetTemplate{},
appSet)
if err != nil {
return nil, fmt.Errorf("child generator returned an error on parameter generation: %v", err)
}
if len(t) == 0 {
return nil, fmt.Errorf("child generator generated no parameters")
}
if len(t) > 1 {
return nil, ErrMoreThenOneInnerGenerators
}
return t[0].Params, nil
}
const maxDuration time.Duration = 1<<63 - 1
func (m *MatrixGenerator) GetRequeueAfter(appSetGenerator *argoprojiov1alpha1.ApplicationSetGenerator) time.Duration {
res := maxDuration
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)
for _, g := range generators {
temp := g.GetRequeueAfter(base)
if temp < res && temp != NoRequeueAfter {
found = true
res = temp
}
}
}
if found {
return res
} else {
return NoRequeueAfter
}
}
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
}

Some files were not shown because too many files have changed in this diff Show More