Compare commits

...

1151 Commits

Author SHA1 Message Date
argo-bot
0ae7351304 Bump version to 2.3.16 2023-02-02 14:59:25 +00:00
argo-bot
198eb03b03 Bump version to 2.3.16 2023-02-02 14:59:12 +00:00
Panagiotis Georgiadis
c683c8e935 fix: Upgrade gopkg.in/yaml.v2 to v2.2.4 (#12248)
Signed-off-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
2023-02-01 16:38:09 -05:00
Jaideep Rao
02281f2cb5 fix: Upgrade goutils to v1.1.1 [release-2.3] (#12219) (#12223)
* 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 16:04:16 -05:00
dependabot[bot]
ba75811fad 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:57:14 -05:00
dependabot[bot]
e3cb1017e5 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:53 -05:00
Adam Jensen
6a93a8fa00 docs: Fix copy that refers to a different CLI flag (#12236)
Signed-off-by: Adam Jensen <adam@acj.sh>
2023-01-31 16:52:19 -05:00
Kostis (Codefresh)
1b73581543 docs: Clarify directory recursion (#12037)
Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>
2023-01-31 16:29:53 -05:00
James Brady
883469373c 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:51 -05:00
Nobuo Takizawa
2382958ee8 chore: Update dex's image tag that is forgotten to be updated (#12234)
Signed-off-by: nobuyo <longzechangsheng@gmail.com>
2023-01-31 16:17:44 -05:00
argo-bot
8c2e7e6566 Bump version to 2.3.15 2023-01-27 23:17:12 +00:00
argo-bot
4fb8ec9f5f Bump version to 2.3.15 2023-01-27 23:16:56 +00:00
Eugen Friedland
a05a450995 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:34 -05:00
Michael Crenshaw
d143571617 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:44:22 -05:00
argo-bot
181008e310 Bump version to 2.3.14 2023-01-25 15:22:27 +00:00
argo-bot
e77eafe294 Bump version to 2.3.14 2023-01-25 15:22:11 +00:00
Dan Garfield
8a7f841466 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>

* fix lint

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:03 -05:00
Justin Marquis
e4bc8b4908 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:05:46 -05:00
argo-bot
eb7b8a4790 Bump version to 2.3.13 2023-01-18 02:38:46 +00:00
argo-bot
75c3285ddf Bump version to 2.3.13 2023-01-18 02:38:34 +00:00
Michael Crenshaw
90ae691700 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:06:16 -05:00
dependabot[bot]
7ac47700fb 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:18 -05:00
dependabot[bot]
3bfdaa93b1 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:08:45 -05:00
Michael Crenshaw
39762bc563 Revert "fix: ssa e2e tests failing after updating to kubectl 1.26 (#11753)"
This reverts commit f479187c88.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2023-01-10 16:59:50 -05:00
dependabot[bot]
4ffcac1170 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:32 -05:00
dependabot[bot]
ab5ac8e426 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:15 -05:00
Michael Crenshaw
b0917a8f66 chore: upgrade redis to 6.2.8 to avoid CVE-2022-3996 (#11926)
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:51:29 -05:00
dependabot[bot]
78f9035871 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:21 -05:00
dependabot[bot]
29450f7127 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:36 -05:00
Michael Crenshaw
12387ec4fd 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:41 -05:00
dependabot[bot]
9a5379ca46 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:11 -05:00
Justin Marquis
b7d4baa1fa 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:15:10 -05:00
Justin Marquis
1540323517 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:32:44 -05:00
Gaël Jourdan-Weil
82c29a0122 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:15 -05:00
Matt Clegg
1295acdaa5 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:31 -05:00
Phil Wright- Christie
a8fd7c8245 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:33 -05:00
Leonardo Luz Almeida
f479187c88 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:50:04 -05:00
dependabot[bot]
ea15d38fde 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:50 -05:00
yanyx
9785967bc3 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:25 -05:00
Justin Marquis
40a3e61061 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:48:29 -05:00
argo-bot
cd6bac967c Bump version to 2.3.12 2022-12-16 15:59:04 +00:00
argo-bot
8ef492279b Bump version to 2.3.12 2022-12-16 15:58:50 +00:00
Leonardo Luz Almeida
5ecf969e11 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:41 -05:00
Michael Crenshaw
b73ea919c5 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:09:47 +01:00
Michael Crenshaw
3680a4a518 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:26:33 -05:00
dependabot[bot]
7d36cb32ea 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:26:45 -05:00
Nicholas Morey
08ffc7cab8 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:59:33 -05:00
asingh
07cf3355fe 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:37 -05:00
Michael Vittrup Larsen
210e54f6a3 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:19 -05:00
dependabot[bot]
9ebfe157f1 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:36 -05:00
Michael Crenshaw
1f21e04964 Revert "fix: application stuck in infinite reconciliation loop if using wrong project (#11246)"
This reverts commit 553033592d.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-02 09:25:34 -05:00
cleverhu
ff8cd75469 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-12-02 09:08:21 -05:00
dependabot[bot]
b9003b4f86 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:55:18 -05:00
dependabot[bot]
bab79ee084 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:49 -05:00
Michael Crenshaw
71cd8b6650 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:07:23 -05:00
Michael Crenshaw
75cb10ed5a 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:49 -05:00
dependabot[bot]
82c3bba0c8 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:09 -05:00
dependabot[bot]
4ec90801aa 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:41 -05:00
dependabot[bot]
fa3ac41440 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:03:00 -05:00
dependabot[bot]
27e47a3dc7 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:40 -05:00
Alexander Matyushentsev
553033592d 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:59:13 -05:00
Michael Crenshaw
f3c820269c 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:19 -05:00
Edmund Rhudy
31bfc2ba21 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 10:00:34 -05:00
Alexander Matyushentsev
fdfcb002c4 fix: Undefined cluster in UI when app is referencing cluster by name (#9493)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-11-17 10:00:28 -05:00
Shuai Zhang
73388c8668 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:16:26 -05:00
Justin Marquis
196376833e 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:38 -05:00
argo-bot
3ef61d737c Bump version to 2.3.11 2022-11-01 21:22:53 +00:00
argo-bot
d24aaff5d2 Bump version to 2.3.11 2022-11-01 21:22:41 +00:00
Chromo-residuum-opec
0d7d5255c9 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:15:11 -04:00
Michael Crenshaw
5f118f5c9b 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:25:38 -04:00
Michael Crenshaw
3855e2c853 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:25:16 -04:00
Alex Eftimie
fbf38d1029 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:12 -04:00
Allex
0bc9d1b973 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:41 -04:00
Michael Crenshaw
bd8e16aa1a 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 11:32:43 -04:00
34FathomBelow
65556c22ec 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:58 -04:00
Michael Crenshaw
508fdd6fd5 chore: use one checksum file
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-18 14:59:14 -04:00
Jessie Teng
3b2d31cc58 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:02:08 -04:00
argo-bot
cd3298e3b6 Bump version to 2.3.10 2022-10-17 23:41:52 +00:00
argo-bot
eb8a48a30a Bump version to 2.3.10 2022-10-17 23:41:37 +00:00
34FathomBelow
85403f9acd chore: provide checksums for cli-binaries (#9260)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-17 15:07:42 -04:00
Alex Collins
7542801620 ci: Cancel redundant builds. Fixes #9222 (#9223)
Signed-off-by: Alex Collins <alex_collins@intuit.com>
2022-10-17 13:20:35 -04:00
34FathomBelow
0aeb9ad65b 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:02:26 -04:00
Michael Crenshaw
2f56e10b34 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:33:09 -04:00
Aiman Fatima
21e2844c3c 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:43 -04:00
Chris Davis
814200fe32 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:37 -07:00
Michael Crenshaw
8379b7923d 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:20:12 -04:00
Michael Crenshaw
0856e2589e 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:20 -04:00
Mayursinh Sarvaiya
96c13c1d06 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:50 -04:00
Nir Shtein
4e16049fd0 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:21 -04:00
Sakshi Jain
2465c923e8 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:41 -04:00
Matt Morrison
03e37400a7 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:50:10 -04:00
Minchao
26ec83d50c 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:19 -04:00
Lars Kellogg-Stedman
e7dfe5d704 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:35:10 -04:00
Denis Krivenko
5de0362818 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:43 -04:00
Eddie Knight
cd6a619848 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:45:13 -04:00
jannfis
07773b7664 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:40 -04:00
argo-bot
cedd3a664e Bump version to 2.3.9 2022-10-05 17:02:10 +00:00
argo-bot
f035fb2802 Bump version to 2.3.9 2022-10-05 17:01:55 +00:00
Michael Crenshaw
defdd1a2ba 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:37 -04:00
argo-bot
8b9ff390e8 Bump version to 2.3.8 2022-10-03 20:49:52 +00:00
argo-bot
437b0554ed Bump version to 2.3.8 2022-10-03 20:49:39 +00:00
Michael Crenshaw
c4e7326aad 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:46:12 -04:00
Michael Crenshaw
919582de89 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:55:54 -04:00
JesseBot
5940e56c8b 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:18 -04:00
Michael Crenshaw
4a299a2f2e 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:49:59 -04:00
argo-bot
402da6f64c Bump version to 2.3.7 2022-07-29 14:48:08 +00:00
argo-bot
89c600a6fe Bump version to 2.3.7 2022-07-29 14:47:55 +00:00
jannfis
76cd161e0a test: Remove cluster e2e tests not intended for release-2.3
Signed-off-by: jannfis <jann@mistrust.net>
2022-07-29 07:51:33 +00:00
jannfis
4b8b5918f8 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-28 20:25:30 +00:00
Michael Crenshaw
6d0b9caed5 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:24 -04:00
dependabot[bot]
4bb00bade6 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-27 16:28:30 -04:00
Snyk bot
14424c58b2 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-27 16:22:59 -04:00
Alexander Matyushentsev
c0d2e13b42 chore: upgrade moment to latest version to fix CVE (#9005)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-07-27 16:04:37 -04:00
Michael Crenshaw
6de0d9dced chore: move dependencies to dev dependencies (#8541)
chore: move dependencies to dev dependencies (#8541)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-07-27 15:37:49 -04:00
Michael Crenshaw
5c31b47517 docs: add OpenSSH breaking change notes (#10104)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 15:28:23 -04:00
Michael Crenshaw
92d26b55bd fix: avoid CVE-2022-28948 (#10093)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-27 15:08:17 -04:00
Michael Crenshaw
a25a6dcfe3 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 15:00:13 -04:00
Michael Crenshaw
fe6c0f1a38 chore: upgrade base image to 22.04 (#10103)
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>

chore: update Kex-Algorithms (#9561)

* chore: update Kex-Algorithms

Signed-off-by: douhunt <douhunt@protonmail.com>

* sorted kex-algorithms

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

Co-authored-by: douhunt <douhunt@protonmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

chore upgrade base image for test containers Ubuntu:22.04 (#9563)

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

Co-authored-by: 34FathomBelow <34fathombelow@protonmail.com>
2022-07-26 14:49:06 -04:00
Michael Crenshaw
0851ea54b8 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-26 14:06:27 -04:00
34FathomBelow
3e920bf3b6 chore: update redis to 6.2.7 avoid CVE-2022-30065/CVE-2022-2097 (#10062)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-25 14:24:45 -04:00
Michael Crenshaw
a606b0ab01 chore: upgrade Dex to 2.32.0 (#10036) (#10042)
Signed-off-by: CI <michael@crenshaw.dev>
2022-07-20 10:45:44 -04:00
34FathomBelow
e4074454c6 chore: update haproxy to 2.0.29 for redis-ha (#10045)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-07-19 15:05:54 -04:00
Daniel Helfand
d0e30d961a fix: use serviceaccount name instead of struct (#9614)
* fix: use serviceaccount name instead of struct

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: change name of param from sa to serviceAccount

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-07-13 16:29:39 -04:00
Daniel Helfand
98aadc7dc1 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-07-13 16:29:03 -04:00
Michael Crenshaw
efdec2888e 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:20:20 -04:00
argo-bot
0badce7840 Bump version to 2.3.6 2022-07-12 16:31:10 +00:00
argo-bot
ac6fce35e2 Bump version to 2.3.6 2022-07-12 16:30:56 +00:00
Michael Crenshaw
3172b6b2c7 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
8d5119b1e3 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
Nicolas Fillot
068ca899ce [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:06 -04:00
argo-bot
1287d24bfe Bump version to 2.3.5 2022-06-21 16:28:23 +00:00
argo-bot
68e825cf9b Bump version to 2.3.5 2022-06-21 16:28:06 +00:00
Michael Crenshaw
738384bdd0 chore: fix docs gen
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 10:41:40 -04:00
Michael Crenshaw
7fb77d578d 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
336d61cac6 Merge pull request from GHSA-q4w5-4gq2-98vm
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:39:56 -04:00
Michael Crenshaw
c0b62972ca Merge pull request from GHSA-2m7h-86qq-fp4v
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

fix references

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

use long enough state param for oauth2

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

typo

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

more entropy

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

fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:39:01 -04:00
Michael Crenshaw
048c025cfe Merge pull request from GHSA-h4w9-6x78-8vrj
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-21 09:36:38 -04:00
Michael Crenshaw
7eb34755e5 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:13:22 -04:00
Michael Crenshaw
2f4afe8c08 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-06-13 17:31:42 -04:00
jannfis
92f53aeb72 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>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 17:30:09 -04:00
Alexander Matyushentsev
43f8027f6d chore: remove obsolete repo-server unit test (#9559)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-06-13 17:24:15 -04:00
Michael Crenshaw
909f94a383 chore: update golangci-lint (#8988)
* chore: update golangci-lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 16:55:45 -04:00
Michael Crenshaw
af5348c9b1 chore: lint issues
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 16:54:18 -04:00
Michael Crenshaw
d4faef6324 fix: test race (#9469)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 16:48:17 -04:00
Tommaso Sardelli
af45491a7d chore: upgrade golangci-lint to v1.46.2 (#9448)
* chore: upgrade golangci-lint to v1.46.2

Because:

* Installation of golangci-lint v1.45.2 is currently broken and fails
  silently due to a redacted dependency
  (https://github.com/blizzy78/varnamelen/issues/13)

This commit:

* Upgrades golangci-lint to v1.46.2

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>

* fix: lint

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

* fix: lint

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-06-13 16:44:47 -04:00
Michael Crenshaw
b0e4473fcd 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-13 16:05:11 -04:00
Michael Crenshaw
cf1f44e379 test: fix ErrorContains (#9445)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 09:21:10 -04:00
argo-bot
ac8b7df946 Bump version to 2.3.4 2022-05-18 11:32:27 +00:00
argo-bot
5d515b8423 Bump version to 2.3.4 2022-05-18 11:32:11 +00:00
jannfis
69dcee049e Merge pull request from GHSA-r642-gv9p-2wjj
Signed-off-by: jannfis <jann@mistrust.net>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
2022-05-18 13:16:21 +02:00
Michael Crenshaw
d36d95dc9f 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: add new util file

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

* chore: lint

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
df79d7db1d 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
Daniel Helfand
7165431a84 fix: allow cli/ui to follow logs (#8987) (#9065)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-04-11 11:34:42 -04:00
Michael Crenshaw
13ec3f43d8 chore: upgrade to go 1.17.8 (#8866) (#9004)
* 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-04-05 08:45:56 -07:00
Alexander Matyushentsev
eea93c5103 fix: fix broken monaco editor collapse icons (#8709)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-30 14:19:23 -07:00
pasha-codefresh
2cc81959b4 fix: Fix docs build error (#8895)
* work with specific jinja version

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2022-03-30 11:29:28 -07:00
argo-bot
07ac038a8f Bump version to 2.3.3 2022-03-29 23:56:04 +00:00
argo-bot
3828da7f8c Bump version to 2.3.3 2022-03-29 23:55:46 +00:00
Alexander Matyushentsev
3bd9121545 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 16:49:52 -07:00
Ishita Sequeira
df6e7c169e docs: update v2.4+ roadmap items (#8593)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-03-29 16:49:48 -07:00
Alexander Matyushentsev
25b01666f0 fix: bump gitops engine version to v0.6.2
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-29 15:20:54 -07:00
Michael Crenshaw
9d6e6d84de 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:14:10 -07:00
jannfis
7f9ff6e8c3 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>
2022-03-29 07:34:31 +00:00
argo-bot
ecc2af9dca Bump version to 2.3.2 2022-03-23 00:32:13 +00:00
argo-bot
c5b0279050 Bump version to 2.3.2 2022-03-23 00:31:57 +00:00
Michael Crenshaw
6df17e7c56 chore: fix imports (#8859)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-03-22 12:55:09 -07:00
Michael Crenshaw
e55ecf9107 chore: remove lint-docs CI task (#8722) (#8858)
* 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>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-22 12:54:37 -07:00
Alexander Matyushentsev
21f208f17e 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:31 -07:00
argo-bot
b65c1699fa Bump version to 2.3.1 2022-03-10 22:43:44 +00:00
argo-bot
4c1428a6be Bump version to 2.3.1 2022-03-10 22:43:24 +00:00
Keith Chong
bca190bd0c fix: Retry checkbox unchecked unexpectedly; Sync up with YAML (#8682) (#8720)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-03-10 14:23:30 -08:00
Alexander Matyushentsev
88ca5aabf2 chore: Bump stable version of application set addon (#8744)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-10 13:19:44 -08:00
Alexander Matyushentsev
8297f827a8 fix: correct jsonnet paths resolution (#8721)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-03-08 15:59:03 -08:00
Yuan Tang
b85ef39e0d fix(ui): Applications page incorrectly resets to tiles view. Fixes #8702 (#8718)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-03-08 11:24:02 -08:00
argo-bot
fe42780229 Bump version to 2.3.0 2022-03-06 06:18:59 +00:00
argo-bot
057d95374d Bump version to 2.3.0 2022-03-06 06:18:41 +00:00
Yuan Tang
1546c1d314 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-04 10:41:25 -08:00
jannfis
31564c6067 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 07:35:21 +00:00
Alexander Matyushentsev
6e54e59e82 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-25 15:43:03 -08:00
Alexander Matyushentsev
196dab98dc Unique repo path and permissions (#8517)
Unique repo path and permissions (#8517)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:42:59 -08:00
Michael Crenshaw
9d4ed2847e chore: bump redoc vesion to avoid CVE-2021-23820 (#8604)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-25 15:42:52 -08:00
Yuan Tang
ffc6080060 build: Bump up network timeout during yarn install (#8601)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2022-02-25 15:42:46 -08:00
Alexander Matyushentsev
ca2e3041f1 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-25 15:42:11 -08:00
Michael Crenshaw
31676e2aea 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-25 15:42:05 -08:00
Michael Crenshaw
81f9bc20ec 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-25 15:40:20 -08:00
Jesse Suen
0b868bd221 fix!: enforce app create/update privileges when getting repo details (#8558)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-02-25 15:39:26 -08:00
Yuan Tang
37c1585c2f 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-25 15:39:18 -08:00
pasha-codefresh
e095ef6e4c 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-25 15:39:04 -08:00
pasha-codefresh
8396e06121 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-25 15:38:57 -08:00
Ben Ye
d4a6498d80 feat: expose cluster sync retry duration (#8481)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-02-25 15:38:49 -08:00
Yi Cai
4fc814bc16 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-25 15:38:39 -08:00
Michael Crenshaw
bf67d55f3f chore: upgrade redoc (#8573)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
2022-02-25 15:38:33 -08:00
dependabot[bot]
87402fdc4c 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-25 15:38:19 -08:00
Alexander Matyushentsev
10b4c47aad feat: support custom helm values file schemes (#8535)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:37:45 -08:00
Alexander Matyushentsev
e6a9400c38 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-25 15:36:27 -08:00
Alexander Matyushentsev
ebb21736df fix: build ui as part of 'make release-cli' command (#8536)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:36:21 -08:00
Alexander Matyushentsev
ea7ad844cb fix: refreshing label is hidden by resource tree (#8391)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:36:12 -08:00
jannfis
76c0b32887 fix: Return early on error when updating clusters (#8526)
Signed-off-by: jannfis <jann@mistrust.net>
2022-02-25 15:36:06 -08:00
Christian Roth
827096c195 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-25 15:35:48 -08:00
Yuan Tang
bca450f7aa 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-25 15:35:33 -08:00
Yuan Tang
3c7d99f82c 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-25 15:35:23 -08:00
Daniel Helfand
c5c25cd75b docs: update ApplicationSet controller getting started link (#8482)
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2022-02-25 15:35:09 -08:00
Jesse Suen
f54d0a037f chore: update protoc to 3.17.3 and make install portable (#7932)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-02-25 15:34:44 -08:00
Alexander Matyushentsev
6da138956a 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-25 15:34:24 -08:00
Keith Chong
b3a181ea88 fix: Adjust z-index for newly added tree view toolbar (#8422) (#8423)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2022-02-25 15:33:20 -08:00
Alexander Matyushentsev
2f5da24654 feat: add RespectIgnoreDifferences sync option to UI (#8390)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:32:59 -08:00
Soumya Ghosh Dastidar
cc572a5eb2 fix(cli): argo app diff passes --api-versions to helm template (#8371)
Signed-off-by: Soumya Ghosh Dastidar <soumya@akuity.io>
2022-02-25 15:32:37 -08:00
Alexander Matyushentsev
ae03c3b872 chore: fix broken TestHelmIgnoreMissingValueFiles test (#8368)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:31:31 -08:00
Jonah Back
79ac472382 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-25 15:31:16 -08:00
Chetan Banavikalmutt
061ba811f1 chore: upgrade Helm to v3.8.0 (#8301)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2022-02-25 15:29:49 -08:00
Alexander Matyushentsev
b5909d59ec refactor: update gitops-engine version to v0.6.0
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-25 15:27:15 -08:00
jannfis
68f17dbe8e 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 11:56:22 +00:00
Jesse Suen
bc6b4950ba docs: add security documentation related to git repositories (#8463)
Signed-off-by: Jesse Suen <jesse@akuity.io>
2022-02-11 13:48:10 -08:00
jannfis
c2cf633bbc 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-09 09:05:24 +00:00
Jonathan West
bdd05d5c7a Update Argo CD V2.3 to ApplicationSet v0.4.0 (#8416)
Signed-off-by: Jonathan West <jonwest@redhat.com>
2022-02-07 10:49:14 -08:00
Ishita Sequeira
4b04a39180 fix: fix deployment config health status (#8376)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2022-02-06 11:20:56 -08:00
argo-bot
aa54aa7eda Bump version to 2.3.0-rc5 2022-02-04 23:32:12 +00:00
argo-bot
4bbd0e57dd Bump version to 2.3.0-rc5 2022-02-04 23:32:00 +00:00
fredericfran-gds
2d6b619a86 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 15:08:59 -08:00
Leonardo Luz Almeida
39487ef7c7 chore: Generate spdx for the UI project (#8385)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-04 15:08:54 -08:00
jannfis
fcc7c0b080 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:08:32 -08:00
argo-bot
ed734fedbb Bump version to 2.3.0-rc4 2022-02-03 21:46:08 +00:00
argo-bot
7414f2d42c Bump version to 2.3.0-rc4 2022-02-03 21:45:50 +00:00
jannfis
8139df8983 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
f364330de2 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:45:43 -08:00
pasha-codefresh
4ec67d8b08 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:45:39 -08:00
Leonardo Luz Almeida
3d3f81df4a chore: update actions/setup-go to v2 (#8349)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-03 09:45:34 -08:00
argo-bot
37f01f6f32 Bump version to 2.3.0-rc2 2022-02-02 22:37:02 +00:00
argo-bot
36eab6b82c Bump version to 2.3.0-rc2 2022-02-02 22:36:47 +00:00
Leonardo Luz Almeida
793acc147f chore: Use go install to add spdx-sbom-generator (#8346)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-02 13:51:14 -08:00
Leonardo Luz Almeida
b50609c0e6 chore: generate sbom for the released docker image (#8338)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-02 13:51:10 -08:00
Michael Crenshaw
5f48ce96c6 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-02 13:30:43 -08:00
Alexander Matyushentsev
c32460a2bc chore: automate bundling argocd addons during release process (#8336)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-02 13:28:40 -08:00
Ben Ye
7eb1aba99b fix: register controller workqueue metrics correctly (#8318)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2022-02-01 12:02:55 -08:00
Alexander Matyushentsev
1a8139f4d6 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:27:40 -08:00
Leonardo Luz Almeida
02c03c3b26 chore: generate and upload sbom during release (#8332)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-02-01 10:27:34 -08:00
Alexander Matyushentsev
cdb20d5060 docs: mention argocd notifications and applicationset changes in upgrade instructions (#8312)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-02-01 10:27:27 -08:00
argo-bot
7d7eed4932 Bump version to 2.3.0-rc1 2022-01-30 21:42:54 +00:00
argo-bot
af8c5eb07a Bump version to 2.3.0-rc1 2022-01-30 21:42:41 +00:00
Alexander Matyushentsev
1a476f7564 fix: argocd build fails on windows (#8319)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-01-30 13:02:01 -08:00
Saumeya Katyal
7f15389c72 feat: favourite ui feature (#8210)
* feat: favourite ui feature (#8210)

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2022-01-28 12:55:23 -08:00
Alexander Matyushentsev
1a3556e1cc 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:34 -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
Alexander Matyushentsev
caa246a38d refactor: allow using own config maps to register the cmp plugins instead of 'argocd-cmp-cm' (#7677)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-10 14:57:14 -08:00
pasha-codefresh
ebf27dea3e feat: Improve unit test coverage for util/app/app.go (#7641)
feat: Improve unit test coverage for util/app/app.go (#7641)
Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-11-10 13:41:04 -08:00
Yuan Tang
98fcb417eb build: Pin Python to 3.9.8 to work with arch x64 on GitHub Actions (#7678)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-10 12:44:48 -08:00
Yuan Tang
a3517d594b docs: Update CI troubleshooting guide on build steps (#7639)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-08 09:49:00 -08:00
Yuan Tang
e0c9827a37 chore: Correct function names in docstring in server/project/project.go (#7650)
* docs: Correct function names in docstring in server/project/project.go

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-08 09:48:28 -08:00
May Zhang
375e27bd7a Feat: cmp server (#6585)
* feat: config management plugin enhancement (#6585)

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
Signed-off-by: May Zhang <may_zhang@intuit.com>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-08 09:47:10 -08:00
Yuan Tang
46fdb6f364 fix: Add missing passCredentials in swagger.json (#7640)
* fix: Add missing passCredentials in swagger.json

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

* Retrigger CI pipeline

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-08 08:49:28 -08:00
pasha-codefresh
2e84638827 fix: timezone fix test (#7643)
* 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>

* sync window broken tests

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

* sync window broken tests

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-11-07 19:08:02 +01:00
Yuan Tang
0a64781616 build: Add Helm v3.7.1 checksum for arm64 to fix build on Apple M1 (#7635)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-05 14:39:57 -07:00
Yuan Tang
43a29e6b2d docs: Add -s to sign off empty commits that retriggers CI (#7628)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-05 14:39:42 -07:00
Leonardo Luz Almeida
b77f947e1d fix: TestRepository should assume git by default (#7630)
* fix: TestRepository should assume git by default

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

* fix proto diff

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-11-05 13:51:02 -07:00
Leonardo Luz Almeida
dc24380065 chore: refactoring gpg test data embeding it in go code (#7625)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-11-05 08:45:14 +01:00
Leonardo Luz Almeida
b0278c4493 fix: handle repo creation when secret does not have proper label (#7617)
* fix: handle repo creation when secret does not have proper label

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

* address code review comments with linters

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

* remove gpg test data refactoring code

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-11-04 17:14:53 -07:00
Alexander Matyushentsev
1431e04b90 fix: add missing await on cluster list page (#7621)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-04 17:14:25 -07:00
Alexander Matyushentsev
5bb45435e0 docs: more post v2.3 roadmap items (#7509)
* docs: more post v2.3 roadmap items

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

* replace multiple sources with helm + repo; add app dependencies feature

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-04 09:36:48 -07:00
pasha-codefresh
691b77ff9e feat: split yamls (#7595)
feat: split yamls (#7595)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-11-04 08:33:08 -07:00
Yuan Tang
b52793ab07 docs: Add link to awesome-argo for more resources (#7619)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-11-04 08:25:34 -07:00
Chandler Wilkerson
fc13eda8d6 feat: Add KubeVirt custom health checks (#7176)
Signed-off-by: cwilkers <cwilkers@redhat.com>
2021-11-04 08:23:48 -07:00
Ishita Sequeira
ff45418948 feat: add timezone option to sync window (#7442)
* feat: add timezone option to sync window

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

* Retrigger CI pipeline

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

* Addressed PR comments

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

* feat: add timezone option to sync window

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

* Addressed PR comments

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

* Addressed PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-11-04 08:22:24 +01:00
Leonardo Luz Almeida
0d4e40ed6a fix: Address issue during diff when secret data is nil (#7603)
* fix: update gitops-engine to latest + log improvements

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

* run go mod tidy

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-11-03 12:46:05 -07:00
pasha-codefresh
fe3cc7218c feat: cache argo cd rbac (#7587)
feat: cache argo cd rbac (#7587)

Part of: #4296

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-03 11:28:52 -07:00
Alexander Matyushentsev
513d8a4ae0 fix: fix invalid resource icons (#7610)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-03 08:19:06 +01:00
plakyda-codefresh
6036e9b4c9 feat: remove cluster confirmation (#7602)
feat: remove cluster confirmation (#7602)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-11-02 11:37:59 -07:00
Leonardo Luz Almeida
8a6b759c4a fix: address edge cases with sync windows (#7517)
* fix: address edge cases with sync windows

Signed-off-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>

* trigger build

Signed-off-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>

* trigger build

Signed-off-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2021-11-02 08:48:00 -07:00
Saumeya Katyal
c2b3e74089 feat: autocompletion for resource shortnames (#7466)
* feat: autocompletion for resource shortnames

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-11-02 08:33:51 -07:00
John Keates
8b10b64dfa Update USERS.md (#7589)
Add Wehkamp as a argocd user.
2021-11-01 11:31:57 -07:00
jphelton
e5c34f472e fix: argocd-dex now merges existing dex.config.oauth2 block instead of overwriting (#7583)
* fix: argocd-dex now merges existing dex.config.oauth2 block with autogenerated block

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

* simplified statement based on PR feedback

Signed-off-by: Joshua Helton <jdoghelton@gmail.com>
2021-11-01 11:30:42 -07:00
Ben Ye
49b71522c4 feat: support pprof endpoints (#7533)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2021-11-01 10:49:43 -07:00
Alexander Matyushentsev
7a6b2ffe56 fix: controller fails to connect to cluster using exec auth provider (#7586)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-11-01 10:02:57 +01:00
jannfis
c7792522c5 fix: Improve user experience for update-password CLI command (#7581)
* fix: Improve user experience for update-password CLI command

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

* Regenerate CLI docs

Signed-off-by: jannfis <jann@mistrust.net>
2021-10-30 10:30:58 +02:00
Simon Ninon
f4fd836a1b fix: return a codes.NotFound error when trying to get a non-existent repository (#7548)
* fix: return a codes.NotFound error when trying to get a non-existent repository

Signed-off-by: Simon Ninon <simon.ninon@gmail.com>

* move s.db.RepositoryExists call after the permission check

Signed-off-by: Simon Ninon <simon.ninon@gmail.com>

* update ArgoDB mock and add unit tests

Signed-off-by: Simon Ninon <simon.ninon@gmail.com>
2021-10-30 10:11:19 +02:00
Mathieu Parent
2770c690a5 Update to Helm v3.7.1, allow to pass credentials and new OCI support (#7249)
* chore: Update Helm to v3.7.1

Signed-off-by: Mathieu Parent <math.parent@gmail.com>
2021-10-29 17:48:27 -07:00
Nills Franssens
5b914750a4 docs: remove mention of ksonnet in basics (#7567)
Signed-off-by: Nills Franssens <nills.franssens@gmail.com>
2021-10-29 10:46:05 -07:00
Yuan Tang
43cba9cc0b docs: Remove misleading minus sign after version number (#7559)
* docs: Remove unnecessary version numbers in high_availability.md

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

* Fix

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-10-28 15:49:32 -07:00
Alex Stockinger
0dbffb8557 Clarify key/cert encoding in cluster credentials (#7545)
Fixes #7544

Signed-off-by: Alex Stockinger <mail@alexstockinger.de>
2021-10-28 13:02:19 -07:00
pasha-codefresh
7b0cf773cc feat: Replace option in cli, sync command (#7526)
feat: Replace option in cli, sync command (#7526)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-28 13:01:32 -07:00
Denis Lavrushko
d3bec0faaa docs: Added iits-consulting to the Users.md (#7566)
* added IITS organizations to the USERS.md file

Signed-off-by: Denis Lavrushko <denis.lavrushko@iits-consulting.de>
2021-10-28 12:21:09 -07:00
Saumeya Katyal
7750f579bb docs: toolchain doc minor command update (#7568)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-10-28 12:16:54 -07:00
Jeff Maaks
5aeb113968 Update private-repositories.md -- add Azure Repos (#7040)
Added a link to the documentation for creating an access token on Azure Repos
2021-10-28 12:11:40 -07:00
Engin Diri
4522a88289 feat: Show "Open application" link in Application details list view (#7455)
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
2021-10-28 12:04:29 -07:00
Ben Ye
5f4ecf1ef2 feat: improve cluster info fetch from secret by reducing unnecessary unmarshalling (#7530)
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2021-10-28 11:11:25 -07:00
Masakinpo
7ced59f346 chore: fix typo in docs/operator-manual/high_availability.md (#7551)
* fix typo in docs/operator-manual/high_availability.md

Signed-off-by: Masakinpo <masakinpo.jp@gmail.com>

* chore: fix typo in docs/operator-manual/high_availability.md

Signed-off-by: Masakinpo <masakinpo.jp@gmail.com>
2021-10-27 10:44:43 -07:00
Omer Kahani
a912611b7a Adding Snyk (#7537)
Signed-off-by: Omer Kahani <kahaniomer@gmail.com>
2021-10-25 18:19:21 -07:00
Alexander Matyushentsev
a21b0363e3 fix: Argo CD should provide apiversion and kinds to 'helm template' command (#7519)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-25 16:52:19 -07:00
Viktor Farcic
07b8a1f63c docs: Video about Image Updater (#7547)
Signed-off-by: Viktor Farcic <viktor@farcic.com>
2021-10-25 20:23:57 +02:00
Keith Chong
1804d771c7 feat: Add banner position option #7313 (#7462)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2021-10-23 11:09:17 -07:00
kiran
7fe8e5ff37 Added paytmlabs argocd blog in readme (#7529)
Signed-off-by: kiran <kiran.sundaravarathan@paytm.com>

Co-authored-by: kiran <kiran.sundaravarathan@paytm.com>
2021-10-22 17:26:47 -07:00
pasha-codefresh
b8510f35f1 fix: mkdocs doesnt work with 3.10.0 python (#7518)
fix: mkdocs doesnt work with 3.10.0 python (#7518)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-21 15:46:31 -07:00
pasha-codefresh
aa6aed3c04 feat: max cookie length (#7515)
feat: max cookie length (#7515)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-21 14:37:39 -07:00
Snyk bot
d6d620e98c fix: upgrade @types/react-helmet from 5.0.8 to 5.0.17 (#7473)
Snyk has created this PR to upgrade @types/react-helmet from 5.0.8 to 5.0.17.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/argoproj/project/e257be49-1bf5-455e-a11b-cdab3dbef067?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-21 11:13:23 -07:00
Michael Crenshaw
3e17a69df3 chore: default to no gpg for Procfile - avoids missing temp dir failure (#7506)
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: Michael Crenshaw <michael_crenshaw@intuit.com>
2021-10-21 11:12:47 -07:00
Alexander Matyushentsev
da63fb26d1 fix: don't use revision caching during app creation (#7508)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-20 20:24:14 -07:00
Mohammad Yosefpor
401b266235 fix: supporting OCI dependencies. Fixes #6062 (#6994)
* fix: supporting OCI dependencies

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* chore: add org to USERS.md

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* fix(tests): remove invalid TestRepoPermission e2e test

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-10-20 18:22:37 -07:00
Alexander Matyushentsev
f46ac844b8 chore: add pasha-codefresh to reviewers list (#7503)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-20 13:09:13 -07:00
May Zhang
046840dcf7 fix: docker image for ui-test (#7461)
fix: docker image for ui-test (#7461)

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-10-20 11:34:28 -07:00
Atsushin
d460f844a4 fix: Fix Color Support in Logs (#7476)
Signed-off-by: Atsushi Neki <nekiaiken@gmail.com>
2021-10-20 11:31:24 -07:00
Leonardo Luz Almeida
970bb80b28 feat: add new sync option to fail if finds shared resources (#7444)
* feat: add new sync option to fail if finds shared resources

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

* docs: add docs for FailOnSharedResource sync option

Signed-off-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2021-10-20 08:06:41 -07:00
Alexander Matyushentsev
81e801d8ee fix: Invalid memory address or nil pointer dereference in processRequestedAppOperation (#7501)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-20 08:03:55 -07:00
Alexander Matyushentsev
872eff292b fix: Operation has completed with phase: Running (#7482)
* fix: Operation has completed with phase: Running

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-19 17:16:31 -07:00
Julian Strobl
00874af5f2 fix: client certificate ignored during (re)login (#7423)
fix: client certificate ignored during (re)login (#7423)

Signed-off-by: Julian Strobl <julian.strobl@telekom.de>

Co-authored-by: Julian Strobl <julian.strobl@telekom.de>
2021-10-19 13:12:35 -07:00
Hritik Gupta
ad97ed52d5 doc: fixed content in toolchain guide (#7470)
doc: fixed content in toolchain guide (#7470)

Signed-off-by: hgupta3 <hritik_gupta@intuit.com>
2021-10-19 13:08:41 -07:00
Alexander Matyushentsev
7ea35924c9 fix: Application status panel shows Syncing instead of Deleting (#7486)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-19 10:30:09 -07:00
Byungjin Park (Claud)
c7074fe67a docs: Add KarrotPay to Users (#7467)
Signed-off-by: Byungjin Park <posquit0.bj@gmail.com>
2021-10-19 10:13:27 -07:00
jannfis
9a11790df2 fix: Allow plugins to lock repository at top-level to prevent git races (#6223)
* fix: Allow plugins to lock complete repository

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

* Add some documentation

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

* Adapt documentation

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

* Codegen

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

* Update codegen

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

* Update codegen

Signed-off-by: jannfis <jann@mistrust.net>
2021-10-19 18:51:59 +02:00
Yuan Tang
695699d08e docs: Add Akuity to the list of users (#7480)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-10-19 08:20:32 -07:00
Álvaro González
374965a606 docs: add a google warning and fix some formats (#7340)
Signed-off-by: alvarogonzalez-packlink <alvarogonzalez@packlink.com>
2021-10-19 01:36:59 -07:00
pasha-codefresh
ddc9f56d05 feat: Cluster name as part of sync (#7394)
feat: Cluster name as part of sync (#7394)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-18 18:44:54 -07:00
pasha-codefresh
3312dc0037 feat: Resource id tracking method doc (#7468)
feat: Resource id tracking method doc (#7468)
Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-18 18:44:08 -07:00
pasha-codefresh
67dd012b87 feat: add cluster name UI (#7409)
* group diff should set resource id use new interface

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

* add cluster destination should support name

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-18 13:03:49 -07:00
Leonardo Luz Almeida
10bb1c4e1f docs: add remaining metric docs (#7469)
Signed-off-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
2021-10-18 10:10:34 -07:00
ChangZhuo Chen (陳昌倬)
f3730da01e fix: Fix typo in SparkApplication health check script (#7433) (#7434)
Closes: #7433

Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@czchen.org>
2021-10-17 22:24:42 -07:00
Snyk bot
d8f6ee2d72 fix: upgrade @types/react-dom from 16.8.5 to 16.9.14 (#7400)
Snyk has created this PR to upgrade @types/react-dom from 16.8.5 to 16.9.14.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/argoproj/project/e257be49-1bf5-455e-a11b-cdab3dbef067?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-17 20:35:07 -07:00
Leonardo Luz Almeida
b5d1433a1f Fix argocd_cluster_connection_status metric (#7419)
* bug: fix argocd_cluster_connection_status metric + docs

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-10-17 19:58:02 -07:00
Vaibhav Thakur
83ff035df7 Add Tigera to USERS.md (#7435)
Signed-off-by: Vaibhav Thakur <vaibhav@tigera.io>

Co-authored-by: Vaibhav Thakur <vaibhav@tigera.io>
2021-10-17 11:50:02 -07:00
jiraguha
1d4b91efa2 Add Rise the money app for teens to USERS.md (#7465)
Signed-off-by: jpiraguha <jiraguha@gmail.com>
2021-10-17 11:39:43 -07:00
May Zhang
43bcbfb093 fix: makeslice: cap out of range (#7463)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-10-17 10:43:14 -07:00
May Zhang
f0cd21a9f3 fix: invalid memory address or nil pointer dereference during cluster… (#7445)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-10-16 21:57:39 -07:00
Guy Elia
d7d8fe3da2 Add BigPanda to USERS.md (#7416)
Add BigPanda as an ArgoCD user
2021-10-12 10:00:51 -07:00
Assel Meher
c80c1d4f95 fix: fix parameter name when the value is a list (#7360) (#7362)
* fix: #7360

Signed-off-by: Assel Meher <asselmeher@gmail.com>

* fix assert in tests

Signed-off-by: Assel Meher <asselmeher@gmail.com>
2021-10-12 09:50:50 -07:00
Alexander Krantz
6644cbe452 fix: prevent displayed namespace from being undefined (#7401)
Signed-off-by: Alex Krantz <alex@krantz.dev>
2021-10-12 08:28:24 -07:00
Regina Scott
ae02bc27fc feat: add hide toggle for health status bar (#7153)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-10-11 14:41:48 -07:00
Mustafa
5faea8f339 docs: Append echo to kubectl in getting_started.md (#7403)
Add echo to the end of the kubectl command to fetch initial admin secrets so that '%' new line character is not printed at the end of the secret.

Signed-off-by: mustafa89 <mustafa.mujahid@outlook.com>

Co-authored-by: Mustafa Mujahid <mustafa.mujahid@tradebyte.com>
2021-10-11 22:49:06 +02:00
pasha-codefresh
678d35d850 feat: project destination cli (#7407)
feat: project destination cli (#7407)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-11 06:42:47 -07:00
c1_zh
363e1d2d49 feat: Make Casbin matcher configurable on runtime(globMatch(default) or RegexMatch) (#7165)
* feat: Make Casbin matcher configurable on runtime(globMatch(default) or RegexMatch)

Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2021-10-09 12:01:09 -07:00
Alexander Matyushentsev
b2c70df619 docs: update v2.3+ roadmap (#7353)
* docs: update v2.3+ roadmap

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

* Address reviewer notes: Add 'Merge Argo CD Image Updater into Argo CD' and 'Multi-tenancy improvements'

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-08 15:46:15 -07:00
May Zhang
3c874ae065 fix: Utilize a backoff for git retried operations (#7395)
* fix: git retry duration

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

* fix: adjust default values

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

* fix: adjust default values

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-10-08 14:00:09 -07:00
Jan-Otto Kröpke
4dd570eb11 docs: Kustomize load_restrictor -> load-restrictor (#7358)
Signed-off-by: Jan-Otto Kröpke <joe@adorsys.de>
2021-10-08 11:56:05 -07:00
Chetan Banavikalmutt
1bc231dd99 fix: failing automated UI smoke tests (#7392)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-10-08 11:49:00 -07:00
Hritik Gupta
8a8373faba feat(ui): Ability to view previous container logs in log viewer (#7393)
feat(ui): Ability to view previous container logs in log viewer (#7393)

Signed-off-by: hgupta3 <hritik_gupta@intuit.com>
2021-10-08 11:33:26 -07:00
Leonardo Luz Almeida
384f5b2bae Expose Application labels in prometheus metric (#7374)
Expose Application labels in prometheus metric (#7374)

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2021-10-08 10:15:51 -07:00
pasha-codefresh
b0736219b6 feat: Resources should be normalized in order to prevent our of sync during migration (#7388)
feat: Resources should be normalized in order to prevent our of sync during migration (#7388)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-07 09:51:29 -07:00
Hrittik Roy
4399348ae5 docs: Add p3r to Users.md (#7346)
docs: Add p3r to Users.md (#7346)

* Update USERS.md

* Add p3r to Users.md

Signed-off-by: GitHub <noreply@github.com>

* Update USERS.md

Signed-off-by: GitHub <noreply@github.com>
2021-10-07 09:49:39 -07:00
Chetan Banavikalmutt
df5cce866f fix: unable to read jqPathExpressions (#7375)
The commit introduces the following changes:
1. Update the admin settings resource-overrides CLI to work with jqPathExpressions
2. Allow jqPathExpressions to be set from the UI

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-10-06 09:59:09 -07:00
pasha-codefresh
07eeddf5f1 feat: group diff should set resource id use new interface (#7381)
feat: group diff should set resource id use new interface (#7381)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-06 09:08:20 -07:00
Chetan Banavikalmutt
0c757534ed fix: remove misleading Helm labels from Redis resources in HA mode (#7368)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-10-05 13:00:26 +02:00
Chetan Banavikalmutt
d8d7b30f58 fix: username is required with access token (#7359)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-10-04 14:58:16 -07:00
Alexander Matyushentsev
9d88e614cd fix: creating JWT token fails (#7366)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-10-04 14:43:49 -07:00
Fabiano Arruda
4e025838c0 Update USERS.md (#7348) 2021-10-04 09:49:15 -07:00
pasha-codefresh
d0c6280d38 feat: change annotation format (#7345)
* change annotation format

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-04 09:48:51 -07:00
Keith Chong
e084a110e4 feat: Allow Banner to be non-closable #7261 (#7312)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2021-10-04 09:45:13 -07:00
pasha-codefresh
df7e5ffd96 feat: annotation-label tracking method (#7342)
feat: annotation-label tracking method (#7342)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-03 16:08:51 -07:00
Oleksandr Saulyak
6f8b10c324 fix: updated argo-ui package with fixes for #7192 / #7262 (#7344)
Signed-off-by: oleksandr-codefresh <oleksandr.saulyak@codefresh.io>
2021-10-02 10:50:32 -07:00
Jille Timmermans
eb70a1e3fa docs: Add an example for setting up Helm charts with GitOps (#7060)
Took me embarrassingly long to figure out.

Signed-off-by: Jille Timmermans <jille@quis.cx>
2021-10-01 11:18:30 -07:00
plakyda-codefresh
35bd9e1ed6 fix: retry options in app details modal (#7329)
fix: retry options in app details modal (#7329)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-10-01 10:24:46 -07:00
Matt Pursley
778be231b9 fix: a few typos in kustomize.md (#7334)
Signed-off-by: Matt Pursley <mattpursley@improbable.io>
2021-10-01 10:17:47 -07:00
Abhishek Veeramalla
d790e96aa9 fix: Retry with exponential backoff result in time to wait of zero(#7173) (#7339)
* fix: Retry with exponential backoff result in time to wait of zero(#7173)

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix issue reported by golintci

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
2021-10-01 10:02:44 -07:00
Saumeya Katyal
a6039e1be9 fix: add url check and wrapping for commit msg field (#7218)
* fix: add url check and wrapping for commit msg field

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

* move url regex to util

lint check

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-10-01 09:23:49 -07:00
pasha-codefresh
3d4deeb4f0 fix: compare app state (#7341)
* fix compare app state

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-10-01 09:18:01 -07:00
pasha-codefresh
ebd87b77ed feat: improve sync logic (#7328)
feat: improve sync logic (#7328)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-30 14:49:29 -07:00
Yuan Tang
31b2cbee70 chore: More informative error message when redirect URL is invalid (#7331)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-09-30 13:29:12 -07:00
pasha-codefresh
a2677f5537 fix: Rm browser history (#7327)
fix: Rm browser history (#7327)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-30 13:25:46 -07:00
Álvaro González
65d669565b docs: configuring Google OIDC and Google groups for RBAC (#7308)
Signed-off-by: alvarogonzalez-packlink <alvarogonzalez@packlink.com>
2021-09-30 02:02:19 -07:00
Ishita Sequeira
07f4034aaa feat: lua script for pause/resume action for Deployments (#7293)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-09-29 17:58:35 -07:00
Yi Cai
459833d7c3 fix: default schedule options are cropped #5261 (#7289)
* fix: default schedule options are cropped #5261

Signed-off-by: ciiay <yicai@redhat.com>
2021-09-29 14:53:49 -07:00
Andrii Shaforostov
bbdbf81108 feat: update argo-ui (#7323)
* use merged argo-ui, align dependencies with argo-ui

Signed-off-by: andrii-codefresh <andrii@codefresh.io>

* use merged argo-ui, align dependencies with argo-ui

Signed-off-by: andrii-codefresh <andrii@codefresh.io>
2021-09-29 14:51:42 -07:00
Alexander Matyushentsev
1842c98374 fix: core-install.yaml always refers to latest argocd image (#7321)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-29 14:05:18 -07:00
Chetan Banavikalmutt
94372adcd4 fix: handle applicationset backup forbidden error (#7306)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-09-29 12:33:58 -07:00
plakyda-codefresh
e3df023310 fix: Move orphaned filter to Filters block (#7082)
fix: Move orphaned filter to Filters block (#7082)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-09-29 12:29:21 -07:00
Duy Le
6f5f7ffeee fix: tooltip zindex overwrite toolbar (#7220)
Signed-off-by: Duy Le <duyngoc834@gmail.com>
2021-09-29 12:24:41 -07:00
chandu484
97302103d9 Add Keeeb User to userlist (#7288) 2021-09-29 11:03:29 -07:00
Regina Scott
380037b63d fix: preventOverflow console warnings (#7298)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-09-29 10:27:25 -07:00
pasha-codefresh
0d68194205 feat: tracking method for annotations should be in another format (#7316)
feat: tracking method for annotations should be in another format (#7316)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-29 10:14:49 -07:00
Abhishek Veeramalla
20313adbe2 docs: minor formatting change in the docs (#7305)
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
2021-09-29 11:43:57 +02:00
pasha-codefresh
a731997c59 feat: tracking method e2e (#7310)
feat: tracking method e2e (#7310)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-28 12:46:01 -07:00
pasha-codefresh
bb88a1c975 feat: rename app identifier (#7251)
feat: rename app identifier (#7251)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-28 08:35:17 -07:00
Alexander Matyushentsev
917d0797fa fix: deploy CI task should start docker using current user id to avoid permission denied error (#7300)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-27 19:01:55 -07:00
plakyda-codefresh
993cb838a9 feat: Project autocomplete (Connect repo SSH) (#7286)
feat: Project autocomplete (Connect repo SSH) (#7286)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-09-27 17:19:00 -07:00
Regina Scott
eb2c69d45e fix: long banner messages get cut off (#7264)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-09-27 13:31:14 -07:00
Alexander Matyushentsev
65012f502b chore: use kustomize verison bundled into argocd to upgrade argocd manifests in argoproj/argoproj-deployments (#7299)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-27 12:58:15 -07:00
ml
2f6e91ad22 chore: fix typo in directory name (#7248)
Signed-off-by: ml <ml@visu.li>
2021-09-27 11:33:00 -07:00
shivjm
b264729bfb docs: fix example ServiceMonitor for argocd-repo-server (#7254)
Signed-off-by: Shiv Jha-Mathur <shivjm@users.noreply.github.com>
2021-09-23 12:46:19 -07:00
pasha-codefresh
3952f66fc7 fix: remove not existing repo (#7280)
* remove not existing repo

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

* fix test

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-22 14:27:07 +02:00
plakyda-codefresh
b1f979aad6 feat: retry option app creation (#7252)
feat: retry option app creation (#7252)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-09-21 15:42:26 -07:00
Yuan Tang
2a579a6c05 docs: Add missing links to 1.8-2.1 upgrading guides (#7263)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-09-21 15:02:26 -07:00
dependabot[bot]
9e234b9dec chore(deps): bump tmpl from 1.0.4 to 1.0.5 in /ui (#7266)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 15:02:14 -07:00
John Chen
4f69e93802 docs: add comment about current-user-password (#7258)
It is not immediately clear what the `<current-user-password>` should be as shown by this issue: https://github.com/argoproj/argo-cd/issues/4096.
This comment should make it more clear that when users are setting passwords as the default `admin` user, they should be using the `admin` password here.

Signed-off-by: John Chen <johnchen456@gmail.com>
2021-09-21 14:34:13 -07:00
Alexander Matyushentsev
3799d706df refactor: cache virtual project calculation to improve performance (#7274)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-21 12:20:49 -07:00
yyyyyy888
344353cb16 docs: Add Sutpc company into the user list. (#7267)
Signed-off-by: yangtian9999 <yangtian9999@163.com>
2021-09-21 12:20:08 -07:00
dependabot[bot]
d698e5d68a chore(deps): bump prismjs from 1.24.1 to 1.25.0 in /ui (#7265)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.24.1...v1.25.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 11:32:50 -07:00
dependabot[bot]
5f9993a75b chore(deps): bump nth-check from 2.0.0 to 2.0.1 in /ui (#7270)
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 09:43:13 -07:00
Alexander Matyushentsev
f613fab6f3 refactor: stop using @beyonk/google-fonts-webpack-plugin to download google fonts (#7253)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-18 08:22:53 +02:00
Alexander Matyushentsev
183d729d40 fix: Argo CD should not use cached git/helm revision during app creation/update validation (#7244)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-16 18:35:15 -07:00
Regina Scott
b26e92873f fix: typo causing docs to not render properly (#7242)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-09-16 13:00:02 -07:00
Alexander Matyushentsev
36ab4dadda fix: Argo CD server address unspecified with Argo CD CLI v2.1.x (#7238)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-16 11:23:29 -07:00
pasha-codefresh
91fea1470f feat: add test to redis_hook.go (#7233)
* add test to redis_hook.go

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

* restart action

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-16 08:06:29 -07:00
pasha-codefresh
17e6ebdce1 feat: show difference in repos that exist and that should be changed (#7224)
* show difference in repos that exist and that should be changed

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-16 08:02:50 -07:00
pasha-codefresh
6f794d0dc9 fix: Redis should reconnect on connectivity issue (#7207)
fix: Redis should reconnect on connectivity issue (#7207)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-15 09:05:48 -07:00
Miguel Ángel Cabrera Miñagorri
9cf71bef90 fix: support gpg keys generation in centos-7 distros (#7221)
Signed-off-by: Miguel A. Cabrera Minagorri <mcabrera@vmware.com>
2021-09-15 08:26:46 -07:00
gin
25db5038c7 docs(users): add mixi in users.md (#7210)
Signed-off-by: gin <10017674+lirlia@users.noreply.github.com>
2021-09-14 12:52:19 -07:00
Remington Breeze
b6c458e8f4 fix(ui): Add Error Boundary around Extensions and comply with new Extensions API (#7215)
* fix: Add error boundary around Extensions and change path where UI looks for extensions

Signed-off-by: Remington Breeze <remington@breeze.software>

* Add error message to error boundary

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-09-14 12:51:37 -07:00
Alexander Matyushentsev
2147ed3aea fix: cluster API should not drop system labels and annotations (#7212)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-14 10:37:57 -07:00
Remington Breeze
3df6be73e7 fix(ui): More tab was displayed for resources that did not have extensions installed (#7209)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-09-13 22:18:38 -07:00
jannfis
d823efee5d proposal: Change application identifier to allow app names longer than 63 chars (#6425)
proposal: Change application identifier to allow app names longer than 63 chars (#6425)

Signed-off-by: jannfis <jann@mistrust.net>
2021-09-13 08:49:15 -07:00
pasha-codefresh
1817b6b4d4 Scoped resources doc (#7206)
* add doc about scoped resources

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

* docs: explain project scoped resources

Signed-off-by: Kostis Kapelonis <kostis@codefresh.io>

Co-authored-by: Kostis Kapelonis <kostis@codefresh.io>
2021-09-13 08:47:39 -07:00
pasha-codefresh
7ed06cc9f6 feat: Scoped resources cluster e2e (#7199)
feat: Scoped resources cluster e2e (#7199)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-12 19:05:49 -07:00
Yuan Tang
49378a95c4 chore: Update Ingress apiVersion to networking.k8s.io/v1beta1 (#7188)
* chore: Update Ingress apiVersion to networking.k8s.io/v1beta1

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

* Revert changes in  controller/cache/info_test.go

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-09-10 10:04:52 -07:00
jannfis
a38f3176e2 chore: Update haproxy for redis-ha to 2.0.25 (#7194)
Signed-off-by: jannfis <jann@mistrust.net>
2021-09-10 09:13:27 -07:00
pasha-codefresh
08d1cf0e55 feat: Ability to test rbac and implement it with scoped repos (#7187)
feat: Ability to test rbac and implement it with scoped repos (#7187)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-09 21:42:32 -07:00
Thomas
85c45ca76e fix: use selected helm-values (#7166)
Signed-off-by: Thomas Münzl <thomasmuenzl@icloud.com>
2021-09-09 20:48:32 -07:00
Yi Cai
626c963b1c docs: minor update on dependencies.md (#7190)
Signed-off-by: ciiay <yicai@redhat.com>
2021-09-09 15:28:49 -07:00
Suraj Bodade
fc49eb2e46 fixed small typos in github credentials types (#7161)
Signed-off-by: suraj-zemoso <suraj.bodade@zemosolabs.com>
2021-09-09 11:40:06 -07:00
irizzant
e0c07b8027 #7144 fix: add custom volume as Helm working dir (#7162)
#7144 fix: add custom volume as Helm working dir (#7162)

Signed-off-by: irizzant <i.rizzante@gmail.com>
2021-09-09 10:31:03 -07:00
Chetan Banavikalmutt
7122b83fc3 feat: support adding labels and annotations to cluster secret (#7139)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-09-09 09:03:32 -07:00
pasha-codefresh
c64e8df84c feat: ability to switch user during test execution (#7164)
feat: ability to switch user during test execution (#7164)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-09-09 08:58:46 -07:00
Ben Ye
be884d2172 feat: Support delete-resource command in cli (#7093)
* feat: support delete-resource command in argocd cli

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

* add E2E test and fix documents

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

* sync app

Signed-off-by: Ben Ye <ben.ye@bytedance.com>
2021-09-06 09:11:06 -07:00
Ijeh Onyeka
d2100a30a0 add youverify to companies actively using argocd (#7163) 2021-09-04 15:09:51 -07:00
ThoTischner
9559613c8f feat: Closes #6956 - Adding confluent health checks (#6957)
* Issue argoproj#6956 - Adding confluent health checks

Signed-off-by: ThoTischner <thomas-schwaig@web.de>

* Issue argoproj#6956 - Change Unknown to Progressing

Signed-off-by: ThoTischner <thomas-schwaig@web.de>
2021-09-03 21:51:00 +02:00
dependabot[bot]
bd7f8c8eda chore(deps): bump tar from 6.1.3 to 6.1.11 in /ui (#7123)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.3 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.3...v6.1.11)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-03 19:32:33 +02:00
jannfis
a90ab1a2e1 chore: Upgrade github.com/bradleyfalzon/ghinstallation to v2.0.2 (#7151)
Signed-off-by: jannfis <jann@mistrust.net>
2021-09-03 10:28:10 -07:00
Thomas
a5126648e1 fix: use basehref as cookie-path (#7105)
Signed-off-by: Thomas Münzl <thomasmuenzl@icloud.com>
2021-09-03 19:21:31 +02:00
Petr Drastil
d9e8a0fc31 chore: Upgrade dex server image to 2.30.0 (#7102)
* chore: Upgrade dex server to 2.30.0

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

* Revert dex server probes

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2021-09-03 19:20:01 +02:00
Ishita Sequeira
b559bf88d1 feat: Add health checks for route.openshift.io (#7112)
* feat: Add health checks for route.openshift.io

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

* Addressed PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-09-03 17:27:16 +02:00
Ishita Sequeira
c0f2bf55a7 feat: health check for openshift DeploymentConfig (#7114)
* feat: health check for openshift DeploymentConfig

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

* Address PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-09-03 17:26:31 +02:00
Ishita Sequeira
4b92f96034 feat: Add health checks for olm operators (#7126)
* feat: Add health checks for olm operators

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

* Addressed the PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-09-03 17:25:42 +02:00
smartbit
24054820da docs: update url of External Secrets Operator (#7120)
has moved from ContainerSolutions' github account to it's own github project
2021-09-03 11:10:58 +02:00
Alexander Matyushentsev
22600228c2 fix: Correct this attempt to modify const 'store' variable (#7145)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-02 11:37:20 -07:00
renjikari
9025318adf docs: Add freee as a user (#7140)
Signed-off-by: Shunki Fujiwara <shunki-fujiwara@freee.co.jp>
2021-09-02 03:43:13 -07:00
Alexander Matyushentsev
5d9aa989f3 fix: gracefully shutdown metrics server when dex config changes (#7138)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-01 18:55:05 -07:00
Alexander Matyushentsev
9613b240fb fix: upgrade gitops engine (fix #7088) (#7137)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-01 17:45:42 -07:00
Alexander Matyushentsev
8fbcc1c7fc fix: cluster filter popping out of box (#7135)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-01 15:33:27 -07:00
Remington Breeze
d2ff65ae39 feat(ui): Display event timestamps in human readable format (#7132)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-09-01 15:08:40 -07:00
c1_zh
dd26a48f8a fix: Network view is confusing if same ingress is targeting two services #2338 (#7113)
Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2021-09-01 14:46:40 -07:00
Chetan Banavikalmutt
8c19c7864d docs: add a section about banners (#7109)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-09-01 12:52:59 -07:00
pasha-codefresh
a9f009cb10 feat: e2e for clusters (#7118)
feat: e2e for clusters (#7118)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-31 10:32:54 -07:00
May Zhang
ce1d8031ae fix: repository name already exists when multiple helm dependencies f… (#7096)
* fix: repository name already exists when multiple helm dependencies from same private repo server

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

* fix: add test cases

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

* fix: clean up

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-08-31 08:30:03 -07:00
pasha-codefresh
dd2900eaeb feat: scoped repo e2e tests (#7110)
feat: scoped repo e2e tests (#7110)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-30 10:10:32 -07:00
pasha-codefresh
c0bcd6b255 feat: repo list and repo get command + e2e tests (#7108)
feat: repo list and repo get command + e2e tests (#7108)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-30 10:08:33 -07:00
Álvaro González
6897aa4ed2 docs: add configuration guide for using Google Load Balancers with GKE (#6747)
* docs: add configuration guide for using Google Load Balancers with GKE

Signed-off-by: alvarogonzalez-packlink <alvarogonzalez@packlink.com>

* docs: fix format on notes and warnings

Signed-off-by: alvarogonzalez-packlink <alvarogonzalez@packlink.com>
2021-08-30 15:58:49 +02:00
Yi Cai
42903044f3 fix: Summary Colors don't match key and numbers don't match colors #5200 (#7042)
Signed-off-by: ciiay <yicai@redhat.com>
2021-08-27 12:41:09 -07:00
Thomas
700806f408 fix: reset token-cookie on logout (oidc) (#7092)
fix: reset token-cookie on logout (oidc) (#7092)

Signed-off-by: jimtoniq <thomasmuenzl@icloud.com>
2021-08-27 11:09:19 -07:00
pasha-codefresh
b271d6ac5c feat: Test create repository with project ( part of scoped resources e2e tests ) (#7103)
feat: Test create repository with project ( part of scoped resources e2e tests ) (#7103)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-27 10:29:31 -07:00
Jonah Back
a940cb5914 fix(ui): calculate service info correctly for networking.k8s.io/v1 ingress (#6923)
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-08-26 14:47:26 -07:00
Alexander Matyushentsev
87de4edd15 fix: document IP addresses logging (#7094)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-26 13:01:40 -07:00
Alexander Matyushentsev
abba8dddce docs: update VERSION file and CHANGELOG (#7083)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-26 11:28:51 -07:00
plakyda-codefresh
44520ea479 feat: resource name filter + filter block for resource table view (#7081)
feat: resource name filter + filter block for resource table view (#7081)

Signed-off-by: viktorplakida <plakyda1@gmail.com>
2021-08-26 10:32:36 -07:00
pasha-codefresh
ae803a2f1e feat: goreman option to exclude (#7080)
feat: goreman option to exclude (#7080)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-25 12:40:55 -07:00
pasha-codefresh
49a854a738 feat: Scoped clusters (#7039)
feat: Scoped clusters (#7039)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-25 09:53:58 -07:00
Benjamin Manifold
81155ccb0c feat: Cassandra Health Check. Closes #6843 (#7017)
Signed-off-by: benmanifold <benmanifold@gmail.com>
2021-08-25 11:27:07 +02:00
Josh Gavant
18057fa5ee docs: clarify new repo, port-forward flags (#6937)
The instructions for telling the CLI how to automatically use
port-forward were intertwined with the instructions for registering a
repo; this separates them.

This also moves the port-forward flags instructions to the first place
in the doc a user would need them.

Signed-off-by: Josh Gavant <joshgavant@gmail.com>
2021-08-25 11:26:44 +02:00
May Zhang
ca5003f3ba fix: password reset requirements (#7071)
* fix: password reset meet requirement

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-08-24 23:21:03 -07:00
Alexander Matyushentsev
1d3d03f5d3 fix: Custom Styles feature is broken (#7067)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-24 15:08:12 -07:00
Remington Breeze
a894d4b128 fix(ui): Unschedulable button changed widths on click (#7030)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-24 11:29:45 -07:00
Remington Breeze
440e4dc5d9 fix(ui): Add State to props passed to Extensions (#7045)
Signed-off-by: Remington Breeze <remington@breeze.software>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-24 11:23:56 -07:00
Alexander Matyushentsev
d6973c7b8a fix: fix building remote container (#7062)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-24 09:48:14 -07:00
pasha-codefresh
34e904dd7b fix: make codegen (#7059)
fix: make codegen

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-24 09:02:44 -07:00
Omar De Donato
c7e532941f docs: added Technacy in USERS.md (#7051)
We at Technacy love using Argo CD

Signed-off-by: Omar <omar.dedonato@technacy.it>
2021-08-23 13:23:28 +02:00
Alexander Matyushentsev
613db278a7 fix: keep uid_entrypoint.sh for backward compatibility (#7047)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-23 08:38:29 +02:00
pasha-codefresh
91c883668e feat: Scoped repo unit tests (#7026)
feat: Scoped repo unit tests

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-22 18:01:36 -07:00
Yi Cai
d12eafa826 fix: Truncated synchronize check-boxes should have tooltips #4233 (#6954)
Signed-off-by: ciiay <yicai@redhat.com>
2021-08-20 12:41:25 -07:00
Alexander Matyushentsev
0dcac9a8d9 fix: reload extension when selected resource node changes (#7034)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-19 22:14:00 -07:00
Jesse Suen
0078a4d9ee docs: add @wanghong230 as a reviewer (#7029)
Signed-off-by: Jesse Suen <jessesuen@gmail.com>
2021-08-19 17:02:51 -07:00
Jesse Suen
8ceceb8b55 docs: add @rbreeze as an approver (#7028)
Signed-off-by: Jesse Suen <jessesuen@gmail.com>
2021-08-19 13:56:47 -07:00
Remington Breeze
2e3405134b fix(ui): Resource details crashed due to extensions (#7025)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-19 09:55:16 -07:00
pasha-codefresh
5b1906d2a7 feat: Cover grpc crud rbac (#7008)
feat: Cover grpc crud rbac (#7008)

Signed-off-by: Victor Plakyda <plakyda1@gmail.com>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-19 08:43:48 -07:00
pasha-codefresh
0093bddc39 fix(ui): user account list yaml (#7021)
fix(ui): user account list yaml (#7021)

Signed-off-by: Victor Plakyda <plakyda1@gmail.com>
2021-08-19 08:40:20 -07:00
Alexander Matyushentsev
788613cb14 feat: support loading extensions in Argo CD UI (#7019)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-19 08:39:51 -07:00
pasha-codefresh
53dd0da8c3 fix(ui): applications table view, Closes #6733 (#6995)
Co-authored-by: Victor Plakyda <plakyda1@gmail.com>
2021-08-18 12:23:34 -07:00
Guido Zockoll
8f21138d54 docs: added type:git to secret examples (fixes #6984) (#7013)
* Update declarative-setup.md

added `type: git` to the secrets

* warning about labels getting lost

when using sealed-secrets the labels will get lost and has to be readded
2021-08-18 20:18:28 +02:00
Saumeya Katyal
676a8714bf fix: Unschedulable button style (#7003)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-08-18 09:24:03 -07:00
Philipp Dallig
4ae1d876fd fix: Running on Openshift 4.x with readOnlyRootFilesystem (#6998)
Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
2021-08-18 12:18:01 +02:00
Chris Sinjakli
efc8ec1d78 chore: Log application name for invalid application spec (#6991)
When creating an application directly through the CLI or a `kubectl
apply`, it's relatively obvious which application is invalid (provided
you aren't applying several at once) as you're there creating it
interactively.

It's less clear when applications are generated by the application set
controller. When that happens, you need to go looking in the controller
logs, where you'll find something like:

> time="2021-08-10T11:36:02Z" level=error msg="application spec is
> invalid: InvalidSpecError: application destination
> {https://kubernetes.default.svc default} is not permitted in project
> 'my-project'"

which doesn't have any connection back to the application being
generated. This is particularly tricky to track down if you're searching
your logs via some sort of aggregator rather than watching `kubectl logs
-f`.

After this change, the log produced would be:

> time="2021-08-10T11:36:02Z" level=error msg="application spec for
> guestbook is invalid: InvalidSpecError: application destination
> {https://kubernetes.default.svc default} is not permitted in project
> 'my-project'"

There's probably fancier ways this information could be presented (e.g.
if application sets were represented in the UI and knew about failures
to apply their generated applications), but this logging change seems
like a cheap way to make this situation more debuggable.

Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
2021-08-18 11:10:52 +02:00
Alexander Matyushentsev
e3b7a2be13 fix: resouce health filter should include node if node or node's root health matches filter (#7002)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-17 14:34:27 -07:00
Alexander Matyushentsev
44ec4e0a82 fix: upgrade argo-ui version (#7010)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-17 12:50:07 -07:00
pasha-codefresh
24ad4618c2 fix: Git errors to grpc (#7005)
fix: Git errors to grpc (#7005)

Signed-off-by: olegz-codefresh <olegz@codefresh.io>
2021-08-17 12:27:44 -07:00
Yuan Tang
d3fb6fb7db chore: Update to use NewSharedInformerFactoryWithOptions due to deprecation (#7009)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-08-17 21:23:13 +02:00
RoCha
95d9016ed4 feat: healtcheck for iam.cnrm.cloud.google.com/IAMPolicyMember (#6783)
Signed-off-by: Romain Chalumeau <rchalumeau@magicleap.com>
2021-08-17 21:20:30 +02:00
Alexander Matyushentsev
e195995790 docs: update obsolete resource customization docs (#7000)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-16 10:49:34 -07:00
Spiros Economakis
124995c275 feat: Add a metric to express connection status to each cluster (#6862)
The cluster collector includes one more metric for kubernetes cluster connection
which rely on `SyncError`.

Ticket: #6855
Signed-off-by: Spiros Economakis <spiros.oikonomakis@gmail.com>
2021-08-16 09:52:47 -07:00
pasha-codefresh
7b89c4e53c feat: Project scoped repo (#6943)
feat: Project scoped repo (#6943)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-16 09:38:37 -07:00
David Collom
1ab85de378 fix: Disable generating of CA Certificates (#6987)
Signed-off-by: David Collom <david.collom@jetstack.io>
2021-08-14 10:04:41 +02:00
Remington Breeze
eb76649ef5 chore(ui): Relocate CheckboxRow component to Filters instead of argo-ui (#6990)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-13 15:33:36 -07:00
Remington Breeze
3887289090 fix(ui): Migrate to keyhook helpers in argo-ui, update keybindings accordingly (#6953)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-13 14:26:11 -07:00
Yi Cai
d842e8333a feat: Allow collapsing of individual diff sections in diff view #3608 (#6978)
Signed-off-by: ciiay <yicai@redhat.com>
2021-08-13 08:31:37 -07:00
Alexander Matyushentsev
311926b8c9 fix: argocd core commands should not drop existing persistent flags (#6981)
* fix: argocd core commands should not drop existing persistent flags

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

* run cli codegen

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-12 23:10:59 -07:00
Yuan Tang
63d809614c docs: Fix links to subsections in roadmap (#6986)
* docs: Fix links to completed subsections in roadmap

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

* One more link

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-08-12 22:50:15 -07:00
Yuan Tang
741329afb6 docs: Add cluster URL when creating an app to be consistent with the screenshot (#6731)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-08-12 22:23:00 -07:00
Nico Schottelius
d36cf3e2bb Update USERS.md - added ungleich.ch (#6979)
Signed-off-by: Nico Schottelius <nico.schottelius@ungleich.ch>

Co-authored-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2021-08-12 22:17:54 -07:00
Alexander Matyushentsev
53bbb8ecf4 docs: update roadmap and release checklist (#6980)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-12 16:59:39 -07:00
dependabot[bot]
86ca66b2d6 chore(deps): bump jszip from 3.5.0 to 3.7.1 in /ui-test (#6952)
Bumps [jszip](https://github.com/Stuk/jszip) from 3.5.0 to 3.7.1.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/compare/v3.5.0...v3.7.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-12 13:19:20 -07:00
pasha-codefresh
6ac9753b63 feat: support ability get cluster by name from cli, Closes #6865 (#6972)
feat: support ability get cluster by name from cli, Closes #6865 (#6972)

Support get cluster cmd by name
https://github.com/argoproj/argo-cd/issues/6865

Signed-off-by: olegz-codefresh <olegz@codefresh.io>
2021-08-12 13:18:18 -07:00
pasha-codefresh
afb1c8b210 feat(ui): add top value for large breakpoint Closes #6944 (#6975)
feat(ui): add `top` value for `large` breakpoint Closes #6944 (#6975)

Signed-off-by: andrii-codefresh <andrii@codefresh.io>
2021-08-12 12:35:20 -07:00
dependabot[bot]
117eadaceb chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /ui-test (#6950)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-12 12:33:41 -07:00
dependabot[bot]
10b4e44c42 chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /ui (#6949)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-12 12:33:18 -07:00
dependabot[bot]
8cf8a8cf81 chore(deps): bump url-parse from 1.5.1 to 1.5.3 in /ui (#6951)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
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>
2021-08-12 12:33:10 -07:00
pasha-codefresh
8a29cf8fbf fix(ui): Fix checkbox style in Delete pod modal Closes #6947 (#6961)
* Fix checkbox style in Delete pod modal

Signed-off-by: Victor Plakyda <plakyda1@gmail.com>

* Fix checkbox

Signed-off-by: Victor Plakyda <plakyda1@gmail.com>

Co-authored-by: Victor Plakyda <plakyda1@gmail.com>
2021-08-12 12:05:17 -07:00
ritchiekng
4a3dd76f19 Create USERS.md (#6973)
Fixing issue where link not working
2021-08-12 12:02:30 -07:00
Jesse Suen
b91732a8eb fix: rollout v1.0 'Paused' status.phase should map to Argo CD 'Suspended' (#6967)
Signed-off-by: Jesse Suen <jessesuen@gmail.com>
2021-08-12 11:37:08 -07:00
ritchiekng
97e8c7d00d Update USERS.md - added MeDirect (#6955)
* Update USERS.md

Signed-off-by: Steve Ritchie <steve.ritchie@medirect.com.mt>

* Update USERS.md

Updating website for Medirect
2021-08-11 16:28:51 -07:00
Alexander Matyushentsev
e5ee00f4d0 fix: basehref not set correctly (#6962)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-11 15:22:33 -07:00
Alexander Matyushentsev
aab0b173d5 fix: update deprecated helm2 installation URL (#6960)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-11 12:33:59 -07:00
Alexander Matyushentsev
50993206a5 fix: make sure repo server discard cached empty response (#6948)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-10 19:25:07 -07:00
Alexander Matyushentsev
4164db88f5 fix: applications/resources filter improvement and bug fixes (#6931)
* fix: applications/resources filter improvement and bug fixes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-10 17:10:24 -07:00
May Zhang
c5eb25ceba fix: use secure way to generate initial password (#6938)
* fix: use secure way to generate initial password

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

* fix: use secure way to generate initial password

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-08-09 19:22:10 -07:00
pasha-codefresh
685b07ed34 feat(ui): Retry strategy, Application + Applications, #5318 (#6864)
feat(ui): Retry strategy, Application + Applications, #5318 (#6864)

Signed-off-by: Victor Plakyda <plakyda1@gmail.com>
2021-08-09 17:26:31 -07:00
jannfis
3091bc5b6f docs: Update contributor docs (#6615)
* Sync

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

* docs: Update contributor docs

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

* New paragraph about code submission

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

* Update

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

* Update code submissions before triage paragraph

Signed-off-by: jannfis <jann@mistrust.net>
2021-08-09 12:15:21 +02:00
Saravanan Arumugam (Aswath)
810a977846 Added RightRev As the user's list. (#6929)
Added RightRev As the user's list.

Signed-off-by: Saravanan Arumugam (Aswath) <saravanan.a@rightrev.com>
2021-08-08 08:55:39 -07:00
jannfis
adade448a8 docs: Update security considerations (#6930)
* docs: Update security considerations

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

* docs: Update security considerations

Signed-off-by: jannfis <jann@mistrust.net>
2021-08-08 08:55:01 -07:00
jannfis
c22d8321cc docs: Update security contacts in security policy (#6928)
* docs: Update security contact

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

* docs: Update security contact

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

* docs: Update security contact

Signed-off-by: jannfis <jann@mistrust.net>
2021-08-07 17:58:21 -07:00
Daisuke Taniwaki
819225c709 fix: Set header to OIDC requests (#6869)
Signed-off-by: Daisuke Taniwaki <daisuketaniwaki@gmail.com>
2021-08-05 12:02:22 +02:00
Connor
dd50b88cd1 docs: Add documentation on using OIDC with Dex (#6904)
* docs: Add documentation on using OIDC with Dex

Signed-off-by: Connor Kelly <connor.r.kelly@gmail.com>

* docs: Add documentation on using OIDC with Dex -- fix typo

Signed-off-by: Connor Kelly <connor.r.kelly@gmail.com>

* Fix warning box for Dex OIDC group configuration knob

Signed-off-by: Connor Kelly <connor.r.kelly@gmail.com>
2021-08-05 11:57:18 +02:00
Alexander Matyushentsev
8b1c364f58 fix: application sync panel crashes if app has no sync options (#6914)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-04 16:56:08 -07:00
Yi Cai
d74ce38c8c fix: Reword Generate new token dialog (#6913)
Signed-off-by: ciiay <yicai@redhat.com>
2021-08-04 16:48:27 -07:00
Alexander Matyushentsev
826288f861 fix: assume ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS, ARGOCD_SERVER_REPO_SERVER_TIMEOUT_SECONDS env vars have seconds (#6912)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-04 13:51:16 -07:00
Yi Cai
e86c5ea17c fix: UI 6337 cluster filter improvement for issue #6337 (#6856)
* fix: when cluster field is bge-dev1, the applications with cluster dev1 is selected #6337

Signed-off-by: ciiay <yicai@redhat.com>
2021-08-04 13:05:49 -07:00
Noam Gal
f7614e0c4e fixed max to use MaxInt64 value (#6911)
Signed-off-by: Noam Gal <noam.gal@codefresh.io>
2021-08-04 11:07:54 -07:00
Chetan Banavikalmutt
2130c8a949 fix: unset command should remove env vars when there's no error (#6908)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-08-04 10:54:16 -07:00
pasha-codefresh
9d6ccee305 feat: rollback should work without id passed #6825. (#6877)
feat: rollback should work without id passed #6825. (#6877)

Signed-off-by: pashavictorovich <pavel@codefresh.io>
2021-08-04 10:51:54 -07:00
Remington Breeze
9c0495d9a3 fix: Add https prefix to ingress URLs if hosts field is present (#6901)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-04 09:33:41 -07:00
woshicai
ef653cac57 fix: client input arguments with equal sign (#6885)
Signed-off-by: Charles Cai <charles.cai@sap.com>

Co-authored-by: Charles Cai <charles.cai@sap.com>
2021-08-04 14:20:18 +02:00
Bob Claerhout
9099d0ba83 docs: Add replace description on individual resource level (#6905)
Signed-off-by: Bob Claerhout <claerhout.bob@gmail.com>
2021-08-04 14:14:21 +02:00
May Zhang
50b0010470 fix: logout redirect URL (#6903)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-08-03 17:05:58 -07:00
Alexander Matyushentsev
6b0d449997 refactor: update resources install order according to helm implementation (#6902)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-03 16:53:39 -07:00
Alexander Matyushentsev
c607a3b294 fix: controller should not create orphaned resources warning by default (#6898)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-03 16:05:19 -07:00
Alexander Matyushentsev
4fef2114fe feat: Improve Replace sync option description in UI (#6899)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-03 16:05:08 -07:00
dependabot[bot]
8c216ed7a8 chore(deps): bump tar from 6.1.0 to 6.1.3 in /ui (#6900)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.3.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-03 13:50:29 -07:00
Joseph Michael Casey
d404f0e425 docs(users): add Capital One (#6897) 2021-08-03 10:51:49 -07:00
Yi Cai
c5ebc584d0 fix: menu for application loses text when title area buttons collapse #6474 (#6887)
Signed-off-by: ciiay <yicai@redhat.com>
2021-08-03 10:06:12 -07:00
Remington Breeze
241a6fb1ba fix(ui): Bump argo-ui to hide filter suggestions on enter and show on typing (#6891)
* fix(ui): Bump argo-ui to hide filter suggestions on enter and show on typing

Signed-off-by: Remington Breeze <remington@breeze.software>

* remove unneccessary yarn.lock changes

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-03 09:34:07 -07:00
Remington Breeze
93e624d590 fix(ui): Add View Details option to resource actions menu (#6893)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-03 09:33:25 -07:00
Jan-Otto Kröpke
8f4e002ae4 fix: upgrade to kustomize 4.2.0 (#6861)
Signed-off-by: Jan-Otto Kröpke <joe@adorsys.de>
2021-08-03 09:24:22 -07:00
May Zhang
3abf8c6735 fix: add documentation for using argocd repocreds with --enable-coi and --type helm (#6890)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-08-03 10:48:20 +02:00
Jun
3ff8481694 feat: Rollback command support omit history id (#6863)
Signed-off-by: junnplus <junnplus@gmail.com>
2021-08-02 22:32:09 -07:00
Remington Breeze
0d23207c59 fix(ui): Incorrect path for non-namespaced resources (#6895)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-02 17:56:12 -07:00
balchua
fcd28b6eb1 docs: rename credit agricole to credit agricole CIB. (#6871)
* rename credit agricole to credit agricole CIB.

Signed-off-by: balchua <balchua@yahoo.com>

* fix semantic pr.

Signed-off-by: balchua <balchua@yahoo.com>
2021-08-02 12:29:54 -07:00
Remington Breeze
7e27d1072f fix(ui): Page navigation no longer visible with status bar (#6888)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-08-02 12:29:37 -07:00
Alexander Matyushentsev
1e5c763d6f fix: make sure orphaned filter checkbox is clickable (#6886)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-08-02 11:51:40 -07:00
woshicai
7fbf50493b fix: docs about custom image user #6851 (#6872)
* fix: docs about custom image user, change it from argocd to 999

Signed-off-by: Charles Cai <charles.cai@sap.com>

* update: docs for upgrading version

Signed-off-by: Charles Cai <charles.cai@sap.com>

Co-authored-by: Charles Cai <charles.cai@sap.com>
2021-08-02 11:43:01 -07:00
Geoffrey Huntley
f170d24ed1 docs(users): add gitpod (#6879)
Signed-off-by: Geoffrey Huntley <ghuntley@ghuntley.com>
2021-08-02 11:39:08 -07:00
Joe Bowbeer
bcfc112d82 docs: installation.md (#6860)
Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2021-07-30 15:57:17 -07:00
Yi Cai
66acd16bce fix: Project filter selector does not get unset upon clear filters #6750 (#6866)
Signed-off-by: ciiay <yicai@redhat.com>
2021-07-30 15:47:00 -07:00
Remington Breeze
bee20c2154 fix(ui): Prevent UI crash if app status or resources is empty (#6858) 2021-07-30 08:48:05 -07:00
Alexander Matyushentsev
17bef1c2c6 fix: util.cli.SetLogLevel should update global log level (#6852)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-29 13:01:38 -07:00
Alexander Matyushentsev
2abf284f81 fix: include cluster level RBAC into argocd-core manifests (#6854)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-29 12:49:06 -07:00
David Maciel
221d0c048d Fix #6567 Admin token now expires (#6846) 2021-07-29 11:19:53 -07:00
dependabot[bot]
cd9dcecccd chore(deps): bump glob-parent from 5.1.1 to 5.1.2 in /ui-test (#6848)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-29 11:18:57 -07:00
dependabot[bot]
52090425c6 chore(deps): bump ws from 7.4.1 to 7.5.3 in /ui-test (#6849)
Bumps [ws](https://github.com/websockets/ws) from 7.4.1 to 7.5.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.1...7.5.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-29 11:18:19 -07:00
Klaus Dorninger
228c465393 fix: #6844 multiple global projects can be configured (#6845)
Signed-off-by: Klaus Dorninger <github@dornimaug.org>
2021-07-29 11:01:52 -07:00
Keith Chong
4a69cce7b1 test: Add initial automated UI smoke tests (#4393) (#4694)
Signed-off-by: Keith Chong <kykchong@redhat.com>
2021-07-29 10:11:11 -07:00
Alexander Matyushentsev
c7738a0cae fix: core installation must include CRD definitions (#6841)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-28 16:30:11 -07:00
Remington Breeze
369385388d fix(ui): Bump argo-ui version to fix autocomplete issues (#6836)
* fix(ui): Bump argo-ui version to fix autocomplete issues

Signed-off-by: Remington Breeze <remington@breeze.software>

* Remove unnecessary upgrades

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-28 14:55:24 -07:00
May Zhang
321a9734ec fix: Correct usage info for argocd account delete-token (#6831)
* Correct usage info for `argocd account delete-token`

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

* fix: Correct usage info for `argocd account delete-token`

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

* fix: Correct usage info for `argocd account delete-token`

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-07-28 13:40:39 -07:00
Alexander Matyushentsev
0c644e0df7 docs: add v2.1 changelog (#6834)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-28 13:34:13 -07:00
Alexander Matyushentsev
bd1390c182 fix: empty repo url should not crash UI (#6833)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-28 13:05:06 -07:00
Alexander Matyushentsev
ba5c300cc5 fix: argocd admin repo generate-spec should convert secret data (#6820)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-27 19:26:40 -07:00
Alexander Matyushentsev
1b99ce2bf3 refactor: rename Argo CD headless feature to Core (#6819)
* refactor: rename Argo CD headless feature to Core

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

* Apply reviewer notes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-27 16:36:13 -07:00
Kshama Jain
e1e0f27a7b feat: update rollout health check for Argo Rollouts v1.0 and v1.1 (#6380)
Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
Signed-off-by: Jesse Suen <Jesse_Suen@intuit.com>

Co-authored-by: Jesse Suen <Jesse_Suen@intuit.com>
2021-07-27 10:00:20 -07:00
David Maciel
62104da946 Update link to Helm secrets (#6810)
The helm secrets link (https://github.com/futuresimple/helm-secrets) is pointing to the deprecated version of the tool. In their Deprecation notice (https://github.com/zendesk/helm-secrets#deprecation-information) they recommend moving to the maintained fork https://github.com/jkroepke/helm-secrets
2021-07-26 17:55:36 -07:00
Alexander Matyushentsev
d6a5d7700f fix: status bar rounding on applcition list page (#6811)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-26 17:08:25 -07:00
Tianchu Zhao
f1d740c4df docs(users): add woolworths,wooliesx (#6792)
Signed-off-by: Tianchu Zhao <evantczhao@gmail.com>
2021-07-26 14:58:47 -07:00
Alexander Matyushentsev
fb357defe3 feat: support --inline flag in 'argocd admin app/proj generate-spec' commands (#6804)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-26 14:58:13 -07:00
Alexander Matyushentsev
75a5f79ed2 fix: reduce filters panel width (#6809)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-26 14:54:53 -07:00
RoCha
8c973a40e3 docs: Change load_restrictor none to LoadRestrictionsNone (#6806)
Signed-off-by: Romain Chalumeau <rchalumeau@magicleap.com>
2021-07-26 13:31:34 -07:00
saprette
30ede1c4bf fix: Webhook does not trigger refresh when using target revision format refs/heads/<branch name> (#6800)
* fix: [#6785] Webhook does not trigger refresh when using target revision format refs/heads/<branch name>

Signed-off-by: Samuel Prette <samuel.prette@clearstream.com>

* fix: Update tests for [#6785] fix

Signed-off-by: Samuel Prette <samuel.prette@clearstream.com>
2021-07-26 12:47:34 -07:00
Jan Jansen
af516e9f0d chore: pre filter groups before enforcing #4296 (#6651)
* chore: pre filter groups before enforcing

Part of: #4296

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

* chore: prevent serialization if it is a mapclaims

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

* add comments

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
2021-07-26 11:11:36 -07:00
Alexander Matyushentsev
c3abe77bd5 fix: Cannot read property 'forEach' of undefined (#6803)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-26 10:36:50 -07:00
Daniel Galán y Martins
02bf2bfc20 docs: Add Joblift to USERS (#6807)
Signed-off-by: Daniel Galán y Martins <git@galan.de>
2021-07-26 10:27:20 -07:00
Alexander Matyushentsev
f66a38875b refactor: enhance application resources filter panels (#6793)
* refactor: enhance application resources filter panels

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

* use fixed position for resources filter on application details page

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-22 21:54:24 -07:00
Alexander Matyushentsev
7c3c3528b6 fix: copy ui assets into correct dist directory during image build (#6790)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-22 16:02:58 -07:00
Remington Breeze
eff2d2f816 feat(ui): Relocate resource filters (#6777)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-22 13:08:25 -07:00
Remington Breeze
84c70b776a fix(ui): Allow filters in input that are not listed in suggestions (#6788)
* fix(ui): Allow filters in input that are not listed in suggestions

Signed-off-by: Remington Breeze <remington@breeze.software>

* Add back accidentally removed line

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-22 13:02:07 -07:00
Alexander Matyushentsev
e68618d168 fix: add incorrectly removed --staticassets flag (#6778)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-22 08:37:04 -07:00
Alexander Matyushentsev
6262a8c750 feat: merge argocd-util into 'argocd admin' subcommand (#6773)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-21 17:00:49 -07:00
Alexander Matyushentsev
e058bc4228 chore: remove '-i' parameter from docker run command (#6776)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-21 13:49:10 -07:00
Alexander Matyushentsev
082e66bd5b chore: fix broken dev image build (#6775)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-21 13:34:14 -07:00
Avishai Carmel
ba221b9cee Users: add Lightricks (#6772) 2021-07-21 13:16:41 -07:00
Eldar Yusupov
2497679dcb feat: Add Redis SSL support. Fixes #4688 (#6742)
* feat: Add Redis SSL support

Signed-off-by: Eldar Yusupov <eyusupov@gmail.com>
2021-07-21 10:07:24 -07:00
Florian Hopfensperger
5f5f0285e9 fix: Static path for UI (#6769)
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@de.ibm.com>
2021-07-21 09:37:45 -07:00
Alexander Matyushentsev
561452ac94 feat: Headless Argo CD (aka GitOps Agent) (#6361)
* feat: add --headless flag to Argo CD CLI command

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

* docs: add headless installation manifests and documentation

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

* Apply reviewer notes

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

* Remove port forwarding logs

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-20 21:51:36 -07:00
Remington Breeze
d7a8a877ad feat: Add API server capability to serve UI extensions from shared dir (#6766)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-20 16:50:00 -07:00
Regina Scott
9c690a10e2 WIP: add status bar to applications list, issue #6275 (#6710)
Signed-off-by: Remington Breeze <remington@breeze.software>
Co-authored-by: Remington Breeze <remington@breeze.software>
Co-authored-by: Regina Scott
2021-07-20 14:55:43 -07:00
Alexander Matyushentsev
03dcff6659 fix: fix broken Test_nativeHelmChart_ExtractChart_insecure test (#6765)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-20 11:04:40 -07:00
Pieter van der Meer
3220b7613d fix: add insecure-skip-tls-verify on helm pull when Creds.InsecureSkipVerify is set to true (#6458)
* add "--insecure-skip-tls-verify" on helm pull when Creds.InsecureSkipVerify is set to true

* Requested change of alax

Co-authored-by: Pieter van der Meer <Pieter@dataworkz.nl>
2021-07-20 09:37:07 -07:00
Abhinav Sonkar
fbe2649857 docs: Add Axual (#6714)
* Add Axual

Signed-off-by: Abhinav Sonkar <abhinav@axual.com>

* Add alphabetically

Signed-off-by: Abhinav Sonkar <abhinav@axual.com>

Co-authored-by: Abhinav Sonkar <abhinav@axual.com>
2021-07-19 18:48:08 -07:00
Alexander Matyushentsev
c33e850d38 fix: argocd-server crashes due to nil pointer dereference (#6757)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-19 18:16:10 -07:00
Alexander Matyushentsev
b627435996 fix: TypeError: Cannot read property 'group' of undefined (#6755)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-19 16:51:38 -07:00
Alexander Matyushentsev
e251b14d6b fix: The UI crashes when trying to access some application with an empty commit message (#6756)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-19 16:51:18 -07:00
Alexander Matyushentsev
58ac345f2b feat: support managing cluster resources in a namespaced mode (#6581)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-19 11:58:58 -07:00
Remington Breeze
ef744e3c15 feat(ui): Persist visibility of apps list filters in local storage (#6748)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-19 11:00:51 -07:00
Alexander Matyushentsev
a9a69b74c9 docs: Argo CD Headless proposal (aka GitOps Agent) (#6385)
* docs: Argo CD Headless proposal (aka GitOps Agent)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-19 10:39:09 -07:00
ZymoticB
e17565ae81 fix: allow argocd-notification ingress to repo-server (#6746)
* Allow argocd-notification ingress to repo-server

This change allows an argocd-notification installation using the provided
manifests to ingress to the repo-server.

I am not sure if there is a prevailing opinion about how to manage a
cross project network policy for these related components so I thought
I would put up a PR to spark that discussion. This could live in a separate
NetworkPolicy object managed by the argocd-notifications manifests but I
thought it wuold be better for the possible ingresses for the argocd project
to all live in the argo-cd manifests. I know that notifications are an optional
component, so maybe this is better provided as a separate manifest that can
be strategic merged in? (I am a kustomize user).

Regardless, I think this policy is something that be maintained by argoproj
in some form to reduce release burden of users trying to hand maintain network
policies.

Signed-off-by: Tyler Dixon <tdixon@buf.build>

* make manifests

Signed-off-by: Tyler Dixon <tdixon@buf.build>
2021-07-16 13:59:30 -07:00
jannfis
1838fc0587 chore: Include k8s v1.21 in e2e test, drop v1.16 (#6716)
Signed-off-by: jannfis <jann@mistrust.net>
2021-07-16 09:43:08 -07:00
Nabil BENDAFI
90bacef5bb feat: allow argocd-cm to reference K8S Secrets (#4188) (#4342)
* feat: allow argocd-cm to reference K8S Secrets

Signed-off-by: Nabil BENDAFI <nbendafi@yseop.com>
2021-07-16 09:40:16 -07:00
Viktor Farcic
2ca14c6310 docs: Yet another ArgoCD-related video (#6730)
Signed-off-by: Viktor Farcic <viktor@farcic.com>
2021-07-16 09:17:44 -07:00
Yuan Tang
af7f3fbd48 docs: Add Alibaba Group to USERS.md (#6740)
* docs: Add Alibaba Group to USERS.md

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2021-07-16 09:15:35 -07:00
rohanmathure
30d2ba1f1c docs: Add chime as a user (#6725)
Signed-off-by: Rohan Mathure <rohan.mathure@chime.com>
2021-07-14 21:01:55 -07:00
Alex Collins
2b3601cfa3 feat(ui): Adds resource filter panel. Fixes #6379 #6331 #6081 (#6717)
Signed-off-by: Alex Collins <alex_collins@intuit.com>
2021-07-14 16:01:12 -07:00
Yi Cai
1b46143d07 fix: Cluster filter is broken on applications list page #6616 (#6715)
Signed-off-by: ciiay <yicai@redhat.com>
2021-07-14 21:00:19 +02:00
jannfis
3bba77c36f chore: Skip cluster e2e tests if already run (#6705)
* chore: Skip cluster e2e tests if already run

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

* Use defer to record test run

Signed-off-by: jannfis <jann@mistrust.net>
2021-07-13 19:19:48 +02:00
Josh Soref
1602ec992d chore: Spelling (#5373)
* spelling: across

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

* spelling: anyway

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

* spelling: assessment

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

* spelling: attribute

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

* spelling: crlf

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

* spelling: cmux

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

* spelling: committed

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

* spelling: convenience

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

* spelling: does-not

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

* spelling: e.g.

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

* spelling: fall back

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

* spelling: fall back to

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

* spelling: then ... falls back

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

* spelling: formatted

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

* spelling: github

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

* spelling: gitlab

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

* spelling: gitops

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

* spelling: health checks

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

* spelling: located

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

* spelling: logging

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

* spelling: oidc

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

* spelling: openshift

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

* spelling: os

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

* spelling: powershell

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

* spelling: preferred

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

* spelling: redact

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

* spelling: repo

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

* spelling: similarly

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

* spelling: staging

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

* spelling: statefulset

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

* spelling: stopped

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

* spelling: superseded

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

* spelling: synchronization

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

* spelling: to

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

* spelling: unified

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

* spelling: verification

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

* spelling: zookeeper

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

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-13 19:02:03 +02:00
Alexander Matyushentsev
45fbca510b docs: document health statuses in custom health checks (#6692)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-13 08:56:52 +02:00
Nico Ring
c8eab2c15d fix: correct type of Service for AWS ALB ingress (#6511)
Signed-off-by: Nico Ring <ringnico@web.de>
2021-07-13 08:56:06 +02:00
Alexander Matyushentsev
083390ef87 fix: downgrade normalize-url to avoid crash in safari (#6703)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-12 13:51:01 -07:00
Saumeya Katyal
d6dd6afd05 build: Upgrade npm dependencies to remove vulnerablities (#6700)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-07-12 09:54:18 -07:00
xuhrc
9a788c3470 fix: label selector is useless when name variable is not set (#5975)
when name variable is empty, the label selector is useless.

Signed-off-by: stanhrxu <stanhrxu@tencent.com>
2021-07-12 09:26:00 -07:00
Alexander Matyushentsev
dec710e8cb fix: download Pod Logs button not honouring argocd-server rootpath (#6548) (#6627)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-12 09:09:31 -07:00
Denis Krivenko
2693b5480e feat: Implement MinIO Tenant CRD health check (#6509)
* feat: Implement MinIO Tenant CRD health check

Signed-off-by: dnskr <dnskrv88@gmail.com>

* feat: Replace 'Unknown' and 'Missing' health check statuses with 'Progressing' for MinIO Tenant CRD

Signed-off-by: dnskr <dnskrv88@gmail.com>

Co-authored-by: Denis Krivenko <dnskrv88@gmail.com>
2021-07-11 14:18:33 -07:00
Saumeya Katyal
da3f21b62d fix: Version warning banner in docs (#6682)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>

add side-bar media queries

removed extra comments

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-07-11 10:23:28 +02:00
Alexander Matyushentsev
17d698d77f chore: stop publishing documentation to github pages (#6688)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-10 10:28:17 +02:00
Yi Cai
5f5b788202 fix: pods Tooltip runs offscreen #5481 (#6685)
Signed-off-by: ciiay <yicai@redhat.com>
2021-07-09 15:55:01 -07:00
Yi Cai
040202e7d0 fix: [#5462] ArgoCD UI External links dropdown caret positioned incorrectly in list view (#6668)
* fix: #5462 ArgoCD UI External links dropdown caret positioned incorrectly in list view

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

* fix: minor uddaptes to fix eslint error

Signed-off-by: ciiay <yicai@redhat.com>
2021-07-09 23:02:48 +02:00
Balazs Zachar
7e68b1ef71 feat: add custom resource health checks for trident.netapp.io/TridentOrchestrator and trident.netapp.io/TridentBackendConfig (Closes [ISSUE #6550]) (#6552)
* feat: add custom resource health checks for trident.netapp.io/TridentOrchestrator and trident.netapp.io/TridentBackendConfig

Signed-off-by: Balazs Zachar <zachar.balazs@gmail.com>

* feat: extend TridentOrchestrator check with degraded state (based on official documentation)

Signed-off-by: Balazs Zachar <zachar.balazs@gmail.com>
2021-07-08 18:39:23 -07:00
Remington Breeze
abdb4c0679 fix(ui): Add retry button to filters that failed to load (#6630)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-08 18:11:26 -07:00
Remington Breeze
0ff1ec511a fix(ui): Autocomplete menu did not change direction when not enough room (#6629)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-07-08 18:10:50 -07:00
jannfis
8030f4202a chore: Update Golang builder to 1.16.5 (#6653)
* chore: Update Golang builder to 1.16.5

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

* Use variables to refer to Go version in workflows

Signed-off-by: jannfis <jann@mistrust.net>
2021-07-08 12:35:06 +02:00
jannfis
b893eccea0 chore: Update container base image to Ubuntu 21.04 (#6652)
Signed-off-by: jannfis <jann@mistrust.net>
2021-07-07 21:08:21 +02:00
Yujun Zhang
e0db23b63d feat: make http client retryable (#6632)
Signed-off-by: Yujun Zhang <zhangyujun@gmail.com>
2021-07-06 12:12:51 +02:00
Takuma Kume
ef7ee088f5 feat: Supported set metadata annotations with argocd-util app generate-spec command (#6633)
* feat: Supported set metadata annotations with `argocd-util appgenerate-spec` command

Signed-off-by: takumakume <takuma.kume@pepabo.com>

* docs: Added `--annotations` option of `argocd-util app generate-spec` command

Signed-off-by: takumakume <takuma.kume@pepabo.com>

* fix: `--annotations` option changes the `.metadata` section, so change it to the appropriate place

Signed-off-by: takumakume <takuma.kume@pepabo.com>

* docs: Added `--annotations` option of `argocdapp create` command

Signed-off-by: takumakume <takuma.kume@pepabo.com>

* fix: set an empty value if there is no `=` in `--annotations`

Signed-off-by: takumakume <takuma.kume@pepabo.com>

* docs: added an example `--annotations` are `=` delimited

Signed-off-by: takumakume <takuma.kume@pepabo.com>
2021-07-06 12:11:48 +02:00
Shyukri Shyukriev
8cecf1eee6 docs: add MariaDB (#6638)
Signed-off-by: Shyukri Shyukriev <shyukri.shyukriev@mariadb.com>
2021-07-06 09:37:46 +02:00
Alexander Matyushentsev
f12650c32b fix: Application list page filter counts are confusing (#6625) (#6626)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-02 17:02:34 -07:00
Saumeya Katyal
ba4c65540b fix: Modify column size for Count field (#6611)
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
2021-07-02 23:09:34 +02:00
Alexander Matyushentsev
2ab10516be refactor: use git+https://github.com/argoproj/argo-ui.git instead of argo-ux npm package (#6622)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-02 14:00:37 -07:00
dependabot[bot]
7149e35822 chore(deps): bump prismjs from 1.23.0 to 1.24.0 in /ui (#6609)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.23.0...v1.24.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-01 09:26:21 -07:00
dependabot[bot]
e59ed2208f chore(deps): bump color-string from 1.5.3 to 1.5.5 in /ui (#6610)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-01 08:57:54 -07:00
Alexander Matyushentsev
8b40f96584 docs: document Argo CD development process (#6546)
docs: document Argo CD development process (#6546)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-07-01 08:55:07 -07:00
Regina Scott
6d1b789b53 fix: remove deprecated css function (#6607)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-07-01 08:54:44 -07:00
Remington Breeze
2a41018756 feat(ui): Improved applications list filters (#6091)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-06-30 17:29:22 -07:00
Alexander Matyushentsev
9f1af587ee refactor: upgrade gitops engine (#6578) (#6606)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-30 14:44:23 -07:00
Jonathan West
4a4b43f1d2 fix: unable to delete an Application if its target cluster is deleted, Argo CD enters infinite app deletion reconciliation loop (#6557)
Signed-off-by: Jonathan West <jonwest@redhat.com>
2021-06-29 16:32:21 -04:00
dependabot[bot]
5bd2f61c56 chore(deps): bump color-string from 1.5.3 to 1.5.5 in /ui (#6586)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-29 09:43:09 -07:00
jannfis
1d0b5fc7ec docs: Update security policy (#6593)
Signed-off-by: jannfis <jann@mistrust.net>
2021-06-29 07:52:56 -07:00
jannfis
76632d927e chore: Upgrade golang dependencies to latest versions (#6592)
Signed-off-by: jannfis <jann@mistrust.net>
2021-06-29 07:52:43 -07:00
dependabot[bot]
9b867ff075 chore(deps): bump prismjs from 1.23.0 to 1.24.0 in /ui (#6584)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.23.0...v1.24.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-28 14:29:53 -07:00
Chetan Banavikalmutt
f81ed952cb feat: add proxy field to repository create form (#6565)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-06-28 14:26:24 -07:00
Alexander Matyushentsev
ef910c8458 fix: argocd-util generate-spec should not print argocd-cm ConfigMap (#6582)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-28 13:19:03 -07:00
jannfis
e5d9c39308 chore: Fix some annoyances when running locally (#6576)
Signed-off-by: jannfis <jann@mistrust.net>
2021-06-28 20:54:26 +02:00
Marcio Ribeiro
46418f7a45 docs: Add Boticario and Beleza na Web To users (#6569)
Add Boticario and Beleza na Web To users
2021-06-28 09:39:11 -07:00
mitreangjelkoski
379298337f docs: Added Chargetrip as official users of ArgoCD (#6579)
Optional. My organization is added to USERS.md.
2021-06-28 09:38:56 -07:00
jannfis
d47f466198 fix: Allow gRPC connections from gRPC versions >1.17.x (#6577)
* fix: Allow gRPC connections from gRPC versions >1.17.x

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

* Use correct muxer for matching

Signed-off-by: jannfis <jann@mistrust.net>
2021-06-28 08:02:11 +02:00
jannfis
f74d8072c5 chore: Remove deprecated go build flag -i from protogen (#6571)
Signed-off-by: jannfis <jann@mistrust.net>
2021-06-25 18:31:43 +02:00
Xavi Torelló
0e9aa8e6b6 docs: Use latest GH release to avoid extra curl (#6556) 2021-06-25 11:39:09 +02:00
Vladyslav Miletskyi
ce1bcb3e4b docs: link docs about different PrunePropagationPolicy values (#6555)
This part of the documentation is not clear enough. It takes a lot of digging to actually find a clear explanation of what those policies are bringing to the end-user.

Source: https://github.com/argoproj/argo-cd/discussions/6239
Signed-off-by: Miletskyi Vladyslav <vladyslav.miletskyi@eu.equinix.com>
2021-06-24 16:51:47 +02:00
Jan Gräfen
ee8393dba5 docs: Add Generali Deutschland AG to users (#6542)
Signed-off-by: Jan Gräfen <223234+jangraefen@users.noreply.github.com>
2021-06-23 23:00:11 +02:00
Jan Gräfen
33a8d80a42 chore: Remove unneeded secret type check (#6543)
Signed-off-by: Jan Gräfen <223234+jangraefen@users.noreply.github.com>
2021-06-23 13:28:34 -07:00
Jan Gräfen
a80656d345 docs: Add missing documentation for repository secrets (#6540)
docs: Add missing documentation for repository secrets (#6540)

Signed-off-by: Jan Gräfen <223234+jangraefen@users.noreply.github.com>
2021-06-23 12:26:16 -07:00
Jan Gräfen
4d9e8bc2e6 feat: Repository Configuration as Secrets (#6103)
feat: Repository Configuration as Secrets (#6103)

Signed-off-by: Jan Gräfen <223234+jangraefen@users.noreply.github.com>
2021-06-23 10:46:43 -07:00
Benjamin Henrion
31be4d8f19 chore: container did not support setting the timezone via an env var like '-e TZ=Europe/Brussels'; Solution: adding tzdata package solve this issue (#6481)
Signed-off-by: Benjamin Henrion <zoobab@gmail.com>
2021-06-23 19:42:41 +02:00
Alexander Matyushentsev
6736a3d7d7 fix: EKS Clusters Broken Due To ReadOnly Filesystem (#6504)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-23 19:41:22 +02:00
Zadkiel
63eb5de233 docs: fix typo in declarative setup (#6536)
Signed-off-by: zadkiel <hello@zadkiel.fr>
2021-06-23 09:01:18 -07:00
Alexander Matyushentsev
9815490edb fix: WebUI failure when loading pod view 't.parentRefs is undefined' (#6490) (#6535)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-22 18:20:54 -07:00
Alexander Matyushentsev
766a7ba2b1 fix: Aggregated pod logs viewer is broken (#6329) (#6534)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-22 18:14:55 -07:00
RoCha
7d32c2735a chore: Correct path to resource_customizations in TestLuaHealthScript (#6499)
Signed-off-by: Romain Chalumeau <rchalumeau@magicleap.com>
2021-06-22 17:20:32 -07:00
Antonin Bas
4ae5cdf7a4 fix: typo in networkPolicy definition in manifests (#6532)
Unless the argocd-dex-server-network-policy NetworkPolicy was meant to
authorize ALL TCP traffic, which seems unlikely, this is a typo.

Signed-off-by: Antonin Bas <abas@vmware.com>
2021-06-22 15:37:04 -07:00
Subba Reddy Veeramreddy
7f5c0142ff feat: Ignore preserveUnknownFields in Diff from CRD Spec (#6503)
Signed-off-by: Subba Reddy Veeramreddy <subbareddyv.uoh@gmail.com>
2021-06-22 09:58:15 -07:00
Chetan Banavikalmutt
c5b8aa765c docs: Add chetan as a reviewer (#6524)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-06-22 09:15:30 -07:00
Henrik Blixt
1593f8d797 docs: add hblixt as reviewer (#6519)
* docs: add hblixt as reviewer

As per 6/21 meeting, proposed and accepted as reviewer.
Thanks for the confidence, looking forward to contributing even more!

* docs: re-add ishitasequeira
2021-06-21 15:04:36 -07:00
Ishita Sequeira
f3b79aef25 chore: Add ishitasequeira as a reviewer (#6518)
Signed-off-by: Ishita Sequeira <isequeir@redhat.com>

Co-authored-by: jannfis <jann@mistrust.net>
2021-06-21 13:30:15 -07:00
Alexander Matyushentsev
c4f69ac144 refactor: upgrade rxjs version (#6515)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-21 13:13:38 -07:00
Regina Scott
dff84a7d95 docs: Add reginapizza as a reviewer (#6517)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-06-21 22:00:52 +02:00
Josh Soref
bf9622a2c4 docs: simplify declarative setup (#6487)
* Split different kinds of objects
* Remove some legacy content
* Some wording fixes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-06-21 12:38:29 +02:00
Alexander Matyushentsev
2541fa0332 refactor: upgrade gitops engine (argoproj/gitops-engine/#286) (#6491)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-17 12:06:18 -07:00
Remington Breeze
0f6c1ab01e docs: Argo CD Extensions proposal (#6240)
Signed-off-by: Remington Breeze <remington@breeze.software>
Co-authored-by: Jesse Suen <jessesuen@users.noreply.github.com>
2021-06-17 10:02:55 -07:00
Alexander Matyushentsev
170b657a79 docs: update 2021 roadmap (#6386)
* docs: update 2021 roadmap

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

* Apply reviewer notes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-17 08:48:51 -07:00
Chetan Banavikalmutt
9476ab5e18 feat: add first class support to access repositories using proxy (#5581) (#6286)
* feat: add first class support to access repositories using proxy

Currently, users need to set the proxy URLs as env variables in the repo server. This is not user-friendly and also error-prone. This PR adds support to maintain proxy URLs along with repository configs in the argocd-cm. Argo CD uses this proxy to access your repository. In case the custom proxy is absent, it defaults to reading the proxy from the env variables.

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

* set both http & https proxy variables

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-06-16 14:45:10 +02:00
Alexander Matyushentsev
e58d94f430 refactor: upgrade gitops engine (argoproj/gitops-engine/#286) (#6478)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-15 12:23:42 -07:00
Alexander Matyushentsev
2c966f24a5 fix: app hard refresh should refresh cached app details (#6463)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-15 11:48:14 -07:00
Zadkiel
15a3c29b01 docs: use jq path expression to ignore differences to caBundle mutating webhook (#6470)
Signed-off-by: zadkiel <zadkiel_aharonian@carrefour.com>
2021-06-15 09:34:48 -07:00
veithammerstingl
4485025d86 Included BMW Group as Users (#6476) 2021-06-14 18:54:02 -07:00
jannfis
a647ca960a fix: Update redis to 6.2.4 (#6475)
Signed-off-by: jannfis <jann@mistrust.net>
2021-06-14 18:44:39 -07:00
amitde69
c62012d526 Update USERS.md (#6466) 2021-06-12 16:56:58 -07:00
Yujun Zhang
a0f887e854 fix: unset --plugin-env should return OK when not found (#6457)
Signed-off-by: Yujun Zhang <zhangyujun@gmail.com>
2021-06-12 12:58:18 -07:00
balchua
e415d6ee90 docs: Add Crédit Agricole CIB to list of production users. (#6465)
* add ca-cib to production users.

Signed-off-by: balchua <balchua@yahoo.com>

* fix sematic pr.

Signed-off-by: balchua <balchua@yahoo.com>
2021-06-12 10:38:20 +02:00
Amit Rout
6f959506ab docs: Argo CD installation manifest file to run test against a real cluster (#6311)
* docs: Argo CD installation manifest file to run test against a real cluster

Signed-off-by: arout <arout@redhat.com>

* Use more expressive sentence

Signed-off-by: arout <arout@redhat.com>
2021-06-11 09:43:59 +02:00
Alexander Matyushentsev
fba25d8229 fix: prevent 'cannot read property "filter" of undefined' during nodes filtering (#6453)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-10 15:47:43 -07:00
Alexander Matyushentsev
2da0e81b05 fix: missing live resources without a health check should not affect application health (#6446)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-10 13:29:22 -07:00
Ishita Sequeira
f533ed17f0 feat: simplify parametrization of Argo CD server processes (#6328)
feat: simplify parametrization of Argo CD server processes  (#6328)

Signed-off-by: Ishita Sequeira <isequeir@redhat.com>
2021-06-10 13:03:47 -07:00
David Schneider
aa86dbabbf Fix documentation for TLS configuration (#6448)
Correct the header for "Inbound TLS options for argocd-repo-server"
2021-06-10 10:35:42 -07:00
Josiah Wolf Oberholtzer
af338ddd80 feat: Support Kustomize --force flags (#6443)
Signed-off-by: Josiah Oberholtzer <josiah.oberholtzer@gmail.com>
2021-06-09 10:16:43 -07:00
Alexander Matyushentsev
e865504a98 fix: re-use same http transport in grpc proxy to avoid goroutine leak (#6444)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-09 10:15:56 -07:00
jannfis
1f9fc2cc53 fix: Fail gracefully when unable to unmarshal cluster secret (#6427)
* fix: Fail gracefully when unable to unmarshal cluster secret

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

* Do not log error details

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

* Do not return invalid clusters on list

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

* Additional test

Signed-off-by: jannfis <jann@mistrust.net>
2021-06-09 14:23:09 +02:00
dependabot[bot]
8c9674b272 chore(deps): bump ws from 5.2.2 to 5.2.3 in /ui (#6436)
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 20:25:05 -07:00
Miguel A. Alvarado V
2f9683aac7 docs: adding "repository.credentials" to argocd-cm.yaml (#6435)
for pairity with what's in declarative-setup.md

Signed-off-by: Miguel A. Alvarado V <alvaradoma@gmail.com>
2021-06-08 16:10:40 -07:00
Alexander Matyushentsev
3dd5dc44ac fix: repo-server should reset manifests cache when k8s version/api versions change (#6434)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-08 16:10:24 -07:00
Alexander Matyushentsev
c618c1fc76 docs: move initial password instructions for v1.9+ to get top (#6307)
* docs: move initial password instructions for v1.9+ to get top

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-08 15:31:44 -07:00
Alexander Matyushentsev
9adba69e88 feat: disable reconciliation if timeout.reconciliation is set to 0 (#6406)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-08 08:57:05 -07:00
Alexander Matyushentsev
faba995bd7 chore: regenerate manifests using codegen (#6422)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-07 12:13:45 -07:00
Alexander Matyushentsev
124cc8a07e chore: pin mkdocs version to fix docs build (#6421)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-07 10:53:37 -07:00
Alexander Matyushentsev
33d691eccd fix: allows access to dex metrics from any pod (#6420)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-07 10:42:09 -07:00
Carlos Montemuino
f2093ecbf3 docs: add Glovo to users (#6416)
Signed-off-by: Carlos Montemuiño <carlos.montemuino@glovoapp.com>
2021-06-07 09:29:34 -07:00
Saleh Almatrafi
12c95d64a7 add Tamkeen Technologies to the USERS (#6408)
Co-authored-by: Saleh Almatrafi <s.almatrafi@tamkeentech.sa>
2021-06-06 10:14:49 -07:00
Dean Lindqvist Todevski
e729acd075 Update USERS.md (#6398)
* Update USERS.md

Add Zimpler to users.
2021-06-04 16:14:08 -07:00
Miguel A. Alvarado V
e444575c15 fix: Update rbac.md for typo (#6392)
Fixing what seems like a typo

Signed-off-by: Miguel A. Alvarado V <miguel@caylent.com>
2021-06-04 14:18:24 -07:00
Alexander Matyushentsev
2eb6b3bf80 fix: add client side retry to prevent 'transport is closing' errors (#6402)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-04 11:57:04 -07:00
Leah
abb0c4b260 feat: allow substitutions in plugin env variables (#6097)
* feat: allow substitutions in plugin env variables

Signed-off-by: Leah <github.leah@hrmny.sh>

* allow all variables

Signed-off-by: Leah <github.leah@hrmny.sh>

* add docs

Signed-off-by: Leah <github.leah@hrmny.sh>

* better phrasing

Signed-off-by: Leah <github.leah@hrmny.sh>

* add generic error to env var parsing

Signed-off-by: Leah <github.leah@hrmny.sh>
2021-06-04 19:11:09 +02:00
Kshama Jain
c3b12202d7 docs: enhancement proposal for config management plugin v2 (#5927)
docs: enhancement proposal for config management plugin v2 (#5927)

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-06-04 09:08:51 -07:00
Felipe Romani
118c298752 WSpot adopt (#5575)
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-04 09:08:29 -07:00
Jake Utley
86d0ee6982 feat: allow jq path expressions in diffing customizations (#4320) (#6109)
* Add jqPathExpression field and implementation for ignoreDifferences

Signed-off-by: Jake Utley <jutley@hiya.com>

* Add a couple tests for jqPathExpression

Signed-off-by: Jake Utley <jutley@hiya.com>

* Add JQPathExpressions into relevant types in types.go

Signed-off-by: Jake Utley <jutley@hiya.com>

* Add documentation for jq path expressions

Signed-off-by: Jake Utley <jutley@hiya.com>

* Add Hiya to USERS.md

Signed-off-by: Jake Utley <jutley@hiya.com>

* Update generated code

Signed-off-by: Jake Utley <jutley@hiya.com>

* Do not require jsonPointers or jqPathExpressions

Signed-off-by: Jake Utley <jutley@hiya.com>

* Fix some linting issues

Signed-off-by: Jake Utley <jutley@hiya.com>

* Add test for valid jq that produces error

Signed-off-by: Jake Utley <jutley@hiya.com>

* Add test to correctly parse jqPathExpressions from split key configs

Signed-off-by: Jake Utley <jutley@hiya.com>

* regen

Signed-off-by: Jake Utley <jutley@hiya.com>
2021-06-03 22:06:55 -07:00
Kshama Jain
2ba6223b6c feat: update app informer to avoid stale cache (#6372)
feat: update app informer to avoid stale cache (#6372)

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-06-03 15:40:35 -07:00
Remington Breeze
16349b8819 fix(ui): Show orphaned resources option in list view did not work (#6171)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-06-03 14:14:21 -07:00
LucasBoisserie
bffdd0b6f3 fix: Update documentation Argocd app CRD health with app of apps (#6281)
fix: Update documentation Argocd app CRD health with app of apps (#6281)

Signed-off-by: LucasBoisserie <lucas.boisserie@gmail.com>
2021-06-03 10:46:09 -07:00
Remington Breeze
e9ce61d662 fix(ui): resize pod groups with large number of pods (#6382)
* fix(ui): resize pod groups with large number of pods

Signed-off-by: Remington Breeze <remington@breeze.software>

* Remove comments

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-06-02 15:35:51 -07:00
Jared Clarke
d6f579b8f6 feat: Add the ability to change user password in the UI (#5444)
* feat: Add the ability to change user password

Signed-off-by: Jared Clarke <jared.clarke@eckoh.com>
2021-06-02 15:26:16 -07:00
Remington Breeze
f43a6ad2aa fix(ui): Crash on application pod view (#6384)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-06-02 14:19:15 -07:00
Alexander Matyushentsev
3fbe818bea docs: add project scoped repositories and clusters proposal (#6065)
* docs: add project scoped repositories and clusters proposal

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-06-01 11:45:56 -07:00
Nabil BENDAFI
dfa5fef8c6 docs: typo (#6367)
Signed-off-by: Nabil BENDAFI <nbendafi@yseop.com>
2021-06-01 04:21:33 -04:00
Josh Soref
701bc5b709 docs: reword change initial password advice (#6356)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-05-31 17:32:49 -07:00
jannfis
0f6a7d5f34 feat: Upgrade Helm to v3.6.0 and pass --kube-version to templating (#6359)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-29 08:46:16 +02:00
Aikawa
e44fa434ab fix: use current logrus config when logrus is created internally (#6234) (#6301)
fix: use current logrus config when logrus is created internally (#6234) (#6301)
Signed-off-by: yu-croco <yuki.kita22@gmail.com>
2021-05-28 16:27:57 -07:00
Huanxin Hu
e3392eeb57 fix: applications list filter do not filter out the exactly cluster name (#6340)
Signed-off-by: Huanxin Hu <huanxin.hu@bytedance.com>

Co-authored-by: Huanxin Hu <huanxin.hu@bytedance.com>
2021-05-28 14:32:28 -07:00
jannfis
4a3c94b20c chore: Update Golang to v1.16.4 (#6358)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-28 19:06:06 +02:00
jannfis
2a7745b41b chore: Remove deprecated -i from go build flags (#6355)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-28 17:19:49 +02:00
Alexander Matyushentsev
e23f3f495d fix: avoid possible nip pointer dereference during syncing (#6354)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-28 07:25:35 -07:00
Alexander Matyushentsev
1708a7154d feat: add 'argocd-util cluster shards' command that prints shards statistics (#6353)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-27 15:37:55 -07:00
Kshama Jain
a6d04469c5 fix: logout redirect URL (#6347)
* fix logout redirect url

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-05-27 13:02:06 -07:00
Alexander Matyushentsev
3604a588bb refactor: upgrade k8s client to v0.21.0 (#6322)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-27 10:20:53 -07:00
dependabot[bot]
a61052ba1a chore(deps): bump dns-packet from 1.3.1 to 1.3.4 in /ui (#6346)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-27 08:53:27 -07:00
jannfis
c5b25c067f docs: Reflect minimum required Go version with reality (#6342)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-27 14:49:08 +02:00
Vadym Liubko
54ec2fcadb docs: fix typo in sync_windows.md (#6334)
Signed-off-by: Vadym Liubko <neznam.ua@gmail.com>
2021-05-27 08:44:59 +02:00
Alexander Matyushentsev
5fd7ffdb7a fix: add missing --container flag to 'argocd app logs' command (#6320)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-25 17:37:08 -07:00
Alexander Matyushentsev
aad1a26144 fix: grpc web proxy must ensure to read full header (#6319)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-25 17:36:50 -07:00
dependabot[bot]
32f60d3504 chore(deps): bump browserslist from 4.7.2 to 4.16.6 in /ui (#6312)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.7.2 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.7.2...4.16.6)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-25 12:27:40 -07:00
zakriya753
8cb589859f Update USERS.md (#6308)
Unifonic Inc include in Users
2021-05-25 12:27:01 -07:00
Kshama Jain
62aa859f29 fix: add generate bearer token option to argocd-util cluster generate-spec (#6317)
* Add generate bearer token option

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-05-25 10:48:09 -07:00
blakebarnett
ae5388dd79 fix: replace colons in addition to slashes in app tmp directory (#6290) (#6293)
closes https://github.com/argoproj/argo-cd/issues/6290

Signed-off-by: Blake Barnett <blakeb@me.com>
2021-05-24 13:04:29 -07:00
Alexander Matyushentsev
ffb22ff1ff fix: UI should automatically retrigger SSO login after token expiration (#6309)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-24 10:50:47 -07:00
Stéphane Este-Gracias
857d448a5c docs: Add CLI installation with Homebrew for Linux and WSL (#6297)
Signed-off-by: Stéphane Este-Gracias <sestegra@gmail.com>
2021-05-24 09:42:32 -07:00
Kshama Jain
20ba86ba5f fix: argocd cluster add <context> --in-cluster (#6276)
fix: argocd cluster add <context> --in-cluster (#6276)

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-05-24 09:25:54 -07:00
gaurav517
35a5f19d08 docs: fix git-pod url in doc (#6284)
Signed-off-by: Kumar Gaurav <kgaurav2@ebay.com>
Signed-off-by: Kumar Gaurav <gaurav@kgaurav.com>
2021-05-23 14:08:24 -07:00
Alexander Matyushentsev
cc98954847 fix: default app resync timeout is 0 seconds instead of 3 minutes (#6299)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-21 17:36:41 -07:00
Alexander Matyushentsev
696610688e fix: controller should refresh app before running sync operation (#6294)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-21 13:32:31 -07:00
Alexander Matyushentsev
0e9823efa9 fix: userinfo /v1/session/userinfo should return authenticated=false if token has expired (#6282)
fix: userinfo /v1/session/userinfo should return authenticated=false if token has expired (#6282)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-20 12:58:24 -07:00
Alexander Matyushentsev
40629e5715 fix: enable access to metrics port in embedded network policies (#6277)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-19 22:32:57 -07:00
Alexander Matyushentsev
b57ba42b9d fix: gzip static resources if gzip is enabled (#6279)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-19 22:32:36 -07:00
Alexander Matyushentsev
b2f547e5ab fix: display log streaming error in logs viewer (#6100) (#6273)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-19 15:52:11 -07:00
Kshama Jain
da222e9621 fix: namespace install shouldn't contain namespace in the manifests (#6266)
* fix: Argocd namespace install contains namespace in the manifests

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-05-19 14:33:01 -07:00
Shoubhik Bose
cc4eea0d69 chore: Organize Application-related defaults/constants in the Application API's package. (#5893)
chore: Organize Application-related defaults/constants in the Application API's package. (#5893)

Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-05-19 12:43:04 -07:00
Alexander Matyushentsev
9b32e01104 feat: cache resolved git/helm repository revisions (#6102)
* feat: cache resolved git/helm repository revisions

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-19 12:30:15 -07:00
Shoubhik Bose
44dccdbba0 fix: run argo-cd repo server as non-root with read-only-root-fs (#5814)
fix: run  argo-cd repo server as non-root with read-only-root-fs (#5814)

Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-05-19 12:21:56 -07:00
dependabot[bot]
cf78189678 chore(deps): bump ua-parser-js from 0.7.20 to 0.7.28 in /ui (#6186)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.20 to 0.7.28.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.20...0.7.28)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 08:56:05 -07:00
dependabot[bot]
da9cf5a4b6 chore(deps): bump url-parse from 1.4.7 to 1.5.1 in /ui (#6190)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 08:55:44 -07:00
Remington Breeze
e84f3c6b3f fix(ui): Hide Diff tab in Application Details when App is synced (#6214)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-19 08:54:56 -07:00
Remington Breeze
e959c3b2a0 feat(ui): Add view toggle to hide/show unschedulable node in pod view (#6263)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-19 08:51:57 -07:00
Kai Reichart
748126e95f fix: jq installation arm (#6269)
Signed-off-by: Kai Reichart <kai@reichart.dev>
2021-05-19 14:03:21 +02:00
Alexander Matyushentsev
3f32a750a0 chore: use go embed instead of packr (#6262)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-18 20:46:17 -07:00
Remington Breeze
7d12385aed fix(ui): Don't count errored or completed neighbor pods toward resource consumption (#6259)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-18 16:01:23 -07:00
Remington Breeze
4159ebc6ce fix(ui): Resource details panel crashes when resource deleted (#6260)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-18 13:16:38 -07:00
jannfis
434af15d5b fix: Enable kex algo diffie-hellman-group-exchange-sha256 for go-git ssh (#6253)
* fix: Add support for diffie-hellman-group-exchange-sha256 for go-git ssh

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

* Update Procfile

Signed-off-by: jannfis <jann@mistrust.net>
2021-05-18 13:25:23 +02:00
Kotaro Shimizu
5c41377ca6 docs: fix ApplyOutOfSyncOnly in sync-options (#6249)
Signed-off-by: nekottyo <nekottyo@gmail.com>
2021-05-17 21:37:15 -07:00
Bob Lau
f1d72d2b86 docs: Remove duplicated IBM GitOps blog and update official URL (#6245) (#6246)
Signed-off-by: Bo Liu <lbseraph@gmail.com>
2021-05-16 11:04:08 +02:00
Yujun Zhang
5aa29ce405 chore: fix typo in comment (#6224)
Signed-off-by: Yujun Zhang <zhangyujun@gmail.com>
2021-05-15 17:27:17 +02:00
Yujun Zhang
a1419c2276 feat: use RLock and RUnlock for project to improve performance (#6225)
* feat: use RLock and RUnlock for project to improve performance

Signed-off-by: Yujun Zhang <zhangyujun@gmail.com>

* chore: go mod vendor && go mod tidy

Signed-off-by: Yujun Zhang <yujunz@nvidia.com>
2021-05-13 19:12:24 -07:00
akhalyavka
9bf83b4695 fix: rewrite Host header in dex reverse proxy (#6183)
* fix: rewrite Host header in dex reverse proxy

Signed-off-by: Alexey Khalyavka <alexey.khalyavka@datarobot.com>

* lint

Signed-off-by: Alexey Khalyavka <alexey.khalyavka@datarobot.com>
2021-05-12 09:11:44 +02:00
mickkael
5934094330 chore: docker image build compatible with arm64 (#6192)
Signed-off-by: mickkael <19755421+mickkael@users.noreply.github.com>
2021-05-12 09:07:32 +02:00
dependabot[bot]
456a2bc934 chore(deps): bump hosted-git-info from 2.8.5 to 2.8.9 in /ui (#6202)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.5 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.9)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 21:47:27 -07:00
dependabot[bot]
32c73ad8bd chore(deps-dev): bump postcss from 7.0.21 to 8.2.10 in /ui (#6219)
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.21 to 8.2.10.
- [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/7.0.21...8.2.10)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 21:46:57 -07:00
Remington Breeze
d3fffc2b49 fix(ui): UI crashes after reinstalling ArgoCD (#6218)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-11 20:54:29 -07:00
aniekgul
ac2491d37d chore: upgrade redis-ha to 4.12.15, use bind value (#6205)
Signed-off-by: Aniek Gul <aniekgul@hotmail.com>
2021-05-11 09:57:40 +02:00
Joe Bowbeer
31d234560d fix: copy github app key from repocreds (#6197)
* fix: copy github app key from repocreds

Fixes #6196

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>

* Add GitHub App to unit test

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2021-05-11 09:56:49 +02:00
dependabot[bot]
4761656306 chore(deps): bump handlebars from 4.7.6 to 4.7.7 in /ui (#6187)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 15:13:06 +02:00
Dominik Braun
ce28ea33c9 feat: Ask for confirmation when adding a cluster (#6172)
* feat: Ask for confirmation when adding a cluster

Signed-off-by: Dominik Braun <mail@dominikbraun.io>

* feat: Exit with code 1 on non-successful confirmation

Signed-off-by: Dominik Braun <mail@dominikbraun.io>

* feat: Optimize imports

Signed-off-by: Dominik Braun <mail@dominikbraun.io>

* feat: Use existing isatty.IsTerminal function

Signed-off-by: Dominik Braun <mail@dominikbraun.io>

* Order imports in cluster.go

Signed-off-by: Dominik Braun <mail@dominikbraun.io>

* Update CLI documentation

Signed-off-by: Dominik Braun <mail@dominikbraun.io>
2021-05-10 13:33:03 +02:00
jannfis
29b4c4deff chore: Allow ingress traffic to argocd-server by default (#6179)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-10 10:22:55 +02:00
Joshua Jackson
6c51082d40 docs: Onelogin - Update documentation for v2 openid setup (#6191)
Why do we need this change?
=======================
On April 20th, 2021 onelogin removed their v1 implementation of openid. You will get a 410 error if you try to use this url. As such update documentation to rely upon v2 api

What effects does this change have?
=======================
* Updates the onelogin documentation to correctly setup with the v2 implementation of openid

Signed-off-by: Joshua Jackson <joshua.jackson@jobvite-inc.com>
2021-05-10 10:22:24 +02:00
andybauer
5ec7d6e33e docs: added SAP GitOps blog post (#6185)
Signed-off-by: Andreas Bauer <hallo@abauer.org>
2021-05-07 16:30:05 +02:00
Dewan Ishtiaque Ahmed
09c5698c11 fix: test/remote/Makefile image path fix (#6181)
Signed-off-by: Dewan Ahmed <dewan.ishtiaque@hotmail.com>
2021-05-06 19:41:37 +02:00
Dominik Braun
1797aa5324 docs: Recommend --embed-certs flag for starting minikube (#6170)
* Recommend --embed-certs flag for starting minikube

Signed-off-by: Dominik Braun <mail@dominikbraun.io>

* docs: Recommend --embed-certs flag for starting minikube

Signed-off-by: Dominik Braun <mail@dominikbraun.io>
2021-05-06 13:31:56 +02:00
Alexander Matyushentsev
8b6af8b3d3 feat: add network policies to restrict traffic flow between argocd components (#6156)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-04 17:18:11 -07:00
Kyle Smith
82b177fd02 refactor: decompose Repository.GetAppDetails, remove interface{}. (#5634)
* refactor: decompose Repository.GetAppDetails, remove interface{}.

Signed-off-by: Kyle Smith <askreet@gmail.com>
2021-05-04 13:45:31 -07:00
Chetan Banavikalmutt
deac72f05f feat: allow admins to enable the usage of lua standard library (#6087)
Currently, the usage of standard lua library is always disabled, making it difficult to implement complex health check scripts.
This feat allow admins to control the usage of standard library by setting "health.lua.useOpenLibs" (merged-keys convention)/"resource.customizations.useOpenLibs.<group_kind>"
(split-keys convention) field in argocd-cm ConfigMap.

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-05-04 08:25:51 +02:00
Seiji 誠 次
6acac42412 Missing parameter (#6152)
This missing parameter in `argocd` CLI led me to open an issue https://github.com/argoproj/argo-cd/issues/6151

But I found the real problem that concerned in a missing command parameter at docs.

Signed-off-by: hakuno <seoseiji@gmail.com>
2021-05-03 13:21:05 -07:00
Remington Breeze
1e517e71e9 fix(ui): URL not updated on tab change (#6149)
* fix(ui): URL was not update on tab change

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-03 10:12:23 -07:00
Jonah Back
ddfd78f872 fix: copy github app key from repocreds (#6140)
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-05-03 19:08:47 +02:00
jannfis
75a201e45b chore: Update haproxy for redis-ha to 2.0.22 (#6142)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-03 09:07:16 +02:00
Trevor Royer
b4507d800d fix: knative health reporting #6130 (#6131)
* add ready = false health check

add additional tests

Signed-off-by: Trevor Royer <troyer@redhat.com>

* Fix health checks for knative resources

Signed-off-by: Trevor Royer <troyer@redhat.com>

* fix tests

Signed-off-by: Trevor Royer <troyer@redhat.com>
2021-05-01 13:09:42 +02:00
Remington Breeze
5981bd18be fix(ui): Resource detail tabs links weren't working (#6138)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-04-30 11:09:24 -07:00
Chetan Banavikalmutt
4c012245c4 feat: add support to backup applicationsets (#6095)
This commit adds support to export and import applicationset objects along with other Argo CD resources

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-04-30 12:34:58 +02:00
Kirill Zaborsky
2f1357a2b5 Fix password placeholder (#6105)
Signed-off-by: Kirill Zaborsky <qrilka@gmail.com>
2021-04-29 12:41:32 -07:00
Josh Soref
5c3f1d4b17 docs: add period to sentence (#6124)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-04-29 10:47:30 +02:00
yancl
a125794dba fix: remove break for appsCount (#6115)
Signed-off-by: yancl <kmoving@gmail.com>
2021-04-28 12:37:46 -07:00
Jan Jansen
c46c95bb4a feat: Implement cluster-api CRD health checks (#5142)
Signed-off-by: jan.jansen <jan.jansen@gdata.de>
2021-04-28 11:58:03 -07:00
Alexander Matyushentsev
9ef9be41d5 docs: update v2.0 release date in changelog (#6118)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-28 11:54:21 -07:00
J. Mark Pim
11489822d0 fix: Don't record the user claims of invalid tokens (#5897)
* fix: Only add claims to the context if they're valid

Signed-off-by: Mark Pim <j.mark.pim@gmail.com>
2021-04-28 11:50:18 -07:00
rafaelsilvaaa10
070fe0a9d8 Update Users - Adding Natura &Co (#6120)
We are currently working with argocd in production
2021-04-28 11:48:42 -07:00
Dinesh Yadav
45713b1ffc Support external vendoring of assets using go toolchain (#3217) 2021-04-28 10:36:13 -07:00
jannfis
d9bc6cf699 feat: Externalize TLS cert for argocd-server (#6071)
* feat: Externalize TLS cert for argocd-server

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

* Update docs for mTLS scenarios

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

* Inline documentation

Signed-off-by: jannfis <jann@mistrust.net>
2021-04-26 19:56:09 +02:00
Tom Keur
fa9440f885 chore (docs): add webstores to users (#6088)
Signed-off-by: Tom Keur <tom.keur@webstores.nl>
2021-04-24 17:19:02 +02:00
May Zhang
1ea0b373d2 fix: when resolve dependencies, use repo from project. (#6090)
* fix: when resolve dependencies, use repo from project.

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

* fix: failed test case

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

* fix: lint error

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

* fix: lint error

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-04-23 17:32:28 -07:00
Kshama Jain
fad9030ded feat: split resource.customizations into sub keys (#6060)
feat: split resource.customizations into sub keys (#6060)

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-04-23 16:29:42 -07:00
Remington Breeze
bfd0b155ef fix(ui): Application Create panel broken (#6080)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-04-21 13:35:45 -07:00
May Zhang
050e63fded fix: manifest files with kustomize 4.1.2 (#6073)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-04-21 07:42:43 -07:00
May Zhang
b6d5c23bce fix: upgrade to kustomize 4.1.2 (#6059)
* fix: upgrade to kustomize 4.1.2

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

* fix: try to trigger the build again.

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

* fix: unit test

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

* fix: trigger build

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

* fix: install-codegen-tools.sh

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

* fix: trigger build

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

* fix: revert back to 3.9.4

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

* fix: try 4.1.2 again

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

* fix: adding sha256 file for kustomize 4.1.2

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

* fix: adding sha256 file for kustomize 4.1.2

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

* fix: disable a test

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

* fix: remove kustomize 3

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

* fix: fixed e2e test and added upgrade doc

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

* fix: fixed e2e test and added upgrade doc

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-04-20 15:35:18 -07:00
Remington Breeze
1bffd827aa feat(ui): Information header for selected resource panel (#5557)
* Add new resource header for resource info panel

Signed-off-by: Remington Breeze <remington@breeze.software>
2021-04-20 14:26:48 -07:00
Sebastián Greco
5ca09481e0 feat: Add health-checks for Elasticsearch #6052 (#6052)
* Add Elasticsearch health checks

Signed-off-by: Sebastian Greco <pup_seba@yahoo.com>
2021-04-20 11:39:48 -07:00
dependabot[bot]
411f9c44df chore(deps): bump ssri from 6.0.1 to 6.0.2 in /ui (#6058)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 10:41:01 -07:00
Alexander Matyushentsev
81d5b9388b chore: publish argoproj/argocd:latest using CI (#6070)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-20 10:13:47 -07:00
hrpatel
dee71db556 fix: Run redis container as redis (#6041)
Signed-off-by: hrpatel <hrpatel@users.noreply.github.com>
2021-04-20 10:13:26 -07:00
Ishita Sequeira
31d66bcef8 fix: file descriptor leak (#6064)
Signed-off-by: Ishita Sequeira <isequeir@redhat.com>
2021-04-20 09:03:04 -07:00
May Zhang
9c5ed913d0 fix: Enable helm OCI to work for lots of different URLs without having to create a repo for each one (#6027)
* fix: add helm dependecies with custom CA

Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>

* fixed go lint error

Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>

* ignore existing repos

Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>

* fix: Enable helm OCI to work for lots of different URLs without having to create a repo for each one

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

* fix: Enable helm OCI to work for lots of different URLs without having to create a repo for each one

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

* fix: lint

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

* fix: lint

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

* fix: fix test code

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

* fix: dependency add for https and oci

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

* fix: go.sum and install.yaml

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

* fix: fix checking if repo exits

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

* fix: fix generated files

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

* fix: fix go.mod and go.sum

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

* fix: clean up code

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

* fix: rename RepoCreds to HelmRepoCreds

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

* fix: Added type for repoCreds.

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

* fix: checking in install.yaml

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

* fix: checking in install.yaml

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

* fix: checking in install.yaml

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

* fix: Makefile

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

Co-authored-by: Shubham Agarwal <shubhamagarawal19@gmail.com>
2021-04-19 13:17:26 -07:00
jannfis
66f36ff002 chore: Validate checksums of downloaded files in build chain (#6057)
* chore: Validate checksums of downloaded files in build chain

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

* Fix arm install of kustomize

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

* Add sudo package to Go builder image

Signed-off-by: jannfis <jann@mistrust.net>
2021-04-19 18:46:21 +02:00
Jacob Wernette
3e43ecaa2d docs: Add argocd-vault-plugin to secret management list (#6054)
Signed-off-by: Jacob Wernette <werne2j@gmail.com>
2021-04-18 18:07:00 +02:00
Remington Breeze
6fb395f8af feat(ui): Keyboard shortcuts (#5601)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-04-16 12:07:42 -07:00
Ralph Soika
376e8a7beb docs: fixed Ingress configuration for kubernetes v1.19+ (#5961)
* fixed Ingress configuration for kubernetes v1.19+

Signed-off-by: Ralph Soika <ralph.soika@imixs.com>

* fix: fixed Ingress configuration for kubernetes v1.19+

Signed-off-by: Ralph Soika <ralph.soika@imixs.com>
2021-04-16 19:57:48 +02:00
Maxime Bouchenoire
70d7f2bcf5 docs: Link issues related to health checks in FAQ (#5993)
* docs: Link issues related to health checks in FAQ

Signed-off-by: Maxime Bouchenoire <maxime.bouchenoire@witick.io>

* docs: Add Witick to USERS.md

Signed-off-by: Maxime Bouchenoire <maxime.bouchenoire@witick.io>
2021-04-15 16:51:08 -07:00
Shoubhik Bose
3d3a250072 fix: run server as nonroot (#5820)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-04-15 16:43:39 -07:00
Shoubhik Bose
6093797498 fix: make application-controller run as nonroot (#5819)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-04-15 16:37:19 -07:00
Petr Drastil
887242c341 fix: spark application check fails on missing section (#6036)
* fix: spark application check fails on missing section

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2021-04-15 14:44:51 -07:00
Chetan Banavikalmutt
62a6c7ae55 fix: don't resolve revision for a local sync (#6002)
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-04-15 12:51:03 -07:00
Shoubhik Bose
6aee524e0a chore: compile-time validation of adherence to interface contract (#5850)
* fix: compile time validation of interface contract

Signed-off-by: Shoubhik Bose <shbose@redhat.com>

* fix: application specific parameter override is not reflected in application parameters tab (#5845)

Signed-off-by: May Zhang <may_zhang@intuit.com>
Signed-off-by: Shoubhik Bose <shbose@redhat.com>

* chore: compile time resolution

Signed-off-by: Shoubhik Bose <shbose@redhat.com>

* chore: adherance to contract

Signed-off-by: Shoubhik Bose <shbose@redhat.com>

* Revert "fix: application specific parameter override is not reflected in application parameters tab (#5845)"

This reverts commit 43c8012062.

Signed-off-by: Shoubhik Bose <shbose@redhat.com>

Co-authored-by: May Zhang <may_zhang@intuit.com>
2021-04-15 12:45:57 -07:00
aniekgul
d78af0b463 refactor: upgrade redis-ha to 4.12.14 & cleanup generate.sh (#6021)
Signed-off-by: Aniek Gul <aniekgul@hotmail.com>
2021-04-15 20:24:08 +02:00
Shubham Agarwal
aa829c2c81 fix: execute cm dev mounter for make start (#6042)
Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>
2021-04-15 15:49:12 +02:00
Marcel Hoyer
5bc7297934 fix: bitbucket server failing diagnostics:ping (#6029) (#6034)
Signed-off-by: Marcel Hoyer <m.hoyer@cid.com>

Co-authored-by: Marcel Hoyer <m.hoyer@cid.com>
2021-04-14 13:18:12 -07:00
Shubham Agarwal
8f53bd53ec fix: add helm dependencies with custom CA (#6003)
* fix: add helm dependecies with custom CA

Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>

* fixed go lint error

Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>

* ignore existing repos

Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>

* fix: Enable helm OCI to work for lots of different URLs without having to create a repo for each one

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

* Revert "fix: Enable helm OCI to work for lots of different URLs without having to create a repo for each one"

This reverts commit a8ae8cf1b9.

* fix: only adding the dependency repo which does not exist in the repo list

Co-authored-by: May Zhang <may_zhang@intuit.com>
2021-04-14 10:05:37 -07:00
Samuel Suter
8fd6f13855 docs: Custom resource actions (#5838)
Signed-off-by: Samuel Suter <samuel.suter@sendgrid.com>
2021-04-13 20:09:25 -07:00
Jef LeCompte
8a2897d783 docs: update delete policy verbiage (#6025)
Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
2021-04-13 14:35:03 -07:00
Alexander Matyushentsev
c847bd9f4d chore: remove Argo CD CRDs from namespaced install (#6022)
* chore: remove Argo CD CRDs from namespaced install

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-13 11:41:44 -07:00
Ryota
61080b3313 docs: improve Orphaned Resources Monitoring with more examples and correct grammar (#6006)
Signed-off-by: Ryota <rytswd@gmail.com>
2021-04-13 11:59:15 +02:00
rumstead
8301d39487 Adding explicit bind to redis and sentinel for IPv4 clusters #5957 (#6005)
* fix(redis-ha): Adding explicit bind to redis and sentinel config to support IPv4 clusters. Closes #5957

Signed-off-by: Ryan Umstead <ryan.umstead@blackrock.com>
2021-04-12 14:08:38 -07:00
May Zhang
12cabdfb4e fix: adding tests for helm OCI registry (#5978)
* initial draft of adding tests for OCI

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

* fix: initial draft of adding tests for OCI

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

* bring up registry for tests

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

* bring up registry for tests

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

* bring up registry for tests

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

* fix: just to test if PR is working

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

* adding additional helm oci dependencies tests

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-04-12 09:15:43 -07:00
Yuan Tang
9da9514ba8 docs: Add Ant Group to the list of users (#6011)
Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
2021-04-12 09:07:49 -07:00
bainss
5e34a8a9b8 add Polarpoint.io (#6010)
Signed-off-by: Surjit Bains <surjit.bains@gmail.com>
2021-04-12 09:07:24 -07:00
Ishita Sequeira
2f92777f71 chore: move access checks from api server to repo server (#5940)
* chore: move api checks to reposerver

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

* resolving merge conflicts

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

* Address PR comments

Signed-off-by: Ishita Sequeira <isequeir@redhat.com>
2021-04-09 17:34:09 +02:00
Remington Breeze
ae2d0ff0a6 fix(ui): Unscheduled pods in node view are now visible. Fixes #5981 (#5988)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-04-08 09:04:47 -07:00
Josh Soref
b003f70e26 docs: SealedSecret status missing on k8s 1.16+ (#5846)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-04-07 14:30:45 -07:00
Jonah Back
445872f558 fix: use correct field for evaluating whether or not GitHub Enterprise is selected (#5987)
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-04-07 14:27:05 -07:00
jannfis
9afa8333b4 chore: Make e2e tests runnable against remote cluster (#5895)
* chore: Make e2e tests runnable against remote cluster

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

* Fix linter complaint

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

* Revert

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

* Address reviewer comments

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

* Compat with Mac

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

* Revert test setting

Signed-off-by: jannfis <jann@mistrust.net>
2021-04-07 14:49:17 +02:00
namku
4f9c5007a7 docs: k8s version in Ingress Configuration documentation (#5727)
* Fix k8s version in Ingress Configuration doc

Signed-off-by: Isaac Lopez <syak7771@gmail.com>

* docs: Fix k8s version in ingress api

Signed-off-by: Isaac Lopez <syak7771@gmail.com>
2021-04-07 00:11:58 -07:00
Raphaël Pinson
7c88ac861c feat: Allow to pass Kubernetes configuration overrides (#5906)
This allows to override the Kubernetes configuration used to set up the
Port Forward.

Closes [ISSUE 5905]

Signed-off-by: Raphaël Pinson <raphael.pinson@camptocamp.com>
2021-04-07 00:04:36 -07:00
Brandon Sorgdrager
834a5fa854 chore: Change grammar in high_availability.md (#5964)
Update summary statement for high availability to use proper grammar.

Signed-off-by: mgmtadmin <brandon.sorgdrager@gmail.com>
2021-04-06 23:59:03 -07:00
Marcus Noble
2a2b81f6b9 fix: Improvements to mobile UI (#5965)
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-04-06 23:05:37 -07:00
Chetan Banavikalmutt
f06fc0d982 feat: allow per-version kustomize options (#5967)
Allow adding build options that are specific to a kustomize version instead of using the same default options for each version.

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-04-06 09:24:57 -07:00
Alexander Matyushentsev
92c7ca04c7 chore: make argocd gitpod friendly (#5973)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-06 08:55:15 -07:00
Kshama Jain
1bc3348553 Upgrade gitops-engine (#5972)
* fix: upgrade gitops engine

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-04-05 15:51:59 -07:00
Shoubhik Bose
a686f12f4d fix: run dex as nonroot (#5815)
* fix: run dex as nonroot

Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-04-04 17:30:55 -07:00
Mitsuo Heijo
ed5c5b639a chore: Update go-git to v5 (#5520)
Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
2021-04-04 17:18:54 -07:00
Alexander Matyushentsev
ac3d4cc761 fix: correct package name in Makefile (#5960)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-03 22:48:36 -07:00
Alexander Matyushentsev
24b2caca91 chore: fix incorrect image name in 'publish' CI job (#5956)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-04 00:17:55 +02:00
Alexander Matyushentsev
b37eee1054 chore: fix invalid IMAGE_NAMESPACE in image 'publish' CI job (#5953)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-02 18:19:55 -07:00
Shoubhik Bose
dc4eaff6b3 chore: Remove specification of user id for the Redis workload (#5863)
* fix: avoid specifying redis user

Signed-off-by: Shoubhik Bose <shbose@redhat.com>

* fix: generate manifests

Signed-off-by: Shoubhik Bose <shbose@redhat.com>

* chore: one less manifest

Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-04-02 11:18:08 +02:00
Shoubhik Bose
8eeb9a074a chore: use clusterrolebinding v1 (#5939)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-04-02 11:13:19 +02:00
Dax McDonald
7945286434 docs: clarify that the certificate must be in PEM format (#5946)
Signed-off-by: Dax McDonald <31839142+daxmc99@users.noreply.github.com>
2021-04-02 11:12:13 +02:00
Alexander Matyushentsev
de522bf43b chore: migrate argocd dev images to ghcr.io (#5948)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-01 14:36:20 -07:00
dependabot[bot]
0a53fb1f2f chore(deps): bump y18n from 4.0.0 to 4.0.1 in /ui (#5919)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 12:57:02 -07:00
jannfis
ae49b45249 chore: Upgrade Go module to v2 (#5931)
* chore: Upgrade Go module to v2

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

* Restore import order

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

* fix knowntypes_normalizer codegen error

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

* fix codegen

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

* fix Procfile

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

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-01 20:44:18 +02:00
Yutaro Nishi
a2ebe15895 add user (#5938)
* add user

Signed-off-by: yuta-ron <jan.joqr@gmail.com>
2021-04-01 11:03:38 -07:00
Hien Le
7f5a23d89d Update USERS.md (#5835)
Signed-off-by: Hien Le <Hien.LeThai@nttdata.com>
2021-04-01 11:00:46 -07:00
Shoubhik Bose
24218b4808 docs: Propose an enhancement proposal process (#5771)
* docs: propose an enhancement proposal process

Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-03-31 22:00:11 -07:00
Alexander Matyushentsev
d085636fd7 fix: support loading oci helm dependencies referenced by chart stored in non-oci repo (#5917)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-30 11:14:30 -07:00
Patric Stout
75a1ea0c61 fix: installing packr for arm is no longer working (#5904)
Since Go 1.11, "go get" uses the modules system. This changes
the location the package is downloaded.

Additionally, "go get -u" does more work than required; changing
this to "go get -d" speeds up the process.

Finally, since Go 1.13 "go get" can also check out tags directly,
avoiding an additional checkout.

Signed-off-by: Patric Stout <github@truebrain.nl>
2021-03-30 19:41:59 +02:00
Regina Scott
11c730c202 fix: improvements to keyboard navigation (#5825)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-30 10:20:02 -07:00
dependabot[bot]
7cab755d1a chore(deps): bump pygments from 2.4 to 2.7.4 in /docs (#5900)
Bumps [pygments](https://github.com/pygments/pygments) from 2.4 to 2.7.4.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.4.0...2.7.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-30 10:19:30 -07:00
Viktor Farcic
12bec2f4f3 docs: Video (#5916)
* docs: PRs with Argo CD and Codefresh

Signed-off-by: Viktor Farcic <viktor@farcic.com>

* Video

Signed-off-by: Viktor Farcic <viktor@farcic.com>

* Yet another video

Signed-off-by: Viktor Farcic <viktor@farcic.com>

* Video

Signed-off-by: Viktor Farcic <vfarcic@farcic.com>

Co-authored-by: Viktor Farcic <vfarcic@farcic.com>
2021-03-30 19:15:02 +02:00
Shoubhik Bose
8bfe41b44b chore: add fix-missing (#5864)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-03-30 09:24:04 +02:00
HOA PHAN
a8c211e0b2 fix: replace retired google helm chart repo with new location (#5885)
Signed-off-by: Hoa Phan <s50600822@gmail.com>
2021-03-30 08:41:53 +02:00
Regina Scott
9590dc9740 docs: path error in docs for argo ui contributing (#5898)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-30 08:05:19 +02:00
Bostjan Skufca Jese
8808bb7b7f docs: Fix an instance of an awkwardly-worded sentence in docs (#5899)
Signed-off-by: Bostjan Skufca Jese <bostjan@skufca.si>
2021-03-30 08:03:07 +02:00
Austin Smart
6f5f87b730 fix: Use helm login for Oci helm repos. #5856 (#5887)
fix: Use helm login for Oci helm repos. #5856 (#5887)

Signed-off-by: Austin Smart <austin@austinsmart.com>
2021-03-29 10:27:15 -07:00
jannfis
3ce367462a chore: Some linter issues with golangci-lint 1.38 (#5894)
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-29 09:26:01 -07:00
Byungjin Park (Claud)
2f785cde06 docs: Update USERS.md (#5892)
Signed-off-by: Byungjin Park <posquit0.bj@gmail.com>
2021-03-29 11:21:34 +02:00
Alexander Matyushentsev
719d6a9c25 fix: fix incorrect OCI Helm registiries assumptions (#5888)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-26 15:33:36 -07:00
May Zhang
1c318f3959 fix: documentation update for argocd-util settings rbac (#5879)
* fix: documentation update for argocd-util settings rbac

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

* fix: documentation update for argocd-util settings rbac

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-26 11:00:23 -07:00
yconio
4ee30a1cff doc:add handelsbanken to USERS.md (#5818)
* doc:add handelsbanken to USERS.md
2021-03-26 09:44:15 -07:00
Shoubhik Bose
8d066d3007 fix: avoid short names (#5865)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-03-26 09:38:49 -07:00
May Zhang
26af455a6c fix: global project info is missing in UI (#5861)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-26 09:36:55 -07:00
May Zhang
86494a2800 fix: add prefix sync for CLI argocd app flag --retry-limit, --retry-b… (#5876)
* fix: add prefix sync for CLI argocd app flag --retry-limit, --retry-backoff-duration, --retry-backoff-factor and --retry-backoff-max-duration

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-26 09:34:31 -07:00
Kshama Jain
a7ab7dd969 fix: update gitops-engine (#5874)
fix: update gitops-engine (#5874)

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-03-25 16:25:12 -07:00
Alexander Matyushentsev
d297bc3241 fix: non-cascading application delete is broken (#5875)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-25 15:17:26 -07:00
Remington Breeze
65b4b5887b fix(ui): Pod logs filter did not refresh on button click. Also add tooltip for clarification (#5858)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-03-25 15:15:02 -07:00
Alexander Matyushentsev
f3883944e5 chore: fix 'make codegen-local' on mac (#5847)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-25 10:28:34 -07:00
Chetan Banavikalmutt
2faa08e710 feat: add exit-code flag to app diff command (#5852)
Using exit-code flag we could control the exit status of the command when there's a diff.

Example:

argocd app diff sample --local /path --exit-code=false

The above command will return exit code 0 even if it finds a diff.

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-03-25 08:22:18 +01:00
Kshama Jain
6cc8ab025a fix: get correct username from jwt token subject (#5836) (#5848)
* fix: get correct username from jwt token subject

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-03-24 12:30:26 -07:00
jannfis
733587e78a chore: Fix manifest generation in release and make quay.io the lead (#5831)
* chore: Fix manifest generation in release and make quay.io the lead

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

* Fix docker push command

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-24 14:39:10 +01:00
May Zhang
bde4ad4d82 fix: application specific parameter override is not reflected in application parameters tab (#5845)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-23 14:05:11 -07:00
William Tam
53fabec845 chore: Separate "online" mode from "production" mode in yarn build (#5830)
* Separate "online" mode from "production" mode in yarn build
Signed-off-by: William Tam <email.wtam@gmail.com>

* Signed-off-by: William Tam <email.wtam@gmail.com>
Fix typo
2021-03-22 13:24:18 +01:00
May Zhang
ccfa058cf7 fix: error when reset application parameters from UI (#5828)
* fix: error when reset kustomize parameters from UI

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

* Revert "fix: error when reset kustomize parameters from UI"

This reverts commit 126f210a

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

* fix: error when reset kustomize parameters from UI

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-20 11:05:22 -07:00
Alexander Matyushentsev
14a71f3f92 docs: add 2.0 change log and mention redis in upgrade instructions (#5812)
* docs: add 2.0 change log and mention redis in upgrade instructions

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

* docs: apply reviewer notes

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-19 11:12:36 -07:00
Chetan Banavikalmutt
aff71203e8 feat: Support unset plugin env variables (#5737)
This commit adds a flag --plugin-env to the app unset command, using which the plugin env varibles can be removed if present.

Example

argocd app unset example --plugin-env key1 --plugin-env key2

Fixes: #5681
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-03-19 09:16:56 +01:00
jannfis
84f0594568 chore: Use right protocol for argo-ui dependency (#5805)
* chore: Use right protocol for argocd-ui dependency

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

* Update docs

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-18 15:03:28 -07:00
Alexander Matyushentsev
796a20ca9a feat: allow downloading logs as a txt file (#5803)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-18 14:12:48 -07:00
Alexander Matyushentsev
21b7679ba7 refactor: upgrade golang to v1.16.2 (#5809)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-18 13:35:14 -07:00
Alexander Matyushentsev
439963f4c9 feat: Support kubectl replace instead of apply (#2730) (#5802)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-17 22:02:43 -07:00
May Zhang
b2c54f8215 fix: app list with --repo returns invalid selector (#5801)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-17 21:59:30 -07:00
May Zhang
ecd865803e doc: update doc regarding PruneLast sync option. (#5796)
* doc: update doc regarding PruneLast sync option.

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

* fix: semantic pr failed.

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

* fix: also updated application.yaml

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-17 14:15:34 -07:00
Alexander Matyushentsev
ed0cbdd8fa fix: revert use streaming API for Application List UI view (#5797)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-17 10:35:26 -07:00
Svend Sorensen
9ba4019898 feat(helm): Do not fail when value files do not exist (#5751)
* feat(helm): Do not fail when value files do not exist

Skip Helm value files that do not exit. This will allow the values that do exit
to be displayed.
2021-03-17 09:58:21 -07:00
Florian Flock
3d05a20454 Wrong command for argocd-server (#5761)
Command in the Deployment of argocd-server needs to be `argocd-server`, otherwise it will fail on startup.
2021-03-16 15:28:50 -07:00
May Zhang
036346b604 fix: file exention comparisons are case sensitive (#5789)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-16 15:24:21 -07:00
Karan Thanvi
4417b95c80 fix broken link (#5619)
fixes broken link for webhooks description
2021-03-16 15:23:50 -07:00
Ed Lee
d82c770531 Update OWNERS (#5772) 2021-03-16 15:23:34 -07:00
Shoubhik Bose
14083aa631 docs: remove obsolete ci section (#5773)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-03-16 15:23:19 -07:00
Alexander Matyushentsev
6b065717c6 feat: support 'PrunePropagationPolicy' sync policy in the UI (#5755)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-16 14:27:08 -07:00
ryota-sakamoto
d1b2d57467 chore: update golangci-lint version (#5760)
Signed-off-by: Ryota Sakamoto <sakamo.ryota+github@gmail.com>
2021-03-16 14:19:34 -07:00
Shoubhik Bose
8eef06671a docs: Update Community section (#5770)
Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-03-16 14:18:14 -07:00
Regina Scott
416be6011e docs: add instructions for contributing to argo-ui (#5776)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-16 13:10:26 -07:00
kshamajain99
91c20b7ca5 fix: remove zjwt (#5774)
* fix: remove zjwt

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-03-16 11:53:12 -07:00
May Zhang
38864e0f1b fix: in securityContext set allowPrivilegeEscalation to false also drop all capabilities. (#5786)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-16 11:00:33 -07:00
Elliot Zhang
e8b0d34ea3 docs: add Gojek to USERS.md (#5782)
Signed-off-by: Elliot Zhang <z11imdk@gmail.com>
2021-03-16 09:38:54 -07:00
jannfis
7a68880e2e feat: Make TLS to repo-server configurable and optional (#5764)
feat:  Make TLS to repo-server configurable and optional (#5764)

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-16 09:23:10 -07:00
Shoubhik Bose
9c849e63f7 chore: use kube libraries v0.20.4 (#5775)
* chore: use kube libraries v0.20.4

Signed-off-by: Shoubhik Bose <shbose@redhat.com>
2021-03-15 20:48:25 -07:00
Chetan Banavikalmutt
b728505c9f feat: support background propagation policy while deleting applications (#5216) (#5524)
* feat: support background propagation policy

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

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

* fix lint and doc errors

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

* update logs to display the application name

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

* address review comments

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

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

* Add radio buttons in the UI to select propagation policy

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

* inject finalizers instead of annotations for specifying propagation policy

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

* rebase branch on master

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

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

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

* fix the label of policy radio button

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-03-15 17:27:41 +01:00
dirien
d1fa6f8380 docs: Documentation only changes (#5759)
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
2021-03-14 12:23:40 +01:00
May Zhang
8cb2faf6a9 fix: app sync --dry-run stuck (#5753)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-12 13:52:57 -08:00
Josh Soref
96a23450ab chore: change version to 2.0.0 (#5750)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-12 20:32:44 +01:00
Samuel Suter
89f5a71e06 feat: filter applications by source repo URL (#5602) (#5603)
* feat: filter applications by source repo URL (#5602)

Signed-off-by: Samuel Suter <samuel.suter@sendgrid.com>

* Unit test for FilterByRepo
2021-03-12 09:07:22 -08:00
Onur Yartaşı
6757395b9c fix: Invalid semantic version MaxVersion (#5740) (#5747)
* fix: invalid semantic version (#5740)

Signed-off-by: Onur Yartaşı <onuryartasi@live.com>
2021-03-12 09:02:56 -08:00
Alexander Matyushentsev
d957ab467e feat: support resource prune propagation policy (#5743)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-12 09:01:36 -08:00
Regina Scott
f08a859822 fix: align status panel icons (#5746)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-11 15:43:27 -08:00
Alexander Matyushentsev
a532af7c74 fix: visually separate sync options and manual sync options (#5745)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-11 14:50:46 -08:00
Regina Scott
73af758724 Issue5408- Increase text contrast for improved web accessibility (#5700)
* fix: increase contrast for text color

Signed-off-by: Regina Scott <rescott@redhat.com>

* aligned spacing in application status panel

Signed-off-by: Regina Scott <rescott@redhat.com>

* boldened and darkened headers

Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-11 14:40:42 -08:00
Alexander Matyushentsev
1b7441d62b fix: add missing key property in Filter component (#5741)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-11 11:51:01 -08:00
Jay Li
1c15e1845b fix: Segmentation fault when no 'aud' inside a token (#5735)
Signed-off-by: Jay Li <xenium_lee@163.com>
2021-03-11 10:26:30 -08:00
Alexander Matyushentsev
b2fead6a84 feat: implement 'argocd-util cluster stats' command (#5733)
Signed-off-by: Alexander Matyushentsev <Alexander_Matyushentsev@intuit.com>
2021-03-11 08:53:17 -08:00
Alexander Matyushentsev
4112b55e06 fix: correctly load applications list page with no apps (#5732)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-10 11:07:33 -08:00
Jonathan West
50066eb1aa docs: move jgwest to approver (#5730)
Signed-off-by: Jonathan West <jonwest@redhat.com>
2021-03-10 18:40:51 +01:00
Alexander Matyushentsev
0da05bb13b refactor: applications-list page uses only watch API to quicker show application to the user (#5719)
Signed-off-by: Alexander Matyushentsev <Alexander_Matyushentsev@intuit.com>
2021-03-10 09:25:44 -08:00
dependabot[bot]
e49d3f7dca chore(deps): bump prismjs from 1.22.0 to 1.23.0 in /ui (#5648)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.22.0...v1.23.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-09 11:44:21 -08:00
dependabot[bot]
ec314207de chore(deps): bump elliptic from 6.5.3 to 6.5.4 in /ui (#5713)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-09 11:43:47 -08:00
Alexander Matyushentsev
1f140678e8 fix: improve 'argocd-util proj generate-spec' usability (#5717)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-09 11:42:16 -08:00
Mikhail Nacharov
33b570c652 fix(ui): out-of-sync button in apps with request hooks (#5625)
Fixes #5125

Signed-off-by: Mikhail Vladimirovich Nacharov <author@mnacharov.ru>
2021-03-09 11:21:33 -08:00
Jesse Suen
9c3df13672 fix: argocd-util import --prune must also remove finalizers if present (#5712)
Signed-off-by: Jesse Suen <Jesse_Suen@intuit.com>
2021-03-09 10:38:00 -08:00
Ishita Sequeira
445d091d49 feat: added cascade option to delete resources #5368 (#5538)
* feat: added cascade option to delete resources #5368

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

* addressed PR comments related to cascade delete

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

* feat: update gitops-engine version

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

* Fix e2e tests

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

* feat: update gitops-engine version

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

* fix: Address PR comments

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-03-09 14:04:14 +01:00
Alexander Matyushentsev
27519b08e2 refactor: restructure 'argocd-util' commands (#5708)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-08 16:56:07 -08:00
anais-codefresh
a0a54555eb feat: adding noscript tag (#5650)
Signed-off-by: anais-codefresh <anais.urlichs@codefresh.io>
2021-03-08 18:24:45 +01:00
jannfis
90602a7ad9 feat: Upgrade Redis to v6.2.1 (#5701)
* feat: Upgrade Redis to v6

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

* Preload correct Redis image in CI

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

* Fix labels on StatefulSet and Deployment

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

* Update redis to 6.2.1 and haproxy to 2.0.20

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

* More 6.0.7 -> 6.2.1 updates

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

* Fix antiAffinity selectors

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-07 09:35:24 +01:00
Alexander Matyushentsev
e3163e317a fix: logout link is broken (#5698)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-06 20:07:33 -08:00
kshamajain99
c0985fb0c9 fix: upgrade klog (#5697) (#5699)
fix: upgrade klog (#5697) (#5699)
2021-03-05 14:55:33 -08:00
Jonathan West
df29371ee9 docs: Add ApplicationSet page to Argo CD docs (#5685)
* docs: Add ApplicationSet page to Argo CD docs

Signed-off-by: Jonathan West <jonwest@redhat.com>

* docs: Add ApplicationSet page to Argo CD docs

Signed-off-by: Jonathan West <jonwest@redhat.com>

* docs: Add ApplicationSet page to Argo CD docs

Signed-off-by: Jonathan West <jonwest@redhat.com>
2021-03-05 22:15:37 +01:00
Regina Scott
022a130a3e fix: capitalization in headers (#5692)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-05 09:39:43 +01:00
Regina Scott
0259ed7f97 fix: increase contrast for badge colors (#5678)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-05 09:37:58 +01:00
Viktor Farcic
d8cb02bddb docs: Yet another ArgoCD-related video (#5686)
* docs: PRs with Argo CD and Codefresh

Signed-off-by: Viktor Farcic <viktor@farcic.com>

* Video

Signed-off-by: Viktor Farcic <viktor@farcic.com>

* Yet another video

Signed-off-by: Viktor Farcic <viktor@farcic.com>
2021-03-04 11:05:41 -08:00
jannfis
415034c493 docs: Bring upgrade instructions 1.8-2.0 up-to-date (#5689)
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-04 19:58:51 +01:00
Alexander Matyushentsev
b268ef4db9 fix: minor 'argocd-util config' commands fixes (#5688)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-04 10:32:17 -08:00
Alexander Matyushentsev
8562a4ea47 refactor: upgrade golang to v1.16.0 (#5677)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-04 08:52:27 -08:00
Alexander Matyushentsev
8569105d81 feat: upgrade kustomize to v3.9.4 and support v3.8.5 breaking change (#5672)
* feat: upgrade kustomize to v3.9.4 and support v3.8.5 breaking change

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

* fix flaky test

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-04 08:51:13 -08:00
Nick Groszewski
892712a7cb feat: Add additional strimzi custom resource health checks (#5642)
Add additional strimzi custom resource health checks, including:
* Kafka
* KafkaTopic
* KafkaUser

Contributes to argoproj/argo-cd#5577

Signed-off-by: Nick Groszewski <groszewn@gmail.com>
2021-03-04 14:59:18 +01:00
chgl
39d42ecfbf fix: updated CRD from apiextensions/v1beta1 to v1 (#5516)
Signed-off-by: chgl <chgl@users.noreply.github.com>
2021-03-04 14:55:30 +01:00
Gagan Hegde
ac1808b1be fix: Better handling of base64 encoded passwords/credentials (#5023)
* Removed the trailing argocd CRLF characterrs to values retrieved from the agro secrets
2021-03-03 14:44:50 -08:00
jannfis
28b0b193c5 fix: Handle GnuPG verification errors gracefully (#5560)
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-03 14:39:47 -08:00
Ishita Sequeira
212a92cdfb feat: made Helm v3 the default and removed version auto-detection (#5646)
* feat: made Helm v3 the default and removed version auto-detection

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

* feat: made Helm v3 the default and removed version auto-detection

Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-03-03 14:36:35 -08:00
Alexander Matyushentsev
5889bbb330 feat: support caching helm repo index (#5661)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-03 14:07:59 -08:00
Richard Li
a3d2b1aa96 add ambassador labs (#5674)
Signed-off-by: Richard Li <richard@datawire.io>
2021-03-03 13:18:37 -08:00
Jesse Lumme
ced0e8c114 docs: Updated USERS.md - added Smilee.io (#5665)
* docs: Updated USERS.md

Signed-off-by: GitHub <noreply@github.com>

* docs: Updated USERS.md

Signed-off-by: GitHub <noreply@github.com>
2021-03-03 13:05:04 -08:00
Knut Götz
b0f952011a docs: Fix wrong link in troubleshooting.md for health assessment docs (#5666)
Signed-off-by: Knut Götz <knutgoetz@gmail.com>
2021-03-03 09:40:00 -08:00
kshamajain99
7abfbe8178 fix: don't log certain fields (#5662)
* fix: support longer cookie

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

* merge conflicts

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

* fix: don't log certain fields

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-03-02 18:38:16 -08:00
Alexander Matyushentsev
0ccd573229 feat: regenerate active users token if it is expiring soon (#5629)
* feat: regenerate active users token if it is expiring soon

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

* Comment how 'renew-token' header is used

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-02 18:24:22 -08:00
Regina Scott
cdabf31119 fix: broken link to resetting admin password (#5660)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-02 15:13:24 -08:00
Remington Breeze
4d0d1435fe feat(ui): Filter sync results by status (#5499)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-03-02 14:05:22 -08:00
jannfis
5fa10a3526 fix: Ensure requested file from server is within a base path (#5564)
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-02 13:32:12 -08:00
jannfis
e33330fce1 chore: Fix failing e2e tests due to GH actions change (#5658)
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-02 21:36:49 +01:00
Andreas Fritzler
519ac0d291 Fixed dex connectors documentation link (#5573)
Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
2021-03-02 10:59:01 -08:00
jannfis
734f5c424b chore: Update inline docs for types.go (#5653)
* docs: Rework type descriptions

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

* More updates, and codegen

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-02 19:24:51 +01:00
jannfis
d4a514c390 chore: Allow re-enable auth in local make start (#5639)
* chore: Allow re-enable auth in local make start

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

* Retrigger CI

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-02 19:24:36 +01:00
Regina Scott
8595c2f0a9 fix: docs version selector not rendering (#5649)
Signed-off-by: Regina Scott <rescott@redhat.com>
2021-03-01 21:51:17 -08:00
Alexander Matyushentsev
d3f624c6d7 fix: pod logs viewer keep reloading completed container logs when logs following enabled (#5644)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-01 13:06:21 -08:00
Remington Breeze
8c97aded11 fix(ui): Toolbar wrap hides search. Refactor Page (#5593)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-03-01 13:04:37 -08:00
Shubham Agarwal
c6d37289c0 feat: exposed sync retry options via cli for app create (#5638)
Signed-off-by: Shubham Agarwal <shubhamagarawal19@gmail.com>
2021-03-01 15:01:19 +01:00
Jan Gräfen
cbc04c7897 fix: Empty resource whitelist allowed all resources (#5540) (#5551)
* fix: Empty resource whitelist allowed all resources

This requires setting the default in quite a few
places around the code base as well as adapting
a couple of tests

Signed-off-by: Jan Graefen <223234+jangraefen@users.noreply.github.com>

* Improve default behavior and not require explicitly set whitelist

Signed-off-by: Jan Graefen <223234+jangraefen@users.noreply.github.com>
2021-03-01 13:55:24 +01:00
Josh Soref
086683ab31 fix: reword Create SSH known host entries dialog (#5484)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-02-28 10:32:32 +01:00
1433 changed files with 129505 additions and 29871 deletions

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

@@ -10,27 +10,25 @@ on:
branches:
- 'master'
env:
# Golang version to use across CI steps
GOLANG_VERSION: '1.18'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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: '1.14.12'
go-version: ${{ env.GOLANG_VERSION }}
- name: Download all Go modules
run: |
go mod download
@@ -44,13 +42,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: '1.14.12'
go-version: ${{ env.GOLANG_VERSION }}
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -61,16 +59,19 @@ 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
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # v3.3.1
with:
version: v1.29
args: --timeout 5m --exclude SA5011
version: v1.46.2
args: --timeout 10m --exclude SA5011 --verbose
test-go:
name: Run unit tests for Go packages
@@ -81,13 +82,13 @@ jobs:
- 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: '1.14.12'
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
run: |
sudo apt-get install git -y
@@ -105,7 +106,7 @@ jobs:
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -122,12 +123,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,13 +142,13 @@ jobs:
- 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: '1.14.12'
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
run: |
sudo apt-get install git -y
@@ -165,7 +166,7 @@ jobs:
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -182,7 +183,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/
@@ -192,11 +193,11 @@ 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: '1.14.12'
go-version: ${{ env.GOLANG_VERSION }}
- name: Create symlink in GOPATH
run: |
mkdir -p ~/go/src/github.com/argoproj
@@ -239,14 +240,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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -259,6 +260,8 @@ jobs:
yarn build
env:
NODE_ENV: production
NODE_ONLINE_ENV: online
HOST_ARCH: amd64
working-directory: ui/
- name: Run ESLint
run: yarn lint
@@ -274,12 +277,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@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -290,16 +293,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
@@ -335,7 +338,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
k3s-version: [v1.20.2, v1.19.2, v1.18.9, v1.17.11, v1.16.15]
k3s-version: [v1.23.3, v1.22.6, v1.21.2]
needs:
- build-go
env:
@@ -350,11 +353,22 @@ jobs:
ARGOCD_SERVER: "127.0.0.1:8088"
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: '1.14.12'
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
@@ -367,7 +381,7 @@ jobs:
sudo chown runner $HOME/.kube/config
kubectl version
- name: Restore go build cache
uses: actions/cache@v1
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -377,10 +391,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
@@ -390,9 +407,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:5.0.10-alpine
docker pull redis:6.2.8-alpine
- name: Create target directory for binaries in the build-process
run: |
mkdir -p dist
@@ -420,7 +437,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

@@ -6,15 +6,27 @@ on:
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
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -24,10 +36,10 @@ jobs:
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# 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 +47,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 +61,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,30 +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.x
- name: build
run: |
pip install -r docs/requirements.txt
mkdocs build
- name: deploy
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v2.5.0
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site

View File

@@ -4,47 +4,102 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
types: [ labeled, unlabeled, opened, synchronize, reopened ]
env:
GOLANG_VERSION: '1.17'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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: '1.14.12'
- uses: actions/checkout@master
go-version: ${{ env.GOLANG_VERSION }}
- 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=docker.pkg.github.com/argoproj/argo-cd IMAGE_TAG=${{ steps.image.outputs.tag }}
working-directory: ./src/github.com/argoproj/argo-cd
# publish
- run: |
docker login docker.pkg.github.com --username $USERNAME --password $PASSWORD
docker push docker.pkg.github.com/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }}
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_QUAY_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
# build
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98 # v2.4.0
- run: |
IMAGE_PLATFORMS=linux/amd64
if [[ "${{ github.event_name }}" == "push" || "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]
then
IMAGE_PLATFORMS=linux/amd64,linux/arm64
fi
echo "Building image for platforms: $IMAGE_PLATFORMS"
docker buildx build --platform $IMAGE_PLATFORMS --sbom=false --provenance=false --push="${{ github.event_name == 'push' }}" \
-t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} \
-t quay.io/argoproj/argocd:latest .
working-directory: ./src/github.com/argoproj/argo-cd
# 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@e82f1b9a8007d399333baba4d75915558e9fb6a4
- 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: |
docker run -v $(pwd):/src -w /src --rm -t lyft/kustomizer:v3.3.0 kustomize edit set image quay.io/argoproj/argocd=docker.pkg.github.com/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }}
docker run -u $(id -u):$(id -g) -v $(pwd):/src -w /src --rm -t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} kustomize edit set image quay.io/argoproj/argocd=ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }}
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
# 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

@@ -10,15 +10,25 @@ on:
- '!release-v1.1*'
- '!release-v1.0*'
- '!release-v0*'
env:
GOLANG_VERSION: '1.17'
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
SOURCE_TAG: ${{ github.ref }}
# The image namespace where Docker image will be published to
IMAGE_NAMESPACE: argoproj
IMAGE_NAMESPACE: quay.io/argoproj
# Whether to create & push image and release assets
DRY_RUN: false
# Whether a draft release should be created, instead of public one
@@ -33,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 }}
@@ -90,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)
@@ -137,9 +147,9 @@ 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: '1.14.12'
go-version: ${{ env.GOLANG_VERSION }}
- name: Setup Git author information
run: |
@@ -178,18 +188,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 }}
@@ -197,17 +196,54 @@ jobs:
QUAY_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
run: |
set -ue
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
docker push ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
docker login quay.io --username "${QUAY_USERNAME}" --password "${QUAY_TOKEN}"
docker tag ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION} quay.io/${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
docker push quay.io/${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-stdin <<< "${DOCKER_TOKEN}"
if: ${{ env.DRY_RUN != 'true' }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98 # v2.4.0
- 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 --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@e82f1b9a8007d399333baba4d75915558e9fb6a4
- name: Get digest of image
run: |
echo "IMAGE_DIGEST_QUAY=$(crane digest quay.io/argoproj/argocd:v${TARGET_VERSION})" >> $GITHUB_ENV
echo "IMAGE_DIGEST_DOCK=$(crane digest docker.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_QUAY }}
cosign sign --key env://COSIGN_PRIVATE_KEY docker.io/argoproj/argocd@${{ env.IMAGE_DIGEST_DOCK }}
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
@@ -216,8 +252,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
@@ -227,78 +263,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
if: ${{ env.DRY_RUN != 'true' }}
# include argocd-util as part of release artifacts (argoproj/argo-cd#5174)
- name: Upload argocd-util-linux-amd64 binary to release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/argocd-linux-amd64
asset_name: argocd-util-linux-amd64
asset_content_type: application/octet-stream
if: ${{ env.DRY_RUN != 'true' }}
- name: Upload argocd-util-darwin-amd64 binary to release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/argocd-darwin-amd64
asset_name: argocd-util-darwin-amd64
asset_content_type: application/octet-stream
if: ${{ env.DRY_RUN != 'true' }}
- name: Upload argocd-util-windows-amd64 binary to release assets
uses: actions/upload-release-asset@v1
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-util-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 }}
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
@@ -309,3 +334,4 @@ jobs:
set -ue
git push --delete origin ${SOURCE_TAG}
if: ${{ always() }}

8
.gitignore vendored
View File

@@ -2,7 +2,9 @@
.idea/
.DS_Store
vendor/
dist/
dist/*
ui/dist/app/*
!ui/dist/app/gitkeep
site/
*.iml
# delve debug binaries
@@ -13,10 +15,10 @@ test-results
.scannerwork
.scratch
node_modules/
.kube/
# 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-util/argocd-util
cmd/argocd-server/argocd-server

17
.gitpod.Dockerfile vendored Normal file
View File

@@ -0,0 +1,17 @@
FROM gitpod/workspace-full
USER root
RUN curl -o /usr/local/bin/kubectl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x /usr/local/bin/kubectl
RUN curl -L https://go.kubebuilder.io/dl/2.3.1/$(go env GOOS)/$(go env GOARCH) | \
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 install github.com/mattn/goreman@latest
USER gitpod
ENV ARGOCD_REDIS_LOCAL=true
ENV KUBECONFIG=/tmp/kubeconfig

6
.gitpod.yml Normal file
View File

@@ -0,0 +1,6 @@
image:
file: .gitpod.Dockerfile
tasks:
- 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

View File

@@ -1,6 +1,433 @@
# Changelog
## v1.8.0 (Unreleased)
## v2.3.0 (Unreleased)
### 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
- fix: password reset requirements (#7071)
- fix: Custom Styles feature is broken (#7067)
- fix(ui): Add State to props passed to Extensions (#7045)
- fix: keep uid_entrypoint.sh for backward compatibility (#7047)
## v2.1.0 (2021-08-20)
> [Upgrade instructions](./docs/operator-manual/upgrading/2.0-2.1.md)
### Argo CD Core
Argo CD Core - lightweight Argo CD distribution that packages only core GitOps features and relies
on Kubernetes API/RBAC to power UI and CLI.
### Core Features
* The synchronization process became much much faster and requires significantly less memory.
* An additional caching that ensures that each repository's target revisions are queried only once per
reconciliation cycle. This dramatically reduces the number of Git requests.
* Improved Diffing Customizations: use JQ path expressions to exclude required fields from the diffing.
* Health assessment support for new CRDs: introduced health assessment of CRDs from trident.netapp.io,
elasticsearch.k8s.elastic.co, cluster.x-k8s.io, and minio.min.io API groups.
### Improved Settings
A set of changes had been implemented to simplify configuring Argo CD.
* Simplified Repository Registration: you no longer need to modify the argocd-cm ConfigMap to register a
new Git or Helm repository.
* Enhanced Resource Customizations: the resource.customizations key has been deprecated in favor of
a separate ConfigMap key per resource.
* Reference secret values from any Kubernetes secret: starting v2.1 you can use sensitive data stored in
any Kubernetes secret to configure Argo CD.
* Simplify parametrization of Argo CD server processes: an additional optional ConfigMap argocd-cmd-params-cm
has been introduced.
### Refreshed User Interface
* Enhanced and more consistent filters on Applications List and Applications Details pages.
* Status bar on the Application List page.
* The redesigned search box on the Application List page and more.
### The argocd-util CLI deprecation
The argocd CLI and now available under argocd admin subcommand.
## v2.0.5 (2021-07-22)
* fix: allow argocd-notification ingress to repo-server (#6746)
* fix: argocd-server crashes due to nil pointer dereference (#6757)
* fix: WebUI failure when loading pod view 't.parentRefs is undefined' (#6490) (#6535)
* fix: prevent 'cannot read property "filter" of undefined' during nodes filtering (#6453)
* fix: download Pod Logs button not honouring argocd-server rootpath (#6548) (#6627)
* fix: Version warning banner in docs (#6682)
* fix: upgrade gitops engine to fix workflow health check
## v2.0.4 (2021-06-22)
* fix: typo in networkPolicy definition in manifests (#6532)
* fix: Update redis to 6.2.4 (#6475)
* fix: allows access to dex metrics from any pod (#6420)
* fix: add client side retry to prevent 'transport is closing' errors (#6402)
* fix: Update documentation Argocd app CRD health with app of apps (#6281)
* fix(ui): Crash on application pod view (#6384)
* chore: pin mkdocs version to fix docs build (#6421)
* chore: regenerate manifests using codegen (#6422)
* refactor: use RLock and RUnlock for project to improve performance (#6225)
* chore: Update Golang to v1.16.4 (#6358)
## v2.0.3 (2021-05-27)
### Bug Fixes
* fix: add missing --container flag to 'argocd app logs' command (#6320)
* fix: grpc web proxy must ensure to read full header (#6319)
* fix: controller should refresh app before running sync operation (#6294)
## v2.0.2 (2021-05-20)
### Bug Fixes
* fix: enable access to metrics port in embedded network policies (#6277)
* fix: display log streaming error in logs viewer (#6100) (#6273)
* fix: Don't count errored or completed neighbor pods toward resource consumption (#6259)
* fix: Enable kex algo diffie-hellman-group-exchange-sha256 for go-git ssh (#6256)
* fix: copy github app key from repocreds (#6140, #6197)
* fix(ui): UI crashes after reinstalling ArgoCD (#6218)
* fix: add network policies to restrict traffic flow between argocd components (#6156)
* fix: Revert "feat: Add health checks for kubernetes-external-secrets (#5435)"
* chore: Allow ingress traffic to argocd-server by default (#6179)
## v2.0.1 (2021-04-15)
### Bug Fixes
* fix: spark application check fails on missing section (#6036)
* fix: Adding explicit bind to redis and sentinel for IPv4 clusters #5957 (#6005)
* fix: fix: use correct field for evaluating whether or not GitHub Enterprise is selected (#5987)
## v2.0.0 (2021-04-07)
> [Upgrade instructions](./docs/operator-manual/upgrading/1.8-2.0.md)
### Pods View
Pods View is particularly useful for applications that have hundreds of pods. Instead of visualizing all Kubernetes
resources for the application, it only shows Kubernetes pods and closely related resources. The Pods View supports
grouping related resources by Parent Resource, Top Level Parent, or by Node. Each way of grouping solves a particular
use case. For example grouping by Top Level Parent allows you to quickly find how many pods your application is running
and which resources created them. Grouping by Node allows to see how Pods are spread across the nodes and how many
resources they requested.
### Logs Viewer
Argo CD provides a way to see live logs of pods, which is very useful for debugging and troubleshooting. In the v2.0
release, the log visualization has been rewritten to support pagination, filtering, the ability to disable/enable log
streaming, and even a dark mode for terminal lovers. Do you want to see aggregated logs of multiple deployment pods?
Not a problem! Just click on the parent resource such as Deployment, ReplicaSet, or StatefulSet and navigate
to the Logs tab.
### Banner Feature
Want to notify your Argo CD users of upcoming changes? Just specify the notification message and optional URL using the
`ui.bannercontent` and `ui.bannerurl` attributes in the `argocd-cm` ConfigMap.
### Core Features
* The new sync option `PrunePropagationPolicy=background` allows using background deletion during syncing
* New application finalizer `resources-finalizer.argocd.argoproj.io:background` allows using background deletion when the application is deleted
* The new sync option `ApplyOutOfSyncOnly=true` allows skipping syncing resources that are already in the desired state.
* The new sync option `PruneLast=true` allows deferring resource pruning until the last synchronization phase after all other resources are synced and healthy.
### The argocd-util CLI
Argo CD Util is a CLI tool that contains useful commands for operators who manage Argo CD. Starting from this release
the Argo CD Utility is published with every Argo CD release as a Homebrew installation.
## v1.8.7 (2021-02-26)
### Important note
This release fixed a regression regarding which cluster resources are permitted on the AppProject level.
Previous to this fix, after #3960 has been merged, all cluster resources were allowed on project level when neither of
the allow or deny lists was defined. However, the correct behavior is to block all resources in this case.
If you have Projects with empty allow and deny lists, but want the associated applications be able to sync cluster
resources, you will have to adapt your cluster resources allow lists to explicitly allow the resources.
- fix: redact sensitive data in logs (#5662)
- fix: Properly escape HTML for error message from CLI SSO (#5563)
- fix: Empty resource whitelist allowed all resources (#5540) (#5551)
## v1.8.6 (2021-02-26)
- fix: Properly escape HTML for error message from CLI SSO (#5563)
- fix: API server should not print resource body when resource update fails (#5617)
- fix: fix memory leak in application controller (#5604)
## v1.8.5 (2021-02-19)
- fix: 'argocd app wait --suspended' stuck if operation is in progress (#5511)
- fix: Presync hooks stop working after namespace resource is added in a Helm chart #5522
- docs: add the missing rbac resources to the documentation (#5476)
- refactor: optimize argocd-application-controller redis usage (#5345)
## v1.8.4 (2021-02-05)
- feat: set X-XSS-Protection while serving static content (#5412)
- fix: version info should be avaialble if anonymous access is enabled (#5422)
- fix: disable jwt claim audience validation #5381 (#5413)
- fix: /api/version should not return tools version for unauthenticated requests (#5415)
- fix: account tokens should be rejected if required capability is disabled (#5414)
- fix: tokens keep working after account is deactivated (#5402)
- fix: a request which was using a revoked project token, would still be allowed to perform requests allowed by default policy (#5378)
## v1.8.3 (2021-01-21)
- fix: make sure JWT token time fields contain only integer values (#5228)
## v1.8.2 (2021-01-09)
### Bug Fixes
- fix: updating cluster drops secret (#5220)
- fix: remove invalid assumption about OCI helm chart path (#5179)
- fix: Possible nil pointer dereference in repository API (#5128)
- fix: Possible nil pointer dereference in repocreds API (#5130)
- fix: use json serialization to store cache instead of github.com/vmihailenco/msgpack (#4965)
- fix: add liveness probe to restart repo server if it fails to server tls requests (#5110) (#5119)
- fix: Allow correct SSO redirect URL for CLI static client (#5098)
- fix: add grpc health check (#5060)
- fix: setting 'revision history limit' errors in UI (#5035)
- fix: add api-server liveness probe that catches bad data in informer (#5026)
### Refactoring
- chore: Update Dex to v2.27.0 (#5058)
- chore: Upgrade gorilla/handlers and gorilla/websocket (#5186)
- chore: Upgrade jwt-go to 4.0.0-preview1 (#5184)
## v1.8.1 (2020-12-09)
- fix: sync retry is broken for multi-phase syncs (#5017)
## v1.8.0 (2020-12-09)
### Mono-Repository Improvements
@@ -93,7 +520,7 @@ In addition to new features and enhancements, weve fixed more than 50 bugs an
## v1.7.5 (2020-09-15)
- fix: app create with -f should not ignore other options (#4322)
- fix: limit concurrent list requests accross all clusters (#4328)
- fix: limit concurrent list requests across all clusters (#4328)
- fix: fix possible deadlock in /v1/api/stream/applications and /v1/api/application APIs (#4315)
- fix: WatchResourceTree does not enforce RBAC (#4311)
- fix: app refresh API should use app resource version (#4303)
@@ -227,7 +654,7 @@ use cases, such as bootstrapping a Kubernetes cluster, or decentralized manageme
#### Other
- refactoring: Gitops engine (#3066)
- refactoring: GitOps engine (#3066)
## v1.5.8 (2020-06-16)
@@ -290,7 +717,7 @@ customizations, custom resource health checks, and more.
### Other
* New Project and Application CRD settings ([#2900](https://github.com/argoproj/argo-cd/issues/2900), [#2873](https://github.com/argoproj/argo-cd/issues/2873)) that allows customizing Argo CD behavior.
* Upgraded Dex (v2.22.0) enables seamless [SSO integration](https://www.openshift.com/blog/openshift-authentication-integration-with-argocd) with Openshift.
* Upgraded Dex (v2.22.0) enables seamless [SSO integration](https://www.openshift.com/blog/openshift-authentication-integration-with-argocd) with OpenShift.
#### Enhancements
@@ -322,7 +749,7 @@ customizations, custom resource health checks, and more.
* fix for helm repo add with flag --insecure-skip-server-verification (#3420)
* fix: app diff --local support for helm repo. #3151 (#3407)
* fix: Syncing apps incorrectly states "app synced", but this is not true (#3286)
* fix: for jsonnet when it is localed in nested subdirectory and uses import (#3372)
* fix: for jsonnet when it is located in nested subdirectory and uses import (#3372)
* fix: Update 4.5.3 redis-ha helm manifest (#3370)
* fix: return 401 error code if username does not exist (#3369)
* fix: Do not panic while running hooks with short revision (#3368)
@@ -438,7 +865,7 @@ Last-minute bugs that will be addressed in 1.5.1 shortly:
- fix: argocd-util backup produced truncated backups. import app status (#3096)
- fix: upgrade redis-ha chart and enable haproxy (#3147)
- fix: make dex server deployment init container resilient to restarts (#3136)
- fix: reduct secret values of manifests stored in git (#3088)
- fix: redact secret values of manifests stored in git (#3088)
- fix: labels not being deleted via UI (#3081)
- fix: HTTP|HTTPS|NO_PROXY env variable reading #3055 (#3063)
- fix: Correct usage text for repo add command regarding insecure repos (#3068)
@@ -545,10 +972,10 @@ 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 healthchecks for cert-manager v0.11.0 (#2689)
* feat: Add custom health checks for cert-manager v0.11.0 (#2689)
* feat: add git submodule support (#2495)
* feat: Add repository credential management API and CLI (addresses #2136) (#2207)
* feat: add support for --additional-headers cli flag (#2467)
@@ -733,7 +1160,7 @@ There may be instances when you want to control the times during which an Argo C
#### Bug Fixes
- failed parsing on parameters with comma (#1660)
- Statefulset with OnDelete Update Strategy stuck progressing (#1881)
- StatefulSet with OnDelete Update Strategy stuck progressing (#1881)
- Warning during secret diffing (#1923)
- Error message "Unable to load data: key is missing" is confusing (#1944)
- OIDC group bindings are truncated (#2006)
@@ -815,7 +1242,7 @@ There may be instances when you want to control the times during which an Argo C
## v1.2.3 (2019-10-1)
* Make argo-cd docker images openshift friendly (#2362) (@duboisf)
* Add dest-server and dest-namespace field to reconciliation logs (#2354)
- Stop loggin /repository.RepositoryService/ValidateAccess parameters (#2386)
- Stop logging /repository.RepositoryService/ValidateAccess parameters (#2386)
## v1.2.2 (2019-09-26)
+ Resource action equivalent to `kubectl rollout restart` (#2177)
@@ -900,7 +1327,7 @@ Support for Git LFS enabled repositories - now you can store Helm charts as tar
- Wait for CRD creation during sync process (#1940)
- Added a button to select out of sync items in the sync panel (#1902)
- Proper handling of an excluded resource in an application (#1621)
- Stop repeating logs on stoped container (#1614)
- Stop repeating logs on stopped container (#1614)
- Fix git repo url parsing on application list view (#2174)
- Fix nil pointer dereference error during app reconciliation (#2146)
- Fix history api fallback implementation to support app names with dots (#2114)
@@ -956,7 +1383,7 @@ optimized which significantly reduced the number of Git requests. With v1.1 rele
#### User Defined Application Metadata
User-defined Application metadata enables the user to define a list of useful URLs for their specific application and expose those links on the UI
(e.g. reference tp a CI pipeline or an application-specific management tool). These links should provide helpful shortcuts that make easier to integrate Argo CD into existing
(e.g. reference to a CI pipeline or an application-specific management tool). These links should provide helpful shortcuts that make easier to integrate Argo CD into existing
systems by making it easier to find other components inside and outside Argo CD.
### Deprecation Notice
@@ -1320,7 +1747,7 @@ has a minimum client version of v0.12.0. Older CLI clients will be rejected.
* Deprecate componentParameterOverrides in favor of source specific config (#1207)
* Support talking to Dex using local cluster address instead of public address (#1211)
* Use Recreate deployment strategy for controller (#1315)
* Honor os environment variables for helm commands (#1306) (@1337andre)
* Honor OS environment variables for helm commands (#1306) (@1337andre)
* Disable CGO_ENABLED for server/controller binaries (#1286)
* Documentation fixes and improvements (@twz123, @yann-soubeyrand, @OmerKahani, @dulltz)
- Fix CRD creation/deletion handling (#1249)
@@ -1410,7 +1837,7 @@ running Dex (e.g. Okta, OneLogin, Auth0, Microsoft, etc...)
The optional, [Dex IDP OIDC provider](https://github.com/dexidp/dex) is still bundled as part of the
default installation, in order to provide a seamless out-of-box experience, enabling Argo CD to
integrate with non-OIDC providers, and to benefit from Dex's full range of
[connectors](https://github.com/dexidp/dex/tree/master/Documentation/connectors).
[connectors](https://dexidp.io/docs/connectors/).
#### OIDC group bindings to Project Roles
OIDC group claims from an OAuth2 provider can now be bound to a Argo CD project roles. Previously,
@@ -1812,8 +2239,8 @@ RBAC policy rules, need to be rewritten to include one extra column with the eff
+ Override parameters
## v0.1.0 (2018-03-12)
+ Define app in Github with dev and preprod environment using KSonnet
+ Define app in GitHub with dev and preprod environment using KSonnet
+ Add cluster Diff App with a cluster Deploy app in a cluster
+ Deploy a new version of the app in the cluster
+ App sync based on Github app config change - polling only
+ App sync based on GitHub app config change - polling only
+ Basic UI: App diff between Git and k8s cluster for all environments Basic GUI

View File

@@ -1,10 +1,10 @@
ARG BASE_IMAGE=ubuntu:20.10
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 golang:1.14.12 as builder
FROM docker.io/library/golang:1.17 as builder
RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
@@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
make \
wget \
gcc \
sudo \
zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -27,11 +28,11 @@ ADD hack/install.sh .
ADD hack/installers installers
ADD hack/tool-versions.sh .
RUN ./install.sh packr-linux
RUN ./install.sh ksonnet-linux
RUN ./install.sh helm2-linux
RUN ./install.sh helm-linux
RUN ./install.sh kustomize-linux
RUN ./install.sh awscli-linux
####################################################################################################
# Argo CD Base - used as the base for both the release and dev argocd images
@@ -47,29 +48,28 @@ RUN groupadd -g 999 argocd && \
mkdir -p /home/argocd && \
chown argocd:0 /home/argocd && \
chmod g=u /home/argocd && \
chmod g=u /etc/passwd && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y git git-lfs python3-pip tini gpg && \
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
# script to add current (possibly arbitrary) user to /etc/passwd at runtime
# (if it's not already there, to be openshift friendly)
COPY uid_entrypoint.sh /usr/local/bin/uid_entrypoint.sh
COPY --from=builder /usr/local/aws-cli/v2/current/dist /usr/local/aws-cli/v2/current/dist
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# keep uid_entrypoint.sh for backward compatibility
RUN ln -s /usr/local/bin/entrypoint.sh /usr/local/bin/uid_entrypoint.sh
RUN ln -s /usr/local/aws-cli/v2/current/dist/aws /usr/local/bin/aws
# 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
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 && \
@@ -86,25 +86,23 @@ WORKDIR /home/argocd
####################################################################################################
# Argo CD UI stage
####################################################################################################
FROM node:12.18.4 as argocd-ui
FROM docker.io/library/node:12.18.4 as argocd-ui
WORKDIR /src
ADD ["ui/package.json", "ui/yarn.lock", "./"]
RUN yarn install
RUN yarn install --network-timeout 200000
ADD ["ui/", "."]
ARG ARGO_VERSION=latest
ENV ARGO_VERSION=$ARGO_VERSION
RUN NODE_ENV='production' yarn build
RUN HOST_ARCH='amd64' 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.14.12 as argocd-build
COPY --from=builder /usr/local/bin/packr /usr/local/bin/packr
FROM docker.io/library/golang:1.17 as argocd-build
WORKDIR /go/src/github.com/argoproj/argo-cd
@@ -115,26 +113,21 @@ 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
####################################################################################################
# Final image
####################################################################################################
FROM argocd-base
COPY --from=argocd-build /go/src/github.com/argoproj/argo-cd/dist/argocd* /usr/local/bin/
COPY --from=argocd-ui ./src/dist/app /shared/app
USER root
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-util
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-notifications
USER 999
USER 999

View File

@@ -3,17 +3,11 @@
####################################################################################################
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-util
RUN ln -s /usr/local/bin/argocd-darwin-amd64 /usr/local/bin/argocd-util-darwin-amd64
RUN ln -s /usr/local/bin/argocd-windows-amd64.exe /usr/local/bin/argocd-util-windows-amd64.exe
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-notifications
USER 999
COPY --from=argocd-ui ./src/dist/app /shared/app

146
Makefile
View File

@@ -1,10 +1,11 @@
PACKAGE=github.com/argoproj/argo-cd/common
PACKAGE=github.com/argoproj/argo-cd/v2/common
CURRENT_DIR=$(shell pwd)
DIST_DIR=${CURRENT_DIR}/dist
CLI_NAME=argocd
UTIL_CLI_NAME=argocd-util
BIN_NAME=argocd
GEN_RESOURCES_CLI_NAME=argocd-resources-gen
HOST_OS:=$(shell go env GOOS)
HOST_ARCH:=$(shell go env GOARCH)
@@ -13,9 +14,8 @@ BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
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)
PACKR_CMD=$(shell if [ "`which packr`" ]; then echo "packr"; else echo "go run github.com/gobuffalo/packr/packr"; 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
@@ -25,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,6 +45,9 @@ ARGOCD_E2E_REPOSERVER_PORT?=8081
ARGOCD_E2E_REDIS_PORT?=6379
ARGOCD_E2E_DEX_PORT?=5556
ARGOCD_E2E_YARN_HOST?=localhost
ARGOCD_E2E_DISABLE_AUTH?=
ARGOCD_E2E_TEST_TIMEOUT?=30m
ARGOCD_IN_CI?=false
ARGOCD_TEST_E2E?=true
@@ -73,6 +76,10 @@ define run-in-test-server
-e ARGOCD_IN_CI=$(ARGOCD_IN_CI) \
-e ARGOCD_E2E_TEST=$(ARGOCD_E2E_TEST) \
-e ARGOCD_E2E_YARN_HOST=$(ARGOCD_E2E_YARN_HOST) \
-e ARGOCD_E2E_DISABLE_AUTH=$(ARGOCD_E2E_DISABLE_AUTH) \
-e ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} \
-e ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} \
-e ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} \
-v ${DOCKER_SRC_MOUNT} \
-v ${GOPATH}/pkg/mod:/go/pkg/mod${VOLUME_MOUNT} \
-v ${GOCACHE}:/tmp/go-build-cache${VOLUME_MOUNT} \
@@ -81,6 +88,7 @@ define run-in-test-server
-w ${DOCKER_WORKDIR} \
-p ${ARGOCD_E2E_APISERVER_PORT}:8080 \
-p 4000:4000 \
-p 5000:5000 \
$(TEST_TOOLS_PREFIX)$(TEST_TOOLS_IMAGE):$(TEST_TOOLS_TAG) \
bash -c "$(1)"
endef
@@ -105,7 +113,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
@@ -152,7 +160,7 @@ IMAGE_PREFIX=${IMAGE_NAMESPACE}/
endif
.PHONY: all
all: cli image argocd-util
all: cli image
# We have some legacy requirements for being checked out within $GOPATH.
# The ensure-gopath target can be used as dependency to ensure we are running
@@ -171,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
@@ -180,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
@@ -187,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
@@ -203,29 +222,19 @@ cli: test-tools-image
.PHONY: cli-local
cli-local: clean-debug
CGO_ENABLED=0 ${PACKR_CMD} build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${CLI_NAME} ./cmd
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${CLI_NAME} ./cmd
.PHONY: cli-argocd
cli-argocd:
go build -v -i -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
.PHONY: argocd-util
argocd-util: clean-debug
# Build argocd-util as a statically linked binary, so it could run within the alpine-based dex container (argoproj/argo-cd#844)
CGO_ENABLED=0 ${PACKR_CMD} build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${UTIL_CLI_NAME} ./cmd
# .PHONY: dev-tools-image
# dev-tools-image:
# docker build -t $(DEV_TOOLS_PREFIX)$(DEV_TOOLS_IMAGE) . -f hack/Dockerfile.dev-tools
# docker tag $(DEV_TOOLS_PREFIX)$(DEV_TOOLS_IMAGE) $(DEV_TOOLS_PREFIX)$(DEV_TOOLS_IMAGE):$(DEV_TOOLS_VERSION)
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-windows-amd64.exe GOOS=windows argocd-all
.PHONY: test-tools-image
test-tools-image:
@@ -243,25 +252,25 @@ manifests: test-tools-image
# consolidated binary for cli, util, server, repo-server, controller
.PHONY: argocd-all
argocd-all: clean-debug
CGO_ENABLED=0 ${PACKR_CMD} build -v -i -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
# NOTE: we use packr to do the build instead of go, since we embed swagger files and policy.csv
# files into the go binary
.PHONY: server
server: clean-debug
CGO_ENABLED=0 ${PACKR_CMD} build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-server ./cmd
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-server ./cmd
.PHONY: repo-server
repo-server:
CGO_ENABLED=0 ${PACKR_CMD} build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-repo-server ./cmd
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-repo-server ./cmd
.PHONY: controller
controller:
CGO_ENABLED=0 ${PACKR_CMD} build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-application-controller ./cmd
CGO_ENABLED=0 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-application-controller ./cmd
.PHONY: packr
packr:
go build -o ${DIST_DIR}/packr github.com/gobuffalo/packr/packr/
.PHONY: build-ui
build-ui:
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)
@@ -269,19 +278,14 @@ ifeq ($(DEV_IMAGE), true)
# 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: packr
image: build-ui
docker build -t argocd-base --target argocd-base .
docker build -t argocd-ui --target argocd-ui .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 dist/packr build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 dist/packr build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-darwin-amd64 ./cmd
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 dist/packr build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd-windows-amd64.exe ./cmd
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-application-controller
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-repo-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-cmp-server
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-dex
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-util
ln -sfn ${DIST_DIR}/argocd-darwin-amd64 ${DIST_DIR}/argocd-util-darwin-amd64
ln -sfn ${DIST_DIR}/argocd-windows-amd64.exe ${DIST_DIR}/argocd-util-windows-amd64.exe
cp Dockerfile.dev dist
docker build -t $(IMAGE_PREFIX)argocd:$(IMAGE_TAG) -f dist/Dockerfile.dev dist
else
@@ -291,10 +295,8 @@ 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:
@@ -307,7 +309,7 @@ mod-download: test-tools-image
.PHONY: mod-download-local
mod-download-local:
go mod download
go mod download && go mod tidy # go mod download changes go.sum https://github.com/golang/go/issues/42970
.PHONY: mod-vendor
mod-vendor: test-tools-image
@@ -397,7 +399,7 @@ test-e2e:
test-e2e-local: cli-local
# NO_PROXY ensures all tests don't go out through a proxy if one is configured on the test system
export GO111MODULE=off
ARGOCD_GPG_ENABLED=true NO_PROXY=* ./hack/test.sh -timeout 20m -v ./test/e2e
ARGOCD_GPG_ENABLED=true NO_PROXY=* ./hack/test.sh -timeout $(ARGOCD_E2E_TEST_TIMEOUT) -v ./test/e2e
# Spawns a shell in the test server container for debugging purposes
debug-test-server: test-tools-image
@@ -424,19 +426,21 @@ start-e2e-local:
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
mkdir -p /tmp/argo-e2e/app/config/gpg/source && chmod 0700 /tmp/argo-e2e/app/config/gpg/source
mkdir -p /tmp/argo-e2e/app/config/plugin && chmod 0700 /tmp/argo-e2e/app/config/plugin
# set paths for locally managed ssh known hosts and tls certs data
ARGOCD_SSH_DATA_PATH=/tmp/argo-e2e/app/config/ssh \
ARGOCD_TLS_DATA_PATH=/tmp/argo-e2e/app/config/tls \
ARGOCD_GPG_DATA_PATH=/tmp/argo-e2e/app/config/gpg/source \
ARGOCD_GNUPGHOME=/tmp/argo-e2e/app/config/gpg/keys \
ARGOCD_GPG_ENABLED=true \
ARGOCD_GPG_ENABLED=$(ARGOCD_GPG_ENABLED) \
ARGOCD_PLUGINCONFIGFILEPATH=/tmp/argo-e2e/app/config/plugin \
ARGOCD_E2E_DISABLE_AUTH=false \
ARGOCD_ZJWT_FEATURE_FLAG=always \
ARGOCD_IN_CI=$(ARGOCD_IN_CI) \
ARGOCD_E2E_TEST=true \
goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START}
# Cleans VSCode debug.test files from sub-dirs to prevent them from being included in packr boxes
# Cleans VSCode debug.test files from sub-dirs to prevent them from being included in by golang embed
.PHONY: clean-debug
clean-debug:
-find ${CURRENT_DIR} -name debug.test | xargs rm -f
@@ -462,10 +466,16 @@ start-local: mod-vendor-local dep-ui-local
mkdir -p /tmp/argocd-local/gpg/source
ARGOCD_ZJWT_FEATURE_FLAG=always \
ARGOCD_IN_CI=false \
ARGOCD_GPG_ENABLED=true \
ARGOCD_GPG_ENABLED=$(ARGOCD_GPG_ENABLED) \
ARGOCD_E2E_TEST=false \
goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START}
# Run goreman start with exclude option , provide exclude env variable with list of services
.PHONY: run
run:
bash ./hack/goreman-start.sh
# Runs pre-commit validation with the virtualized toolchain
.PHONY: pre-commit
pre-commit: codegen build lint test
@@ -499,10 +509,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
@@ -524,16 +530,15 @@ 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:
sudo ./hack/install.sh packr-linux
sudo ./hack/install.sh kustomize-linux
sudo ./hack/install.sh ksonnet-linux
sudo ./hack/install.sh helm2-linux
sudo ./hack/install.sh helm-linux
./hack/install.sh kustomize-linux
./hack/install.sh ksonnet-linux
./hack/install.sh helm2-linux
./hack/install.sh helm-linux
# Installs all tools required for running codegen (Linux packages)
.PHONY: install-codegen-tools-local
install-codegen-tools-local:
sudo ./hack/install.sh codegen-tools
./hack/install.sh codegen-tools
# Installs all tools required for running codegen (Go packages)
.PHONY: install-go-tools-local
@@ -546,3 +551,14 @@ dep-ui: test-tools-image
dep-ui-local:
cd ui && yarn install
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: checksums
checksums:
sha256sum ./dist/$(BIN_NAME)-* | awk -F './dist/' '{print $$1 $$2}' > ./dist/$(BIN_NAME)-$(TARGET_VERSION)-checksums.txt

18
OWNERS
View File

@@ -5,13 +5,23 @@ owners:
approvers:
- alexec
- alexmt
- dthomson25
- jannfis
- jessesuen
- jgwest
- mayzhang2000
- rachelwang20
- rbreeze
reviewers:
- jgwest
- wtam2018
- dthomson25
- tetchel
- wtam2018
- ishitasequeira
- reginapizza
- hblixt
- chetan-rns
- wanghong230
- pasha-codefresh
- ciiay
- leoluz
- crenshaw-dev
- saumeya

View File

@@ -1,8 +1,9 @@
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} --staticassets ui/dist/app"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/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.27.0 serve /dex.yaml"
redis: docker run --rm --name argocd-redis -i -p ${ARGOCD_E2E_REDIS_PORT:-6379}:${ARGOCD_E2E_REDIS_PORT:-6379} redis:5.0.10-alpine --save "" --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}
repo-server: sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} 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 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}"
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} "
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:6.2.8-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:-/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} $COMMAND --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379}"
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}

View File

@@ -28,26 +28,48 @@ Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
To learn more about Argo CD [go to the complete documentation](https://argo-cd.readthedocs.io/).
Check live demo at https://cd.apps.argoproj.io/.
## Community Blogs and Presentations
## Community
### Contribution, Discussion and Support
You can reach the Argo CD community and developers via the following channels:
* 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)
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)
### 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)
1. [Couchbase - How To Run a Database Cluster in Kubernetes Using Argo CD](https://youtu.be/nkPoPaVzExY)
1. [Automation of Everything - How To Combine Argo Events, Workflows & Pipelines, CD, and Rollouts](https://youtu.be/XNXJtxkUKeY)
1. [Environments Based On Pull Requests (PRs): Using Argo CD To Apply GitOps Principles On Previews](https://youtu.be/cpAaI8p4R60)
1. [Argo CD: Applying GitOps Principles To Manage Production Environment In Kubernetes](https://youtu.be/vpWQeoaiRM4)
1. [Creating Temporary Preview Environments Based On Pull Requests With Argo CD And Codefresh](https://codefresh.io/continuous-deployment/creating-temporary-preview-environments-based-pull-requests-argo-cd-codefresh/)
1. [Tutorial: Everything You Need To Become A GitOps Ninja](https://www.youtube.com/watch?v=r50tRQjisxw) 90m tutorial on GitOps and Argo CD.
1. [Comparison of Argo CD, Spinnaker, Jenkins X, and Tekton](https://www.inovex.de/blog/spinnaker-vs-argo-cd-vs-tekton-vs-jenkins-x/)
1. [Simplify and Automate Deployments Using GitOps with IBM Multicloud Manager 3.1.2](https://medium.com/ibm-cloud/simplify-and-automate-deployments-using-gitops-with-ibm-multicloud-manager-3-1-2-4395af317359)
1. [Simplify and Automate Deployments Using GitOps with IBM Multicloud Manager 3.1.2](https://www.ibm.com/cloud/blog/simplify-and-automate-deployments-using-gitops-with-ibm-multicloud-manager-3-1-2)
1. [GitOps for Kubeflow using Argo CD](https://v0-6.kubeflow.org/docs/use-cases/gitops-for-kubeflow/)
1. [GitOps Toolsets on Kubernetes with CircleCI and Argo CD](https://www.digitalocean.com/community/tutorials/webinar-series-gitops-tool-sets-on-kubernetes-with-circleci-and-argo-cd)
1. [Simplify and Automate Deployments Using GitOps with IBM Multicloud Manager](https://www.ibm.com/blogs/bluemix/2019/02/simplify-and-automate-deployments-using-gitops-with-ibm-multicloud-manager-3-1-2/)
1. [CI/CD in Light Speed with K8s and Argo CD](https://www.youtube.com/watch?v=OdzH82VpMwI&feature=youtu.be)
1. [Machine Learning as Code](https://www.youtube.com/watch?v=VXrGp5er1ZE&t=0s&index=135&list=PLj6h78yzYM2PZf9eA7bhWnIh_mK1vyOfU). Among other things, describes how Kubeflow uses Argo CD to implement GitOPs for ML
1. [Argo CD - GitOps Continuous Delivery for Kubernetes](https://www.youtube.com/watch?v=aWDIQMbp1cc&feature=youtu.be&t=1m4s)
1. [Introduction to Argo CD : Kubernetes DevOps CI/CD](https://www.youtube.com/watch?v=2WSJF7d8dUg&feature=youtu.be)
1. [GitOps Deployment and Kubernetes - using ArgoCD](https://medium.com/riskified-technology/gitops-deployment-and-kubernetes-f1ab289efa4b)
1. [GitOps Deployment and Kubernetes - using Argo CD](https://medium.com/riskified-technology/gitops-deployment-and-kubernetes-f1ab289efa4b)
1. [Deploy Argo CD with Ingress and TLS in Three Steps: No YAML Yak Shaving Required](https://itnext.io/deploy-argo-cd-with-ingress-and-tls-in-three-steps-no-yaml-yak-shaving-required-bc536d401491)
1. [GitOps Continuous Delivery with Argo and Codefresh](https://codefresh.io/events/cncf-member-webinar-gitops-continuous-delivery-argo-codefresh/)
1. [Stay up to date with ArgoCD and Renovate](https://mjpitz.com/blog/2020/12/03/renovate-your-gitops/)
1. [Stay up to date with Argo CD and Renovate](https://mjpitz.com/blog/2020/12/03/renovate-your-gitops/)
1. [Setting up Argo CD with Helm](https://www.arthurkoziel.com/setting-up-argocd-with-helm/)
1. [Applied GitOps with ArgoCD](https://thenewstack.io/applied-gitops-with-argocd/)
1. [Applied GitOps with Argo CD](https://thenewstack.io/applied-gitops-with-argocd/)
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/)

View File

@@ -1,6 +1,6 @@
# Security Policy for Argo CD
Version: **v1.0 (2020-02-26)**
Version: **v1.4 (2022-01-23)**
## Preface
@@ -8,6 +8,31 @@ 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.
## A word about security scanners
Many organisations these days employ security scanners to validate their
container images before letting them on their clusters, and that is a good
thing. However, the quality and results of these scanners vary greatly,
many of them produce false positives and require people to look at the
issues reported and validate them for correctness. A great example of that
is, that some scanners report kernel vulnerabilities for container images
just because they are derived from some distribution.
We kindly ask you to not raise issues or contact us regarding any issues
that are found by your security scanner. Many of those produce a lot of false
positives, and many of these issues don't affect Argo CD. We do have scanners
in place for our code, dependencies and container images that we publish. We
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. 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
We currently support the most recent release (`N`, e.g. `1.8`) and the release
@@ -35,13 +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 Git Hub SA feature to keep our
community well informed, and will credit you for your findings (unless you
prefer to stay anonymous, of course).
We will publish security advisiories 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 all of the following people:
Please report vulnerabilities by e-mail to the following address:
* jfischer@redhat.com
* Jesse_Suen@intuit.com
* Alexander_Matyushentsev@intuit.com
* Edward_Lee@intuit.com
* 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

@@ -8,25 +8,40 @@ Currently, the following organizations are **officially** using Argo CD:
1. [3Rein](https://www.3rein.com/)
1. [7shifts](https://www.7shifts.com/)
1. [Adevinta](https://www.adevinta.com/)
1. [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. [AppDirect](https://www.appdirect.com)
1. [Arctiq Inc.](https://www.arctiq.ca)
1. [ARZ Allgemeines Rechenzentrum GmbH ](https://www.arz.at/)
1. [Axual B.V.](https://axual.com)
1. [Baloise](https://www.baloise.com)
1. [BCDevExchange DevOps Platform](https://bcdevexchange.org/DevOpsPlatform)
1. [Beat](https://thebeat.co/en/)
1. [Beez Innovation Labs](https://www.beezlabs.com/)
1. [BioBox Analytics](https://biobox.io)
1. [BigPanda](https://bigpanda.io)
1. [BMW Group](https://www.bmwgroup.com/)
1. [Camptocamp](https://camptocamp.com)
1. [Capital One](https://www.capitalone.com)
1. [CARFAX](https://www.carfax.com)
1. [Celonis](https://www.celonis.com/)
1. [Chime](https://www.chime.com)
1. [Cisco ET&I](https://eti.cisco.com/)
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. [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. [Deloitte](https://www.deloitte.com/)
1. [Devtron Labs](https://github.com/devtron-labs/devtron)
1. [EDF Renewables](https://www.edf-re.com/)
1. [edX](https://edx.org)
@@ -35,17 +50,34 @@ Currently, the following organizations are **officially** using Argo CD:
1. [END.](https://www.endclothing.com/)
1. [Energisme](https://energisme.com/)
1. [Fave](https://myfave.com)
1. [Flip](https://flip.id)
1. [Fonoa](https://www.fonoa.com/)
1. [Future PLC](https://www.futureplc.com/)
1. [Garner](https://www.garnercorp.com)
1. [G DATA CyberDefense AG](https://www.gdata-software.com/)
1. [Generali Deutschland AG](https://www.generali.de/)
1. [Gitpod](https://www.gitpod.io)
1. [Glovo](https://www.glovoapp.com)
1. [Gllue](https://gllue.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. [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. [KarrotPay](https://www.daangnpay.com/)
1. [Kasa](https://kasa.co.kr/)
1. [Keptn](https://keptn.sh)
1. [Kinguin](https://www.kinguin.net/)
@@ -56,17 +88,22 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Lytt](https://www.lytt.co/)
1. [Major League Baseball](https://mlb.com)
1. [Mambu](https://www.mambu.com/)
1. [Mattermost](https://www.mattermost.com)
1. [Max Kelsen](https://www.maxkelsen.com/)
1. [MindSpore](https://mindspore.cn)
1. [Mirantis](https://mirantis.com/)
1. [mixi Group](https://mixi.co.jp/)
1. [Moengage](https://www.moengage.com/)
1. [Money Forward](https://corp.moneyforward.com/en/)
1. [MOO Print](https://www.moo.com/)
1. [MTN Group](https://www.mtn.com/)
1. [Natura &Co](https://naturaeco.com/)
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)
@@ -74,9 +111,11 @@ 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. [Packlink](https://www.packlink.com/)
1. [PayPay](https://paypay.ne.jp/)
1. [Peloton Interactive](https://www.onepeloton.com/)
1. [Pipefy](https://www.pipefy.com/)
1. [Polarpoint.io](https://polarpoint.io)
1. [Preferred Networks](https://preferred.jp/en/)
1. [Prudential](https://prudential.com.sg)
1. [PUBG](https://www.pubg.com)
@@ -89,9 +128,14 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Robotinfra](https://www.robotinfra.com)
1. [Saildrone](https://www.saildrone.com/)
1. [Saloodo! GmbH](https://www.saloodo.com)
1. [Schwarz IT](https://jobs.schwarz/it-mission)
1. [Skit](https://skit.ai/)
1. [Snyk](https://snyk.io/)
1. [Speee](https://speee.jp/)
1. [Spendesk](https://spendesk.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/)
@@ -101,10 +145,12 @@ Currently, the following organizations are **officially** using Argo CD:
1. [ThousandEyes](https://www.thousandeyes.com/)
1. [Ticketmaster](https://ticketmaster.com)
1. [Tiger Analytics](https://www.tigeranalytics.com/)
1. [Tigera](https://www.tigera.io/)
1. [Toss](https://toss.im/en)
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. [Universidad Mesoamericana](https://www.umes.edu.gt/)
@@ -114,7 +160,38 @@ 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. [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. [Sap Labs] (http://sap.com)
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. [Devopsi - Poland Software/DevOps Consulting](https://devopsi.pl/)
1. [Skyscanner](https://www.skyscanner.net/)
1. [Casavo](https://casavo.com)
1. [Majid Al Futtaim](https://www.majidalfuttaim.com/)
1. [ZOZO](https://corp.zozo.com/)

View File

@@ -1 +1 @@
1.9.0
2.3.16

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 26 KiB

7
assets/embed.go Normal file
View File

@@ -0,0 +1,7 @@
package assets
import "embed"
// Embedded contains embedded assets
//go:embed *
var Embedded embed.FS

View File

@@ -11,4 +11,4 @@ g = _, _
e = some(where (p.eft == allow)) && !some(where (p.eft == deny))
[matchers]
m = g(r.sub, p.sub) && globMatch(r.res, p.res) && globMatch(r.act, p.act) && globMatch(r.obj, p.obj)
m = g(r.sub, p.sub) && globOrRegexMatch(r.res, p.res) && globOrRegexMatch(r.act, p.act) && globOrRegexMatch(r.obj, p.obj)

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@ package commands
import (
"context"
"fmt"
"math"
"time"
@@ -12,20 +13,21 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller"
"github.com/argoproj/argo-cd/controller/sharding"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/util/cache"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/env"
"github.com/argoproj/argo-cd/util/errors"
kubeutil "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/settings"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller"
"github.com/argoproj/argo-cd/v2/controller/sharding"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/env"
"github.com/argoproj/argo-cd/v2/util/errors"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/argoproj/argo-cd/v2/util/tls"
)
const (
@@ -47,9 +49,12 @@ func NewCommand() *cobra.Command {
glogLevel int
metricsPort int
metricsCacheExpiration time.Duration
metricsAplicationLabels []string
kubectlParallelismLimit int64
cacheSrc func() (*appstatecache.Cache, error)
redisClient *redis.Client
repoServerPlaintext bool
repoServerStrictTLS bool
)
var command = cobra.Command{
Use: cliName,
@@ -71,8 +76,34 @@ func NewCommand() *cobra.Command {
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
resyncDuration := time.Duration(appResyncPeriod) * time.Second
repoClientset := apiclient.NewRepoServerClientset(repoServerAddress, repoServerTimeoutSeconds)
var resyncDuration time.Duration
if appResyncPeriod == 0 {
// Re-sync should be disabled if period is 0. Set duration to a very long duration
resyncDuration = time.Hour * 24 * 365 * 100
} else {
resyncDuration = time.Duration(appResyncPeriod) * time.Second
}
tlsConfig := apiclient.TLSConfiguration{
DisableTLS: repoServerPlaintext,
StrictValidation: repoServerStrictTLS,
}
// Load CA information to use for validating connections to the
// repository server, if strict TLS validation was requested.
if !repoServerPlaintext && repoServerStrictTLS {
pool, err := tls.LoadX509CertPool(
fmt.Sprintf("%s/controller/tls/tls.crt", env.StringFromEnv(common.EnvAppConfigPath, common.DefaultAppConfigPath)),
fmt.Sprintf("%s/controller/tls/ca.crt", env.StringFromEnv(common.EnvAppConfigPath, common.DefaultAppConfigPath)),
)
if err != nil {
log.Fatalf("%v", err)
}
tlsConfig.Certificates = pool
}
repoClientset := apiclient.NewRepoServerClientset(repoServerAddress, repoServerTimeoutSeconds, tlsConfig)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -80,10 +111,14 @@ func NewCommand() *cobra.Command {
errors.CheckError(err)
cache.Cache.SetClient(cacheutil.NewTwoLevelClient(cache.Cache.GetClient(), 10*time.Minute))
settingsMgr := settings.NewSettingsManager(ctx, kubeClient, namespace)
var appController *controller.ApplicationController
settingsMgr := settings.NewSettingsManager(ctx, kubeClient, namespace, settings.WithRepoOrClusterChangedHandler(func() {
appController.InvalidateProjectsCache()
}))
kubectl := kubeutil.NewKubectl()
clusterFilter := getClusterFilter()
appController, err := controller.NewApplicationController(
appController, err = controller.NewApplicationController(
namespace,
settingsMgr,
kubeClient,
@@ -95,6 +130,7 @@ func NewCommand() *cobra.Command {
time.Duration(selfHealTimeoutSeconds)*time.Second,
metricsPort,
metricsCacheExpiration,
metricsAplicationLabels,
kubectlParallelismLimit,
clusterFilter)
errors.CheckError(err)
@@ -114,18 +150,21 @@ func NewCommand() *cobra.Command {
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().Int64Var(&appResyncPeriod, "app-resync", defaultAppResyncPeriod, "Time period in seconds for application resync.")
command.Flags().StringVar(&repoServerAddress, "repo-server", common.DefaultRepoServerAddr, "Repo server address.")
command.Flags().IntVar(&repoServerTimeoutSeconds, "repo-server-timeout-seconds", 60, "Repo server RPC call timeout seconds.")
command.Flags().IntVar(&statusProcessors, "status-processors", 1, "Number of application status processors")
command.Flags().IntVar(&operationProcessors, "operation-processors", 1, "Number of application operation processors")
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
command.Flags().Int64Var(&appResyncPeriod, "app-resync", int64(env.ParseDurationFromEnv("ARGOCD_RECONCILIATION_TIMEOUT", defaultAppResyncPeriod*time.Second, 0, math.MaxInt64).Seconds()), "Time period in seconds for application resync.")
command.Flags().StringVar(&repoServerAddress, "repo-server", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER", common.DefaultRepoServerAddr), "Repo server address.")
command.Flags().IntVar(&repoServerTimeoutSeconds, "repo-server-timeout-seconds", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS", 60, 0, math.MaxInt64), "Repo server RPC call timeout seconds.")
command.Flags().IntVar(&statusProcessors, "status-processors", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_STATUS_PROCESSORS", 20, 0, math.MaxInt32), "Number of application status processors")
command.Flags().IntVar(&operationProcessors, "operation-processors", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_OPERATION_PROCESSORS", 10, 0, math.MaxInt32), "Number of application operation processors")
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_LOGFORMAT", "text"), "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error")
command.Flags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level")
command.Flags().IntVar(&metricsPort, "metrics-port", common.DefaultPortArgoCDMetrics, "Start metrics server on given port")
command.Flags().DurationVar(&metricsCacheExpiration, "metrics-cache-expiration", 0*time.Second, "Prometheus metrics cache expiration (disabled by default. e.g. 24h0m0s)")
command.Flags().IntVar(&selfHealTimeoutSeconds, "self-heal-timeout-seconds", 5, "Specifies timeout between application self heal attempts")
command.Flags().DurationVar(&metricsCacheExpiration, "metrics-cache-expiration", env.ParseDurationFromEnv("ARGOCD_APPLICATION_CONTROLLER_METRICS_CACHE_EXPIRATION", 0*time.Second, 0, math.MaxInt64), "Prometheus metrics cache expiration (disabled by default. e.g. 24h0m0s)")
command.Flags().IntVar(&selfHealTimeoutSeconds, "self-heal-timeout-seconds", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_SELF_HEAL_TIMEOUT_SECONDS", 5, 0, math.MaxInt32), "Specifies timeout between application self heal attempts")
command.Flags().Int64Var(&kubectlParallelismLimit, "kubectl-parallelism-limit", 20, "Number of allowed concurrent kubectl fork/execs. Any value less the 1 means no limit.")
command.Flags().BoolVar(&repoServerPlaintext, "repo-server-plaintext", env.ParseBoolFromEnv("ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_PLAINTEXT", false), "Disable TLS on connections to repo server")
command.Flags().BoolVar(&repoServerStrictTLS, "repo-server-strict-tls", env.ParseBoolFromEnv("ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_STRICT_TLS", false), "Whether to use strict validation of the TLS cert presented by the repo server")
command.Flags().StringSliceVar(&metricsAplicationLabels, "metrics-application-labels", []string{}, "List of Application labels that will be added to the argocd_application_labels metric")
cacheSrc = appstatecache.AddCacheFlagsToCmd(&command, func(client *redis.Client) {
redisClient = client
})

View File

@@ -0,0 +1,58 @@
package commands
import (
"time"
"github.com/argoproj/pkg/stats"
"github.com/spf13/cobra"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/cmpserver"
"github.com/argoproj/argo-cd/v2/cmpserver/plugin"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
)
const (
// CLIName is the name of the CLI
cliName = "argocd-cmp-server"
)
func NewCommand() *cobra.Command {
var (
configFilePath string
)
var command = cobra.Command{
Use: cliName,
Short: "Run ArgoCD ConfigManagementPlugin Server",
Long: "ArgoCD ConfigManagementPlugin Server is an internal service which runs as sidecar container in reposerver deployment. It can be configured by following options.",
DisableAutoGenTag: true,
RunE: func(c *cobra.Command, args []string) error {
cli.SetLogFormat(cmdutil.LogFormat)
cli.SetLogLevel(cmdutil.LogLevel)
config, err := plugin.ReadPluginConfig(configFilePath)
errors.CheckError(err)
server, err := cmpserver.NewServer(plugin.CMPServerInitConstants{
PluginConfig: *config,
})
errors.CheckError(err)
// register dumper
stats.RegisterStackDumper()
stats.StartStatsTicker(10 * time.Minute)
stats.RegisterHeapDumper("memprofile")
// run argocd-cmp-server server
server.Run()
return nil
},
}
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
command.Flags().StringVar(&configFilePath, "config-dir-path", common.DefaultPluginConfigFilePath, "Config management plugin configuration file location, Default is '/home/argocd/cmp-server/config/'")
return &command
}

View File

@@ -14,11 +14,11 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/dex"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/settings"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/dex"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/settings"
)
const (

View File

@@ -0,0 +1,57 @@
package commands
import (
"context"
"fmt"
"os"
"strings"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"github.com/argoproj/argo-cd/v2/reposerver/askpass"
"github.com/argoproj/argo-cd/v2/util/errors"
grpc_util "github.com/argoproj/argo-cd/v2/util/grpc"
"github.com/argoproj/argo-cd/v2/util/io"
)
const (
// cliName is the name of the CLI
cliName = "argocd-git-ask-pass"
)
func NewCommand() *cobra.Command {
var command = cobra.Command{
Use: cliName,
Short: "Argo CD git credential helper",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
if len(os.Args) != 2 {
errors.CheckError(fmt.Errorf("expected 1 argument, got %d", len(os.Args)-1))
}
nonce := os.Getenv(git.ASKPASS_NONCE_ENV)
if nonce == "" {
errors.CheckError(fmt.Errorf("%s is not set", git.ASKPASS_NONCE_ENV))
}
conn, err := grpc_util.BlockingDial(context.Background(), "unix", askpass.SocketPath, nil, grpc.WithInsecure())
errors.CheckError(err)
defer io.Close(conn)
client := askpass.NewAskPassServiceClient(conn)
creds, err := client.GetCredentials(context.Background(), &askpass.CredentialsRequest{Nonce: nonce})
errors.CheckError(err)
switch {
case strings.HasPrefix(os.Args[1], "Username"):
fmt.Println(creds.Username)
case strings.HasPrefix(os.Args[1], "Password"):
fmt.Println(creds.Password)
default:
errors.CheckError(fmt.Errorf("unknown credential type '%s'", os.Args[1]))
}
},
}
return &command
}

View File

@@ -0,0 +1,132 @@
package commands
import (
"context"
"fmt"
"net/http"
"os"
"strings"
service "github.com/argoproj/argo-cd/v2/util/notification/argocd"
notificationscontroller "github.com/argoproj/argo-cd/v2/notification_controller/controller"
controller "github.com/argoproj/notifications-engine/pkg/controller"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"k8s.io/client-go/tools/clientcmd"
)
const (
defaultMetricsPort = 9001
)
func addK8SFlagsToCmd(cmd *cobra.Command) clientcmd.ClientConfig {
loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
loadingRules.DefaultClientConfig = &clientcmd.DefaultClientConfig
overrides := clientcmd.ConfigOverrides{}
kflags := clientcmd.RecommendedConfigOverrideFlags("")
cmd.PersistentFlags().StringVar(&loadingRules.ExplicitPath, "kubeconfig", "", "Path to a kube config. Only required if out-of-cluster")
clientcmd.BindOverrideFlags(&overrides, cmd.PersistentFlags(), kflags)
return clientcmd.NewInteractiveDeferredLoadingClientConfig(loadingRules, &overrides, os.Stdin)
}
func NewCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
processorsCount int
namespace string
appLabelSelector string
logLevel string
logFormat string
metricsPort int
argocdRepoServer string
argocdRepoServerPlaintext bool
argocdRepoServerStrictTLS bool
configMapName string
secretName string
)
var command = cobra.Command{
Use: "controller",
Short: "Starts Argo CD Notifications controller",
RunE: func(c *cobra.Command, args []string) error {
restConfig, err := clientConfig.ClientConfig()
if err != nil {
return err
}
dynamicClient, err := dynamic.NewForConfig(restConfig)
if err != nil {
return err
}
k8sClient, err := kubernetes.NewForConfig(restConfig)
if err != nil {
return err
}
if namespace == "" {
namespace, _, err = clientConfig.Namespace()
if err != nil {
return err
}
}
level, err := log.ParseLevel(logLevel)
if err != nil {
return err
}
log.SetLevel(level)
switch strings.ToLower(logFormat) {
case "json":
log.SetFormatter(&log.JSONFormatter{})
case "text":
if os.Getenv("FORCE_LOG_COLORS") == "1" {
log.SetFormatter(&log.TextFormatter{ForceColors: true})
}
default:
return fmt.Errorf("Unknown log format '%s'", logFormat)
}
argocdService, err := service.NewArgoCDService(k8sClient, namespace, argocdRepoServer, argocdRepoServerPlaintext, argocdRepoServerStrictTLS)
if err != nil {
return err
}
defer argocdService.Close()
registry := controller.NewMetricsRegistry("argocd")
http.Handle("/metrics", promhttp.HandlerFor(prometheus.Gatherers{registry, prometheus.DefaultGatherer}, promhttp.HandlerOpts{}))
go func() {
log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", metricsPort), http.DefaultServeMux))
}()
log.Infof("serving metrics on port %d", metricsPort)
log.Infof("loading configuration %d", metricsPort)
ctrl := notificationscontroller.NewController(k8sClient, dynamicClient, argocdService, namespace, appLabelSelector, registry, secretName, configMapName)
err = ctrl.Init(context.Background())
if err != nil {
return err
}
go ctrl.Run(context.Background(), processorsCount)
<-context.Background().Done()
return nil
},
}
clientConfig = addK8SFlagsToCmd(&command)
command.Flags().IntVar(&processorsCount, "processors-count", 1, "Processors count.")
command.Flags().StringVar(&appLabelSelector, "app-label-selector", "", "App label selector.")
command.Flags().StringVar(&namespace, "namespace", "", "Namespace which controller handles. Current namespace if empty.")
command.Flags().StringVar(&logLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
command.Flags().StringVar(&logFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().IntVar(&metricsPort, "metrics-port", defaultMetricsPort, "Metrics port")
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", "argocd-repo-server:8081", "Argo CD repo server address")
command.Flags().BoolVar(&argocdRepoServerPlaintext, "argocd-repo-server-plaintext", false, "Use a plaintext client (non-TLS) to connect to repository server")
command.Flags().BoolVar(&argocdRepoServerStrictTLS, "argocd-repo-server-strict-tls", false, "Perform strict validation of TLS certificates when connecting to repo server")
command.Flags().StringVar(&configMapName, "config-map-name", "argocd-notifications-cm", "Set notifications ConfigMap name")
command.Flags().StringVar(&secretName, "secret-name", "argocd-notifications-secret", "Set notifications Secret name")
return &command
}

View File

@@ -13,22 +13,24 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"google.golang.org/grpc/health/grpc_health_v1"
"k8s.io/apimachinery/pkg/api/resource"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/reposerver"
"github.com/argoproj/argo-cd/reposerver/apiclient"
reposervercache "github.com/argoproj/argo-cd/reposerver/cache"
"github.com/argoproj/argo-cd/reposerver/metrics"
"github.com/argoproj/argo-cd/reposerver/repository"
cacheutil "github.com/argoproj/argo-cd/util/cache"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/env"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/gpg"
"github.com/argoproj/argo-cd/util/healthz"
ioutil "github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/tls"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/reposerver"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/reposerver/askpass"
reposervercache "github.com/argoproj/argo-cd/v2/reposerver/cache"
"github.com/argoproj/argo-cd/v2/reposerver/metrics"
"github.com/argoproj/argo-cd/v2/reposerver/repository"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/env"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/gpg"
"github.com/argoproj/argo-cd/v2/util/healthz"
ioutil "github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/tls"
)
const (
@@ -61,14 +63,21 @@ func getPauseGenerationOnFailureForRequests() int {
return env.ParseNumFromEnv(common.EnvPauseGenerationRequests, defaultPauseGenerationOnFailureForRequests, 0, math.MaxInt32)
}
func getSubmoduleEnabled() bool {
return env.ParseBoolFromEnv(common.EnvGitSubmoduleEnabled, true)
}
func NewCommand() *cobra.Command {
var (
parallelismLimit int64
listenPort int
metricsPort int
cacheSrc func() (*reposervercache.Cache, error)
tlsConfigCustomizerSrc func() (tls.ConfigCustomizer, error)
redisClient *redis.Client
parallelismLimit int64
listenPort int
metricsPort int
cacheSrc func() (*reposervercache.Cache, error)
tlsConfigCustomizer tls.ConfigCustomizer
tlsConfigCustomizerSrc func() (tls.ConfigCustomizer, error)
redisClient *redis.Client
disableTLS bool
maxCombinedDirectoryManifestsSize string
)
var command = cobra.Command{
Use: cliName,
@@ -79,20 +88,29 @@ func NewCommand() *cobra.Command {
cli.SetLogFormat(cmdutil.LogFormat)
cli.SetLogLevel(cmdutil.LogLevel)
tlsConfigCustomizer, err := tlsConfigCustomizerSrc()
errors.CheckError(err)
if !disableTLS {
var err error
tlsConfigCustomizer, err = tlsConfigCustomizerSrc()
errors.CheckError(err)
}
cache, err := cacheSrc()
errors.CheckError(err)
maxCombinedDirectoryManifestsQuantity, err := resource.ParseQuantity(maxCombinedDirectoryManifestsSize)
errors.CheckError(err)
askPassServer := askpass.NewServer()
metricsServer := metrics.NewMetricsServer()
cacheutil.CollectMetrics(redisClient, metricsServer)
server, err := reposerver.NewServer(metricsServer, cache, tlsConfigCustomizer, repository.RepoServerInitConstants{
ParallelismLimit: parallelismLimit,
ParallelismLimit: parallelismLimit,
PauseGenerationAfterFailedGenerationAttempts: getPauseGenerationAfterFailedGenerationAttempts(),
PauseGenerationOnFailureForMinutes: getPauseGenerationOnFailureForMinutes(),
PauseGenerationOnFailureForRequests: getPauseGenerationOnFailureForRequests(),
})
SubmoduleEnabled: getSubmoduleEnabled(),
MaxCombinedDirectoryManifestsSize: maxCombinedDirectoryManifestsQuantity,
}, askPassServer)
errors.CheckError(err)
grpc := server.CreateGRPC()
@@ -104,7 +122,7 @@ func NewCommand() *cobra.Command {
// connect to itself to make sure repo server is able to serve connection
// used by liveness probe to auto restart repo server
// see https://github.com/argoproj/argo-cd/issues/5110 for more information
conn, err := apiclient.NewConnection(fmt.Sprintf("localhost:%d", listenPort), 60)
conn, err := apiclient.NewConnection(fmt.Sprintf("localhost:%d", listenPort), 60, &apiclient.TLSConfiguration{DisableTLS: disableTLS})
if err != nil {
return err
}
@@ -123,6 +141,7 @@ func NewCommand() *cobra.Command {
})
http.Handle("/metrics", metricsServer.GetHandler())
go func() { errors.CheckError(http.ListenAndServe(fmt.Sprintf(":%d", metricsPort), nil)) }()
go func() { errors.CheckError(askPassServer.Run(askpass.SocketPath)) }()
if gpg.IsGPGEnabled() {
log.Infof("Initializing GnuPG keyring at %s", common.GetGnuPGHomePath())
@@ -146,12 +165,16 @@ func NewCommand() *cobra.Command {
return nil
},
}
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
command.Flags().Int64Var(&parallelismLimit, "parallelismlimit", 0, "Limit on number of concurrent manifests generate requests. Any value less the 1 means no limit.")
if cmdutil.LogFormat == "" {
cmdutil.LogFormat = os.Getenv("ARGOCD_REPO_SERVER_LOGLEVEL")
}
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_REPO_SERVER_LOGFORMAT", "text"), "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_REPO_SERVER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error")
command.Flags().Int64Var(&parallelismLimit, "parallelismlimit", int64(env.ParseNumFromEnv("ARGOCD_REPO_SERVER_PARALLELISM_LIMIT", 0, 0, math.MaxInt32)), "Limit on number of concurrent manifests generate requests. Any value less the 1 means no limit.")
command.Flags().IntVar(&listenPort, "port", common.DefaultPortRepoServer, "Listen on given port for incoming connections")
command.Flags().IntVar(&metricsPort, "metrics-port", common.DefaultPortRepoServerMetrics, "Start metrics server on given port")
command.Flags().BoolVar(&disableTLS, "disable-tls", env.ParseBoolFromEnv("ARGOCD_REPO_SERVER_DISABLE_TLS", false), "Disable TLS on the gRPC endpoint")
command.Flags().StringVar(&maxCombinedDirectoryManifestsSize, "max-combined-directory-manifests-size", env.StringFromEnv("ARGOCD_REPO_SERVER_MAX_COMBINED_DIRECTORY_MANIFESTS_SIZE", "10M"), "Max combined size of manifest files in a directory-type Application")
tlsConfigCustomizerSrc = tls.AddTLSFlagsToCmd(&command)
cacheSrc = reposervercache.AddCacheFlagsToCmd(&command, func(client *redis.Client) {

View File

@@ -2,6 +2,8 @@ package commands
import (
"context"
"fmt"
"math"
"time"
"github.com/argoproj/pkg/stats"
@@ -11,18 +13,18 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/server"
servercache "github.com/argoproj/argo-cd/server/cache"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/env"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/tls"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/server"
servercache "github.com/argoproj/argo-cd/v2/server/cache"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/env"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/tls"
)
const (
@@ -50,7 +52,6 @@ func NewCommand() *cobra.Command {
glogLevel int
clientConfig clientcmd.ClientConfig
repoServerTimeoutSeconds int
staticAssetsDir string
baseHRef string
rootPath string
repoServerAddress string
@@ -60,6 +61,9 @@ func NewCommand() *cobra.Command {
tlsConfigCustomizerSrc func() (tls.ConfigCustomizer, error)
cacheSrc func() (*servercache.Cache, error)
frameOptions string
repoServerPlaintext bool
repoServerStrictTLS bool
staticAssetsDir string
)
var command = &cobra.Command{
Use: cliName,
@@ -93,8 +97,25 @@ func NewCommand() *cobra.Command {
appclientsetConfig = kube.AddFailureRetryWrapper(appclientsetConfig, failureRetryCount, failureRetryPeriodMilliSeconds)
}
appclientset := appclientset.NewForConfigOrDie(appclientsetConfig)
repoclientset := apiclient.NewRepoServerClientset(repoServerAddress, repoServerTimeoutSeconds)
tlsConfig := apiclient.TLSConfiguration{
DisableTLS: repoServerPlaintext,
StrictValidation: repoServerStrictTLS,
}
// Load CA information to use for validating connections to the
// repository server, if strict TLS validation was requested.
if !repoServerPlaintext && repoServerStrictTLS {
pool, err := tls.LoadX509CertPool(
fmt.Sprintf("%s/server/tls/tls.crt", env.StringFromEnv(common.EnvAppConfigPath, common.DefaultAppConfigPath)),
fmt.Sprintf("%s/server/tls/ca.crt", env.StringFromEnv(common.EnvAppConfigPath, common.DefaultAppConfigPath)),
)
if err != nil {
log.Fatalf("%v", err)
}
tlsConfig.Certificates = pool
}
repoclientset := apiclient.NewRepoServerClientset(repoServerAddress, repoServerTimeoutSeconds, tlsConfig)
if rootPath != "" {
if baseHRef != "" && baseHRef != rootPath {
log.Warnf("--basehref and --rootpath had conflict: basehref: %s rootpath: %s", baseHRef, rootPath)
@@ -107,7 +128,6 @@ func NewCommand() *cobra.Command {
ListenPort: listenPort,
MetricsPort: metricsPort,
Namespace: namespace,
StaticAssetsDir: staticAssetsDir,
BaseHRef: baseHRef,
RootPath: rootPath,
KubeClientset: kubeclientset,
@@ -120,6 +140,7 @@ func NewCommand() *cobra.Command {
Cache: cache,
XFrameOptions: frameOptions,
RedisClient: redisClient,
StaticAssetsDir: staticAssetsDir,
}
stats.RegisterStackDumper()
@@ -137,22 +158,24 @@ func NewCommand() *cobra.Command {
}
clientConfig = cli.AddKubectlFlagsToCmd(command)
command.Flags().BoolVar(&insecure, "insecure", false, "Run server without TLS")
command.Flags().StringVar(&staticAssetsDir, "staticassets", "", "Static assets directory path")
command.Flags().StringVar(&baseHRef, "basehref", "/", "Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&rootPath, "rootpath", "", "Used if Argo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
command.Flags().BoolVar(&insecure, "insecure", env.ParseBoolFromEnv("ARGOCD_SERVER_INSECURE", false), "Run server without TLS")
command.Flags().StringVar(&staticAssetsDir, "staticassets", env.StringFromEnv("ARGOCD_SERVER_STATIC_ASSETS", "/shared/app"), "Directory path that contains additional static assets")
command.Flags().StringVar(&baseHRef, "basehref", env.StringFromEnv("ARGOCD_SERVER_BASEHREF", "/"), "Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&rootPath, "rootpath", env.StringFromEnv("ARGOCD_SERVER_ROOTPATH", ""), "Used if Argo CD is running behind reverse proxy under subpath different from /")
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_SERVER_LOGFORMAT", "text"), "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_REPO_SERVER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error")
command.Flags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level")
command.Flags().StringVar(&repoServerAddress, "repo-server", common.DefaultRepoServerAddr, "Repo server address")
command.Flags().StringVar(&dexServerAddress, "dex-server", common.DefaultDexServerAddr, "Dex server address")
command.Flags().BoolVar(&disableAuth, "disable-auth", false, "Disable client authentication")
command.Flags().BoolVar(&enableGZip, "enable-gzip", false, "Enable GZIP compression")
command.Flags().StringVar(&repoServerAddress, "repo-server", env.StringFromEnv("ARGOCD_SERVER_REPO_SERVER", common.DefaultRepoServerAddr), "Repo server address")
command.Flags().StringVar(&dexServerAddress, "dex-server", env.StringFromEnv("ARGOCD_SERVER_DEX_SERVER", common.DefaultDexServerAddr), "Dex server address")
command.Flags().BoolVar(&disableAuth, "disable-auth", env.ParseBoolFromEnv("ARGOCD_SERVER_DISABLE_AUTH", false), "Disable client authentication")
command.Flags().BoolVar(&enableGZip, "enable-gzip", env.ParseBoolFromEnv("ARGOCD_SERVER_ENABLE_GZIP", false), "Enable GZIP compression")
command.AddCommand(cli.NewVersionCmd(cliName))
command.Flags().IntVar(&listenPort, "port", common.DefaultPortAPIServer, "Listen on given port")
command.Flags().IntVar(&metricsPort, "metrics-port", common.DefaultPortArgoCDAPIServerMetrics, "Start metrics on given port")
command.Flags().IntVar(&repoServerTimeoutSeconds, "repo-server-timeout-seconds", 60, "Repo server RPC call timeout seconds.")
command.Flags().StringVar(&frameOptions, "x-frame-options", "sameorigin", "Set X-Frame-Options header in HTTP responses to `value`. To disable, set to \"\".")
command.Flags().IntVar(&repoServerTimeoutSeconds, "repo-server-timeout-seconds", env.ParseNumFromEnv("ARGOCD_SERVER_REPO_SERVER_TIMEOUT_SECONDS", 60, 0, math.MaxInt64), "Repo server RPC call timeout seconds.")
command.Flags().StringVar(&frameOptions, "x-frame-options", env.StringFromEnv("ARGOCD_SERVER_X_FRAME_OPTIONS", "sameorigin"), "Set X-Frame-Options header in HTTP responses to `value`. To disable, set to \"\".")
command.Flags().BoolVar(&repoServerPlaintext, "repo-server-plaintext", env.ParseBoolFromEnv("ARGOCD_SERVER_REPO_SERVER_PLAINTEXT", false), "Use a plaintext client (non-TLS) to connect to repository server")
command.Flags().BoolVar(&repoServerStrictTLS, "repo-server-strict-tls", env.ParseBoolFromEnv("ARGOCD_SERVER_REPO_SERVER_STRICT_TLS", false), "Perform strict validation of TLS certificates when connecting to repo server")
tlsConfigCustomizerSrc = tls.AddTLSFlagsToCmd(command)
cacheSrc = servercache.AddCacheFlagsToCmd(command, func(client *redis.Client) {
redisClient = client

View File

@@ -1,547 +0,0 @@
package commands
import (
"bufio"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"reflect"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/ghodss/yaml"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
apiv1 "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"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/settings"
)
const (
// CLIName is the name of the CLI
cliName = "argocd-util"
// YamlSeparator separates sections of a YAML file
yamlSeparator = "---\n"
)
var (
configMapResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}
secretResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}
applicationsResource = schema.GroupVersionResource{Group: "argoproj.io", Version: "v1alpha1", Resource: "applications"}
appprojectsResource = schema.GroupVersionResource{Group: "argoproj.io", Version: "v1alpha1", Resource: "appprojects"}
)
// NewCommand returns a new instance of an argocd command
func NewCommand() *cobra.Command {
var (
pathOpts = clientcmd.NewDefaultPathOptions()
)
var command = &cobra.Command{
Use: cliName,
Short: "argocd-util tools used by Argo CD",
Long: "argocd-util has internal utility tools used by Argo CD",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(cli.NewVersionCmd(cliName))
command.AddCommand(NewImportCommand())
command.AddCommand(NewExportCommand())
command.AddCommand(NewClusterConfig())
command.AddCommand(NewProjectsCommand())
command.AddCommand(NewSettingsCommand())
command.AddCommand(NewAppsCommand())
command.AddCommand(NewRBACCommand())
command.AddCommand(NewGenerateConfigCommand(pathOpts))
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
return command
}
// NewImportCommand defines a new command for exporting Kubernetes and Argo CD resources.
func NewImportCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
prune bool
dryRun bool
)
var command = cobra.Command{
Use: "import SOURCE",
Short: "Import Argo CD data from stdin (specify `-') or a file",
Run: func(c *cobra.Command, args []string) {
if len(args) != 1 {
c.HelpFunc()(c, args)
os.Exit(1)
}
config, err := clientConfig.ClientConfig()
errors.CheckError(err)
config.QPS = 100
config.Burst = 50
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
acdClients := newArgoCDClientsets(config, namespace)
var input []byte
if in := args[0]; in == "-" {
input, err = ioutil.ReadAll(os.Stdin)
} else {
input, err = ioutil.ReadFile(in)
}
errors.CheckError(err)
var dryRunMsg string
if dryRun {
dryRunMsg = " (dry run)"
}
// pruneObjects tracks live objects and it's current resource version. any remaining
// items in this map indicates the resource should be pruned since it no longer appears
// in the backup
pruneObjects := make(map[kube.ResourceKey]unstructured.Unstructured)
configMaps, err := acdClients.configMaps.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
// referencedSecrets holds any secrets referenced in the argocd-cm configmap. These
// secrets need to be imported too
var referencedSecrets map[string]bool
for _, cm := range configMaps.Items {
if isArgoCDConfigMap(cm.GetName()) {
pruneObjects[kube.ResourceKey{Group: "", Kind: "ConfigMap", Name: cm.GetName()}] = cm
}
if cm.GetName() == common.ArgoCDConfigMapName {
referencedSecrets = getReferencedSecrets(cm)
}
}
secrets, err := acdClients.secrets.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
for _, secret := range secrets.Items {
if isArgoCDSecret(referencedSecrets, secret) {
pruneObjects[kube.ResourceKey{Group: "", Kind: "Secret", Name: secret.GetName()}] = secret
}
}
applications, err := acdClients.applications.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
for _, app := range applications.Items {
pruneObjects[kube.ResourceKey{Group: "argoproj.io", Kind: "Application", Name: app.GetName()}] = app
}
projects, err := acdClients.projects.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
for _, proj := range projects.Items {
pruneObjects[kube.ResourceKey{Group: "argoproj.io", Kind: "AppProject", Name: proj.GetName()}] = proj
}
// Create or replace existing object
backupObjects, err := kube.SplitYAML(input)
errors.CheckError(err)
for _, bakObj := range backupObjects {
gvk := bakObj.GroupVersionKind()
key := kube.ResourceKey{Group: gvk.Group, Kind: gvk.Kind, Name: bakObj.GetName()}
liveObj, exists := pruneObjects[key]
delete(pruneObjects, key)
var dynClient dynamic.ResourceInterface
switch bakObj.GetKind() {
case "Secret":
dynClient = acdClients.secrets
case "ConfigMap":
dynClient = acdClients.configMaps
case "AppProject":
dynClient = acdClients.projects
case "Application":
dynClient = acdClients.applications
}
if !exists {
if !dryRun {
_, err = dynClient.Create(context.Background(), bakObj, metav1.CreateOptions{})
errors.CheckError(err)
}
fmt.Printf("%s/%s %s created%s\n", gvk.Group, gvk.Kind, bakObj.GetName(), dryRunMsg)
} else if specsEqual(*bakObj, liveObj) {
fmt.Printf("%s/%s %s unchanged%s\n", gvk.Group, gvk.Kind, bakObj.GetName(), dryRunMsg)
} else {
if !dryRun {
newLive := updateLive(bakObj, &liveObj)
_, err = dynClient.Update(context.Background(), newLive, metav1.UpdateOptions{})
errors.CheckError(err)
}
fmt.Printf("%s/%s %s updated%s\n", gvk.Group, gvk.Kind, bakObj.GetName(), dryRunMsg)
}
}
// Delete objects not in backup
for key := range pruneObjects {
if prune {
var dynClient dynamic.ResourceInterface
switch key.Kind {
case "Secret":
dynClient = acdClients.secrets
case "AppProject":
dynClient = acdClients.projects
case "Application":
dynClient = acdClients.applications
default:
log.Fatalf("Unexpected kind '%s' in prune list", key.Kind)
}
if !dryRun {
err = dynClient.Delete(context.Background(), key.Name, metav1.DeleteOptions{})
errors.CheckError(err)
}
fmt.Printf("%s/%s %s pruned%s\n", key.Group, key.Kind, key.Name, dryRunMsg)
} else {
fmt.Printf("%s/%s %s needs pruning\n", key.Group, key.Kind, key.Name)
}
}
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().BoolVar(&dryRun, "dry-run", false, "Print what will be performed")
command.Flags().BoolVar(&prune, "prune", false, "Prune secrets, applications and projects which do not appear in the backup")
return &command
}
type argoCDClientsets struct {
configMaps dynamic.ResourceInterface
secrets dynamic.ResourceInterface
applications dynamic.ResourceInterface
projects dynamic.ResourceInterface
}
func newArgoCDClientsets(config *rest.Config, namespace string) *argoCDClientsets {
dynamicIf, err := dynamic.NewForConfig(config)
errors.CheckError(err)
return &argoCDClientsets{
configMaps: dynamicIf.Resource(configMapResource).Namespace(namespace),
secrets: dynamicIf.Resource(secretResource).Namespace(namespace),
applications: dynamicIf.Resource(applicationsResource).Namespace(namespace),
projects: dynamicIf.Resource(appprojectsResource).Namespace(namespace),
}
}
// NewExportCommand defines a new command for exporting Kubernetes and Argo CD resources.
func NewExportCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
out string
)
var command = cobra.Command{
Use: "export",
Short: "Export all Argo CD data to stdout (default) or a file",
Run: func(c *cobra.Command, args []string) {
config, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
var writer io.Writer
if out == "-" {
writer = os.Stdout
} else {
f, err := os.Create(out)
errors.CheckError(err)
bw := bufio.NewWriter(f)
writer = bw
defer func() {
err = bw.Flush()
errors.CheckError(err)
err = f.Close()
errors.CheckError(err)
}()
}
acdClients := newArgoCDClientsets(config, namespace)
acdConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDConfigMapName, metav1.GetOptions{})
errors.CheckError(err)
export(writer, *acdConfigMap)
acdRBACConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDRBACConfigMapName, metav1.GetOptions{})
errors.CheckError(err)
export(writer, *acdRBACConfigMap)
acdKnownHostsConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDKnownHostsConfigMapName, metav1.GetOptions{})
errors.CheckError(err)
export(writer, *acdKnownHostsConfigMap)
acdTLSCertsConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDTLSCertsConfigMapName, metav1.GetOptions{})
errors.CheckError(err)
export(writer, *acdTLSCertsConfigMap)
referencedSecrets := getReferencedSecrets(*acdConfigMap)
secrets, err := acdClients.secrets.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
for _, secret := range secrets.Items {
if isArgoCDSecret(referencedSecrets, secret) {
export(writer, secret)
}
}
projects, err := acdClients.projects.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
for _, proj := range projects.Items {
export(writer, proj)
}
applications, err := acdClients.applications.List(context.Background(), metav1.ListOptions{})
errors.CheckError(err)
for _, app := range applications.Items {
export(writer, app)
}
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().StringVarP(&out, "out", "o", "-", "Output to the specified file instead of stdout")
return &command
}
// getReferencedSecrets examines the argocd-cm config for any referenced repo secrets and returns a
// map of all referenced secrets.
func getReferencedSecrets(un unstructured.Unstructured) map[string]bool {
var cm apiv1.ConfigMap
err := runtime.DefaultUnstructuredConverter.FromUnstructured(un.Object, &cm)
errors.CheckError(err)
referencedSecrets := make(map[string]bool)
// Referenced repository secrets
if reposRAW, ok := cm.Data["repositories"]; ok {
repos := make([]settings.Repository, 0)
err := yaml.Unmarshal([]byte(reposRAW), &repos)
errors.CheckError(err)
for _, cred := range repos {
if cred.PasswordSecret != nil {
referencedSecrets[cred.PasswordSecret.Name] = true
}
if cred.SSHPrivateKeySecret != nil {
referencedSecrets[cred.SSHPrivateKeySecret.Name] = true
}
if cred.UsernameSecret != nil {
referencedSecrets[cred.UsernameSecret.Name] = true
}
if cred.TLSClientCertDataSecret != nil {
referencedSecrets[cred.TLSClientCertDataSecret.Name] = true
}
if cred.TLSClientCertKeySecret != nil {
referencedSecrets[cred.TLSClientCertKeySecret.Name] = true
}
}
}
// Referenced repository credentials secrets
if reposRAW, ok := cm.Data["repository.credentials"]; ok {
creds := make([]settings.RepositoryCredentials, 0)
err := yaml.Unmarshal([]byte(reposRAW), &creds)
errors.CheckError(err)
for _, cred := range creds {
if cred.PasswordSecret != nil {
referencedSecrets[cred.PasswordSecret.Name] = true
}
if cred.SSHPrivateKeySecret != nil {
referencedSecrets[cred.SSHPrivateKeySecret.Name] = true
}
if cred.UsernameSecret != nil {
referencedSecrets[cred.UsernameSecret.Name] = true
}
if cred.TLSClientCertDataSecret != nil {
referencedSecrets[cred.TLSClientCertDataSecret.Name] = true
}
if cred.TLSClientCertKeySecret != nil {
referencedSecrets[cred.TLSClientCertKeySecret.Name] = true
}
}
}
return referencedSecrets
}
// isArgoCDSecret returns whether or not the given secret is a part of Argo CD configuration
// (e.g. argocd-secret, repo credentials, or cluster credentials)
func isArgoCDSecret(repoSecretRefs map[string]bool, un unstructured.Unstructured) bool {
secretName := un.GetName()
if secretName == common.ArgoCDSecretName {
return true
}
if repoSecretRefs != nil {
if _, ok := repoSecretRefs[secretName]; ok {
return true
}
}
if labels := un.GetLabels(); labels != nil {
if _, ok := labels[common.LabelKeySecretType]; ok {
return true
}
}
if annotations := un.GetAnnotations(); annotations != nil {
if annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD {
return true
}
}
return false
}
// isArgoCDConfigMap returns true if the configmap name is one of argo cd's well known configmaps
func isArgoCDConfigMap(name string) bool {
switch name {
case common.ArgoCDConfigMapName, common.ArgoCDRBACConfigMapName, common.ArgoCDKnownHostsConfigMapName, common.ArgoCDTLSCertsConfigMapName:
return true
}
return false
}
// specsEqual returns if the spec, data, labels, annotations, and finalizers of the two
// supplied objects are equal, indicating that no update is necessary during importing
func specsEqual(left, right unstructured.Unstructured) bool {
if !reflect.DeepEqual(left.GetAnnotations(), right.GetAnnotations()) {
return false
}
if !reflect.DeepEqual(left.GetLabels(), right.GetLabels()) {
return false
}
if !reflect.DeepEqual(left.GetFinalizers(), right.GetFinalizers()) {
return false
}
switch left.GetKind() {
case "Secret", "ConfigMap":
leftData, _, _ := unstructured.NestedMap(left.Object, "data")
rightData, _, _ := unstructured.NestedMap(right.Object, "data")
return reflect.DeepEqual(leftData, rightData)
case "AppProject":
leftSpec, _, _ := unstructured.NestedMap(left.Object, "spec")
rightSpec, _, _ := unstructured.NestedMap(right.Object, "spec")
return reflect.DeepEqual(leftSpec, rightSpec)
case "Application":
leftSpec, _, _ := unstructured.NestedMap(left.Object, "spec")
rightSpec, _, _ := unstructured.NestedMap(right.Object, "spec")
leftStatus, _, _ := unstructured.NestedMap(left.Object, "status")
rightStatus, _, _ := unstructured.NestedMap(right.Object, "status")
// reconciledAt and observedAt are constantly changing and we ignore any diff there
delete(leftStatus, "reconciledAt")
delete(rightStatus, "reconciledAt")
delete(leftStatus, "observedAt")
delete(rightStatus, "observedAt")
return reflect.DeepEqual(leftSpec, rightSpec) && reflect.DeepEqual(leftStatus, rightStatus)
}
return false
}
// updateLive replaces the live object's finalizers, spec, annotations, labels, and data from the
// backup object but leaves all other fields intact (status, other metadata, etc...)
func updateLive(bak, live *unstructured.Unstructured) *unstructured.Unstructured {
newLive := live.DeepCopy()
newLive.SetAnnotations(bak.GetAnnotations())
newLive.SetLabels(bak.GetLabels())
newLive.SetFinalizers(bak.GetFinalizers())
switch live.GetKind() {
case "Secret", "ConfigMap":
newLive.Object["data"] = bak.Object["data"]
case "AppProject":
newLive.Object["spec"] = bak.Object["spec"]
case "Application":
newLive.Object["spec"] = bak.Object["spec"]
if _, ok := bak.Object["status"]; ok {
newLive.Object["status"] = bak.Object["status"]
}
}
return newLive
}
// export writes the unstructured object and removes extraneous cruft from output before writing
func export(w io.Writer, un unstructured.Unstructured) {
name := un.GetName()
finalizers := un.GetFinalizers()
apiVersion := un.GetAPIVersion()
kind := un.GetKind()
labels := un.GetLabels()
annotations := un.GetAnnotations()
unstructured.RemoveNestedField(un.Object, "metadata")
un.SetName(name)
un.SetFinalizers(finalizers)
un.SetAPIVersion(apiVersion)
un.SetKind(kind)
un.SetLabels(labels)
un.SetAnnotations(annotations)
data, err := yaml.Marshal(un.Object)
errors.CheckError(err)
_, err = w.Write(data)
errors.CheckError(err)
_, err = w.Write([]byte(yamlSeparator))
errors.CheckError(err)
}
// NewClusterConfig returns a new instance of `argocd-util kubeconfig` command
func NewClusterConfig() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
)
var command = &cobra.Command{
Use: "kubeconfig CLUSTER_URL OUTPUT_PATH",
Short: "Generates kubeconfig for the specified cluster",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
if len(args) != 2 {
c.HelpFunc()(c, args)
os.Exit(1)
}
serverUrl := args[0]
output := args[1]
conf, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
kubeclientset, err := kubernetes.NewForConfig(conf)
errors.CheckError(err)
cluster, err := db.NewDB(namespace, settings.NewSettingsManager(context.Background(), kubeclientset, namespace), kubeclientset).GetCluster(context.Background(), serverUrl)
errors.CheckError(err)
err = kube.WriteKubeConfig(cluster.RawRestConfig(), namespace, output)
errors.CheckError(err)
},
}
clientConfig = cli.AddKubectlFlagsToCmd(command)
return command
}
func iterateStringFields(obj interface{}, callback func(name string, val string) string) {
if mapField, ok := obj.(map[string]interface{}); ok {
for field, val := range mapField {
if strVal, ok := val.(string); ok {
mapField[field] = callback(field, strVal)
} else {
iterateStringFields(val, callback)
}
}
} else if arrayField, ok := obj.([]interface{}); ok {
for i := range arrayField {
iterateStringFields(arrayField[i], callback)
}
}
}
func redactor(dirtyString string) string {
config := make(map[string]interface{})
err := yaml.Unmarshal([]byte(dirtyString), &config)
errors.CheckError(err)
iterateStringFields(config, func(name string, val string) string {
if name == "clientSecret" || name == "secret" || name == "bindPW" {
return "********"
} else {
return val
}
})
data, err := yaml.Marshal(config)
errors.CheckError(err)
return string(data)
}

View File

@@ -1,359 +0,0 @@
package commands
import (
"context"
"fmt"
"io/ioutil"
"os"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
apiv1 "k8s.io/api/core/v1"
apierr "k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/settings"
)
const (
ArgoCDNamespace = "argocd"
repoSecretPrefix = "repo"
)
func NewGenerateConfigCommand(pathOpts *clientcmd.PathOptions) *cobra.Command {
var command = &cobra.Command{
Use: "config",
Short: "Generate declarative configuration files",
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(NewGenAppConfigCommand())
command.AddCommand(NewGenProjectConfigCommand())
command.AddCommand(NewGenClusterConfigCommand(pathOpts))
command.AddCommand(NewGenRepoConfigCommand())
return command
}
// NewGenAppConfigCommand generates declarative configuration file for given application
func NewGenAppConfigCommand() *cobra.Command {
var (
appOpts cmdutil.AppOptions
fileURL string
appName string
labels []string
outputFormat string
)
var command = &cobra.Command{
Use: "app APPNAME",
Short: "Generate declarative config for an application",
Example: `
# Generate declarative config for a directory app
argocd-util config app guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --directory-recurse
# Generate declarative config for a Jsonnet app
argocd-util config app jsonnet-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path jsonnet-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --jsonnet-ext-str replicas=2
# Generate declarative config for a Helm app
argocd-util config app helm-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --helm-set replicaCount=2
# Generate declarative config for a Helm app from a Helm repo
argocd-util config app nginx-ingress --repo https://kubernetes-charts.storage.googleapis.com --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Generate declarative config for a Kustomize app
argocd-util config app kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
# Generate declarative config for a app using a custom tool:
argocd-util config app ksane --repo https://github.com/argoproj/argocd-example-apps.git --path plugins/kasane --dest-namespace default --dest-server https://kubernetes.default.svc --config-management-plugin kasane
`,
Run: func(c *cobra.Command, args []string) {
app, err := cmdutil.ConstructApp(fileURL, appName, labels, args, appOpts, c.Flags())
errors.CheckError(err)
if app.Name == "" {
c.HelpFunc()(c, args)
os.Exit(1)
}
var printResources []interface{}
printResources = append(printResources, app)
errors.CheckError(cmdutil.PrintResources(printResources, outputFormat))
},
}
command.Flags().StringVar(&appName, "name", "", "A name for the app, ignored if a file is set (DEPRECATED)")
command.Flags().StringVarP(&fileURL, "file", "f", "", "Filename or URL to Kubernetes manifests for the app")
command.Flags().StringArrayVarP(&labels, "label", "l", []string{}, "Labels to apply to the app")
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
// Only complete files with appropriate extension.
err := command.Flags().SetAnnotation("file", cobra.BashCompFilenameExt, []string{"json", "yaml", "yml"})
errors.CheckError(err)
cmdutil.AddAppFlags(command, &appOpts)
return command
}
// NewGenProjectConfigCommand generates declarative configuration file for given project
func NewGenProjectConfigCommand() *cobra.Command {
var (
opts cmdutil.ProjectOpts
fileURL string
outputFormat string
)
var command = &cobra.Command{
Use: "proj PROJECT",
Short: "Generate declarative config for a project",
Run: func(c *cobra.Command, args []string) {
proj, err := cmdutil.ConstructAppProj(fileURL, args, opts, c)
errors.CheckError(err)
var printResources []interface{}
printResources = append(printResources, proj)
errors.CheckError(cmdutil.PrintResources(printResources, outputFormat))
},
}
command.Flags().StringVarP(&fileURL, "file", "f", "", "Filename or URL to Kubernetes manifests for the project")
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
err := command.Flags().SetAnnotation("file", cobra.BashCompFilenameExt, []string{"json", "yaml", "yml"})
if err != nil {
log.Fatal(err)
}
cmdutil.AddProjFlags(command, &opts)
return command
}
func NewGenClusterConfigCommand(pathOpts *clientcmd.PathOptions) *cobra.Command {
var (
clusterOpts cmdutil.ClusterOptions
bearerToken string
outputFormat string
)
var command = &cobra.Command{
Use: "cluster CONTEXT",
Short: "Generate declarative config for a cluster",
Run: func(c *cobra.Command, args []string) {
var configAccess clientcmd.ConfigAccess = pathOpts
if len(args) == 0 {
log.Error("Choose a context name from:")
cmdutil.PrintKubeContexts(configAccess)
os.Exit(1)
}
cfgAccess, err := configAccess.GetStartingConfig()
errors.CheckError(err)
contextName := args[0]
clstContext := cfgAccess.Contexts[contextName]
if clstContext == nil {
log.Fatalf("Context %s does not exist in kubeconfig", contextName)
}
overrides := clientcmd.ConfigOverrides{
Context: *clstContext,
}
clientConfig := clientcmd.NewDefaultClientConfig(*cfgAccess, &overrides)
conf, err := clientConfig.ClientConfig()
errors.CheckError(err)
kubeClientset := fake.NewSimpleClientset()
var awsAuthConf *argoappv1.AWSAuthConfig
var execProviderConf *argoappv1.ExecProviderConfig
if clusterOpts.AwsClusterName != "" {
awsAuthConf = &argoappv1.AWSAuthConfig{
ClusterName: clusterOpts.AwsClusterName,
RoleARN: clusterOpts.AwsRoleArn,
}
} else if clusterOpts.ExecProviderCommand != "" {
execProviderConf = &argoappv1.ExecProviderConfig{
Command: clusterOpts.ExecProviderCommand,
Args: clusterOpts.ExecProviderArgs,
Env: clusterOpts.ExecProviderEnv,
APIVersion: clusterOpts.ExecProviderAPIVersion,
InstallHint: clusterOpts.ExecProviderInstallHint,
}
} else if bearerToken == "" {
bearerToken = "bearer-token"
}
if clusterOpts.Name != "" {
contextName = clusterOpts.Name
}
clst := cmdutil.NewCluster(contextName, clusterOpts.Namespaces, conf, bearerToken, awsAuthConf, execProviderConf)
if clusterOpts.InCluster {
clst.Server = common.KubernetesInternalAPIServerAddr
}
if clusterOpts.Shard >= 0 {
clst.Shard = &clusterOpts.Shard
}
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClientset, ArgoCDNamespace)
argoDB := db.NewDB(ArgoCDNamespace, settingsMgr, kubeClientset)
_, err = argoDB.CreateCluster(context.Background(), clst)
errors.CheckError(err)
secName, err := db.ServerToSecretName(clst.Server)
errors.CheckError(err)
secret, err := kubeClientset.CoreV1().Secrets(ArgoCDNamespace).Get(context.Background(), secName, v1.GetOptions{})
errors.CheckError(err)
cmdutil.ConvertSecretData(secret)
var printResources []interface{}
printResources = append(printResources, secret)
errors.CheckError(cmdutil.PrintResources(printResources, outputFormat))
},
}
command.PersistentFlags().StringVar(&pathOpts.LoadingRules.ExplicitPath, pathOpts.ExplicitFileFlag, pathOpts.LoadingRules.ExplicitPath, "use a particular kubeconfig file")
command.Flags().StringVar(&bearerToken, "bearer-token", "", "Authentication token that should be used to access K8S API server")
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
cmdutil.AddClusterFlags(command, &clusterOpts)
return command
}
func NewGenRepoConfigCommand() *cobra.Command {
var (
repoOpts cmdutil.RepoOptions
outputFormat string
)
// For better readability and easier formatting
var repoAddExamples = `
# Add a Git repository via SSH using a private key for authentication, ignoring the server's host key:
argocd-util config repo git@git.example.com:repos/repo --insecure-ignore-host-key --ssh-private-key-path ~/id_rsa
# Add a Git repository via SSH on a non-default port - need to use ssh:// style URLs here
argocd-util config repo ssh://git@git.example.com:2222/repos/repo --ssh-private-key-path ~/id_rsa
# Add a private Git repository via HTTPS using username/password and TLS client certificates:
argocd-util config repo https://git.example.com/repos/repo --username git --password secret --tls-client-cert-path ~/mycert.crt --tls-client-cert-key-path ~/mycert.key
# Add a private Git repository via HTTPS using username/password without verifying the server's TLS certificate
argocd-util config repo https://git.example.com/repos/repo --username git --password secret --insecure-skip-server-verification
# Add a public Helm repository named 'stable' via HTTPS
argocd-util config repo https://kubernetes-charts.storage.googleapis.com --type helm --name stable
# Add a private Helm repository named 'stable' via HTTPS
argocd-util config repo https://kubernetes-charts.storage.googleapis.com --type helm --name stable --username test --password test
# Add a private Helm OCI-based repository named 'stable' via HTTPS
argocd-util config repo helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type helm --name stable --enable-oci --username test --password test
`
var command = &cobra.Command{
Use: "repo REPOURL",
Short: "Generate declarative config for a repo",
Example: repoAddExamples,
Run: func(c *cobra.Command, args []string) {
if len(args) != 1 {
c.HelpFunc()(c, args)
os.Exit(1)
}
// Repository URL
repoOpts.Repo.Repo = args[0]
// Specifying ssh-private-key-path is only valid for SSH repositories
if repoOpts.SshPrivateKeyPath != "" {
if ok, _ := git.IsSSHURL(repoOpts.Repo.Repo); ok {
keyData, err := ioutil.ReadFile(repoOpts.SshPrivateKeyPath)
if err != nil {
log.Fatal(err)
}
repoOpts.Repo.SSHPrivateKey = string(keyData)
} else {
err := fmt.Errorf("--ssh-private-key-path is only supported for SSH repositories.")
errors.CheckError(err)
}
}
// tls-client-cert-path and tls-client-cert-key-key-path must always be
// specified together
if (repoOpts.TlsClientCertPath != "" && repoOpts.TlsClientCertKeyPath == "") || (repoOpts.TlsClientCertPath == "" && repoOpts.TlsClientCertKeyPath != "") {
err := fmt.Errorf("--tls-client-cert-path and --tls-client-cert-key-path must be specified together")
errors.CheckError(err)
}
// Specifying tls-client-cert-path is only valid for HTTPS repositories
if repoOpts.TlsClientCertPath != "" {
if git.IsHTTPSURL(repoOpts.Repo.Repo) {
tlsCertData, err := ioutil.ReadFile(repoOpts.TlsClientCertPath)
errors.CheckError(err)
tlsCertKey, err := ioutil.ReadFile(repoOpts.TlsClientCertKeyPath)
errors.CheckError(err)
repoOpts.Repo.TLSClientCertData = string(tlsCertData)
repoOpts.Repo.TLSClientCertKey = string(tlsCertKey)
} else {
err := fmt.Errorf("--tls-client-cert-path is only supported for HTTPS repositories")
errors.CheckError(err)
}
}
// Set repository connection properties only when creating repository, not
// when creating repository credentials.
// InsecureIgnoreHostKey is deprecated and only here for backwards compat
repoOpts.Repo.InsecureIgnoreHostKey = repoOpts.InsecureIgnoreHostKey
repoOpts.Repo.Insecure = repoOpts.InsecureSkipServerVerification
repoOpts.Repo.EnableLFS = repoOpts.EnableLfs
repoOpts.Repo.EnableOCI = repoOpts.EnableOci
if repoOpts.Repo.Type == "helm" && repoOpts.Repo.Name == "" {
errors.CheckError(fmt.Errorf("must specify --name for repos of type 'helm'"))
}
// If the user set a username, but didn't supply password via --password,
// then we prompt for it
if repoOpts.Repo.Username != "" && repoOpts.Repo.Password == "" {
repoOpts.Repo.Password = cli.PromptPassword(repoOpts.Repo.Password)
}
argoCDCM := &apiv1.ConfigMap{
TypeMeta: v1.TypeMeta{
Kind: "ConfigMap",
APIVersion: "v1",
},
ObjectMeta: v1.ObjectMeta{
Name: common.ArgoCDConfigMapName,
Namespace: ArgoCDNamespace,
Labels: map[string]string{
"app.kubernetes.io/part-of": "argocd",
},
},
}
kubeClientset := fake.NewSimpleClientset(argoCDCM)
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClientset, ArgoCDNamespace)
argoDB := db.NewDB(ArgoCDNamespace, settingsMgr, kubeClientset)
var printResources []interface{}
_, err := argoDB.CreateRepository(context.Background(), &repoOpts.Repo)
errors.CheckError(err)
secret, err := kubeClientset.CoreV1().Secrets(ArgoCDNamespace).Get(context.Background(), db.RepoURLToSecretName(repoSecretPrefix, repoOpts.Repo.Repo), v1.GetOptions{})
if err != nil {
if !apierr.IsNotFound(err) {
errors.CheckError(err)
}
} else {
cmdutil.ConvertSecretData(secret)
printResources = append(printResources, secret)
}
cm, err := kubeClientset.CoreV1().ConfigMaps(ArgoCDNamespace).Get(context.Background(), common.ArgoCDConfigMapName, v1.GetOptions{})
errors.CheckError(err)
printResources = append(printResources, cm)
errors.CheckError(cmdutil.PrintResources(printResources, outputFormat))
},
}
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
cmdutil.AddRepoFlags(command, &repoOpts)
return command
}

View File

@@ -1,57 +0,0 @@
package commands
import (
"reflect"
"testing"
"github.com/stretchr/testify/assert"
"github.com/undefinedlabs/go-mpatch"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/discovery"
restclient "k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
)
func TestProjectAllowListGen(t *testing.T) {
useMock := true
rules := clientcmd.NewDefaultClientConfigLoadingRules()
overrides := &clientcmd.ConfigOverrides{}
clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(rules, overrides)
if useMock {
var patchClientConfig *mpatch.Patch
patchClientConfig, err := mpatch.PatchInstanceMethodByName(reflect.TypeOf(clientConfig), "ClientConfig", func(*clientcmd.DeferredLoadingClientConfig) (*restclient.Config, error) {
return nil, nil
})
assert.NoError(t, err)
patch, err := mpatch.PatchMethod(discovery.NewDiscoveryClientForConfig, func(c *restclient.Config) (*discovery.DiscoveryClient, error) {
return &discovery.DiscoveryClient{LegacyPrefix: "/api"}, nil
})
assert.NoError(t, err)
var patchSeverPreferedResources *mpatch.Patch
discoClient := &discovery.DiscoveryClient{}
patchSeverPreferedResources, err = mpatch.PatchInstanceMethodByName(reflect.TypeOf(discoClient), "ServerPreferredResources", func(*discovery.DiscoveryClient) ([]*metav1.APIResourceList, error) {
res := metav1.APIResource{
Name: "services",
Kind: "Service",
}
resourceList := []*metav1.APIResourceList{{APIResources: []metav1.APIResource{res}}}
return resourceList, nil
})
assert.NoError(t, err)
defer func() {
err = patchClientConfig.Unpatch()
assert.NoError(t, err)
err = patch.Unpatch()
assert.NoError(t, err)
err = patchSeverPreferedResources.Unpatch()
err = patch.Unpatch()
}()
}
globalProj := generateProjectAllowList(clientConfig, "testdata/test_clusterrole.yaml", "testproj")
assert.True(t, len(globalProj.Spec.NamespaceResourceWhitelist) > 0)
}

View File

@@ -14,17 +14,17 @@ import (
"github.com/ghodss/yaml"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
accountpkg "github.com/argoproj/argo-cd/pkg/apiclient/account"
"github.com/argoproj/argo-cd/pkg/apiclient/session"
"github.com/argoproj/argo-cd/server/rbacpolicy"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/localconfig"
sessionutil "github.com/argoproj/argo-cd/util/session"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
accountpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/account"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/session"
"github.com/argoproj/argo-cd/v2/server/rbacpolicy"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/localconfig"
sessionutil "github.com/argoproj/argo-cd/v2/util/session"
)
func NewAccountCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
@@ -54,7 +54,19 @@ func NewAccountUpdatePasswordCommand(clientOpts *argocdclient.ClientOptions) *co
)
var command = &cobra.Command{
Use: "update-password",
Short: "Update password",
Short: "Update an account's password",
Long: `
This command can be used to update the password of the currently logged on
user, or an arbitrary local user account when the currently logged on user
has appropriate RBAC permissions to change other accounts.
`,
Example: `
# Update the current user's password
argocd account update-password
# Update the password for user foobar
argocd account update-password --account foobar
`,
Run: func(c *cobra.Command, args []string) {
if len(args) != 0 {
c.HelpFunc()(c, args)
@@ -67,16 +79,20 @@ func NewAccountUpdatePasswordCommand(clientOpts *argocdclient.ClientOptions) *co
userInfo := getCurrentAccount(acdClient)
if userInfo.Iss == sessionutil.SessionManagerClaimsIssuer && currentPassword == "" {
fmt.Print("*** Enter current password: ")
password, err := terminal.ReadPassword(int(os.Stdin.Fd()))
fmt.Printf("*** Enter password of currently logged in user (%s): ", userInfo.Username)
password, err := term.ReadPassword(int(os.Stdin.Fd()))
errors.CheckError(err)
currentPassword = string(password)
fmt.Print("\n")
}
if account == "" {
account = userInfo.Username
}
if newPassword == "" {
var err error
newPassword, err = cli.ReadAndConfirmPassword()
newPassword, err = cli.ReadAndConfirmPassword(account)
errors.CheckError(err)
}
@@ -99,7 +115,7 @@ func NewAccountUpdatePasswordCommand(clientOpts *argocdclient.ClientOptions) *co
errors.CheckError(err)
claims, err := configCtx.User.Claims()
errors.CheckError(err)
tokenString := passwordLogin(acdClient, claims.Subject, newPassword)
tokenString := passwordLogin(acdClient, localconfig.GetUsername(claims.Subject), newPassword)
localCfg.UpsertUser(localconfig.User{
Name: localCfg.CurrentContext,
AuthToken: tokenString,
@@ -111,7 +127,7 @@ func NewAccountUpdatePasswordCommand(clientOpts *argocdclient.ClientOptions) *co
},
}
command.Flags().StringVar(&currentPassword, "current-password", "", "current password you wish to change")
command.Flags().StringVar(&currentPassword, "current-password", "", "password of the currently logged on user")
command.Flags().StringVar(&newPassword, "new-password", "", "new password you want to update to")
command.Flags().StringVar(&account, "account", "", "an account name that should be updated. Defaults to current user account")
return command
@@ -362,7 +378,7 @@ argocd account generate-token --account <account-name>`,
}
cmd.Flags().StringVarP(&account, "account", "a", "", "Account name. Defaults to the current account.")
cmd.Flags().StringVarP(&expiresIn, "expires-in", "e", "0s", "Duration before the token will expire. (Default: No expiration)")
cmd.Flags().StringVar(&id, "id", "", "Optional token id. Fallback to uuid if not value specified.")
cmd.Flags().StringVar(&id, "id", "", "Optional token id. Fall back to uuid if not value specified.")
return cmd
}
@@ -377,7 +393,7 @@ func NewAccountDeleteTokenCommand(clientOpts *argocdclient.ClientOptions) *cobra
argocd account delete-token ID
# Delete token of the account with the specified name
argocd account generate-token --account <account-name>`,
argocd account delete-token --account <account-name> ID`,
Run: func(c *cobra.Command, args []string) {
if len(args) != 1 {
c.HelpFunc()(c, args)

View File

@@ -0,0 +1,244 @@
package admin
import (
"reflect"
"github.com/ghodss/yaml"
"github.com/spf13/cobra"
apiv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/settings"
)
const (
// YamlSeparator separates sections of a YAML file
yamlSeparator = "---\n"
)
var (
configMapResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}
secretResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}
applicationsResource = schema.GroupVersionResource{Group: "argoproj.io", Version: "v1alpha1", Resource: "applications"}
appprojectsResource = schema.GroupVersionResource{Group: "argoproj.io", Version: "v1alpha1", Resource: "appprojects"}
appplicationSetResource = schema.GroupVersionResource{Group: "argoproj.io", Version: "v1alpha1", Resource: "applicationsets"}
)
// NewAdminCommand returns a new instance of an argocd command
func NewAdminCommand() *cobra.Command {
var (
pathOpts = clientcmd.NewDefaultPathOptions()
)
var command = &cobra.Command{
Use: "admin",
Short: "Contains a set of commands useful for Argo CD administrators and requires direct Kubernetes access",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(NewClusterCommand(pathOpts))
command.AddCommand(NewProjectsCommand())
command.AddCommand(NewSettingsCommand())
command.AddCommand(NewAppCommand())
command.AddCommand(NewRepoCommand())
command.AddCommand(NewImportCommand())
command.AddCommand(NewExportCommand())
command.AddCommand(NewDashboardCommand())
command.AddCommand(NewNotificationsCommand())
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
return command
}
type argoCDClientsets struct {
configMaps dynamic.ResourceInterface
secrets dynamic.ResourceInterface
applications dynamic.ResourceInterface
projects dynamic.ResourceInterface
applicationSets dynamic.ResourceInterface
}
func newArgoCDClientsets(config *rest.Config, namespace string) *argoCDClientsets {
dynamicIf, err := dynamic.NewForConfig(config)
errors.CheckError(err)
return &argoCDClientsets{
configMaps: dynamicIf.Resource(configMapResource).Namespace(namespace),
secrets: dynamicIf.Resource(secretResource).Namespace(namespace),
applications: dynamicIf.Resource(applicationsResource).Namespace(namespace),
projects: dynamicIf.Resource(appprojectsResource).Namespace(namespace),
applicationSets: dynamicIf.Resource(appplicationSetResource).Namespace(namespace),
}
}
// getReferencedSecrets examines the argocd-cm config for any referenced repo secrets and returns a
// map of all referenced secrets.
func getReferencedSecrets(un unstructured.Unstructured) map[string]bool {
var cm apiv1.ConfigMap
err := runtime.DefaultUnstructuredConverter.FromUnstructured(un.Object, &cm)
errors.CheckError(err)
referencedSecrets := make(map[string]bool)
// Referenced repository secrets
if reposRAW, ok := cm.Data["repositories"]; ok {
repos := make([]settings.Repository, 0)
err := yaml.Unmarshal([]byte(reposRAW), &repos)
errors.CheckError(err)
for _, cred := range repos {
if cred.PasswordSecret != nil {
referencedSecrets[cred.PasswordSecret.Name] = true
}
if cred.SSHPrivateKeySecret != nil {
referencedSecrets[cred.SSHPrivateKeySecret.Name] = true
}
if cred.UsernameSecret != nil {
referencedSecrets[cred.UsernameSecret.Name] = true
}
if cred.TLSClientCertDataSecret != nil {
referencedSecrets[cred.TLSClientCertDataSecret.Name] = true
}
if cred.TLSClientCertKeySecret != nil {
referencedSecrets[cred.TLSClientCertKeySecret.Name] = true
}
}
}
// Referenced repository credentials secrets
if reposRAW, ok := cm.Data["repository.credentials"]; ok {
creds := make([]settings.RepositoryCredentials, 0)
err := yaml.Unmarshal([]byte(reposRAW), &creds)
errors.CheckError(err)
for _, cred := range creds {
if cred.PasswordSecret != nil {
referencedSecrets[cred.PasswordSecret.Name] = true
}
if cred.SSHPrivateKeySecret != nil {
referencedSecrets[cred.SSHPrivateKeySecret.Name] = true
}
if cred.UsernameSecret != nil {
referencedSecrets[cred.UsernameSecret.Name] = true
}
if cred.TLSClientCertDataSecret != nil {
referencedSecrets[cred.TLSClientCertDataSecret.Name] = true
}
if cred.TLSClientCertKeySecret != nil {
referencedSecrets[cred.TLSClientCertKeySecret.Name] = true
}
}
}
return referencedSecrets
}
// isArgoCDSecret returns whether or not the given secret is a part of Argo CD configuration
// (e.g. argocd-secret, repo credentials, or cluster credentials)
func isArgoCDSecret(repoSecretRefs map[string]bool, un unstructured.Unstructured) bool {
secretName := un.GetName()
if secretName == common.ArgoCDSecretName {
return true
}
if repoSecretRefs != nil {
if _, ok := repoSecretRefs[secretName]; ok {
return true
}
}
if labels := un.GetLabels(); labels != nil {
if _, ok := labels[common.LabelKeySecretType]; ok {
return true
}
}
if annotations := un.GetAnnotations(); annotations != nil {
if annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD {
return true
}
}
return false
}
// isArgoCDConfigMap returns true if the configmap name is one of argo cd's well known configmaps
func isArgoCDConfigMap(name string) bool {
switch name {
case common.ArgoCDConfigMapName, common.ArgoCDRBACConfigMapName, common.ArgoCDKnownHostsConfigMapName, common.ArgoCDTLSCertsConfigMapName:
return true
}
return false
}
// specsEqual returns if the spec, data, labels, annotations, and finalizers of the two
// supplied objects are equal, indicating that no update is necessary during importing
func specsEqual(left, right unstructured.Unstructured) bool {
if !reflect.DeepEqual(left.GetAnnotations(), right.GetAnnotations()) {
return false
}
if !reflect.DeepEqual(left.GetLabels(), right.GetLabels()) {
return false
}
if !reflect.DeepEqual(left.GetFinalizers(), right.GetFinalizers()) {
return false
}
switch left.GetKind() {
case "Secret", "ConfigMap":
leftData, _, _ := unstructured.NestedMap(left.Object, "data")
rightData, _, _ := unstructured.NestedMap(right.Object, "data")
return reflect.DeepEqual(leftData, rightData)
case "AppProject":
leftSpec, _, _ := unstructured.NestedMap(left.Object, "spec")
rightSpec, _, _ := unstructured.NestedMap(right.Object, "spec")
return reflect.DeepEqual(leftSpec, rightSpec)
case "Application":
leftSpec, _, _ := unstructured.NestedMap(left.Object, "spec")
rightSpec, _, _ := unstructured.NestedMap(right.Object, "spec")
leftStatus, _, _ := unstructured.NestedMap(left.Object, "status")
rightStatus, _, _ := unstructured.NestedMap(right.Object, "status")
// reconciledAt and observedAt are constantly changing and we ignore any diff there
delete(leftStatus, "reconciledAt")
delete(rightStatus, "reconciledAt")
delete(leftStatus, "observedAt")
delete(rightStatus, "observedAt")
return reflect.DeepEqual(leftSpec, rightSpec) && reflect.DeepEqual(leftStatus, rightStatus)
}
return false
}
func iterateStringFields(obj interface{}, callback func(name string, val string) string) {
if mapField, ok := obj.(map[string]interface{}); ok {
for field, val := range mapField {
if strVal, ok := val.(string); ok {
mapField[field] = callback(field, strVal)
} else {
iterateStringFields(val, callback)
}
}
} else if arrayField, ok := obj.([]interface{}); ok {
for i := range arrayField {
iterateStringFields(arrayField[i], callback)
}
}
}
func redactor(dirtyString string) string {
config := make(map[string]interface{})
err := yaml.Unmarshal([]byte(dirtyString), &config)
errors.CheckError(err)
iterateStringFields(config, func(name string, val string) string {
if name == "clientSecret" || name == "secret" || name == "bindPW" {
return "********"
} else {
return val
}
})
data, err := yaml.Marshal(config)
errors.CheckError(err)
return string(data)
}

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"context"
@@ -10,7 +10,7 @@ import (
"sort"
"time"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/argo"
"github.com/ghodss/yaml"
"github.com/spf13/cobra"
@@ -22,37 +22,107 @@ import (
kubecache "k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller"
"github.com/argoproj/argo-cd/controller/cache"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
appinformers "github.com/argoproj/argo-cd/pkg/client/informers/externalversions"
"github.com/argoproj/argo-cd/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/util/cache"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
kubeutil "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/settings"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/controller"
"github.com/argoproj/argo-cd/v2/controller/cache"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
appinformers "github.com/argoproj/argo-cd/v2/pkg/client/informers/externalversions"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/settings"
)
func NewAppsCommand() *cobra.Command {
func NewAppCommand() *cobra.Command {
var command = &cobra.Command{
Use: "apps",
Short: "Utility commands operate on ArgoCD applications",
Use: "app",
Short: "Manage applications configuration",
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(NewGenAppSpecCommand())
command.AddCommand(NewReconcileCommand())
command.AddCommand(NewDiffReconcileResults())
return command
}
// NewGenAppSpecCommand generates declarative configuration file for given application
func NewGenAppSpecCommand() *cobra.Command {
var (
appOpts cmdutil.AppOptions
fileURL string
appName string
labels []string
outputFormat string
annotations []string
inline bool
)
var command = &cobra.Command{
Use: "generate-spec APPNAME",
Short: "Generate declarative config for an application",
Example: `
# Generate declarative config for a directory app
argocd admin app generate-spec guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --directory-recurse
# Generate declarative config for a Jsonnet app
argocd admin app generate-spec jsonnet-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path jsonnet-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --jsonnet-ext-str replicas=2
# Generate declarative config for a Helm app
argocd admin app generate-spec helm-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --helm-set replicaCount=2
# Generate declarative config for a Helm app from a Helm repo
argocd admin app generate-spec nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Generate declarative config for a Kustomize app
argocd admin app generate-spec kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
# Generate declarative config for a app using a custom tool:
argocd admin app generate-spec ksane --repo https://github.com/argoproj/argocd-example-apps.git --path plugins/kasane --dest-namespace default --dest-server https://kubernetes.default.svc --config-management-plugin kasane
`,
Run: func(c *cobra.Command, args []string) {
apps, err := cmdutil.ConstructApps(fileURL, appName, labels, annotations, args, appOpts, c.Flags())
errors.CheckError(err)
if len(apps) > 1 {
errors.CheckError(fmt.Errorf("failed to generate spec, more than one application is not supported"))
}
app := apps[0]
if app.Name == "" {
c.HelpFunc()(c, args)
os.Exit(1)
}
out, closer, err := getOutWriter(inline, fileURL)
errors.CheckError(err)
defer io.Close(closer)
errors.CheckError(PrintResources(outputFormat, out, app))
},
}
command.Flags().StringVar(&appName, "name", "", "A name for the app, ignored if a file is set (DEPRECATED)")
command.Flags().StringVarP(&fileURL, "file", "f", "", "Filename or URL to Kubernetes manifests for the app")
command.Flags().StringArrayVarP(&labels, "label", "l", []string{}, "Labels to apply to the app")
command.Flags().StringArrayVarP(&annotations, "annotations", "", []string{}, "Set metadata annotations (e.g. example=value)")
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
command.Flags().BoolVarP(&inline, "inline", "i", false, "If set then generated resource is written back to the file specified in --file flag")
// Only complete files with appropriate extension.
err := command.Flags().SetAnnotation("file", cobra.BashCompFilenameExt, []string{"json", "yaml", "yml"})
errors.CheckError(err)
cmdutil.AddAppFlags(command, &appOpts)
return command
}
type appReconcileResult struct {
Name string `json:"name"`
Health *v1alpha1.HealthStatus `json:"health"`
@@ -178,7 +248,7 @@ func NewReconcileCommand() *cobra.Command {
}
outputPath := args[0]
errors.CheckError(os.Setenv(common.EnvVarFakeInClusterConfig, "true"))
errors.CheckError(os.Setenv(v1alpha1.EnvVarFakeInClusterConfig, "true"))
cfg, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
@@ -188,11 +258,12 @@ func NewReconcileCommand() *cobra.Command {
if refresh {
if repoServerAddress == "" {
printLine("Repo server is not provided, trying to port-forward to argocd-repo-server pod.")
repoServerPort, err := kubeutil.PortForward("app.kubernetes.io/name=argocd-repo-server", 8081, namespace)
overrides := clientcmd.ConfigOverrides{}
repoServerPort, err := kubeutil.PortForward(8081, namespace, &overrides, "app.kubernetes.io/name=argocd-repo-server")
errors.CheckError(err)
repoServerAddress = fmt.Sprintf("localhost:%d", repoServerPort)
}
repoServerClient := apiclient.NewRepoServerClientset(repoServerAddress, 60)
repoServerClient := apiclient.NewRepoServerClientset(repoServerAddress, 60, apiclient.TLSConfiguration{DisableTLS: false, StrictValidation: false})
appClientset := appclientset.NewForConfigOrDie(cfg)
kubeClientset := kubernetes.NewForConfigOrDie(cfg)
@@ -263,11 +334,11 @@ func reconcileApplications(
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClientset, namespace)
argoDB := db.NewDB(namespace, settingsMgr, kubeClientset)
appInformerFactory := appinformers.NewFilteredSharedInformerFactory(
appInformerFactory := appinformers.NewSharedInformerFactoryWithOptions(
appClientset,
1*time.Hour,
namespace,
func(options *v1.ListOptions) {},
appinformers.WithNamespace(namespace),
appinformers.WithTweakListOptions(func(options *v1.ListOptions) {}),
)
appInformer := appInformerFactory.Argoproj().V1alpha1().Applications().Informer()
@@ -284,7 +355,7 @@ func reconcileApplications(
return true
}, func(r *http.Request) error {
return nil
})
}, []string{})
if err != nil {
return nil, err
@@ -300,7 +371,7 @@ func reconcileApplications(
)
appStateManager := controller.NewAppStateManager(
argoDB, appClientset, repoServerClient, namespace, kubeutil.NewKubectl(), settingsMgr, stateCache, projInformer, server, cache, time.Second)
argoDB, appClientset, repoServerClient, namespace, kubeutil.NewKubectl(), settingsMgr, stateCache, projInformer, server, cache, time.Second, argo.NewResourceTracking())
appsList, err := appClientset.ArgoprojV1alpha1().Applications(namespace).List(context.Background(), v1.ListOptions{LabelSelector: selector})
if err != nil {
@@ -330,7 +401,7 @@ func reconcileApplications(
return nil, err
}
res := appStateManager.CompareAppState(&app, proj, app.Spec.Source.TargetRevision, app.Spec.Source, false, nil)
res := appStateManager.CompareAppState(&app, proj, app.Spec.Source.TargetRevision, app.Spec.Source, false, false, nil)
items = append(items, appReconcileResult{
Name: app.Name,
Conditions: app.Status.Conditions,
@@ -342,5 +413,5 @@ func reconcileApplications(
}
func newLiveStateCache(argoDB db.ArgoDB, appInformer kubecache.SharedIndexInformer, settingsMgr *settings.SettingsManager, server *metrics.MetricsServer) cache.LiveStateCache {
return cache.NewLiveStateCache(argoDB, appInformer, settingsMgr, kubeutil.NewKubectl(), server, func(managedByApp map[string]bool, ref apiv1.ObjectReference) {}, nil)
return cache.NewLiveStateCache(argoDB, appInformer, settingsMgr, kubeutil.NewKubectl(), server, func(managedByApp map[string]bool, ref apiv1.ObjectReference) {}, nil, argo.NewResourceTracking())
}

View File

@@ -1,9 +1,9 @@
package commands
package admin
import (
"testing"
"github.com/argoproj/argo-cd/test"
"github.com/argoproj/argo-cd/v2/test"
clustermocks "github.com/argoproj/gitops-engine/pkg/cache/mocks"
"github.com/argoproj/gitops-engine/pkg/health"
@@ -16,16 +16,15 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/cache"
"github.com/argoproj/argo-cd/common"
statecache "github.com/argoproj/argo-cd/controller/cache"
cachemocks "github.com/argoproj/argo-cd/controller/cache/mocks"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appfake "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/reposerver/apiclient/mocks"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/settings"
statecache "github.com/argoproj/argo-cd/v2/controller/cache"
cachemocks "github.com/argoproj/argo-cd/v2/controller/cache/mocks"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appfake "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient/mocks"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/settings"
)
func TestGetReconcileResults(t *testing.T) {
@@ -79,7 +78,7 @@ func TestGetReconcileResults_Refresh(t *testing.T) {
Spec: v1alpha1.ApplicationSpec{
Project: "default",
Destination: v1alpha1.ApplicationDestination{
Server: common.KubernetesInternalAPIServerAddr,
Server: v1alpha1.KubernetesInternalAPIServerAddr,
Namespace: "default",
},
},

View File

@@ -0,0 +1,369 @@
package admin
import (
"bufio"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/ghodss/yaml"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
apierr "k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
)
// NewExportCommand defines a new command for exporting Kubernetes and Argo CD resources.
func NewExportCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
out string
)
var command = cobra.Command{
Use: "export",
Short: "Export all Argo CD data to stdout (default) or a file",
Run: func(c *cobra.Command, args []string) {
config, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
var writer io.Writer
if out == "-" {
writer = os.Stdout
} else {
f, err := os.Create(out)
errors.CheckError(err)
bw := bufio.NewWriter(f)
writer = bw
defer func() {
err = bw.Flush()
errors.CheckError(err)
err = f.Close()
errors.CheckError(err)
}()
}
acdClients := newArgoCDClientsets(config, namespace)
acdConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDConfigMapName, v1.GetOptions{})
errors.CheckError(err)
export(writer, *acdConfigMap)
acdRBACConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDRBACConfigMapName, v1.GetOptions{})
errors.CheckError(err)
export(writer, *acdRBACConfigMap)
acdKnownHostsConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDKnownHostsConfigMapName, v1.GetOptions{})
errors.CheckError(err)
export(writer, *acdKnownHostsConfigMap)
acdTLSCertsConfigMap, err := acdClients.configMaps.Get(context.Background(), common.ArgoCDTLSCertsConfigMapName, v1.GetOptions{})
errors.CheckError(err)
export(writer, *acdTLSCertsConfigMap)
referencedSecrets := getReferencedSecrets(*acdConfigMap)
secrets, err := acdClients.secrets.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
for _, secret := range secrets.Items {
if isArgoCDSecret(referencedSecrets, secret) {
export(writer, secret)
}
}
projects, err := acdClients.projects.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
for _, proj := range projects.Items {
export(writer, proj)
}
applications, err := acdClients.applications.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
for _, app := range applications.Items {
export(writer, app)
}
applicationSets, err := acdClients.applicationSets.List(context.Background(), v1.ListOptions{})
if err != nil && !apierr.IsNotFound(err) {
if apierr.IsForbidden(err) {
log.Warn(err)
} else {
errors.CheckError(err)
}
}
if applicationSets != nil {
for _, appSet := range applicationSets.Items {
export(writer, appSet)
}
}
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().StringVarP(&out, "out", "o", "-", "Output to the specified file instead of stdout")
return &command
}
// NewImportCommand defines a new command for exporting Kubernetes and Argo CD resources.
func NewImportCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
prune bool
dryRun bool
verbose bool
stopOperation bool
)
var command = cobra.Command{
Use: "import SOURCE",
Short: "Import Argo CD data from stdin (specify `-') or a file",
Run: func(c *cobra.Command, args []string) {
if len(args) != 1 {
c.HelpFunc()(c, args)
os.Exit(1)
}
config, err := clientConfig.ClientConfig()
errors.CheckError(err)
config.QPS = 100
config.Burst = 50
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
acdClients := newArgoCDClientsets(config, namespace)
var input []byte
if in := args[0]; in == "-" {
input, err = ioutil.ReadAll(os.Stdin)
} else {
input, err = ioutil.ReadFile(in)
}
errors.CheckError(err)
var dryRunMsg string
if dryRun {
dryRunMsg = " (dry run)"
}
// pruneObjects tracks live objects and it's current resource version. any remaining
// items in this map indicates the resource should be pruned since it no longer appears
// in the backup
pruneObjects := make(map[kube.ResourceKey]unstructured.Unstructured)
configMaps, err := acdClients.configMaps.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
// referencedSecrets holds any secrets referenced in the argocd-cm configmap. These
// secrets need to be imported too
var referencedSecrets map[string]bool
for _, cm := range configMaps.Items {
if isArgoCDConfigMap(cm.GetName()) {
pruneObjects[kube.ResourceKey{Group: "", Kind: "ConfigMap", Name: cm.GetName()}] = cm
}
if cm.GetName() == common.ArgoCDConfigMapName {
referencedSecrets = getReferencedSecrets(cm)
}
}
secrets, err := acdClients.secrets.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
for _, secret := range secrets.Items {
if isArgoCDSecret(referencedSecrets, secret) {
pruneObjects[kube.ResourceKey{Group: "", Kind: "Secret", Name: secret.GetName()}] = secret
}
}
applications, err := acdClients.applications.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
for _, app := range applications.Items {
pruneObjects[kube.ResourceKey{Group: "argoproj.io", Kind: "Application", Name: app.GetName()}] = app
}
projects, err := acdClients.projects.List(context.Background(), v1.ListOptions{})
errors.CheckError(err)
for _, proj := range projects.Items {
pruneObjects[kube.ResourceKey{Group: "argoproj.io", Kind: "AppProject", Name: proj.GetName()}] = proj
}
applicationSets, err := acdClients.applicationSets.List(context.Background(), v1.ListOptions{})
if apierr.IsForbidden(err) || apierr.IsNotFound(err) {
log.Warnf("argoproj.io/ApplicationSet: %v\n", err)
} else {
errors.CheckError(err)
}
if applicationSets != nil {
for _, appSet := range applicationSets.Items {
pruneObjects[kube.ResourceKey{Group: "argoproj.io", Kind: "ApplicationSet", Name: appSet.GetName()}] = appSet
}
}
// Create or replace existing object
backupObjects, err := kube.SplitYAML(input)
errors.CheckError(err)
for _, bakObj := range backupObjects {
gvk := bakObj.GroupVersionKind()
key := kube.ResourceKey{Group: gvk.Group, Kind: gvk.Kind, Name: bakObj.GetName()}
liveObj, exists := pruneObjects[key]
delete(pruneObjects, key)
var dynClient dynamic.ResourceInterface
switch bakObj.GetKind() {
case "Secret":
dynClient = acdClients.secrets
case "ConfigMap":
dynClient = acdClients.configMaps
case "AppProject":
dynClient = acdClients.projects
case "Application":
dynClient = acdClients.applications
case "ApplicationSet":
dynClient = acdClients.applicationSets
}
if !exists {
isForbidden := false
if !dryRun {
_, err = dynClient.Create(context.Background(), bakObj, v1.CreateOptions{})
if apierr.IsForbidden(err) || apierr.IsNotFound(err) {
isForbidden = true
log.Warnf("%s/%s %s: %v", gvk.Group, gvk.Kind, bakObj.GetName(), err)
} else {
errors.CheckError(err)
}
}
if !isForbidden {
fmt.Printf("%s/%s %s created%s\n", gvk.Group, gvk.Kind, bakObj.GetName(), dryRunMsg)
}
} else if specsEqual(*bakObj, liveObj) && checkAppHasNoNeedToStopOperation(liveObj, stopOperation) {
if verbose {
fmt.Printf("%s/%s %s unchanged%s\n", gvk.Group, gvk.Kind, bakObj.GetName(), dryRunMsg)
}
} else {
isForbidden := false
if !dryRun {
newLive := updateLive(bakObj, &liveObj, stopOperation)
_, err = dynClient.Update(context.Background(), newLive, v1.UpdateOptions{})
if apierr.IsForbidden(err) || apierr.IsNotFound(err) {
isForbidden = true
log.Warnf("%s/%s %s: %v", gvk.Group, gvk.Kind, bakObj.GetName(), err)
} else {
errors.CheckError(err)
}
}
if !isForbidden {
fmt.Printf("%s/%s %s updated%s\n", gvk.Group, gvk.Kind, bakObj.GetName(), dryRunMsg)
}
}
}
// Delete objects not in backup
for key, liveObj := range pruneObjects {
if prune {
var dynClient dynamic.ResourceInterface
switch key.Kind {
case "Secret":
dynClient = acdClients.secrets
case "AppProject":
dynClient = acdClients.projects
case "Application":
dynClient = acdClients.applications
if !dryRun {
if finalizers := liveObj.GetFinalizers(); len(finalizers) > 0 {
newLive := liveObj.DeepCopy()
newLive.SetFinalizers(nil)
_, err = dynClient.Update(context.Background(), newLive, v1.UpdateOptions{})
if err != nil && !apierr.IsNotFound(err) {
errors.CheckError(err)
}
}
}
case "ApplicationSet":
dynClient = acdClients.applicationSets
default:
log.Fatalf("Unexpected kind '%s' in prune list", key.Kind)
}
isForbidden := false
if !dryRun {
err = dynClient.Delete(context.Background(), key.Name, v1.DeleteOptions{})
if apierr.IsForbidden(err) || apierr.IsNotFound(err) {
isForbidden = true
log.Warnf("%s/%s %s: %v\n", key.Group, key.Kind, key.Name, err)
} else {
errors.CheckError(err)
}
}
if !isForbidden {
fmt.Printf("%s/%s %s pruned%s\n", key.Group, key.Kind, key.Name, dryRunMsg)
}
} else {
fmt.Printf("%s/%s %s needs pruning\n", key.Group, key.Kind, key.Name)
}
}
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().BoolVar(&dryRun, "dry-run", false, "Print what will be performed")
command.Flags().BoolVar(&prune, "prune", false, "Prune secrets, applications and projects which do not appear in the backup")
command.Flags().BoolVar(&verbose, "verbose", false, "Verbose output (versus only changed output)")
command.Flags().BoolVar(&stopOperation, "stop-operation", false, "Stop any existing operations")
return &command
}
// check app has no need to stop operation.
func checkAppHasNoNeedToStopOperation(liveObj unstructured.Unstructured, stopOperation bool) bool {
if !stopOperation {
return true
}
switch liveObj.GetKind() {
case "Application":
return liveObj.Object["operation"] == nil
}
return true
}
// export writes the unstructured object and removes extraneous cruft from output before writing
func export(w io.Writer, un unstructured.Unstructured) {
name := un.GetName()
finalizers := un.GetFinalizers()
apiVersion := un.GetAPIVersion()
kind := un.GetKind()
labels := un.GetLabels()
annotations := un.GetAnnotations()
unstructured.RemoveNestedField(un.Object, "metadata")
un.SetName(name)
un.SetFinalizers(finalizers)
un.SetAPIVersion(apiVersion)
un.SetKind(kind)
un.SetLabels(labels)
un.SetAnnotations(annotations)
data, err := yaml.Marshal(un.Object)
errors.CheckError(err)
_, err = w.Write(data)
errors.CheckError(err)
_, err = w.Write([]byte(yamlSeparator))
errors.CheckError(err)
}
// updateLive replaces the live object's finalizers, spec, annotations, labels, and data from the
// backup object but leaves all other fields intact (status, other metadata, etc...)
func updateLive(bak, live *unstructured.Unstructured, stopOperation bool) *unstructured.Unstructured {
newLive := live.DeepCopy()
newLive.SetAnnotations(bak.GetAnnotations())
newLive.SetLabels(bak.GetLabels())
newLive.SetFinalizers(bak.GetFinalizers())
switch live.GetKind() {
case "Secret", "ConfigMap":
newLive.Object["data"] = bak.Object["data"]
case "AppProject":
newLive.Object["spec"] = bak.Object["spec"]
case "Application":
newLive.Object["spec"] = bak.Object["spec"]
if _, ok := bak.Object["status"]; ok {
newLive.Object["status"] = bak.Object["status"]
}
if stopOperation {
newLive.Object["operation"] = nil
}
case "ApplicationSet":
newLive.Object["spec"] = bak.Object["spec"]
}
return newLive
}

View File

@@ -0,0 +1,617 @@
package admin
import (
"context"
"fmt"
"math"
"os"
"sort"
"strings"
"text/tabwriter"
"time"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/go-redis/redis/v8"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller/sharding"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/util/argo"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/clusterauth"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/glob"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/argoproj/argo-cd/v2/util/text/label"
)
func NewClusterCommand(pathOpts *clientcmd.PathOptions) *cobra.Command {
var command = &cobra.Command{
Use: "cluster",
Short: "Manage clusters configuration",
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(NewClusterConfig())
command.AddCommand(NewGenClusterConfigCommand(pathOpts))
command.AddCommand(NewClusterStatsCommand())
command.AddCommand(NewClusterShardsCommand())
namespacesCommand := NewClusterNamespacesCommand()
namespacesCommand.AddCommand(NewClusterEnableNamespacedMode())
namespacesCommand.AddCommand(NewClusterDisableNamespacedMode())
command.AddCommand(namespacesCommand)
return command
}
type ClusterWithInfo struct {
argoappv1.Cluster
// Shard holds controller shard number that handles the cluster
Shard int
// Namespaces holds list of namespaces managed by Argo CD in the cluster
Namespaces []string
}
func loadClusters(kubeClient *kubernetes.Clientset, appClient *versioned.Clientset, replicas int, namespace string, portForwardRedis bool, cacheSrc func() (*appstatecache.Cache, error), shard int) ([]ClusterWithInfo, error) {
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClient, namespace)
argoDB := db.NewDB(namespace, settingsMgr, kubeClient)
clustersList, err := argoDB.ListClusters(context.Background())
if err != nil {
return nil, err
}
var cache *appstatecache.Cache
if portForwardRedis {
overrides := clientcmd.ConfigOverrides{}
port, err := kubeutil.PortForward(6379, namespace, &overrides,
"app.kubernetes.io/name=argocd-redis-ha-haproxy", "app.kubernetes.io/name=argocd-redis")
if err != nil {
return nil, err
}
client := redis.NewClient(&redis.Options{Addr: fmt.Sprintf("localhost:%d", port)})
cache = appstatecache.NewCache(cacheutil.NewCache(cacheutil.NewRedisCache(client, time.Hour)), time.Hour)
} else {
cache, err = cacheSrc()
if err != nil {
return nil, err
}
}
appItems, err := appClient.ArgoprojV1alpha1().Applications(namespace).List(context.Background(), v1.ListOptions{})
if err != nil {
return nil, err
}
apps := appItems.Items
for i, app := range apps {
err := argo.ValidateDestination(context.Background(), &app.Spec.Destination, argoDB)
if err != nil {
return nil, err
}
apps[i] = app
}
clusters := make([]ClusterWithInfo, len(clustersList.Items))
batchSize := 10
batchesCount := int(math.Ceil(float64(len(clusters)) / float64(batchSize)))
for batchNum := 0; batchNum < batchesCount; batchNum++ {
batchStart := batchSize * batchNum
batchEnd := batchSize * (batchNum + 1)
if batchEnd > len(clustersList.Items) {
batchEnd = len(clustersList.Items)
}
batch := clustersList.Items[batchStart:batchEnd]
_ = kube.RunAllAsync(len(batch), func(i int) error {
cluster := batch[i]
clusterShard := 0
if replicas > 0 {
clusterShard = sharding.GetShardByID(cluster.ID, replicas)
}
if shard != -1 && clusterShard != shard {
return nil
}
nsSet := map[string]bool{}
for _, app := range apps {
if app.Spec.Destination.Server == cluster.Server {
nsSet[app.Spec.Destination.Namespace] = true
}
}
var namespaces []string
for ns := range nsSet {
namespaces = append(namespaces, ns)
}
_ = cache.GetClusterInfo(cluster.Server, &cluster.Info)
clusters[batchStart+i] = ClusterWithInfo{cluster, clusterShard, namespaces}
return nil
})
}
return clusters, nil
}
func getControllerReplicas(kubeClient *kubernetes.Clientset, namespace string) (int, error) {
controllerPods, err := kubeClient.CoreV1().Pods(namespace).List(context.Background(), v1.ListOptions{
LabelSelector: "app.kubernetes.io/name=argocd-application-controller"})
if err != nil {
return 0, err
}
return len(controllerPods.Items), nil
}
func NewClusterShardsCommand() *cobra.Command {
var (
shard int
replicas int
clientConfig clientcmd.ClientConfig
cacheSrc func() (*appstatecache.Cache, error)
portForwardRedis bool
)
var command = cobra.Command{
Use: "shards",
Short: "Print information about each controller shard and portion of Kubernetes resources it is responsible for.",
Run: func(cmd *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
clientCfg, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
kubeClient := kubernetes.NewForConfigOrDie(clientCfg)
appClient := versioned.NewForConfigOrDie(clientCfg)
if replicas == 0 {
replicas, err = getControllerReplicas(kubeClient, namespace)
errors.CheckError(err)
}
if replicas == 0 {
return
}
clusters, err := loadClusters(kubeClient, appClient, replicas, namespace, portForwardRedis, cacheSrc, shard)
errors.CheckError(err)
if len(clusters) == 0 {
return
}
printStatsSummary(clusters)
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().IntVar(&shard, "shard", -1, "Cluster shard filter")
command.Flags().IntVar(&replicas, "replicas", 0, "Application controller replicas count. Inferred from number of running controller pods if not specified")
command.Flags().BoolVar(&portForwardRedis, "port-forward-redis", true, "Automatically port-forward ha proxy redis from current namespace?")
cacheSrc = appstatecache.AddCacheFlagsToCmd(&command)
return &command
}
func printStatsSummary(clusters []ClusterWithInfo) {
totalResourcesCount := int64(0)
resourcesCountByShard := map[int]int64{}
for _, c := range clusters {
totalResourcesCount += c.Info.CacheInfo.ResourcesCount
resourcesCountByShard[c.Shard] += c.Info.CacheInfo.ResourcesCount
}
avgResourcesByShard := totalResourcesCount / int64(len(resourcesCountByShard))
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
_, _ = fmt.Fprintf(w, "SHARD\tRESOURCES COUNT\n")
for shard := 0; shard < len(resourcesCountByShard); shard++ {
cnt := resourcesCountByShard[shard]
percent := (float64(cnt) / float64(avgResourcesByShard)) * 100.0
_, _ = fmt.Fprintf(w, "%d\t%s\n", shard, fmt.Sprintf("%d (%.0f%%)", cnt, percent))
}
_ = w.Flush()
}
func runClusterNamespacesCommand(clientConfig clientcmd.ClientConfig, action func(appClient *versioned.Clientset, argoDB db.ArgoDB, clusters map[string][]string) error) error {
clientCfg, err := clientConfig.ClientConfig()
if err != nil {
return err
}
namespace, _, err := clientConfig.Namespace()
if err != nil {
return err
}
kubeClient := kubernetes.NewForConfigOrDie(clientCfg)
appClient := versioned.NewForConfigOrDie(clientCfg)
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClient, namespace)
argoDB := db.NewDB(namespace, settingsMgr, kubeClient)
clustersList, err := argoDB.ListClusters(context.Background())
if err != nil {
return err
}
appItems, err := appClient.ArgoprojV1alpha1().Applications(namespace).List(context.Background(), v1.ListOptions{})
if err != nil {
return err
}
apps := appItems.Items
for i, app := range apps {
err := argo.ValidateDestination(context.Background(), &app.Spec.Destination, argoDB)
if err != nil {
return err
}
apps[i] = app
}
clusters := map[string][]string{}
for _, cluster := range clustersList.Items {
nsSet := map[string]bool{}
for _, app := range apps {
if app.Spec.Destination.Server != cluster.Server {
continue
}
// Use namespaces of actually deployed resources, since some application use dummy target namespace
// If resources list is empty then use target namespace
if len(app.Status.Resources) != 0 {
for _, res := range app.Status.Resources {
if res.Namespace != "" {
nsSet[res.Namespace] = true
}
}
} else {
if app.Spec.Destination.Server == cluster.Server {
nsSet[app.Spec.Destination.Namespace] = true
}
}
}
var namespaces []string
for ns := range nsSet {
namespaces = append(namespaces, ns)
}
clusters[cluster.Server] = namespaces
}
return action(appClient, argoDB, clusters)
}
func NewClusterNamespacesCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
)
var command = cobra.Command{
Use: "namespaces",
Short: "Print information namespaces which Argo CD manages in each cluster.",
Run: func(cmd *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
err := runClusterNamespacesCommand(clientConfig, func(appClient *versioned.Clientset, _ db.ArgoDB, clusters map[string][]string) error {
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
_, _ = fmt.Fprintf(w, "CLUSTER\tNAMESPACES\n")
for cluster, namespaces := range clusters {
// print shortest namespace names first
sort.Slice(namespaces, func(i, j int) bool {
return len(namespaces[j]) > len(namespaces[i])
})
namespacesStr := ""
if len(namespaces) > 4 {
namespacesStr = fmt.Sprintf("%s (total %d)", strings.Join(namespaces[:4], ","), len(namespaces))
} else {
namespacesStr = strings.Join(namespaces, ",")
}
_, _ = fmt.Fprintf(w, "%s\t%s\n", cluster, namespacesStr)
}
_ = w.Flush()
return nil
})
errors.CheckError(err)
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
return &command
}
func NewClusterEnableNamespacedMode() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
dryRun bool
clusterResources bool
namespacesCount int
)
var command = cobra.Command{
Use: "enable-namespaced-mode PATTERN",
Short: "Enable namespaced mode for clusters which name matches to the specified pattern.",
Run: func(cmd *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
if len(args) == 0 {
cmd.HelpFunc()(cmd, args)
os.Exit(1)
}
pattern := args[0]
errors.CheckError(runClusterNamespacesCommand(clientConfig, func(_ *versioned.Clientset, argoDB db.ArgoDB, clusters map[string][]string) error {
for server, namespaces := range clusters {
if len(namespaces) == 0 || len(namespaces) > namespacesCount || !glob.Match(pattern, server) {
continue
}
cluster, err := argoDB.GetCluster(context.Background(), server)
if err != nil {
return err
}
cluster.Namespaces = namespaces
cluster.ClusterResources = clusterResources
fmt.Printf("Setting cluster %s namespaces to %v...", server, namespaces)
if !dryRun {
_, err = argoDB.UpdateCluster(context.Background(), cluster)
if err != nil {
return err
}
fmt.Println("done")
} else {
fmt.Println("done (dry run)")
}
}
return nil
}))
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().BoolVar(&dryRun, "dry-run", true, "Print what will be performed")
command.Flags().BoolVar(&clusterResources, "cluster-resources", false, "Indicates if cluster level resources should be managed.")
command.Flags().IntVar(&namespacesCount, "max-namespace-count", 0, "Max number of namespaces that cluster should managed managed namespaces is less or equal to specified count")
return &command
}
func NewClusterDisableNamespacedMode() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
dryRun bool
)
var command = cobra.Command{
Use: "disable-namespaced-mode PATTERN",
Short: "Disable namespaced mode for clusters which name matches to the specified pattern.",
Run: func(cmd *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
if len(args) == 0 {
cmd.HelpFunc()(cmd, args)
os.Exit(1)
}
pattern := args[0]
errors.CheckError(runClusterNamespacesCommand(clientConfig, func(_ *versioned.Clientset, argoDB db.ArgoDB, clusters map[string][]string) error {
for server := range clusters {
if !glob.Match(pattern, server) {
continue
}
cluster, err := argoDB.GetCluster(context.Background(), server)
if err != nil {
return err
}
if len(cluster.Namespaces) == 0 {
continue
}
cluster.Namespaces = nil
fmt.Printf("Disabling namespaced mode for cluster %s...", server)
if !dryRun {
_, err = argoDB.UpdateCluster(context.Background(), cluster)
if err != nil {
return err
}
fmt.Println("done")
} else {
fmt.Println("done (dry run)")
}
}
return nil
}))
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().BoolVar(&dryRun, "dry-run", true, "Print what will be performed")
return &command
}
func NewClusterStatsCommand() *cobra.Command {
var (
shard int
replicas int
clientConfig clientcmd.ClientConfig
cacheSrc func() (*appstatecache.Cache, error)
portForwardRedis bool
)
var command = cobra.Command{
Use: "stats",
Short: "Prints information cluster statistics and inferred shard number",
Run: func(cmd *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
clientCfg, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
kubeClient := kubernetes.NewForConfigOrDie(clientCfg)
appClient := versioned.NewForConfigOrDie(clientCfg)
if replicas == 0 {
replicas, err = getControllerReplicas(kubeClient, namespace)
errors.CheckError(err)
}
clusters, err := loadClusters(kubeClient, appClient, replicas, namespace, portForwardRedis, cacheSrc, shard)
errors.CheckError(err)
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
_, _ = fmt.Fprintf(w, "SERVER\tSHARD\tCONNECTION\tNAMESPACES COUNT\tAPPS COUNT\tRESOURCES COUNT\n")
for _, cluster := range clusters {
_, _ = fmt.Fprintf(w, "%s\t%d\t%s\t%d\t%d\t%d\n", cluster.Server, cluster.Shard, cluster.Info.ConnectionState.Status, len(cluster.Namespaces), cluster.Info.ApplicationsCount, cluster.Info.CacheInfo.ResourcesCount)
}
_ = w.Flush()
},
}
clientConfig = cli.AddKubectlFlagsToCmd(&command)
command.Flags().IntVar(&shard, "shard", -1, "Cluster shard filter")
command.Flags().IntVar(&replicas, "replicas", 0, "Application controller replicas count. Inferred from number of running controller pods if not specified")
command.Flags().BoolVar(&portForwardRedis, "port-forward-redis", true, "Automatically port-forward ha proxy redis from current namespace?")
cacheSrc = appstatecache.AddCacheFlagsToCmd(&command)
return &command
}
// NewClusterConfig returns a new instance of `argocd admin kubeconfig` command
func NewClusterConfig() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
)
var command = &cobra.Command{
Use: "kubeconfig CLUSTER_URL OUTPUT_PATH",
Short: "Generates kubeconfig for the specified cluster",
DisableAutoGenTag: true,
Run: func(c *cobra.Command, args []string) {
if len(args) != 2 {
c.HelpFunc()(c, args)
os.Exit(1)
}
serverUrl := args[0]
output := args[1]
conf, err := clientConfig.ClientConfig()
errors.CheckError(err)
namespace, _, err := clientConfig.Namespace()
errors.CheckError(err)
kubeclientset, err := kubernetes.NewForConfig(conf)
errors.CheckError(err)
cluster, err := db.NewDB(namespace, settings.NewSettingsManager(context.Background(), kubeclientset, namespace), kubeclientset).GetCluster(context.Background(), serverUrl)
errors.CheckError(err)
err = kube.WriteKubeConfig(cluster.RawRestConfig(), namespace, output)
errors.CheckError(err)
},
}
clientConfig = cli.AddKubectlFlagsToCmd(command)
return command
}
func NewGenClusterConfigCommand(pathOpts *clientcmd.PathOptions) *cobra.Command {
var (
clusterOpts cmdutil.ClusterOptions
bearerToken string
generateToken bool
outputFormat string
labels []string
annotations []string
)
var command = &cobra.Command{
Use: "generate-spec CONTEXT",
Short: "Generate declarative config for a cluster",
Run: func(c *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
var configAccess clientcmd.ConfigAccess = pathOpts
if len(args) == 0 {
log.Error("Choose a context name from:")
cmdutil.PrintKubeContexts(configAccess)
os.Exit(1)
}
cfgAccess, err := configAccess.GetStartingConfig()
errors.CheckError(err)
contextName := args[0]
clstContext := cfgAccess.Contexts[contextName]
if clstContext == nil {
log.Fatalf("Context %s does not exist in kubeconfig", contextName)
return
}
overrides := clientcmd.ConfigOverrides{
Context: *clstContext,
}
clientConfig := clientcmd.NewDefaultClientConfig(*cfgAccess, &overrides)
conf, err := clientConfig.ClientConfig()
errors.CheckError(err)
kubeClientset := fake.NewSimpleClientset()
var awsAuthConf *argoappv1.AWSAuthConfig
var execProviderConf *argoappv1.ExecProviderConfig
if clusterOpts.AwsClusterName != "" {
awsAuthConf = &argoappv1.AWSAuthConfig{
ClusterName: clusterOpts.AwsClusterName,
RoleARN: clusterOpts.AwsRoleArn,
}
} else if clusterOpts.ExecProviderCommand != "" {
execProviderConf = &argoappv1.ExecProviderConfig{
Command: clusterOpts.ExecProviderCommand,
Args: clusterOpts.ExecProviderArgs,
Env: clusterOpts.ExecProviderEnv,
APIVersion: clusterOpts.ExecProviderAPIVersion,
InstallHint: clusterOpts.ExecProviderInstallHint,
}
} else if generateToken {
bearerToken, err = GenerateToken(clusterOpts, conf)
errors.CheckError(err)
} else if bearerToken == "" {
bearerToken = "bearer-token"
}
if clusterOpts.Name != "" {
contextName = clusterOpts.Name
}
labelsMap, err := label.Parse(labels)
errors.CheckError(err)
annotationsMap, err := label.Parse(annotations)
errors.CheckError(err)
clst := cmdutil.NewCluster(contextName, clusterOpts.Namespaces, clusterOpts.ClusterResources, conf, bearerToken, awsAuthConf, execProviderConf, labelsMap, annotationsMap)
if clusterOpts.InCluster {
clst.Server = argoappv1.KubernetesInternalAPIServerAddr
}
if clusterOpts.Shard >= 0 {
clst.Shard = &clusterOpts.Shard
}
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClientset, ArgoCDNamespace)
argoDB := db.NewDB(ArgoCDNamespace, settingsMgr, kubeClientset)
_, err = argoDB.CreateCluster(context.Background(), clst)
errors.CheckError(err)
secName, err := db.URIToSecretName("cluster", clst.Server)
errors.CheckError(err)
secret, err := kubeClientset.CoreV1().Secrets(ArgoCDNamespace).Get(context.Background(), secName, v1.GetOptions{})
errors.CheckError(err)
errors.CheckError(PrintResources(outputFormat, os.Stdout, secret))
},
}
command.PersistentFlags().StringVar(&pathOpts.LoadingRules.ExplicitPath, pathOpts.ExplicitFileFlag, pathOpts.LoadingRules.ExplicitPath, "use a particular kubeconfig file")
command.Flags().StringVar(&bearerToken, "bearer-token", "", "Authentication token that should be used to access K8S API server")
command.Flags().BoolVar(&generateToken, "generate-bearer-token", false, "Generate authentication token that should be used to access K8S API server")
command.Flags().StringVar(&clusterOpts.ServiceAccount, "service-account", "argocd-manager", fmt.Sprintf("System namespace service account to use for kubernetes resource management. If not set then default \"%s\" SA will be used", clusterauth.ArgoCDManagerServiceAccount))
command.Flags().StringVar(&clusterOpts.SystemNamespace, "system-namespace", common.DefaultSystemNamespace, "Use different system namespace")
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
command.Flags().StringArrayVar(&labels, "label", nil, "Set metadata labels (e.g. --label key=value)")
command.Flags().StringArrayVar(&annotations, "annotation", nil, "Set metadata annotations (e.g. --annotation key=value)")
cmdutil.AddClusterFlags(command, &clusterOpts)
return command
}
func GenerateToken(clusterOpts cmdutil.ClusterOptions, conf *rest.Config) (string, error) {
clientset, err := kubernetes.NewForConfig(conf)
errors.CheckError(err)
bearerToken, err := clusterauth.GetServiceAccountBearerToken(clientset, clusterOpts.SystemNamespace, clusterOpts.ServiceAccount, common.BearerTokenTimeout)
if err != nil {
return "", err
}
return bearerToken, nil
}

View File

@@ -0,0 +1,32 @@
package admin
import (
"context"
"fmt"
"github.com/spf13/cobra"
"github.com/argoproj/argo-cd/v2/cmd/argocd/commands/headless"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apiclient"
)
func NewDashboardCommand() *cobra.Command {
var (
port int
address string
)
cmd := &cobra.Command{
Use: "dashboard",
Short: "Starts Argo CD Web UI locally",
Run: func(cmd *cobra.Command, args []string) {
println(fmt.Sprintf("Argo CD UI is available at http://%s:%d", address, port))
<-context.Background().Done()
},
}
clientOpts := &apiclient.ClientOptions{Core: true}
headless.InitCommand(cmd, clientOpts, &port, &address)
cmd.Flags().IntVar(&port, "port", common.DefaultPortAPIServer, "Listen on given port")
cmd.Flags().StringVar(&address, "address", common.DefaultAddressAPIServer, "Listen on given address")
return cmd
}

View File

@@ -0,0 +1,108 @@
package admin
import (
"encoding/json"
"errors"
"fmt"
"io"
"os"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/ghodss/yaml"
v1 "k8s.io/api/core/v1"
ioutil "github.com/argoproj/argo-cd/v2/util/io"
)
func getOutWriter(inline bool, filePath string) (io.Writer, io.Closer, error) {
if !inline {
return os.Stdout, ioutil.NopCloser, nil
}
if filePath == "" {
return nil, nil, errors.New("The file path must be specified using flag '--file'")
}
err := os.Rename(filePath, fmt.Sprintf("%s.back", filePath))
if err != nil {
return nil, nil, err
}
fileOut, err := os.Create(filePath)
if err != nil {
return nil, nil, err
}
return fileOut, fileOut, nil
}
// PrintResources prints a single resource in YAML or JSON format to stdout according to the output format
func PrintResources(output string, out io.Writer, resources ...interface{}) error {
for i, resource := range resources {
if secret, ok := resource.(*v1.Secret); ok {
convertSecretData(secret)
}
filteredResource, err := omitFields(resource)
if err != nil {
return err
}
resources[i] = filteredResource
}
var obj interface{} = resources
if len(resources) == 1 {
obj = resources[0]
}
switch output {
case "json":
jsonBytes, err := json.MarshalIndent(obj, "", " ")
if err != nil {
return err
}
_, _ = fmt.Fprintln(out, string(jsonBytes))
case "yaml":
yamlBytes, err := yaml.Marshal(obj)
if err != nil {
return err
}
// marshaled YAML already ends with the new line character
_, _ = fmt.Fprint(out, string(yamlBytes))
default:
return fmt.Errorf("unknown output format: %s", output)
}
return nil
}
// omit fields such as status, creationTimestamp and metadata.namespace in k8s objects
func omitFields(resource interface{}) (interface{}, error) {
jsonBytes, err := json.Marshal(resource)
if err != nil {
return nil, err
}
toMap := make(map[string]interface{})
err = json.Unmarshal(jsonBytes, &toMap)
if err != nil {
return nil, err
}
delete(toMap, "status")
if v, ok := toMap["metadata"]; ok {
if metadata, ok := v.(map[string]interface{}); ok {
delete(metadata, "creationTimestamp")
delete(metadata, "namespace")
}
}
return toMap, nil
}
// convertSecretData converts kubernetes secret's data to stringData
func convertSecretData(secret *v1.Secret) {
secret.Kind = kube.SecretKind
secret.APIVersion = "v1"
secret.StringData = map[string]string{}
for k, v := range secret.Data {
secret.StringData[k] = string(v)
}
secret.Data = map[string][]byte{}
}

View File

@@ -0,0 +1,58 @@
package admin
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"testing"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestGetOutWriter_InlineOff(t *testing.T) {
out, closer, err := getOutWriter(false, "")
require.NoError(t, err)
defer io.Close(closer)
assert.Equal(t, os.Stdout, out)
}
func TestGetOutWriter_InlineOn(t *testing.T) {
tmpFile, err := ioutil.TempFile("", "")
require.NoError(t, err)
defer func() {
_ = os.Remove(tmpFile.Name())
_ = os.Remove(fmt.Sprintf("%s.back", tmpFile.Name()))
}()
out, closer, err := getOutWriter(true, tmpFile.Name())
require.NoError(t, err)
defer io.Close(closer)
assert.Equal(t, tmpFile.Name(), out.(*os.File).Name())
_, err = os.Stat(fmt.Sprintf("%s.back", tmpFile.Name()))
assert.NoError(t, err, "Back file must be created")
}
func TestPrintResources_Secret_YAML(t *testing.T) {
out := bytes.Buffer{}
err := PrintResources("yaml", &out, &v1.Secret{
ObjectMeta: metav1.ObjectMeta{Name: "my-secret"},
Data: map[string][]byte{"my-secret-key": []byte("my-secret-data")},
})
assert.NoError(t, err)
assert.Equal(t, `apiVersion: v1
kind: Secret
metadata:
name: my-secret
stringData:
my-secret-key: my-secret-data
`, out.String())
}

View File

@@ -0,0 +1,51 @@
package admin
import (
"log"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
service "github.com/argoproj/argo-cd/v2/util/notification/argocd"
settings "github.com/argoproj/argo-cd/v2/util/notification/settings"
"github.com/argoproj/notifications-engine/pkg/cmd"
"github.com/spf13/cobra"
)
var (
applications = schema.GroupVersionResource{Group: "argoproj.io", Version: "v1alpha1", Resource: "applications"}
)
func NewNotificationsCommand() *cobra.Command {
var (
argocdRepoServer string
argocdRepoServerPlaintext bool
argocdRepoServerStrictTLS bool
)
var argocdService service.Service
toolsCommand := cmd.NewToolsCommand(
"notifications",
"notifications",
applications,
settings.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm"), func(clientConfig clientcmd.ClientConfig) {
k8sCfg, err := clientConfig.ClientConfig()
if err != nil {
log.Fatalf("Failed to parse k8s config: %v", err)
}
ns, _, err := clientConfig.Namespace()
if err != nil {
log.Fatalf("Failed to parse k8s config: %v", err)
}
argocdService, err = service.NewArgoCDService(kubernetes.NewForConfigOrDie(k8sCfg), ns, argocdRepoServer, argocdRepoServerPlaintext, argocdRepoServerStrictTLS)
if err != nil {
log.Fatalf("Failed to initalize Argo CD service: %v", err)
}
})
toolsCommand.PersistentFlags().StringVar(&argocdRepoServer, "argocd-repo-server", "argocd-repo-server:8081", "Argo CD repo server address")
toolsCommand.PersistentFlags().BoolVar(&argocdRepoServerPlaintext, "argocd-repo-server-plaintext", false, "Use a plaintext client (non-TLS) to connect to repository server")
toolsCommand.PersistentFlags().BoolVar(&argocdRepoServerStrictTLS, "argocd-repo-server-strict-tls", false, "Perform strict validation of TLS certificates when connecting to repo server")
return toolsCommand
}

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"context"
@@ -7,11 +7,13 @@ import (
"path/filepath"
"strings"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
appclient "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/typed/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
appclient "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/typed/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/spf13/cobra"
@@ -21,18 +23,53 @@ import (
func NewProjectsCommand() *cobra.Command {
var command = &cobra.Command{
Use: "projects",
Short: "Utility commands operate on ArgoCD Projects",
Use: "proj",
Short: "Manage projects configuration",
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(NewGenProjectSpecCommand())
command.AddCommand(NewUpdatePolicyRuleCommand())
command.AddCommand(NewProjectAllowListGenCommand())
return command
}
// NewGenProjectSpecCommand generates declarative configuration file for given project
func NewGenProjectSpecCommand() *cobra.Command {
var (
opts cmdutil.ProjectOpts
fileURL string
outputFormat string
inline bool
)
var command = &cobra.Command{
Use: "generate-spec PROJECT",
Short: "Generate declarative config for a project",
Run: func(c *cobra.Command, args []string) {
proj, err := cmdutil.ConstructAppProj(fileURL, args, opts, c)
errors.CheckError(err)
out, closer, err := getOutWriter(inline, fileURL)
errors.CheckError(err)
defer io.Close(closer)
errors.CheckError(PrintResources(outputFormat, out, proj))
},
}
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
command.Flags().StringVarP(&fileURL, "file", "f", "", "Filename or URL to Kubernetes manifests for the project")
command.Flags().BoolVarP(&inline, "inline", "i", false, "If set then generated resource is written back to the file specified in --file flag")
// Only complete files with appropriate extension.
err := command.Flags().SetAnnotation("file", cobra.BashCompFilenameExt, []string{"json", "yaml", "yml"})
errors.CheckError(err)
cmdutil.AddProjFlags(command, &opts)
return command
}
func globMatch(pattern string, val string) bool {
if pattern == "*" {
return true
@@ -106,10 +143,10 @@ func NewUpdatePolicyRuleCommand() *cobra.Command {
Use: "update-role-policy PROJECT_GLOB MODIFICATION ACTION",
Short: "Implement bulk project role update. Useful to back-fill existing project policies or remove obsolete actions.",
Example: ` # Add policy that allows executing any action (action/*) to roles which name matches to *deployer* in all projects
argocd-util projects update-role-policy '*' set 'action/*' --role '*deployer*' --resource applications --scope '*' --permission allow
argocd admin projects update-role-policy '*' set 'action/*' --role '*deployer*' --resource applications --scope '*' --permission allow
# Remove policy that which manages running (action/*) from all roles which name matches *deployer* in all projects
argocd-util projects update-role-policy '*' remove override --role '*deployer*'
argocd admin projects update-role-policy '*' remove override --role '*deployer*'
`,
Run: func(c *cobra.Command, args []string) {
if len(args) != 3 {

View File

@@ -1,7 +1,8 @@
package commands
package admin
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
@@ -17,10 +18,10 @@ import (
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
@@ -63,7 +64,10 @@ func NewProjectAllowListGenCommand() *cobra.Command {
}()
}
globalProj := generateProjectAllowList(clientConfig, clusterRoleFileName, projName)
resourceList, err := getResourceList(clientConfig)
errors.CheckError(err)
globalProj, err := generateProjectAllowList(resourceList, clusterRoleFileName, projName)
errors.CheckError(err)
yamlBytes, err := yaml.Marshal(globalProj)
errors.CheckError(err)
@@ -78,23 +82,38 @@ func NewProjectAllowListGenCommand() *cobra.Command {
return command
}
func generateProjectAllowList(clientConfig clientcmd.ClientConfig, clusterRoleFileName string, projName string) v1alpha1.AppProject {
func getResourceList(clientConfig clientcmd.ClientConfig) ([]*metav1.APIResourceList, error) {
config, err := clientConfig.ClientConfig()
if err != nil {
return nil, fmt.Errorf("error while creating client config: %s", err)
}
disco, err := discovery.NewDiscoveryClientForConfig(config)
if err != nil {
return nil, fmt.Errorf("error while creating discovery client: %s", err)
}
serverResources, err := disco.ServerPreferredResources()
if err != nil {
return nil, fmt.Errorf("error while getting server resources: %s", err)
}
return serverResources, nil
}
func generateProjectAllowList(serverResources []*metav1.APIResourceList, clusterRoleFileName string, projName string) (*v1alpha1.AppProject, error) {
yamlBytes, err := ioutil.ReadFile(clusterRoleFileName)
errors.CheckError(err)
if err != nil {
return nil, fmt.Errorf("error reading cluster role file: %s", err)
}
var obj unstructured.Unstructured
err = yaml.Unmarshal(yamlBytes, &obj)
errors.CheckError(err)
if err != nil {
return nil, fmt.Errorf("error unmarshalling cluster role file yaml: %s", err)
}
clusterRole := &rbacv1.ClusterRole{}
err = scheme.Scheme.Convert(&obj, clusterRole, nil)
errors.CheckError(err)
config, err := clientConfig.ClientConfig()
errors.CheckError(err)
disco, err := discovery.NewDiscoveryClientForConfig(config)
errors.CheckError(err)
serverResources, err := disco.ServerPreferredResources()
errors.CheckError(err)
if err != nil {
return nil, fmt.Errorf("error converting cluster role yaml into ClusterRole struct: %s", err)
}
resourceList := make([]metav1.GroupKind, 0)
for _, rule := range clusterRole.Rules {
@@ -140,5 +159,5 @@ func generateProjectAllowList(clientConfig clientcmd.ClientConfig, clusterRoleFi
Spec: v1alpha1.AppProjectSpec{},
}
globalProj.Spec.NamespaceResourceWhitelist = resourceList
return globalProj
return &globalProj, nil
}

View File

@@ -0,0 +1,20 @@
package admin
import (
"testing"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestProjectAllowListGen(t *testing.T) {
res := metav1.APIResource{
Name: "services",
Kind: "Service",
}
resourceList := []*metav1.APIResourceList{{APIResources: []metav1.APIResource{res}}}
globalProj, err := generateProjectAllowList(resourceList, "testdata/test_clusterrole.yaml", "testproj")
assert.NoError(t, err)
assert.True(t, len(globalProj.Spec.NamespaceResourceWhitelist) > 0)
}

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"context"
@@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake"
)
const (

View File

@@ -0,0 +1,169 @@
package admin
import (
"context"
"fmt"
"io/ioutil"
"os"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
apiv1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/settings"
)
const (
ArgoCDNamespace = "argocd"
repoSecretPrefix = "repo"
)
func NewRepoCommand() *cobra.Command {
var command = &cobra.Command{
Use: "repo",
Short: "Manage repositories configuration",
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
}
command.AddCommand(NewGenRepoSpecCommand())
return command
}
func NewGenRepoSpecCommand() *cobra.Command {
var (
repoOpts cmdutil.RepoOptions
outputFormat string
)
// For better readability and easier formatting
var repoAddExamples = `
# Add a Git repository via SSH using a private key for authentication, ignoring the server's host key:
argocd admin repo generate-spec git@git.example.com:repos/repo --insecure-ignore-host-key --ssh-private-key-path ~/id_rsa
# Add a Git repository via SSH on a non-default port - need to use ssh:// style URLs here
argocd admin repo generate-spec ssh://git@git.example.com:2222/repos/repo --ssh-private-key-path ~/id_rsa
# Add a private Git repository via HTTPS using username/password and TLS client certificates:
argocd admin repo generate-spec https://git.example.com/repos/repo --username git --password secret --tls-client-cert-path ~/mycert.crt --tls-client-cert-key-path ~/mycert.key
# Add a private Git repository via HTTPS using username/password without verifying the server's TLS certificate
argocd admin repo generate-spec https://git.example.com/repos/repo --username git --password secret --insecure-skip-server-verification
# Add a public Helm repository named 'stable' via HTTPS
argocd admin repo generate-spec https://charts.helm.sh/stable --type helm --name stable
# Add a private Helm repository named 'stable' via HTTPS
argocd admin repo generate-spec https://charts.helm.sh/stable --type helm --name stable --username test --password test
# Add a private Helm OCI-based repository named 'stable' via HTTPS
argocd admin repo generate-spec helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type helm --name stable --enable-oci --username test --password test
`
var command = &cobra.Command{
Use: "generate-spec REPOURL",
Short: "Generate declarative config for a repo",
Example: repoAddExamples,
Run: func(c *cobra.Command, args []string) {
log.SetLevel(log.WarnLevel)
if len(args) != 1 {
c.HelpFunc()(c, args)
os.Exit(1)
}
// Repository URL
repoOpts.Repo.Repo = args[0]
// Specifying ssh-private-key-path is only valid for SSH repositories
if repoOpts.SshPrivateKeyPath != "" {
if ok, _ := git.IsSSHURL(repoOpts.Repo.Repo); ok {
keyData, err := ioutil.ReadFile(repoOpts.SshPrivateKeyPath)
if err != nil {
log.Fatal(err)
}
repoOpts.Repo.SSHPrivateKey = string(keyData)
} else {
err := fmt.Errorf("--ssh-private-key-path is only supported for SSH repositories.")
errors.CheckError(err)
}
}
// tls-client-cert-path and tls-client-cert-key-key-path must always be
// specified together
if (repoOpts.TlsClientCertPath != "" && repoOpts.TlsClientCertKeyPath == "") || (repoOpts.TlsClientCertPath == "" && repoOpts.TlsClientCertKeyPath != "") {
err := fmt.Errorf("--tls-client-cert-path and --tls-client-cert-key-path must be specified together")
errors.CheckError(err)
}
// Specifying tls-client-cert-path is only valid for HTTPS repositories
if repoOpts.TlsClientCertPath != "" {
if git.IsHTTPSURL(repoOpts.Repo.Repo) {
tlsCertData, err := ioutil.ReadFile(repoOpts.TlsClientCertPath)
errors.CheckError(err)
tlsCertKey, err := ioutil.ReadFile(repoOpts.TlsClientCertKeyPath)
errors.CheckError(err)
repoOpts.Repo.TLSClientCertData = string(tlsCertData)
repoOpts.Repo.TLSClientCertKey = string(tlsCertKey)
} else {
err := fmt.Errorf("--tls-client-cert-path is only supported for HTTPS repositories")
errors.CheckError(err)
}
}
// Set repository connection properties only when creating repository, not
// when creating repository credentials.
// InsecureIgnoreHostKey is deprecated and only here for backwards compat
repoOpts.Repo.InsecureIgnoreHostKey = repoOpts.InsecureIgnoreHostKey
repoOpts.Repo.Insecure = repoOpts.InsecureSkipServerVerification
repoOpts.Repo.EnableLFS = repoOpts.EnableLfs
repoOpts.Repo.EnableOCI = repoOpts.EnableOci
if repoOpts.Repo.Type == "helm" && repoOpts.Repo.Name == "" {
errors.CheckError(fmt.Errorf("must specify --name for repos of type 'helm'"))
}
// If the user set a username, but didn't supply password via --password,
// then we prompt for it
if repoOpts.Repo.Username != "" && repoOpts.Repo.Password == "" {
repoOpts.Repo.Password = cli.PromptPassword(repoOpts.Repo.Password)
}
argoCDCM := &apiv1.ConfigMap{
TypeMeta: v1.TypeMeta{
Kind: "ConfigMap",
APIVersion: "v1",
},
ObjectMeta: v1.ObjectMeta{
Name: common.ArgoCDConfigMapName,
Namespace: ArgoCDNamespace,
Labels: map[string]string{
"app.kubernetes.io/part-of": "argocd",
},
},
}
kubeClientset := fake.NewSimpleClientset(argoCDCM)
settingsMgr := settings.NewSettingsManager(context.Background(), kubeClientset, ArgoCDNamespace)
argoDB := db.NewDB(ArgoCDNamespace, settingsMgr, kubeClientset)
_, err := argoDB.CreateRepository(context.Background(), &repoOpts.Repo)
errors.CheckError(err)
secret, err := kubeClientset.CoreV1().Secrets(ArgoCDNamespace).Get(context.Background(), db.RepoURLToSecretName(repoSecretPrefix, repoOpts.Repo.Repo), v1.GetOptions{})
errors.CheckError(err)
errors.CheckError(PrintResources(outputFormat, os.Stdout, secret))
},
}
command.Flags().StringVarP(&outputFormat, "output", "o", "yaml", "Output format. One of: json|yaml")
cmdutil.AddRepoFlags(command, &repoOpts)
return command
}

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"testing"

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"bytes"
@@ -23,13 +23,13 @@ import (
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/argo/normalizers"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/lua"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/argo/normalizers"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/lua"
"github.com/argoproj/argo-cd/v2/util/settings"
)
type settingsOpts struct {
@@ -162,6 +162,7 @@ func NewSettingsCommand() *cobra.Command {
command.AddCommand(NewValidateSettingsCommand(&opts))
command.AddCommand(NewResourceOverridesCommand(&opts))
command.AddCommand(NewRBACCommand())
opts.clientConfig = cli.AddKubectlFlagsToCmd(command)
command.PersistentFlags().StringVar(&opts.argocdCMPath, "argocd-cm-path", "", "Path to local argocd-cm.yaml file")
@@ -206,7 +207,7 @@ var validatorsByGroup = map[string]settingValidator{
}
ssoProvider = "Dex"
} else if general.OIDCConfigRAW != "" {
if _, err := settings.UnmarshalOIDCConfig(general.OIDCConfigRAW); err != nil {
if err := settings.ValidateOIDCConfig(general.OIDCConfigRAW); err != nil {
return "", fmt.Errorf("invalid oidc.config: %v", err)
}
ssoProvider = "OIDC"
@@ -302,10 +303,10 @@ func NewValidateSettingsCommand(cmdCtx commandContext) *cobra.Command {
Long: "Validates settings specified in 'argocd-cm' ConfigMap and 'argocd-secret' Secret",
Example: `
#Validates all settings in the specified YAML file
argocd-util settings validate --argocd-cm-path ./argocd-cm.yaml
argocd admin settings validate --argocd-cm-path ./argocd-cm.yaml
#Validates accounts and plugins settings in Kubernetes cluster of current kubeconfig context
argocd-util settings validate --group accounts --group plugins --load-cluster-settings`,
argocd admin settings validate --group accounts --group plugins --load-cluster-settings`,
Run: func(c *cobra.Command, args []string) {
settingsManager, err := cmdCtx.createSettingsManager()
errors.CheckError(err)
@@ -391,7 +392,7 @@ func NewResourceIgnoreDifferencesCommand(cmdCtx commandContext) *cobra.Command {
Short: "Renders fields excluded from diffing",
Long: "Renders ignored fields using the 'ignoreDifferences' setting specified in the 'resource.customizations' field of 'argocd-cm' ConfigMap",
Example: `
argocd-util settings resource-overrides ignore-differences ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml`,
argocd admin settings resource-overrides ignore-differences ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml`,
Run: func(c *cobra.Command, args []string) {
if len(args) < 1 {
c.HelpFunc()(c, args)
@@ -400,11 +401,15 @@ argocd-util settings resource-overrides ignore-differences ./deploy.yaml --argoc
executeResourceOverrideCommand(cmdCtx, args, func(res unstructured.Unstructured, override v1alpha1.ResourceOverride, overrides map[string]v1alpha1.ResourceOverride) {
gvk := res.GroupVersionKind()
if len(override.IgnoreDifferences.JSONPointers) == 0 {
if len(override.IgnoreDifferences.JSONPointers) == 0 && len(override.IgnoreDifferences.JQPathExpressions) == 0 {
_, _ = fmt.Printf("Ignore differences are not configured for '%s/%s'\n", gvk.Group, gvk.Kind)
return
}
// This normalizer won't verify 'managedFieldsManagers' ignore difference
// configurations. This requires access to live resources which is not the
// purpose of this command. This will just apply jsonPointers and
// jqPathExpressions configurations.
normalizer, err := normalizers.NewIgnoreNormalizer(nil, overrides)
errors.CheckError(err)
@@ -435,7 +440,7 @@ func NewResourceHealthCommand(cmdCtx commandContext) *cobra.Command {
Short: "Assess resource health",
Long: "Assess resource health using the lua script configured in the 'resource.customizations' field of 'argocd-cm' ConfigMap",
Example: `
argocd-util settings resource-overrides health ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml`,
argocd admin settings resource-overrides health ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml`,
Run: func(c *cobra.Command, args []string) {
if len(args) < 1 {
c.HelpFunc()(c, args)
@@ -466,7 +471,7 @@ func NewResourceActionListCommand(cmdCtx commandContext) *cobra.Command {
Short: "List available resource actions",
Long: "List actions available for given resource action using the lua scripts configured in the 'resource.customizations' field of 'argocd-cm' ConfigMap and outputs updated fields",
Example: `
argocd-util settings resource-overrides action list /tmp/deploy.yaml --argocd-cm-path ./argocd-cm.yaml`,
argocd admin settings resource-overrides action list /tmp/deploy.yaml --argocd-cm-path ./argocd-cm.yaml`,
Run: func(c *cobra.Command, args []string) {
if len(args) < 1 {
c.HelpFunc()(c, args)
@@ -509,7 +514,7 @@ func NewResourceActionRunCommand(cmdCtx commandContext) *cobra.Command {
Short: "Executes resource action",
Long: "Executes resource action using the lua script configured in the 'resource.customizations' field of 'argocd-cm' ConfigMap and outputs updated fields",
Example: `
argocd-util settings resource-overrides action run /tmp/deploy.yaml restart --argocd-cm-path ./argocd-cm.yaml`,
argocd admin settings resource-overrides action run /tmp/deploy.yaml restart --argocd-cm-path ./argocd-cm.yaml`,
Run: func(c *cobra.Command, args []string) {
if len(args) < 2 {
c.HelpFunc()(c, args)

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"context"
@@ -14,11 +14,11 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/server/rbacpolicy"
"github.com/argoproj/argo-cd/util/assets"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/rbac"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/server/rbacpolicy"
"github.com/argoproj/argo-cd/v2/util/assets"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/rbac"
)
// Provide a mapping of short-hand resource names to their RBAC counterparts
@@ -101,19 +101,19 @@ something.
Example: `
# Check whether role some:role has permissions to create an application in the
# 'default' project, using a local policy.csv file
argocd-util rbac can some:role create application 'default/app' --policy-file policy.csv
argocd admin settings rbac can some:role create application 'default/app' --policy-file policy.csv
# Policy file can also be K8s config map with data keys like argocd-rbac-cm,
# i.e. 'policy.csv' and (optionally) 'policy.default'
argocd-util rbac can some:role create application 'default/app' --policy-file argocd-rbac-cm.yaml
argocd admin settings rbac can some:role create application 'default/app' --policy-file argocd-rbac-cm.yaml
# If --policy-file is not given, the ConfigMap 'argocd-rbac-cm' from K8s is
# used. You need to specify the argocd namespace, and make sure that your
# current Kubernetes context is pointing to the cluster Argo CD is running in
argocd-util rbac can some:role create application 'default/app' --namespace argocd
argocd admin settings rbac can some:role create application 'default/app' --namespace argocd
# You can override a possibly configured default role
argocd-util rbac can someuser create application 'default/app' --default-role role:readonly
argocd admin settings rbac can someuser create application 'default/app' --default-role role:readonly
`,
Run: func(c *cobra.Command, args []string) {

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"io/ioutil"
@@ -10,7 +10,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
"github.com/argoproj/argo-cd/util/assets"
"github.com/argoproj/argo-cd/v2/util/assets"
)
func Test_isValidRBACAction(t *testing.T) {

View File

@@ -1,4 +1,4 @@
package commands
package admin
import (
"bytes"
@@ -9,9 +9,9 @@ import (
"os"
"testing"
"github.com/argoproj/argo-cd/common"
utils "github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
utils "github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
@@ -240,6 +240,7 @@ func tempFile(content string) (string, io.Closer, error) {
_ = os.Remove(f.Name())
return "", nil, err
}
defer f.Close()
return f.Name(), utils.NewCloser(func() error {
return os.Remove(f.Name())
}), nil

View File

@@ -14,7 +14,8 @@ import (
"time"
"unicode/utf8"
"github.com/argoproj/gitops-engine/pkg/diff"
"github.com/argoproj/gitops-engine/pkg/sync/common"
"github.com/argoproj/gitops-engine/pkg/health"
"github.com/argoproj/gitops-engine/pkg/sync/hook"
"github.com/argoproj/gitops-engine/pkg/sync/ignore"
@@ -25,33 +26,33 @@ import (
"github.com/spf13/cobra"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/pointer"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller"
"github.com/argoproj/argo-cd/pkg/apiclient"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/pkg/apiclient/application"
applicationpkg "github.com/argoproj/argo-cd/pkg/apiclient/application"
clusterpkg "github.com/argoproj/argo-cd/pkg/apiclient/cluster"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apiclient/settings"
settingspkg "github.com/argoproj/argo-cd/pkg/apiclient/settings"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
repoapiclient "github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/reposerver/repository"
"github.com/argoproj/argo-cd/util/argo"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
argoio "github.com/argoproj/argo-cd/util/io"
argokube "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/templates"
"github.com/argoproj/argo-cd/util/text/label"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/controller"
"github.com/argoproj/argo-cd/v2/pkg/apiclient"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
applicationpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
clusterpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
settingspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
repoapiclient "github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/reposerver/repository"
"github.com/argoproj/argo-cd/v2/util/argo"
argodiff "github.com/argoproj/argo-cd/v2/util/argo/diff"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
argoio "github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/templates"
"github.com/argoproj/argo-cd/v2/util/text/label"
)
var (
@@ -93,6 +94,7 @@ func NewApplicationCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman
command.AddCommand(NewApplicationEditCommand(clientOpts))
command.AddCommand(NewApplicationPatchCommand(clientOpts))
command.AddCommand(NewApplicationPatchResourceCommand(clientOpts))
command.AddCommand(NewApplicationDeleteResourceCommand(clientOpts))
command.AddCommand(NewApplicationResourceActionsCommand(clientOpts))
command.AddCommand(NewApplicationListResourcesCommand(clientOpts))
command.AddCommand(NewApplicationLogsCommand(clientOpts))
@@ -102,11 +104,12 @@ func NewApplicationCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman
// NewApplicationCreateCommand returns a new instance of an `argocd app create` command
func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var (
appOpts cmdutil.AppOptions
fileURL string
appName string
upsert bool
labels []string
appOpts cmdutil.AppOptions
fileURL string
appName string
upsert bool
labels []string
annotations []string
)
var command = &cobra.Command{
Use: "create APPNAME",
@@ -122,7 +125,7 @@ func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra.
argocd app create helm-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --helm-set replicaCount=2
# Create a Helm app from a Helm repo
argocd app create nginx-ingress --repo https://kubernetes-charts.storage.googleapis.com --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
argocd app create nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Create a Kustomize app
argocd app create kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
@@ -133,30 +136,34 @@ func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra.
Run: func(c *cobra.Command, args []string) {
argocdClient := argocdclient.NewClientOrDie(clientOpts)
app, err := cmdutil.ConstructApp(fileURL, appName, labels, args, appOpts, c.Flags())
apps, err := cmdutil.ConstructApps(fileURL, appName, labels, annotations, args, appOpts, c.Flags())
errors.CheckError(err)
if app.Name == "" {
c.HelpFunc()(c, args)
os.Exit(1)
for _, app := range apps {
if app.Name == "" {
c.HelpFunc()(c, args)
os.Exit(1)
}
conn, appIf := argocdClient.NewApplicationClientOrDie()
defer argoio.Close(conn)
appCreateRequest := applicationpkg.ApplicationCreateRequest{
Application: *app,
Upsert: &upsert,
Validate: &appOpts.Validate,
}
created, err := appIf.Create(context.Background(), &appCreateRequest)
errors.CheckError(err)
fmt.Printf("application '%s' created\n", created.ObjectMeta.Name)
}
conn, appIf := argocdClient.NewApplicationClientOrDie()
defer argoio.Close(conn)
appCreateRequest := applicationpkg.ApplicationCreateRequest{
Application: *app,
Upsert: &upsert,
Validate: &appOpts.Validate,
}
created, err := appIf.Create(context.Background(), &appCreateRequest)
errors.CheckError(err)
fmt.Printf("application '%s' created\n", created.ObjectMeta.Name)
},
}
command.Flags().StringVar(&appName, "name", "", "A name for the app, ignored if a file is set (DEPRECATED)")
command.Flags().BoolVar(&upsert, "upsert", false, "Allows to override application with the same name even if supplied application spec is different from existing spec")
command.Flags().StringVarP(&fileURL, "file", "f", "", "Filename or URL to Kubernetes manifests for the app")
command.Flags().StringArrayVarP(&labels, "label", "l", []string{}, "Labels to apply to the app")
command.Flags().StringArrayVarP(&annotations, "annotations", "", []string{}, "Set metadata annotations (e.g. example=value)")
// Only complete files with appropriate extension.
err := command.Flags().SetAnnotation("file", cobra.BashCompFilenameExt, []string{"json", "yaml", "yml"})
if err != nil {
@@ -276,6 +283,8 @@ func NewApplicationLogsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
sinceSeconds int64
untilTime string
filter string
container string
previous bool
)
var command = &cobra.Command{
Use: "logs APPNAME",
@@ -304,6 +313,8 @@ func NewApplicationLogsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
SinceSeconds: sinceSeconds,
UntilTime: &untilTime,
Filter: &filter,
Container: container,
Previous: previous,
})
if err != nil {
log.Fatalf("failed to get pod logs: %v", err)
@@ -344,6 +355,8 @@ func NewApplicationLogsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
command.Flags().Int64Var(&sinceSeconds, "since-seconds", 0, "A relative time in seconds before the current time from which to show logs")
command.Flags().StringVar(&untilTime, "until-time", "", "Show logs until this time")
command.Flags().StringVar(&filter, "filter", "", "Show logs contain this string")
command.Flags().StringVar(&container, "container", "", "Optional container name")
command.Flags().BoolVarP(&previous, "previous", "p", false, "Specify if the previously terminated container logs should be returned")
return command
}
@@ -549,14 +562,16 @@ func NewApplicationSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com
// NewApplicationUnsetCommand returns a new instance of an `argocd app unset` command
func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var (
parameters []string
valuesLiteral bool
valuesFiles []string
nameSuffix bool
namePrefix bool
kustomizeVersion bool
kustomizeImages []string
appOpts cmdutil.AppOptions
parameters []string
valuesLiteral bool
valuesFiles []string
ignoreMissingValueFiles bool
nameSuffix bool
namePrefix bool
kustomizeVersion bool
kustomizeImages []string
pluginEnvs []string
appOpts cmdutil.AppOptions
)
var command = &cobra.Command{
Use: "unset APPNAME parameters",
@@ -633,7 +648,7 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C
}
}
if app.Spec.Source.Helm != nil {
if len(parameters) == 0 && len(valuesFiles) == 0 && !valuesLiteral {
if len(parameters) == 0 && len(valuesFiles) == 0 && !valuesLiteral && !ignoreMissingValueFiles {
c.HelpFunc()(c, args)
os.Exit(1)
}
@@ -661,9 +676,31 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C
}
}
}
if !updated {
return
if ignoreMissingValueFiles {
app.Spec.Source.Helm.IgnoreMissingValueFiles = false
updated = true
}
if app.Spec.Source.Helm.PassCredentials {
app.Spec.Source.Helm.PassCredentials = false
updated = true
}
}
if app.Spec.Source.Plugin != nil {
if len(pluginEnvs) == 0 {
c.HelpFunc()(c, args)
os.Exit(1)
}
for _, env := range pluginEnvs {
err = app.Spec.Source.Plugin.RemoveEnvEntry(env)
if err == nil {
updated = true
}
}
}
if !updated {
return
}
cmdutil.SetAppSpecOptions(c.Flags(), &app.Spec, &appOpts)
@@ -678,10 +715,12 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C
command.Flags().StringArrayVarP(&parameters, "parameter", "p", []string{}, "Unset a parameter override (e.g. -p guestbook=image)")
command.Flags().StringArrayVar(&valuesFiles, "values", []string{}, "Unset one or more Helm values files")
command.Flags().BoolVar(&valuesLiteral, "values-literal", false, "Unset literal Helm values block")
command.Flags().BoolVar(&ignoreMissingValueFiles, "ignore-missing-value-files", false, "Unset the helm ignore-missing-value-files option (revert to false)")
command.Flags().BoolVar(&nameSuffix, "namesuffix", false, "Kustomize namesuffix")
command.Flags().BoolVar(&namePrefix, "nameprefix", false, "Kustomize nameprefix")
command.Flags().BoolVar(&kustomizeVersion, "kustomize-version", false, "Kustomize version")
command.Flags().StringArrayVar(&kustomizeImages, "kustomize-image", []string{}, "Kustomize images name (e.g. --kustomize-image node --kustomize-image mysql)")
command.Flags().StringArrayVar(&pluginEnvs, "plugin-env", []string{}, "Unset plugin env variables (e.g --plugin-env name)")
return command
}
@@ -711,9 +750,9 @@ func liveObjects(resources []*argoappv1.ResourceDiff) ([]*unstructured.Unstructu
return objs, nil
}
func getLocalObjects(app *argoappv1.Application, local, localRepoRoot, appLabelKey, kubeVersion string, kustomizeOptions *argoappv1.KustomizeOptions,
configManagementPlugins []*argoappv1.ConfigManagementPlugin) []*unstructured.Unstructured {
manifestStrings := getLocalObjectsString(app, local, localRepoRoot, appLabelKey, kubeVersion, kustomizeOptions, configManagementPlugins)
func getLocalObjects(app *argoappv1.Application, local, localRepoRoot, appLabelKey, kubeVersion string, apiVersions []string, kustomizeOptions *argoappv1.KustomizeOptions,
configManagementPlugins []*argoappv1.ConfigManagementPlugin, trackingMethod string) []*unstructured.Unstructured {
manifestStrings := getLocalObjectsString(app, local, localRepoRoot, appLabelKey, kubeVersion, apiVersions, kustomizeOptions, configManagementPlugins, trackingMethod)
objs := make([]*unstructured.Unstructured, len(manifestStrings))
for i := range manifestStrings {
obj := unstructured.Unstructured{}
@@ -724,10 +763,10 @@ func getLocalObjects(app *argoappv1.Application, local, localRepoRoot, appLabelK
return objs
}
func getLocalObjectsString(app *argoappv1.Application, local, localRepoRoot, appLabelKey, kubeVersion string, kustomizeOptions *argoappv1.KustomizeOptions,
configManagementPlugins []*argoappv1.ConfigManagementPlugin) []string {
func getLocalObjectsString(app *argoappv1.Application, local, localRepoRoot, appLabelKey, kubeVersion string, apiVersions []string, kustomizeOptions *argoappv1.KustomizeOptions,
configManagementPlugins []*argoappv1.ConfigManagementPlugin, trackingMethod string) []string {
res, err := repository.GenerateManifests(local, localRepoRoot, app.Spec.Source.TargetRevision, &repoapiclient.ManifestRequest{
res, err := repository.GenerateManifests(context.Background(), local, localRepoRoot, app.Spec.Source.TargetRevision, &repoapiclient.ManifestRequest{
Repo: &argoappv1.Repository{Repo: app.Spec.Source.RepoURL},
AppLabelKey: appLabelKey,
AppName: app.Name,
@@ -735,8 +774,10 @@ func getLocalObjectsString(app *argoappv1.Application, local, localRepoRoot, app
ApplicationSource: &app.Spec.Source,
KustomizeOptions: kustomizeOptions,
KubeVersion: kubeVersion,
ApiVersions: apiVersions,
Plugins: configManagementPlugins,
}, true)
TrackingMethod: trackingMethod,
}, true, &git.NoopCredsStore{}, resource.MustParse("0"))
errors.CheckError(err)
return res.Manifests
@@ -783,6 +824,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
var (
refresh bool
hardRefresh bool
exitCode bool
local string
revision string
localRepoRoot string
@@ -820,7 +862,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
defer argoio.Close(conn)
cluster, err := clusterIf.Get(context.Background(), &clusterpkg.ClusterQuery{Name: app.Spec.Destination.Name, Server: app.Spec.Destination.Server})
errors.CheckError(err)
localObjs := groupObjsByKey(getLocalObjects(app, local, localRepoRoot, argoSettings.AppLabelKey, cluster.ServerVersion, argoSettings.KustomizeOptions, argoSettings.ConfigManagementPlugins), liveObjs, app.Spec.Destination.Namespace)
localObjs := groupObjsByKey(getLocalObjects(app, local, localRepoRoot, argoSettings.AppLabelKey, cluster.Info.ServerVersion, cluster.Info.APIVersions, argoSettings.KustomizeOptions, argoSettings.ConfigManagementPlugins, argoSettings.TrackingMethod), liveObjs, app.Spec.Destination.Namespace)
items = groupObjsForDiff(resources, localObjs, items, argoSettings, appName)
} else if revision != "" {
var unstructureds []*unstructured.Unstructured
@@ -862,10 +904,18 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
val := argoSettings.ResourceOverrides[k]
overrides[k] = *val
}
normalizer, err := argo.NewDiffNormalizer(app.Spec.IgnoreDifferences, overrides)
// TODO remove hardcoded IgnoreAggregatedRoles and retrieve the
// compareOptions in the protobuf
ignoreAggregatedRoles := false
diffConfig, err := argodiff.NewDiffConfigBuilder().
WithDiffSettings(app.Spec.IgnoreDifferences, overrides, ignoreAggregatedRoles).
WithTracking(argoSettings.AppLabelKey, argoSettings.TrackingMethod).
WithNoCache().
Build()
errors.CheckError(err)
diffRes, err := diff.Diff(item.target, item.live, diff.WithNormalizer(normalizer))
diffRes, err := argodiff.StateDiff(item.live, item.target, diffConfig)
errors.CheckError(err)
if diffRes.Modified || item.target == nil || item.live == nil {
@@ -886,7 +936,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
_ = cli.PrintDiff(item.key.Name, live, target)
}
}
if foundDiffs {
if foundDiffs && exitCode {
os.Exit(1)
}
@@ -894,6 +944,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
}
command.Flags().BoolVar(&refresh, "refresh", false, "Refresh application data when retrieving")
command.Flags().BoolVar(&hardRefresh, "hard-refresh", false, "Refresh application data as well as target manifests cache")
command.Flags().BoolVar(&exitCode, "exit-code", true, "Return non-zero exit code when there is a diff")
command.Flags().StringVar(&local, "local", "", "Compare live app to a local manifests")
command.Flags().StringVar(&revision, "revision", "", "Compare live app to a particular revision")
command.Flags().StringVar(&localRepoRoot, "local-repo-root", "/", "Path to the repository root. Used together with --local allows setting the repository root")
@@ -901,6 +952,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
}
func groupObjsForDiff(resources *application.ManagedResourcesResponse, objs map[kube.ResourceKey]*unstructured.Unstructured, items []objKeyLiveTarget, argoSettings *settings.Settings, appName string) []objKeyLiveTarget {
resourceTracking := argo.NewResourceTracking()
for _, res := range resources.Items {
var live = &unstructured.Unstructured{}
err := json.Unmarshal([]byte(res.NormalizedLiveState), &live)
@@ -914,7 +966,7 @@ func groupObjsForDiff(resources *application.ManagedResourcesResponse, objs map[
}
if local, ok := objs[key]; ok || live != nil {
if local != nil && !kube.IsCRD(local) {
err = argokube.SetAppInstanceLabel(local, argoSettings.AppLabelKey, appName)
err = resourceTracking.SetAppInstance(local, argoSettings.AppLabelKey, appName, "", argoappv1.TrackingMethod(argoSettings.GetTrackingMethod()))
errors.CheckError(err)
}
@@ -936,8 +988,9 @@ func groupObjsForDiff(resources *application.ManagedResourcesResponse, objs map[
// NewApplicationDeleteCommand returns a new instance of an `argocd app delete` command
func NewApplicationDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var (
cascade bool
noPrompt bool
cascade bool
noPrompt bool
propagationPolicy string
)
var command = &cobra.Command{
Use: "delete APPNAME",
@@ -963,6 +1016,9 @@ func NewApplicationDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra.
if c.Flag("cascade").Changed {
appDeleteReq.Cascade = &cascade
}
if c.Flag("propagation-policy").Changed {
appDeleteReq.PropagationPolicy = &propagationPolicy
}
if cascade && isTerminal && !noPrompt {
var confirmAnswer string = "n"
var lowercaseAnswer string
@@ -997,6 +1053,7 @@ func NewApplicationDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra.
},
}
command.Flags().BoolVar(&cascade, "cascade", true, "Perform a cascaded deletion of all application resources")
command.Flags().StringVarP(&propagationPolicy, "propagation-policy", "p", "foreground", "Specify propagation policy for deletion of application's resources. One of: foreground|background")
command.Flags().BoolVarP(&noPrompt, "yes", "y", false, "Turn off prompting to confirm cascaded deletion of application resources")
return command
}
@@ -1045,6 +1102,7 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
output string
selector string
projects []string
repo string
)
var command = &cobra.Command{
Use: "list",
@@ -1063,6 +1121,9 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
if len(projects) != 0 {
appList = argo.FilterByProjects(appList, projects)
}
if repo != "" {
appList = argo.FilterByRepo(appList, repo)
}
switch output {
case "yaml", "json":
err := PrintResourceList(appList, output, false)
@@ -1079,6 +1140,7 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
command.Flags().StringVarP(&output, "output", "o", "wide", "Output format. One of: wide|name|json|yaml")
command.Flags().StringVarP(&selector, "selector", "l", "", "List apps by label")
command.Flags().StringArrayVarP(&projects, "project", "p", []string{}, "Filter by project name")
command.Flags().StringVarP(&repo, "repo", "r", "", "List apps by source repo URL")
return command
}
@@ -1237,6 +1299,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
timeout uint
strategy string
force bool
replace bool
async bool
retryLimit int64
retryBackoffDuration time.Duration
@@ -1344,18 +1407,35 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
cluster, err := clusterIf.Get(context.Background(), &clusterpkg.ClusterQuery{Name: app.Spec.Destination.Name, Server: app.Spec.Destination.Server})
errors.CheckError(err)
argoio.Close(conn)
localObjsStrings = getLocalObjectsString(app, local, localRepoRoot, argoSettings.AppLabelKey, cluster.ServerVersion, argoSettings.KustomizeOptions, argoSettings.ConfigManagementPlugins)
localObjsStrings = getLocalObjectsString(app, local, localRepoRoot, argoSettings.AppLabelKey, cluster.Info.ServerVersion, cluster.Info.APIVersions, argoSettings.KustomizeOptions, argoSettings.ConfigManagementPlugins, argoSettings.TrackingMethod)
}
syncOptionsFactory := func() *applicationpkg.SyncOptions {
syncOptions := applicationpkg.SyncOptions{}
items := make([]string, 0)
if replace {
items = append(items, common.SyncOptionReplace)
}
if len(items) == 0 {
// for prevent send even empty array if not need
return nil
}
syncOptions.Items = items
return &syncOptions
}
syncReq := applicationpkg.ApplicationSyncRequest{
Name: &appName,
DryRun: dryRun,
Revision: revision,
Resources: selectedResources,
Prune: prune,
Manifests: localObjsStrings,
Infos: getInfos(infos),
Name: &appName,
DryRun: dryRun,
Revision: revision,
Resources: selectedResources,
Prune: prune,
Manifests: localObjsStrings,
Infos: getInfos(infos),
SyncOptions: syncOptionsFactory(),
}
switch strategy {
case "apply":
syncReq.Strategy = &argoappv1.SyncStrategy{Apply: &argoappv1.SyncStrategyApply{}}
@@ -1407,11 +1487,12 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
command.Flags().StringArrayVar(&labels, "label", []string{}, "Sync only specific resources with a label. This option may be specified repeatedly.")
command.Flags().UintVar(&timeout, "timeout", defaultCheckTimeoutSeconds, "Time out after this many seconds")
command.Flags().Int64Var(&retryLimit, "retry-limit", 0, "Max number of allowed sync retries")
command.Flags().DurationVar(&retryBackoffDuration, "retry-backoff-duration", common.DefaultSyncRetryDuration, "Retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().DurationVar(&retryBackoffMaxDuration, "retry-backoff-max-duration", common.DefaultSyncRetryMaxDuration, "Max retry backoff duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().Int64Var(&retryBackoffFactor, "retry-backoff-factor", common.DefaultSyncRetryFactor, "Factor multiplies the base duration after each failed retry")
command.Flags().DurationVar(&retryBackoffDuration, "retry-backoff-duration", argoappv1.DefaultSyncRetryDuration, "Retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().DurationVar(&retryBackoffMaxDuration, "retry-backoff-max-duration", argoappv1.DefaultSyncRetryMaxDuration, "Max retry backoff duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().Int64Var(&retryBackoffFactor, "retry-backoff-factor", argoappv1.DefaultSyncRetryFactor, "Factor multiplies the base duration after each failed retry")
command.Flags().StringVar(&strategy, "strategy", "", "Sync strategy (one of: apply|hook)")
command.Flags().BoolVar(&force, "force", false, "Use a force apply")
command.Flags().BoolVar(&replace, "replace", false, "Use a kubectl create/replace instead apply")
command.Flags().BoolVar(&async, "async", false, "Do not wait for application to sync before continuing")
command.Flags().StringVar(&local, "local", "", "Path to a local directory. When this flag is present no git queries will be made")
command.Flags().StringVar(&localRepoRoot, "local-repo-root", "/", "Path to the repository root. Used together with --local allows setting the repository root")
@@ -1782,6 +1863,23 @@ func NewApplicationHistoryCommand(clientOpts *argocdclient.ClientOptions) *cobra
return command
}
func findRevisionHistory(application *argoappv1.Application, historyId int64) (*argoappv1.RevisionHistory, error) {
// in case if history id not passed and need fetch previous history revision
if historyId == -1 {
l := len(application.Status.History)
if l < 2 {
return nil, fmt.Errorf("Application '%s' should have at least two successful deployments", application.ObjectMeta.Name)
}
return &application.Status.History[l-2], nil
}
for _, di := range application.Status.History {
if di.ID == historyId {
return &di, nil
}
}
return nil, fmt.Errorf("Application '%s' does not have deployment id '%d' in history\n", application.ObjectMeta.Name, historyId)
}
// NewApplicationRollbackCommand returns a new instance of an `argocd app rollback` command
func NewApplicationRollbackCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var (
@@ -1789,36 +1887,33 @@ func NewApplicationRollbackCommand(clientOpts *argocdclient.ClientOptions) *cobr
timeout uint
)
var command = &cobra.Command{
Use: "rollback APPNAME ID",
Short: "Rollback application to a previous deployed version by History ID",
Use: "rollback APPNAME [ID]",
Short: "Rollback application to a previous deployed version by History ID, omitted will Rollback to the previous version",
Run: func(c *cobra.Command, args []string) {
if len(args) != 2 {
if len(args) == 0 {
c.HelpFunc()(c, args)
os.Exit(1)
}
appName := args[0]
depID, err := strconv.Atoi(args[1])
errors.CheckError(err)
var err error
depID := -1
if len(args) > 1 {
depID, err = strconv.Atoi(args[1])
errors.CheckError(err)
}
acdClient := argocdclient.NewClientOrDie(clientOpts)
conn, appIf := acdClient.NewApplicationClientOrDie()
defer argoio.Close(conn)
ctx := context.Background()
app, err := appIf.Get(ctx, &applicationpkg.ApplicationQuery{Name: &appName})
errors.CheckError(err)
var depInfo *argoappv1.RevisionHistory
for _, di := range app.Status.History {
if di.ID == int64(depID) {
depInfo = &di
break
}
}
if depInfo == nil {
log.Fatalf("Application '%s' does not have deployment id '%d' in history\n", app.ObjectMeta.Name, depID)
}
depInfo, err := findRevisionHistory(app, int64(depID))
errors.CheckError(err)
_, err = appIf.Rollback(ctx, &applicationpkg.ApplicationRollbackRequest{
Name: &appName,
ID: int64(depID),
ID: depInfo.ID,
Prune: prune,
})
errors.CheckError(err)
@@ -2156,3 +2251,59 @@ func NewApplicationPatchResourceCommand(clientOpts *argocdclient.ClientOptions)
return command
}
func NewApplicationDeleteResourceCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var resourceName string
var namespace string
var kind string
var group string
var force bool
var orphan bool
var all bool
command := &cobra.Command{
Use: "delete-resource APPNAME",
Short: "Delete resource in an application",
}
command.Flags().StringVar(&resourceName, "resource-name", "", "Name of resource")
command.Flags().StringVar(&kind, "kind", "", "Kind")
err := command.MarkFlagRequired("kind")
errors.CheckError(err)
command.Flags().StringVar(&group, "group", "", "Group")
command.Flags().StringVar(&namespace, "namespace", "", "Namespace")
command.Flags().BoolVar(&force, "force", false, "Indicates whether to orphan the dependents of the deleted resource")
command.Flags().BoolVar(&orphan, "orphan", false, "Indicates whether to force delete the resource")
command.Flags().BoolVar(&all, "all", false, "Indicates whether to patch multiple matching of resources")
command.Run = func(c *cobra.Command, args []string) {
if len(args) != 1 {
c.HelpFunc()(c, args)
os.Exit(1)
}
appName := args[0]
conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie()
defer argoio.Close(conn)
ctx := context.Background()
resources, err := appIf.ManagedResources(ctx, &applicationpkg.ResourcesQuery{ApplicationName: &appName})
errors.CheckError(err)
objectsToDelete := filterResources(command, resources.Items, group, kind, namespace, resourceName, all)
for i := range objectsToDelete {
obj := objectsToDelete[i]
gvk := obj.GroupVersionKind()
_, err = appIf.DeleteResource(ctx, &applicationpkg.ApplicationResourceDeleteRequest{
Name: &appName,
Namespace: obj.GetNamespace(),
ResourceName: obj.GetName(),
Version: gvk.Version,
Group: gvk.Group,
Kind: gvk.Kind,
Force: &force,
Orphan: &orphan,
})
errors.CheckError(err)
log.Infof("Resource '%s' deleted", obj.GetName())
}
}
return command
}

View File

@@ -12,10 +12,10 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
applicationpkg "github.com/argoproj/argo-cd/pkg/apiclient/application"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
applicationpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
)
type DisplayedAction struct {

View File

@@ -0,0 +1,163 @@
package commands
import (
"testing"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestFindRevisionHistoryWithoutPassedId(t *testing.T) {
histories := v1alpha1.RevisionHistories{}
histories = append(histories, v1alpha1.RevisionHistory{ID: 1})
histories = append(histories, v1alpha1.RevisionHistory{ID: 2})
histories = append(histories, v1alpha1.RevisionHistory{ID: 3})
status := v1alpha1.ApplicationStatus{
Resources: nil,
Sync: v1alpha1.SyncStatus{},
Health: v1alpha1.HealthStatus{},
History: histories,
Conditions: nil,
ReconciledAt: nil,
OperationState: nil,
ObservedAt: nil,
SourceType: "",
Summary: v1alpha1.ApplicationSummary{},
}
application := v1alpha1.Application{
Status: status,
}
history, err := findRevisionHistory(&application, -1)
if err != nil {
t.Fatal("Find revision history should fail without errors")
}
if history == nil {
t.Fatal("History should be found")
}
}
func TestFindRevisionHistoryWithoutPassedIdAndEmptyHistoryList(t *testing.T) {
histories := v1alpha1.RevisionHistories{}
status := v1alpha1.ApplicationStatus{
Resources: nil,
Sync: v1alpha1.SyncStatus{},
Health: v1alpha1.HealthStatus{},
History: histories,
Conditions: nil,
ReconciledAt: nil,
OperationState: nil,
ObservedAt: nil,
SourceType: "",
Summary: v1alpha1.ApplicationSummary{},
}
application := v1alpha1.Application{
Status: status,
}
history, err := findRevisionHistory(&application, -1)
if err == nil {
t.Fatal("Find revision history should fail with errors")
}
if history != nil {
t.Fatal("History should be empty")
}
if err.Error() != "Application '' should have at least two successful deployments" {
t.Fatal("Find revision history should fail with correct error message")
}
}
func TestFindRevisionHistoryWithPassedId(t *testing.T) {
histories := v1alpha1.RevisionHistories{}
histories = append(histories, v1alpha1.RevisionHistory{ID: 1})
histories = append(histories, v1alpha1.RevisionHistory{ID: 2})
histories = append(histories, v1alpha1.RevisionHistory{ID: 3, Revision: "123"})
status := v1alpha1.ApplicationStatus{
Resources: nil,
Sync: v1alpha1.SyncStatus{},
Health: v1alpha1.HealthStatus{},
History: histories,
Conditions: nil,
ReconciledAt: nil,
OperationState: nil,
ObservedAt: nil,
SourceType: "",
Summary: v1alpha1.ApplicationSummary{},
}
application := v1alpha1.Application{
Status: status,
}
history, err := findRevisionHistory(&application, 3)
if err != nil {
t.Fatal("Find revision history should fail without errors")
}
if history == nil {
t.Fatal("History should be found")
}
if history.Revision != "123" {
t.Fatal("Failed to find correct history with correct revision")
}
}
func TestFindRevisionHistoryWithPassedIdThatNotExist(t *testing.T) {
histories := v1alpha1.RevisionHistories{}
histories = append(histories, v1alpha1.RevisionHistory{ID: 1})
histories = append(histories, v1alpha1.RevisionHistory{ID: 2})
histories = append(histories, v1alpha1.RevisionHistory{ID: 3, Revision: "123"})
status := v1alpha1.ApplicationStatus{
Resources: nil,
Sync: v1alpha1.SyncStatus{},
Health: v1alpha1.HealthStatus{},
History: histories,
Conditions: nil,
ReconciledAt: nil,
OperationState: nil,
ObservedAt: nil,
SourceType: "",
Summary: v1alpha1.ApplicationSummary{},
}
application := v1alpha1.Application{
Status: status,
}
history, err := findRevisionHistory(&application, 4)
if err == nil {
t.Fatal("Find revision history should fail with errors")
}
if history != nil {
t.Fatal("History should be not found")
}
if err.Error() != "Application '' does not have deployment id '4' in history\n" {
t.Fatal("Find revision history should fail with correct error message")
}
}

View File

@@ -11,12 +11,12 @@ import (
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
certificatepkg "github.com/argoproj/argo-cd/pkg/apiclient/certificate"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
certutil "github.com/argoproj/argo-cd/util/cert"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
certificatepkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/certificate"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
certutil "github.com/argoproj/argo-cd/v2/util/cert"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewCertCommand returns a new instance of an `argocd repo` command

View File

@@ -4,22 +4,28 @@ import (
"context"
"fmt"
"os"
"regexp"
"strings"
"text/tabwriter"
"github.com/mattn/go-isatty"
"k8s.io/client-go/kubernetes"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/text/label"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
clusterpkg "github.com/argoproj/argo-cd/pkg/apiclient/cluster"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/clusterauth"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
clusterpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/clusterauth"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewClusterCommand returns a new instance of an `argocd cluster` command
@@ -56,7 +62,10 @@ func NewClusterCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clientc
// NewClusterAddCommand returns a new instance of an `argocd cluster add` command
func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clientcmd.PathOptions) *cobra.Command {
var (
clusterOpts cmdutil.ClusterOptions
clusterOpts cmdutil.ClusterOptions
skipConfirmation bool
labels []string
annotations []string
)
var command = &cobra.Command{
Use: "add CONTEXT",
@@ -104,24 +113,41 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
clientset, err := kubernetes.NewForConfig(conf)
errors.CheckError(err)
if clusterOpts.ServiceAccount != "" {
managerBearerToken, err = clusterauth.GetServiceAccountBearerToken(clientset, clusterOpts.SystemNamespace, clusterOpts.ServiceAccount)
managerBearerToken, err = clusterauth.GetServiceAccountBearerToken(clientset, clusterOpts.SystemNamespace, clusterOpts.ServiceAccount, common.BearerTokenTimeout)
} else {
managerBearerToken, err = clusterauth.InstallClusterManagerRBAC(clientset, clusterOpts.SystemNamespace, clusterOpts.Namespaces)
isTerminal := isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd())
if isTerminal && !skipConfirmation {
message := fmt.Sprintf("WARNING: This will create a service account `argocd-manager` on the cluster referenced by context `%s` with full cluster level admin privileges. Do you want to continue [y/N]? ", contextName)
if !cli.AskToProceed(message) {
os.Exit(1)
}
}
managerBearerToken, err = clusterauth.InstallClusterManagerRBAC(clientset, clusterOpts.SystemNamespace, clusterOpts.Namespaces, common.BearerTokenTimeout)
}
errors.CheckError(err)
}
labelsMap, err := label.Parse(labels)
errors.CheckError(err)
annotationsMap, err := label.Parse(annotations)
errors.CheckError(err)
conn, clusterIf := argocdclient.NewClientOrDie(clientOpts).NewClusterClientOrDie()
defer io.Close(conn)
if clusterOpts.Name != "" {
contextName = clusterOpts.Name
}
clst := cmdutil.NewCluster(contextName, clusterOpts.Namespaces, conf, managerBearerToken, awsAuthConf, execProviderConf)
clst := cmdutil.NewCluster(contextName, clusterOpts.Namespaces, clusterOpts.ClusterResources, conf, managerBearerToken, awsAuthConf, execProviderConf, labelsMap, annotationsMap)
if clusterOpts.InCluster {
clst.Server = common.KubernetesInternalAPIServerAddr
clst.Server = argoappv1.KubernetesInternalAPIServerAddr
}
if clusterOpts.Shard >= 0 {
clst.Shard = &clusterOpts.Shard
}
if clusterOpts.Project != "" {
clst.Project = clusterOpts.Project
}
clstCreateReq := clusterpkg.ClusterCreateRequest{
Cluster: clst,
Upsert: clusterOpts.Upsert,
@@ -135,6 +161,9 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie
command.Flags().BoolVar(&clusterOpts.Upsert, "upsert", false, "Override an existing cluster with the same name even if the spec differs")
command.Flags().StringVar(&clusterOpts.ServiceAccount, "service-account", "", fmt.Sprintf("System namespace service account to use for kubernetes resource management. If not set then default \"%s\" SA will be created", clusterauth.ArgoCDManagerServiceAccount))
command.Flags().StringVar(&clusterOpts.SystemNamespace, "system-namespace", common.DefaultSystemNamespace, "Use different system namespace")
command.Flags().BoolVarP(&skipConfirmation, "yes", "y", false, "Skip explicit confirmation")
command.Flags().StringArrayVar(&labels, "label", nil, "Set metadata labels (e.g. --label key=value)")
command.Flags().StringArrayVar(&annotations, "annotation", nil, "Set metadata annotations (e.g. --annotation key=value)")
cmdutil.AddClusterFlags(command, &clusterOpts)
return command
}
@@ -145,9 +174,10 @@ func NewClusterGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
output string
)
var command = &cobra.Command{
Use: "get SERVER",
Short: "Get cluster information",
Example: `argocd cluster get https://12.34.567.89`,
Use: "get SERVER/NAME",
Short: "Get cluster information",
Example: `argocd cluster get https://12.34.567.89
argocd cluster get in-cluster`,
Run: func(c *cobra.Command, args []string) {
if len(args) == 0 {
c.HelpFunc()(c, args)
@@ -156,8 +186,8 @@ func NewClusterGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
conn, clusterIf := argocdclient.NewClientOrDie(clientOpts).NewClusterClientOrDie()
defer io.Close(conn)
clusters := make([]argoappv1.Cluster, 0)
for _, clusterName := range args {
clst, err := clusterIf.Get(context.Background(), &clusterpkg.ClusterQuery{Server: clusterName})
for _, clusterSelector := range args {
clst, err := clusterIf.Get(context.Background(), getQueryBySelector(clusterSelector))
errors.CheckError(err)
clusters = append(clusters, *clst)
}
@@ -244,17 +274,29 @@ func NewClusterRemoveCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comm
// Print table of cluster information
func printClusterTable(clusters []argoappv1.Cluster) {
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
_, _ = fmt.Fprintf(w, "SERVER\tNAME\tVERSION\tSTATUS\tMESSAGE\n")
_, _ = fmt.Fprintf(w, "SERVER\tNAME\tVERSION\tSTATUS\tMESSAGE\tPROJECT\n")
for _, c := range clusters {
server := c.Server
if len(c.Namespaces) > 0 {
server = fmt.Sprintf("%s (%d namespaces)", c.Server, len(c.Namespaces))
}
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", server, c.Name, c.ServerVersion, c.ConnectionState.Status, c.ConnectionState.Message)
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n", server, c.Name, c.ServerVersion, c.ConnectionState.Status, c.ConnectionState.Message, c.Project)
}
_ = w.Flush()
}
// Returns cluster query for getting cluster depending on the cluster selector
func getQueryBySelector(clusterSelector string) *clusterpkg.ClusterQuery {
var query clusterpkg.ClusterQuery
isServer, err := regexp.MatchString(`^https?://`, clusterSelector)
if isServer || err != nil {
query.Server = clusterSelector
} else {
query.Name = clusterSelector
}
return &query
}
// Print list of cluster servers
func printClusterServers(clusters []argoappv1.Cluster) {
for _, c := range clusters {

View File

@@ -5,9 +5,25 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
)
func Test_getQueryBySelector(t *testing.T) {
query := getQueryBySelector("my-cluster")
assert.Equal(t, query.Name, "my-cluster")
assert.Equal(t, query.Server, "")
query = getQueryBySelector("http://my-server")
assert.Equal(t, query.Name, "")
assert.Equal(t, query.Server, "http://my-server")
query = getQueryBySelector("https://my-server")
assert.Equal(t, query.Name, "")
assert.Equal(t, query.Server, "https://my-server")
}
func Test_printClusterTable(t *testing.T) {
printClusterTable([]v1alpha1.Cluster{
{

View File

@@ -11,9 +11,9 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/localconfig"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/localconfig"
)
// NewContextCommand returns a new instance of an `argocd ctx` command

View File

@@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/argoproj/argo-cd/util/localconfig"
"github.com/argoproj/argo-cd/v2/util/localconfig"
)
const testConfig = `contexts:

View File

@@ -10,11 +10,11 @@ import (
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
gpgkeypkg "github.com/argoproj/argo-cd/pkg/apiclient/gpgkey"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
argoio "github.com/argoproj/argo-cd/util/io"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
gpgkeypkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/gpgkey"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
argoio "github.com/argoproj/argo-cd/v2/util/io"
)
// NewGPGCommand returns a new instance of an `argocd repo` command

View File

@@ -0,0 +1,103 @@
package headless
import (
"context"
"fmt"
"sync"
"time"
"github.com/go-redis/redis/v8"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
repoapiclient "github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/util/cache"
"github.com/argoproj/argo-cd/v2/util/io"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
)
type forwardCacheClient struct {
namespace string
context string
init sync.Once
client cache.CacheClient
err error
}
func (c *forwardCacheClient) doLazy(action func(client cache.CacheClient) error) error {
c.init.Do(func() {
overrides := clientcmd.ConfigOverrides{
CurrentContext: c.context,
}
redisPort, err := kubeutil.PortForward(6379, c.namespace, &overrides,
"app.kubernetes.io/name=argocd-redis-ha-haproxy", "app.kubernetes.io/name=argocd-redis")
if err != nil {
c.err = err
return
}
redisClient := redis.NewClient(&redis.Options{Addr: fmt.Sprintf("localhost:%d", redisPort)})
c.client = cache.NewRedisCache(redisClient, time.Hour)
})
if c.err != nil {
return c.err
}
return action(c.client)
}
func (c *forwardCacheClient) Set(item *cache.Item) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.Set(item)
})
}
func (c *forwardCacheClient) Get(key string, obj interface{}) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.Get(key, obj)
})
}
func (c *forwardCacheClient) Delete(key string) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.Delete(key)
})
}
func (c *forwardCacheClient) OnUpdated(ctx context.Context, key string, callback func() error) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.OnUpdated(ctx, key, callback)
})
}
func (c *forwardCacheClient) NotifyUpdated(key string) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.NotifyUpdated(key)
})
}
type forwardRepoClientset struct {
namespace string
context string
init sync.Once
repoClientset repoapiclient.Clientset
err error
}
func (c *forwardRepoClientset) NewRepoServerClient() (io.Closer, repoapiclient.RepoServerServiceClient, error) {
c.init.Do(func() {
overrides := clientcmd.ConfigOverrides{
CurrentContext: c.context,
}
repoServerPort, err := kubeutil.PortForward(8081, c.namespace, &overrides, "app.kubernetes.io/name=argocd-repo-server")
if err != nil {
c.err = err
return
}
c.repoClientset = apiclient.NewRepoServerClientset(fmt.Sprintf("localhost:%d", repoServerPort), 60, apiclient.TLSConfiguration{
DisableTLS: false, StrictValidation: false})
})
if c.err != nil {
return nil, nil, c.err
}
return c.repoClientset.NewRepoServerClient()
}

View File

@@ -0,0 +1,167 @@
package headless
import (
"context"
"fmt"
"net"
"os"
"time"
"github.com/alicebob/miniredis/v2"
"github.com/go-redis/redis/v8"
"github.com/golang/protobuf/ptypes/empty"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"
"k8s.io/utils/pointer"
argoapi "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/server"
servercache "github.com/argoproj/argo-cd/v2/server/cache"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/localconfig"
flag "github.com/spf13/pflag"
)
func testAPI(clientOpts *argoapi.ClientOptions) error {
apiClient, err := argoapi.NewClient(clientOpts)
if err != nil {
return err
}
closer, versionClient, err := apiClient.NewVersionClient()
if err != nil {
return err
}
defer io.Close(closer)
_, err = versionClient.Version(context.Background(), &empty.Empty{})
return err
}
func retrieveContextIfChanged(contextFlag *flag.Flag) string {
if contextFlag != nil && contextFlag.Changed {
return contextFlag.Value.String()
}
return ""
}
// InitCommand allows executing command in a headless mode: on the fly starts Argo CD API server and
// changes provided client options to use started API server port
func InitCommand(cmd *cobra.Command, clientOpts *argoapi.ClientOptions, port *int, address *string) *cobra.Command {
ctx, cancel := context.WithCancel(context.Background())
flags := pflag.NewFlagSet("tmp", pflag.ContinueOnError)
clientConfig := cli.AddKubectlFlagsToSet(flags)
// copy k8s persistent flags into argocd command flags
flags.VisitAll(func(flag *pflag.Flag) {
// skip Kubernetes server flags since argocd has it's own server flag
if flag.Name == "server" {
return
}
cmd.Flags().AddFlag(flag)
})
cmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
startInProcessAPI := clientOpts.Core
if !startInProcessAPI {
localCfg, err := localconfig.ReadLocalConfig(clientOpts.ConfigPath)
if err != nil {
return err
}
if localCfg != nil {
configCtx, err := localCfg.ResolveContext(clientOpts.Context)
if err != nil {
return err
}
startInProcessAPI = configCtx.Server.Core
}
}
if !startInProcessAPI {
return nil
}
// get rid of logging error handler
runtime.ErrorHandlers = runtime.ErrorHandlers[1:]
cli.SetLogLevel(log.ErrorLevel.String())
log.SetLevel(log.ErrorLevel)
os.Setenv(v1alpha1.EnvVarFakeInClusterConfig, "true")
if address == nil {
address = pointer.String("localhost")
}
if port == nil || *port == 0 {
addr := fmt.Sprintf("%s:0", *address)
ln, err := net.Listen("tcp", addr)
if err != nil {
return err
}
port = &ln.Addr().(*net.TCPAddr).Port
io.Close(ln)
}
restConfig, err := clientConfig.ClientConfig()
if err != nil {
return err
}
appClientset, err := appclientset.NewForConfig(restConfig)
if err != nil {
return err
}
kubeClientset, err := kubernetes.NewForConfig(restConfig)
if err != nil {
return err
}
namespace, _, err := clientConfig.Namespace()
if err != nil {
return err
}
context := retrieveContextIfChanged(cmd.Flag("context"))
mr, err := miniredis.Run()
if err != nil {
return err
}
appstateCache := appstatecache.NewCache(cacheutil.NewCache(&forwardCacheClient{namespace: namespace, context: context}), time.Hour)
srv := server.NewServer(ctx, server.ArgoCDServerOpts{
EnableGZip: false,
Namespace: namespace,
ListenPort: *port,
AppClientset: appClientset,
DisableAuth: true,
RedisClient: redis.NewClient(&redis.Options{Addr: mr.Addr()}),
Cache: servercache.NewCache(appstateCache, 0, 0, 0),
KubeClientset: kubeClientset,
Insecure: true,
ListenHost: *address,
RepoClientset: &forwardRepoClientset{namespace: namespace, context: context},
})
go srv.Run(ctx, *port, 0)
clientOpts.ServerAddr = fmt.Sprintf("%s:%d", *address, *port)
clientOpts.PlainText = true
if !cache.WaitForCacheSync(ctx.Done(), srv.Initialized) {
log.Fatal("Timed out waiting for project cache to sync")
}
tries := 5
for i := 0; i < tries; i++ {
err = testAPI(clientOpts)
if err == nil {
break
}
time.Sleep(time.Second)
}
return err
}
cmd.PostRun = func(cmd *cobra.Command, args []string) {
cancel()
}
return cmd
}

View File

@@ -0,0 +1,80 @@
package headless
import (
"testing"
flag "github.com/spf13/pflag"
"github.com/stretchr/testify/assert"
)
type StringFlag struct {
// The exact value provided on the flag
value string
}
func (f StringFlag) String() string {
return f.value
}
func (f *StringFlag) Set(value string) error {
f.value = value
return nil
}
func (f *StringFlag) Type() string {
return "string"
}
func Test_FlagContextNotChanged(t *testing.T) {
res := retrieveContextIfChanged(&flag.Flag{
Name: "",
Shorthand: "",
Usage: "",
Value: &StringFlag{value: "test"},
DefValue: "",
Changed: false,
NoOptDefVal: "",
Deprecated: "",
Hidden: false,
ShorthandDeprecated: "",
Annotations: nil,
})
assert.Equal(t, "", res)
}
func Test_FlagContextChanged(t *testing.T) {
res := retrieveContextIfChanged(&flag.Flag{
Name: "",
Shorthand: "",
Usage: "",
Value: &StringFlag{value: "test"},
DefValue: "",
Changed: true,
NoOptDefVal: "",
Deprecated: "",
Hidden: false,
ShorthandDeprecated: "",
Annotations: nil,
})
assert.Equal(t, "test", res)
}
func Test_FlagContextNil(t *testing.T) {
res := retrieveContextIfChanged(&flag.Flag{
Name: "",
Shorthand: "",
Usage: "",
Value: nil,
DefValue: "",
Changed: false,
NoOptDefVal: "",
Deprecated: "",
Hidden: false,
ShorthandDeprecated: "",
Annotations: nil,
})
assert.Equal(t, "", res)
}

View File

@@ -13,23 +13,23 @@ import (
"time"
"github.com/coreos/go-oidc"
"github.com/dgrijalva/jwt-go/v4"
"github.com/golang-jwt/jwt/v4"
log "github.com/sirupsen/logrus"
"github.com/skratchdot/open-golang/open"
"github.com/spf13/cobra"
"golang.org/x/oauth2"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
sessionpkg "github.com/argoproj/argo-cd/pkg/apiclient/session"
settingspkg "github.com/argoproj/argo-cd/pkg/apiclient/settings"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
grpc_util "github.com/argoproj/argo-cd/util/grpc"
"github.com/argoproj/argo-cd/util/io"
jwtutil "github.com/argoproj/argo-cd/util/jwt"
"github.com/argoproj/argo-cd/util/localconfig"
oidcutil "github.com/argoproj/argo-cd/util/oidc"
"github.com/argoproj/argo-cd/util/rand"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
sessionpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/session"
settingspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
grpc_util "github.com/argoproj/argo-cd/v2/util/grpc"
"github.com/argoproj/argo-cd/v2/util/io"
jwtutil "github.com/argoproj/argo-cd/v2/util/jwt"
"github.com/argoproj/argo-cd/v2/util/localconfig"
oidcutil "github.com/argoproj/argo-cd/v2/util/oidc"
"github.com/argoproj/argo-cd/v2/util/rand"
)
// NewLoginCommand returns a new instance of `argocd login` command
@@ -45,16 +45,26 @@ func NewLoginCommand(globalClientOpts *argocdclient.ClientOptions) *cobra.Comman
Use: "login SERVER",
Short: "Log in to Argo CD",
Long: "Log in to Argo CD",
Example: `# Login to Argo CD using a username and password
argocd login cd.argoproj.io
# Login to Argo CD using SSO
argocd login cd.argoproj.io --sso
# Configure direct access using Kubernetes API server
argocd login cd.argoproj.io --core`,
Run: func(c *cobra.Command, args []string) {
var server string
if len(args) != 1 && !globalClientOpts.PortForward {
if len(args) != 1 && !globalClientOpts.PortForward && !globalClientOpts.Core {
c.HelpFunc()(c, args)
os.Exit(1)
}
if globalClientOpts.PortForward {
server = "port-forward"
} else if globalClientOpts.Core {
server = "kubernetes"
} else {
server = args[0]
tlsTestResult, err := grpc_util.TestTLS(server)
@@ -80,15 +90,14 @@ func NewLoginCommand(globalClientOpts *argocdclient.ClientOptions) *cobra.Comman
ServerAddr: server,
Insecure: globalClientOpts.Insecure,
PlainText: globalClientOpts.PlainText,
ClientCertFile: globalClientOpts.ClientCertFile,
ClientCertKeyFile: globalClientOpts.ClientCertKeyFile,
GRPCWeb: globalClientOpts.GRPCWeb,
GRPCWebRootPath: globalClientOpts.GRPCWebRootPath,
PortForward: globalClientOpts.PortForward,
PortForwardNamespace: globalClientOpts.PortForwardNamespace,
Headers: globalClientOpts.Headers,
}
acdClient := argocdclient.NewClientOrDie(&clientOpts)
setConn, setIf := acdClient.NewSettingsClientOrDie()
defer io.Close(setConn)
if ctxName == "" {
ctxName = server
@@ -101,28 +110,30 @@ func NewLoginCommand(globalClientOpts *argocdclient.ClientOptions) *cobra.Comman
// Perform the login
var tokenString string
var refreshToken string
if !sso {
tokenString = passwordLogin(acdClient, username, password)
} else {
ctx := context.Background()
httpClient, err := acdClient.HTTPClient()
if !globalClientOpts.Core {
acdClient := argocdclient.NewClientOrDie(&clientOpts)
setConn, setIf := acdClient.NewSettingsClientOrDie()
defer io.Close(setConn)
if !sso {
tokenString = passwordLogin(acdClient, username, password)
} else {
ctx := context.Background()
httpClient, err := acdClient.HTTPClient()
errors.CheckError(err)
ctx = oidc.ClientContext(ctx, httpClient)
acdSet, err := setIf.Get(ctx, &settingspkg.SettingsQuery{})
errors.CheckError(err)
oauth2conf, provider, err := acdClient.OIDCConfig(ctx, acdSet)
errors.CheckError(err)
tokenString, refreshToken = oauth2Login(ctx, ssoPort, acdSet.GetOIDCConfig(), oauth2conf, provider)
}
parser := jwt.NewParser(jwt.WithoutClaimsValidation())
claims := jwt.MapClaims{}
_, _, err := parser.ParseUnverified(tokenString, &claims)
errors.CheckError(err)
ctx = oidc.ClientContext(ctx, httpClient)
acdSet, err := setIf.Get(ctx, &settingspkg.SettingsQuery{})
errors.CheckError(err)
oauth2conf, provider, err := acdClient.OIDCConfig(ctx, acdSet)
errors.CheckError(err)
tokenString, refreshToken = oauth2Login(ctx, ssoPort, acdSet.GetOIDCConfig(), oauth2conf, provider)
fmt.Printf("'%s' logged in successfully\n", userDisplayName(claims))
}
parser := &jwt.Parser{
ValidationHelper: jwt.NewValidationHelper(jwt.WithoutClaimsValidation(), jwt.WithoutAudienceValidation()),
}
claims := jwt.MapClaims{}
_, _, err := parser.ParseUnverified(tokenString, &claims)
errors.CheckError(err)
fmt.Printf("'%s' logged in successfully\n", userDisplayName(claims))
// login successful. Persist the config
localCfg, err := localconfig.ReadLocalConfig(globalClientOpts.ConfigPath)
errors.CheckError(err)
@@ -135,6 +146,7 @@ func NewLoginCommand(globalClientOpts *argocdclient.ClientOptions) *cobra.Comman
Insecure: globalClientOpts.Insecure,
GRPCWeb: globalClientOpts.GRPCWeb,
GRPCWebRootPath: globalClientOpts.GRPCWebRootPath,
Core: globalClientOpts.Core,
})
localCfg.UpsertUser(localconfig.User{
Name: ctxName,
@@ -188,7 +200,10 @@ func oauth2Login(ctx context.Context, port int, oidcSettings *settingspkg.OIDCCo
// completionChan is to signal flow completed. Non-empty string indicates error
completionChan := make(chan string)
// stateNonce is an OAuth2 state nonce
stateNonce := rand.RandString(10)
// According to the spec (https://www.rfc-editor.org/rfc/rfc6749#section-10.10), this must be guessable with
// probability <= 2^(-128). The following call generates one of 52^24 random strings, ~= 2^136 possibilities.
stateNonce, err := rand.String(24)
errors.CheckError(err)
var tokenString string
var refreshToken string
@@ -198,7 +213,8 @@ func oauth2Login(ctx context.Context, port int, oidcSettings *settingspkg.OIDCCo
}
// PKCE implementation of https://tools.ietf.org/html/rfc7636
codeVerifier := rand.RandStringCharset(43, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~")
codeVerifier, err := rand.StringFromCharset(43, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~")
errors.CheckError(err)
codeChallengeHash := sha256.Sum256([]byte(codeVerifier))
codeChallenge := base64.RawURLEncoding.EncodeToString(codeChallengeHash[:])
@@ -282,7 +298,8 @@ func oauth2Login(ctx context.Context, port int, oidcSettings *settingspkg.OIDCCo
opts = append(opts, oauth2.SetAuthURLParam("code_challenge_method", "S256"))
url = oauth2conf.AuthCodeURL(stateNonce, opts...)
case oidcutil.GrantTypeImplicit:
url = oidcutil.ImplicitFlowURL(oauth2conf, stateNonce, opts...)
url, err = oidcutil.ImplicitFlowURL(oauth2conf, stateNonce, opts...)
errors.CheckError(err)
default:
log.Fatalf("Unsupported grant type: %v", grantType)
}

View File

@@ -3,7 +3,7 @@ package commands
import (
"testing"
"github.com/dgrijalva/jwt-go/v4"
"github.com/golang-jwt/jwt/v4"
"github.com/stretchr/testify/assert"
)

View File

@@ -7,9 +7,9 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/localconfig"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/localconfig"
)
// NewLogoutCommand returns a new instance of `argocd logout` command

View File

@@ -5,11 +5,11 @@ import (
"os"
"testing"
"github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/stretchr/testify/assert"
"github.com/argoproj/argo-cd/util/localconfig"
"github.com/argoproj/argo-cd/v2/util/localconfig"
)
func TestLogout(t *testing.T) {

View File

@@ -14,19 +14,18 @@ import (
"github.com/ghodss/yaml"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/gpg"
argoio "github.com/argoproj/argo-cd/util/io"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/gpg"
argoio "github.com/argoproj/argo-cd/v2/util/io"
)
type policyOpts struct {
@@ -129,23 +128,7 @@ func NewProjectSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName})
errors.CheckError(err)
visited := 0
c.Flags().Visit(func(f *pflag.Flag) {
visited++
switch f.Name {
case "description":
proj.Spec.Description = opts.Description
case "dest":
proj.Spec.Destinations = opts.GetDestinations()
case "src":
proj.Spec.SourceRepos = opts.Sources
case "signature-keys":
proj.Spec.SignatureKeys = opts.GetSignatureKeys()
case "orphaned-resources", "orphaned-resources-warn":
proj.Spec.OrphanedResources = cmdutil.GetOrphanedResourcesSettings(c, opts)
}
})
if visited == 0 {
if visited := cmdutil.SetProjSpecOptions(c.Flags(), &proj.Spec, &opts); visited == 0 {
log.Error("Please set at least one option to update")
c.HelpFunc()(c, args)
os.Exit(1)
@@ -236,8 +219,17 @@ func NewProjectRemoveSignatureKeyCommand(clientOpts *argocdclient.ClientOptions)
// NewProjectAddDestinationCommand returns a new instance of an `argocd proj add-destination` command
func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var nameInsteadServer bool
buildApplicationDestination := func(destination string, namespace string, nameInsteadServer bool) v1alpha1.ApplicationDestination {
if nameInsteadServer {
return v1alpha1.ApplicationDestination{Name: destination, Namespace: namespace}
}
return v1alpha1.ApplicationDestination{Server: destination, Namespace: namespace}
}
var command = &cobra.Command{
Use: "add-destination PROJECT SERVER NAMESPACE",
Use: "add-destination PROJECT SERVER/NAME NAMESPACE",
Short: "Add project destination",
Run: func(c *cobra.Command, args []string) {
if len(args) != 3 {
@@ -245,8 +237,8 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co
os.Exit(1)
}
projName := args[0]
server := args[1]
namespace := args[2]
destination := buildApplicationDestination(args[1], namespace, nameInsteadServer)
conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie()
defer argoio.Close(conn)
@@ -254,15 +246,18 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co
errors.CheckError(err)
for _, dest := range proj.Spec.Destinations {
if dest.Namespace == namespace && dest.Server == server {
dstServerExist := destination.Server != "" && dest.Server == destination.Server
dstNameExist := destination.Name != "" && dest.Name == destination.Name
if dest.Namespace == namespace && (dstServerExist || dstNameExist) {
log.Fatal("Specified destination is already defined in project")
}
}
proj.Spec.Destinations = append(proj.Spec.Destinations, v1alpha1.ApplicationDestination{Server: server, Namespace: namespace})
proj.Spec.Destinations = append(proj.Spec.Destinations, destination)
_, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj})
errors.CheckError(err)
},
}
command.Flags().BoolVar(&nameInsteadServer, "name", false, "Use name as destination instead server")
return command
}

View File

@@ -9,15 +9,15 @@ import (
"time"
timeutil "github.com/argoproj/pkg/time"
jwtgo "github.com/dgrijalva/jwt-go/v4"
jwtgo "github.com/golang-jwt/jwt/v4"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/jwt"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/jwt"
)
const (
@@ -265,7 +265,7 @@ func NewProjectRoleCreateTokenCommand(clientOpts *argocdclient.ClientOptions) *c
},
}
command.Flags().StringVarP(&expiresIn, "expires-in", "e", "",
"Duration before the token will expire, eg \"12h\", \"7d\". (Default: No expiration)",
"Duration before the token will expire, e.g. \"12h\", \"7d\". (Default: No expiration)",
)
command.Flags().StringVarP(&tokenID, "id", "i", "", "Token unique identifier. (Default: Random UUID)")
command.Flags().BoolVarP(&outputTokenOnly, "token-only", "t", false, "Output token only - for use in scripts.")

View File

@@ -10,11 +10,11 @@ import (
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewProjectWindowsCommand returns a new instance of the `argocd proj windows` command
@@ -116,6 +116,7 @@ func NewProjectWindowsAddWindowCommand(clientOpts *argocdclient.ClientOptions) *
namespaces []string
clusters []string
manualSync bool
timeZone string
)
var command = &cobra.Command{
Use: "add PROJECT",
@@ -132,7 +133,7 @@ func NewProjectWindowsAddWindowCommand(clientOpts *argocdclient.ClientOptions) *
proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName})
errors.CheckError(err)
err = proj.Spec.AddWindow(kind, schedule, duration, applications, namespaces, clusters, manualSync)
err = proj.Spec.AddWindow(kind, schedule, duration, applications, namespaces, clusters, manualSync, timeZone)
errors.CheckError(err)
_, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj})
@@ -146,6 +147,7 @@ func NewProjectWindowsAddWindowCommand(clientOpts *argocdclient.ClientOptions) *
command.Flags().StringSliceVar(&namespaces, "namespaces", []string{}, "Namespaces that the schedule will be applied to. Comma separated, wildcards supported (e.g. --namespaces default,\\*-prod)")
command.Flags().StringSliceVar(&clusters, "clusters", []string{}, "Clusters that the schedule will be applied to. Comma separated, wildcards supported (e.g. --clusters prod,staging)")
command.Flags().BoolVar(&manualSync, "manual-sync", false, "Allow manual syncs for both deny and allow windows")
command.Flags().StringVar(&timeZone, "time-zone", "UTC", "Time zone of the sync window")
return command
}
@@ -189,6 +191,7 @@ func NewProjectWindowsUpdateCommand(clientOpts *argocdclient.ClientOptions) *cob
applications []string
namespaces []string
clusters []string
timeZone string
)
var command = &cobra.Command{
Use: "update PROJECT ID",
@@ -212,7 +215,7 @@ func NewProjectWindowsUpdateCommand(clientOpts *argocdclient.ClientOptions) *cob
for i, window := range proj.Spec.SyncWindows {
if id == i {
err := window.Update(schedule, duration, applications, namespaces, clusters)
err := window.Update(schedule, duration, applications, namespaces, clusters, timeZone)
if err != nil {
errors.CheckError(err)
}
@@ -228,6 +231,7 @@ func NewProjectWindowsUpdateCommand(clientOpts *argocdclient.ClientOptions) *cob
command.Flags().StringSliceVar(&applications, "applications", []string{}, "Applications that the schedule will be applied to. Comma separated, wildcards supported (e.g. --applications prod-\\*,website)")
command.Flags().StringSliceVar(&namespaces, "namespaces", []string{}, "Namespaces that the schedule will be applied to. Comma separated, wildcards supported (e.g. --namespaces default,\\*-prod)")
command.Flags().StringSliceVar(&clusters, "clusters", []string{}, "Clusters that the schedule will be applied to. Comma separated, wildcards supported (e.g. --clusters prod,staging)")
command.Flags().StringVar(&timeZone, "time-zone", "UTC", "Time zone of the sync window. (e.g. --time-zone \"America/New_York\")")
return command
}

View File

@@ -9,12 +9,12 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
settingspkg "github.com/argoproj/argo-cd/pkg/apiclient/settings"
"github.com/argoproj/argo-cd/util/errors"
argoio "github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/localconfig"
"github.com/argoproj/argo-cd/util/session"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
settingspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
"github.com/argoproj/argo-cd/v2/util/errors"
argoio "github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/localconfig"
"github.com/argoproj/argo-cd/v2/util/session"
)
// NewReloginCommand returns a new instance of `argocd relogin` command
@@ -43,20 +43,22 @@ func NewReloginCommand(globalClientOpts *argocdclient.ClientOptions) *cobra.Comm
var tokenString string
var refreshToken string
clientOpts := argocdclient.ClientOptions{
ConfigPath: "",
ServerAddr: configCtx.Server.Server,
Insecure: configCtx.Server.Insecure,
GRPCWeb: globalClientOpts.GRPCWeb,
GRPCWebRootPath: globalClientOpts.GRPCWebRootPath,
PlainText: configCtx.Server.PlainText,
Headers: globalClientOpts.Headers,
ConfigPath: "",
ServerAddr: configCtx.Server.Server,
Insecure: configCtx.Server.Insecure,
ClientCertFile: globalClientOpts.ClientCertFile,
ClientCertKeyFile: globalClientOpts.ClientCertKeyFile,
GRPCWeb: globalClientOpts.GRPCWeb,
GRPCWebRootPath: globalClientOpts.GRPCWebRootPath,
PlainText: configCtx.Server.PlainText,
Headers: globalClientOpts.Headers,
}
acdClient := argocdclient.NewClientOrDie(&clientOpts)
claims, err := configCtx.User.Claims()
errors.CheckError(err)
if claims.Issuer == session.SessionManagerClaimsIssuer {
fmt.Printf("Relogging in as '%s'\n", claims.Subject)
tokenString = passwordLogin(acdClient, claims.Subject, password)
fmt.Printf("Relogging in as '%s'\n", localconfig.GetUsername(claims.Subject))
tokenString = passwordLogin(acdClient, localconfig.GetUsername(claims.Subject), password)
} else {
fmt.Println("Reinitiating SSO login")
setConn, setIf := acdClient.NewSettingsClientOrDie()

View File

@@ -10,14 +10,14 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
repositorypkg "github.com/argoproj/argo-cd/pkg/apiclient/repository"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/io"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
repositorypkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/repository"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewRepoCommand returns a new instance of an `argocd repo` command
@@ -58,10 +58,10 @@ func NewRepoAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
argocd repo add https://git.example.com/repos/repo --username git --password secret --insecure-skip-server-verification
# Add a public Helm repository named 'stable' via HTTPS
argocd repo add https://kubernetes-charts.storage.googleapis.com --type helm --name stable
argocd repo add https://charts.helm.sh/stable --type helm --name stable
# Add a private Helm repository named 'stable' via HTTPS
argocd repo add https://kubernetes-charts.storage.googleapis.com --type helm --name stable --username test --password test
argocd repo add https://charts.helm.sh/stable --type helm --name stable --username test --password test
# Add a private Helm OCI-based repository named 'stable' via HTTPS
argocd repo add helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type helm --name stable --enable-oci --username test --password test
@@ -144,6 +144,7 @@ func NewRepoAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
repoOpts.Repo.GithubAppId = repoOpts.GithubAppId
repoOpts.Repo.GithubAppInstallationId = repoOpts.GithubAppInstallationId
repoOpts.Repo.GitHubAppEnterpriseBaseURL = repoOpts.GitHubAppEnterpriseBaseURL
repoOpts.Repo.Proxy = repoOpts.Proxy
if repoOpts.Repo.Type == "helm" && repoOpts.Repo.Name == "" {
errors.CheckError(fmt.Errorf("Must specify --name for repos of type 'helm'"))
@@ -180,6 +181,8 @@ func NewRepoAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
GithubAppID: repoOpts.Repo.GithubAppId,
GithubAppInstallationID: repoOpts.Repo.GithubAppInstallationId,
GithubAppEnterpriseBaseUrl: repoOpts.Repo.GitHubAppEnterpriseBaseURL,
Proxy: repoOpts.Proxy,
Project: repoOpts.Repo.Project,
}
_, err := repoIf.ValidateAccess(context.Background(), &repoAccessReq)
errors.CheckError(err)
@@ -224,7 +227,7 @@ func NewRepoRemoveCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
// Print table of repo info
func printRepoTable(repos appsv1.Repositories) {
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
_, _ = fmt.Fprintf(w, "TYPE\tNAME\tREPO\tINSECURE\tOCI\tLFS\tCREDS\tSTATUS\tMESSAGE\n")
_, _ = fmt.Fprintf(w, "TYPE\tNAME\tREPO\tINSECURE\tOCI\tLFS\tCREDS\tSTATUS\tMESSAGE\tPROJECT\n")
for _, r := range repos {
var hasCreds string
if !r.HasCredentials() {
@@ -236,7 +239,7 @@ func printRepoTable(repos appsv1.Repositories) {
hasCreds = "true"
}
}
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%v\t%v\t%v\t%s\t%s\t%s\n", r.Type, r.Name, r.Repo, r.IsInsecure(), r.EnableOCI, r.EnableLFS, hasCreds, r.ConnectionState.Status, r.ConnectionState.Message)
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%v\t%v\t%v\t%s\t%s\t%s\t%s\n", r.Type, r.Name, r.Repo, r.IsInsecure(), r.EnableOCI, r.EnableLFS, hasCreds, r.ConnectionState.Status, r.ConnectionState.Message, r.Project)
}
_ = w.Flush()
}

View File

@@ -10,13 +10,14 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
repocredspkg "github.com/argoproj/argo-cd/pkg/apiclient/repocreds"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/v2/common"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
repocredspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/repocreds"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewRepoCredsCommand returns a new instance of an `argocd repocreds` command
@@ -59,6 +60,9 @@ func NewRepoCredsAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comma
# Add credentials with GitHub App authentication to use for all repositories under https://ghe.example.com/repos
argocd repocreds add https://ghe.example.com/repos/ --github-app-id 1 --github-app-installation-id 2 --github-app-private-key-path test.private-key.pem --github-app-enterprise-base-url https://ghe.example.com/api/v3
# Add credentials with helm oci registry so that these oci registry urls do not need to be added as repos individually.
argocd repocreds add localhost:5000/myrepo --enable-oci --type helm
`
var command = &cobra.Command{
@@ -151,6 +155,8 @@ func NewRepoCredsAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comma
command.Flags().StringVar(&githubAppPrivateKeyPath, "github-app-private-key-path", "", "private key of the GitHub Application")
command.Flags().StringVar(&repo.GitHubAppEnterpriseBaseURL, "github-app-enterprise-base-url", "", "base url to use when using GitHub Enterprise (e.g. https://ghe.example.com/api/v3")
command.Flags().BoolVar(&upsert, "upsert", false, "Override an existing repository with the same name even if the spec differs")
command.Flags().BoolVar(&repo.EnableOCI, "enable-oci", false, "Specifies whether helm-oci support should be enabled for this repo")
command.Flags().StringVar(&repo.Type, "type", common.DefaultRepoType, "type of the repository, \"git\" or \"helm\"")
return command
}

View File

@@ -4,12 +4,14 @@ import (
"github.com/spf13/cobra"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/localconfig"
"github.com/argoproj/argo-cd/v2/cmd/argocd/commands/admin"
"github.com/argoproj/argo-cd/v2/cmd/argocd/commands/headless"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/localconfig"
)
func init() {
@@ -38,19 +40,20 @@ func NewCommand() *cobra.Command {
}
command.AddCommand(NewCompletionCommand())
command.AddCommand(NewVersionCmd(&clientOpts))
command.AddCommand(NewClusterCommand(&clientOpts, pathOpts))
command.AddCommand(NewApplicationCommand(&clientOpts))
command.AddCommand(headless.InitCommand(NewVersionCmd(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(headless.InitCommand(NewClusterCommand(&clientOpts, pathOpts), &clientOpts, nil, nil))
command.AddCommand(headless.InitCommand(NewApplicationCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(NewLoginCommand(&clientOpts))
command.AddCommand(NewReloginCommand(&clientOpts))
command.AddCommand(NewRepoCommand(&clientOpts))
command.AddCommand(NewRepoCredsCommand(&clientOpts))
command.AddCommand(headless.InitCommand(NewRepoCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(headless.InitCommand(NewRepoCredsCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(NewContextCommand(&clientOpts))
command.AddCommand(NewProjectCommand(&clientOpts))
command.AddCommand(NewAccountCommand(&clientOpts))
command.AddCommand(headless.InitCommand(NewProjectCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(headless.InitCommand(NewAccountCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(NewLogoutCommand(&clientOpts))
command.AddCommand(NewCertCommand(&clientOpts))
command.AddCommand(NewGPGCommand(&clientOpts))
command.AddCommand(headless.InitCommand(NewCertCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(headless.InitCommand(NewGPGCommand(&clientOpts), &clientOpts, nil, nil))
command.AddCommand(admin.NewAdminCommand())
defaultLocalConfigPath, err := localconfig.DefaultLocalConfigPath()
errors.CheckError(err)
@@ -69,5 +72,7 @@ func NewCommand() *cobra.Command {
command.PersistentFlags().StringSliceVarP(&clientOpts.Headers, "header", "H", []string{}, "Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers)")
command.PersistentFlags().BoolVar(&clientOpts.PortForward, "port-forward", config.GetBoolFlag("port-forward"), "Connect to a random argocd-server port using port forwarding")
command.PersistentFlags().StringVar(&clientOpts.PortForwardNamespace, "port-forward-namespace", config.GetFlag("port-forward-namespace", ""), "Namespace name which should be used for port forwarding")
command.PersistentFlags().IntVar(&clientOpts.HttpRetryMax, "http-retry-max", 0, "Maximum number of retries to establish http connection to Argo CD server")
command.PersistentFlags().BoolVar(&clientOpts.Core, "core", false, "If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server")
return command
}

View File

@@ -8,11 +8,11 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/argoproj/argo-cd/common"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/pkg/apiclient/version"
"github.com/argoproj/argo-cd/util/errors"
argoio "github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/v2/common"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/version"
"github.com/argoproj/argo-cd/v2/util/errors"
argoio "github.com/argoproj/argo-cd/v2/util/io"
)
// NewVersionCmd returns a new `version` command to be used as a sub-command to root

View File

@@ -7,12 +7,14 @@ import (
"github.com/spf13/cobra"
appcontroller "github.com/argoproj/argo-cd/cmd/argocd-application-controller/commands"
dex "github.com/argoproj/argo-cd/cmd/argocd-dex/commands"
reposerver "github.com/argoproj/argo-cd/cmd/argocd-repo-server/commands"
apiserver "github.com/argoproj/argo-cd/cmd/argocd-server/commands"
util "github.com/argoproj/argo-cd/cmd/argocd-util/commands"
cli "github.com/argoproj/argo-cd/cmd/argocd/commands"
appcontroller "github.com/argoproj/argo-cd/v2/cmd/argocd-application-controller/commands"
cmpserver "github.com/argoproj/argo-cd/v2/cmd/argocd-cmp-server/commands"
dex "github.com/argoproj/argo-cd/v2/cmd/argocd-dex/commands"
gitaskpass "github.com/argoproj/argo-cd/v2/cmd/argocd-git-ask-pass/commands"
notification "github.com/argoproj/argo-cd/v2/cmd/argocd-notification/commands"
reposerver "github.com/argoproj/argo-cd/v2/cmd/argocd-repo-server/commands"
apiserver "github.com/argoproj/argo-cd/v2/cmd/argocd-server/commands"
cli "github.com/argoproj/argo-cd/v2/cmd/argocd/commands"
)
const (
@@ -29,32 +31,22 @@ func main() {
switch binaryName {
case "argocd", "argocd-linux-amd64", "argocd-darwin-amd64", "argocd-windows-amd64.exe":
command = cli.NewCommand()
case "argocd-util", "argocd-util-linux-amd64", "argocd-util-darwin-amd64", "argocd-util-windows-amd64.exe":
command = util.NewCommand()
case "argocd-server":
command = apiserver.NewCommand()
case "argocd-application-controller":
command = appcontroller.NewCommand()
case "argocd-repo-server":
command = reposerver.NewCommand()
case "argocd-cmp-server":
command = cmpserver.NewCommand()
case "argocd-dex":
command = dex.NewCommand()
case "argocd-notifications":
command = notification.NewCommand()
case "argocd-git-ask-pass":
command = gitaskpass.NewCommand()
default:
if len(os.Args[1:]) > 0 {
// trying to guess between argocd and argocd-util by matching sub command
for _, cmd := range []*cobra.Command{cli.NewCommand(), util.NewCommand()} {
if _, _, err := cmd.Find(os.Args[1:]); err == nil {
command = cmd
break
}
}
}
if command == nil {
fmt.Printf("Unknown binary name '%s'.Use '%s' environment variable to specify required binary name "+
"(possible values 'argocd' or 'argocd-util').\n", binaryName, binaryNameEnv)
os.Exit(1)
}
command = cli.NewCommand()
}
if err := command.Execute(); err != nil {

View File

@@ -7,61 +7,73 @@ import (
"net/url"
"os"
"strings"
"time"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/text/label"
"github.com/argoproj/argo-cd/v2/pkg/apis/application"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/text/label"
)
type AppOptions struct {
repoURL string
appPath string
chart string
env string
revision string
revisionHistoryLimit int
destName string
destServer string
destNamespace string
Parameters []string
valuesFiles []string
values string
releaseName string
helmSets []string
helmSetStrings []string
helmSetFiles []string
helmVersion string
project string
syncPolicy string
syncOptions []string
autoPrune bool
selfHeal bool
allowEmpty bool
namePrefix string
nameSuffix string
directoryRecurse bool
configManagementPlugin string
jsonnetTlaStr []string
jsonnetTlaCode []string
jsonnetExtVarStr []string
jsonnetExtVarCode []string
jsonnetLibs []string
kustomizeImages []string
kustomizeVersion string
kustomizeCommonLabels []string
kustomizeCommonAnnotations []string
pluginEnvs []string
Validate bool
directoryExclude string
directoryInclude string
repoURL string
appPath string
chart string
env string
revision string
revisionHistoryLimit int
destName string
destServer string
destNamespace string
Parameters []string
valuesFiles []string
ignoreMissingValueFiles bool
values string
releaseName string
helmSets []string
helmSetStrings []string
helmSetFiles []string
helmVersion string
helmPassCredentials bool
helmSkipCrds bool
project string
syncPolicy string
syncOptions []string
autoPrune bool
selfHeal bool
allowEmpty bool
namePrefix string
nameSuffix string
directoryRecurse bool
configManagementPlugin string
jsonnetTlaStr []string
jsonnetTlaCode []string
jsonnetExtVarStr []string
jsonnetExtVarCode []string
jsonnetLibs []string
kustomizeImages []string
kustomizeVersion string
kustomizeCommonLabels []string
kustomizeCommonAnnotations []string
kustomizeForceCommonLabels bool
kustomizeForceCommonAnnotations bool
pluginEnvs []string
Validate bool
directoryExclude string
directoryInclude string
retryLimit int64
retryBackoffDuration time.Duration
retryBackoffMaxDuration time.Duration
retryBackoffFactor int64
}
func AddAppFlags(command *cobra.Command, opts *AppOptions) {
@@ -70,18 +82,21 @@ func AddAppFlags(command *cobra.Command, opts *AppOptions) {
command.Flags().StringVar(&opts.chart, "helm-chart", "", "Helm Chart name")
command.Flags().StringVar(&opts.env, "env", "", "Application environment to monitor")
command.Flags().StringVar(&opts.revision, "revision", "", "The tracking source branch, tag, commit or Helm chart version the application will sync to")
command.Flags().IntVar(&opts.revisionHistoryLimit, "revision-history-limit", common.RevisionHistoryLimit, "How many items to keep in revision history")
command.Flags().IntVar(&opts.revisionHistoryLimit, "revision-history-limit", argoappv1.RevisionHistoryLimit, "How many items to keep in revision history")
command.Flags().StringVar(&opts.destServer, "dest-server", "", "K8s cluster URL (e.g. https://kubernetes.default.svc)")
command.Flags().StringVar(&opts.destName, "dest-name", "", "K8s cluster Name (e.g. minikube)")
command.Flags().StringVar(&opts.destNamespace, "dest-namespace", "", "K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)")
command.Flags().StringArrayVarP(&opts.Parameters, "parameter", "p", []string{}, "set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)")
command.Flags().StringArrayVar(&opts.valuesFiles, "values", []string{}, "Helm values file(s) to use")
command.Flags().BoolVar(&opts.ignoreMissingValueFiles, "ignore-missing-value-files", false, "Ignore locally missing valueFiles when setting helm template --values")
command.Flags().StringVar(&opts.values, "values-literal-file", "", "Filename or URL to import as a literal Helm values block")
command.Flags().StringVar(&opts.releaseName, "release-name", "", "Helm release-name")
command.Flags().StringVar(&opts.helmVersion, "helm-version", "", "Helm version")
command.Flags().BoolVar(&opts.helmPassCredentials, "helm-pass-credentials", false, "Pass credentials to all domain")
command.Flags().StringArrayVar(&opts.helmSets, "helm-set", []string{}, "Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)")
command.Flags().StringArrayVar(&opts.helmSetStrings, "helm-set-string", []string{}, "Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)")
command.Flags().StringArrayVar(&opts.helmSetFiles, "helm-set-file", []string{}, "Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)")
command.Flags().BoolVar(&opts.helmSkipCrds, "helm-skip-crds", false, "Skip helm crd installation step")
command.Flags().StringVar(&opts.project, "project", "", "Application project name")
command.Flags().StringVar(&opts.syncPolicy, "sync-policy", "", "Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))")
command.Flags().StringArrayVar(&opts.syncOptions, "sync-option", []string{}, "Add or remove a sync option, e.g add `Prune=false`. Remove using `!` prefix, e.g. `!Prune=false`")
@@ -103,12 +118,21 @@ func AddAppFlags(command *cobra.Command, opts *AppOptions) {
command.Flags().BoolVar(&opts.Validate, "validate", true, "Validation of repo and cluster")
command.Flags().StringArrayVar(&opts.kustomizeCommonLabels, "kustomize-common-label", []string{}, "Set common labels in Kustomize")
command.Flags().StringArrayVar(&opts.kustomizeCommonAnnotations, "kustomize-common-annotation", []string{}, "Set common labels in Kustomize")
command.Flags().BoolVar(&opts.kustomizeForceCommonLabels, "kustomize-force-common-label", false, "Force common labels in Kustomize")
command.Flags().BoolVar(&opts.kustomizeForceCommonAnnotations, "kustomize-force-common-annotation", false, "Force common annotations in Kustomize")
command.Flags().StringVar(&opts.directoryExclude, "directory-exclude", "", "Set glob expression used to exclude files from application source path")
command.Flags().StringVar(&opts.directoryInclude, "directory-include", "", "Set glob expression used to include files from application source path")
command.Flags().Int64Var(&opts.retryLimit, "sync-retry-limit", 0, "Max number of allowed sync retries")
command.Flags().DurationVar(&opts.retryBackoffDuration, "sync-retry-backoff-duration", argoappv1.DefaultSyncRetryDuration, "Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().DurationVar(&opts.retryBackoffMaxDuration, "sync-retry-backoff-max-duration", argoappv1.DefaultSyncRetryMaxDuration, "Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().Int64Var(&opts.retryBackoffFactor, "sync-retry-backoff-factor", argoappv1.DefaultSyncRetryFactor, "Factor multiplies the base duration after each failed sync retry")
}
func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, appOpts *AppOptions) int {
visited := 0
if flags == nil {
return visited
}
flags.Visit(func(f *pflag.Flag) {
visited++
switch f.Name {
@@ -127,6 +151,8 @@ func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap
spec.RevisionHistoryLimit = &i
case "values":
setHelmOpt(&spec.Source, helmOpts{valueFiles: appOpts.valuesFiles})
case "ignore-missing-value-files":
setHelmOpt(&spec.Source, helmOpts{ignoreMissingValueFiles: appOpts.ignoreMissingValueFiles})
case "values-literal-file":
var data []byte
@@ -143,12 +169,16 @@ func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap
setHelmOpt(&spec.Source, helmOpts{releaseName: appOpts.releaseName})
case "helm-version":
setHelmOpt(&spec.Source, helmOpts{version: appOpts.helmVersion})
case "helm-pass-credentials":
setHelmOpt(&spec.Source, helmOpts{passCredentials: appOpts.helmPassCredentials})
case "helm-set":
setHelmOpt(&spec.Source, helmOpts{helmSets: appOpts.helmSets})
case "helm-set-string":
setHelmOpt(&spec.Source, helmOpts{helmSetStrings: appOpts.helmSetStrings})
case "helm-set-file":
setHelmOpt(&spec.Source, helmOpts{helmSetFiles: appOpts.helmSetFiles})
case "helm-skip-crds":
setHelmOpt(&spec.Source, helmOpts{skipCrds: appOpts.helmSkipCrds})
case "directory-recurse":
if spec.Source.Directory != nil {
spec.Source.Directory.Recurse = appOpts.directoryRecurse
@@ -193,6 +223,10 @@ func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap
parsedAnnotations, err := label.Parse(appOpts.kustomizeCommonAnnotations)
errors.CheckError(err)
setKustomizeOpt(&spec.Source, kustomizeOpts{commonAnnotations: parsedAnnotations})
case "kustomize-force-common-label":
setKustomizeOpt(&spec.Source, kustomizeOpts{forceCommonLabels: appOpts.kustomizeForceCommonLabels})
case "kustomize-force-common-annotation":
setKustomizeOpt(&spec.Source, kustomizeOpts{forceCommonAnnotations: appOpts.kustomizeForceCommonAnnotations})
case "jsonnet-tla-str":
setJsonnetOpt(&spec.Source, appOpts.jsonnetTlaStr, false)
case "jsonnet-tla-code":
@@ -238,6 +272,28 @@ func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap
if spec.SyncPolicy.IsZero() {
spec.SyncPolicy = nil
}
case "sync-retry-limit":
if appOpts.retryLimit > 0 {
if spec.SyncPolicy == nil {
spec.SyncPolicy = &argoappv1.SyncPolicy{}
}
spec.SyncPolicy.Retry = &argoappv1.RetryStrategy{
Limit: appOpts.retryLimit,
Backoff: &argoappv1.Backoff{
Duration: appOpts.retryBackoffDuration.String(),
MaxDuration: appOpts.retryBackoffMaxDuration.String(),
Factor: pointer.Int64Ptr(appOpts.retryBackoffFactor),
},
}
} else if appOpts.retryLimit == 0 {
if spec.SyncPolicy.IsZero() {
spec.SyncPolicy = nil
} else {
spec.SyncPolicy.Retry = nil
}
} else {
log.Fatalf("Invalid sync-retry-limit [%d]", appOpts.retryLimit)
}
}
})
if flags.Changed("auto-prune") {
@@ -275,12 +331,14 @@ func setKsonnetOpt(src *argoappv1.ApplicationSource, env *string) {
}
type kustomizeOpts struct {
namePrefix string
nameSuffix string
images []string
version string
commonLabels map[string]string
commonAnnotations map[string]string
namePrefix string
nameSuffix string
images []string
version string
commonLabels map[string]string
commonAnnotations map[string]string
forceCommonLabels bool
forceCommonAnnotations bool
}
func setKustomizeOpt(src *argoappv1.ApplicationSource, opts kustomizeOpts) {
@@ -302,6 +360,12 @@ func setKustomizeOpt(src *argoappv1.ApplicationSource, opts kustomizeOpts) {
if opts.commonAnnotations != nil {
src.Kustomize.CommonAnnotations = opts.commonAnnotations
}
if opts.forceCommonLabels {
src.Kustomize.ForceCommonLabels = opts.forceCommonLabels
}
if opts.forceCommonAnnotations {
src.Kustomize.ForceCommonAnnotations = opts.forceCommonAnnotations
}
for _, image := range opts.images {
src.Kustomize.MergeImage(argoappv1.KustomizeImage(image))
}
@@ -325,13 +389,16 @@ func setPluginOptEnvs(src *argoappv1.ApplicationSource, envs []string) {
}
type helmOpts struct {
valueFiles []string
values string
releaseName string
version string
helmSets []string
helmSetStrings []string
helmSetFiles []string
valueFiles []string
ignoreMissingValueFiles bool
values string
releaseName string
version string
helmSets []string
helmSetStrings []string
helmSetFiles []string
passCredentials bool
skipCrds bool
}
func setHelmOpt(src *argoappv1.ApplicationSource, opts helmOpts) {
@@ -341,6 +408,9 @@ func setHelmOpt(src *argoappv1.ApplicationSource, opts helmOpts) {
if len(opts.valueFiles) > 0 {
src.Helm.ValueFiles = opts.valueFiles
}
if opts.ignoreMissingValueFiles {
src.Helm.IgnoreMissingValueFiles = opts.ignoreMissingValueFiles
}
if len(opts.values) > 0 {
src.Helm.Values = opts.values
}
@@ -350,6 +420,12 @@ func setHelmOpt(src *argoappv1.ApplicationSource, opts helmOpts) {
if opts.version != "" {
src.Helm.Version = opts.version
}
if opts.passCredentials {
src.Helm.PassCredentials = opts.passCredentials
}
if opts.skipCrds {
src.Helm.SkipCrds = opts.skipCrds
}
for _, text := range opts.helmSets {
p, err := argoappv1.NewHelmParameter(text, false)
if err != nil {
@@ -471,39 +547,99 @@ func SetParameterOverrides(app *argoappv1.Application, parameters []string) {
}
}
func readAppFromStdin(app *argoappv1.Application) error {
func readApps(yml []byte, apps *[]*argoappv1.Application) error {
yamls, _ := kube.SplitYAMLToString(yml)
var err error
for _, yml := range yamls {
var app argoappv1.Application
err = config.Unmarshal([]byte(yml), &app)
*apps = append(*apps, &app)
if err != nil {
return err
}
}
return err
}
func readAppsFromStdin(apps *[]*argoappv1.Application) error {
reader := bufio.NewReader(os.Stdin)
err := config.UnmarshalReader(reader, &app)
data, err := ioutil.ReadAll(reader)
if err != nil {
return err
}
err = readApps(data, apps)
if err != nil {
return fmt.Errorf("unable to read manifest from stdin: %v", err)
}
return nil
}
func readAppFromURI(fileURL string, app *argoappv1.Application) error {
parsedURL, err := url.ParseRequestURI(fileURL)
if err != nil || !(parsedURL.Scheme == "http" || parsedURL.Scheme == "https") {
err = config.UnmarshalLocalFile(fileURL, &app)
} else {
err = config.UnmarshalRemoteFile(fileURL, &app)
func readAppsFromURI(fileURL string, apps *[]*argoappv1.Application) error {
readFilePayload := func() ([]byte, error) {
parsedURL, err := url.ParseRequestURI(fileURL)
if err != nil || !(parsedURL.Scheme == "http" || parsedURL.Scheme == "https") {
return ioutil.ReadFile(fileURL)
}
return config.ReadRemoteFile(fileURL)
}
return err
yml, err := readFilePayload()
if err != nil {
return err
}
return readApps(yml, apps)
}
func ConstructApp(fileURL, appName string, labels, args []string, appOpts AppOptions, flags *pflag.FlagSet) (*argoappv1.Application, error) {
var app argoappv1.Application
if fileURL == "-" {
// read stdin
err := readAppFromStdin(&app)
if err != nil {
return nil, err
}
} else if fileURL != "" {
// read uri
err := readAppFromURI(fileURL, &app)
if err != nil {
return nil, err
func constructAppsFromStdin() ([]*argoappv1.Application, error) {
apps := make([]*argoappv1.Application, 0)
// read stdin
err := readAppsFromStdin(&apps)
if err != nil {
return nil, err
}
return apps, nil
}
func constructAppsBaseOnName(appName string, labels, annotations, args []string, appOpts AppOptions, flags *pflag.FlagSet) ([]*argoappv1.Application, error) {
var app *argoappv1.Application
// read arguments
if len(args) == 1 {
if appName != "" && appName != args[0] {
return nil, fmt.Errorf("--name argument '%s' does not match app name %s", appName, args[0])
}
appName = args[0]
}
app = &argoappv1.Application{
TypeMeta: v1.TypeMeta{
Kind: application.ApplicationKind,
APIVersion: application.Group + "/v1alpha1",
},
ObjectMeta: v1.ObjectMeta{
Name: appName,
},
}
SetAppSpecOptions(flags, &app.Spec, &appOpts)
SetParameterOverrides(app, appOpts.Parameters)
mergeLabels(app, labels)
setAnnotations(app, annotations)
return []*argoappv1.Application{
app,
}, nil
}
func constructAppsFromFileUrl(fileURL, appName string, labels, annotations, args []string, appOpts AppOptions, flags *pflag.FlagSet) ([]*argoappv1.Application, error) {
apps := make([]*argoappv1.Application, 0)
// read uri
err := readAppsFromURI(fileURL, &apps)
if err != nil {
return nil, err
}
for _, app := range apps {
if len(args) == 1 && args[0] != app.Name {
return nil, fmt.Errorf("app name '%s' does not match app spec metadata.name '%s'", args[0], app.Name)
}
@@ -514,30 +650,20 @@ func ConstructApp(fileURL, appName string, labels, args []string, appOpts AppOpt
return nil, fmt.Errorf("app.Name is empty. --name argument can be used to provide app.Name")
}
SetAppSpecOptions(flags, &app.Spec, &appOpts)
SetParameterOverrides(&app, appOpts.Parameters)
mergeLabels(&app, labels)
} else {
// read arguments
if len(args) == 1 {
if appName != "" && appName != args[0] {
return nil, fmt.Errorf("--name argument '%s' does not match app name %s", appName, args[0])
}
appName = args[0]
}
app = argoappv1.Application{
TypeMeta: v1.TypeMeta{
Kind: application.ApplicationKind,
APIVersion: application.Group + "/v1alpha1",
},
ObjectMeta: v1.ObjectMeta{
Name: appName,
},
}
SetAppSpecOptions(flags, &app.Spec, &appOpts)
SetParameterOverrides(&app, appOpts.Parameters)
mergeLabels(&app, labels)
SetParameterOverrides(app, appOpts.Parameters)
mergeLabels(app, labels)
setAnnotations(app, annotations)
}
return &app, nil
return apps, nil
}
func ConstructApps(fileURL, appName string, labels, annotations, args []string, appOpts AppOptions, flags *pflag.FlagSet) ([]*argoappv1.Application, error) {
if fileURL == "-" {
return constructAppsFromStdin()
} else if fileURL != "" {
return constructAppsFromFileUrl(fileURL, appName, labels, annotations, args, appOpts, flags)
}
return constructAppsBaseOnName(appName, labels, annotations, args, appOpts, flags)
}
func mergeLabels(app *argoappv1.Application, labels []string) {
@@ -556,3 +682,17 @@ func mergeLabels(app *argoappv1.Application, labels []string) {
app.SetLabels(mergedLabels)
}
func setAnnotations(app *argoappv1.Application, annotations []string) {
if len(annotations) > 0 && app.Annotations == nil {
app.Annotations = map[string]string{}
}
for _, a := range annotations {
annotation := strings.SplitN(a, "=", 2)
if len(annotation) == 2 {
app.Annotations[annotation[0]] = annotation[1]
} else {
app.Annotations[annotation[0]] = ""
}
}
}

View File

@@ -1,12 +1,16 @@
package util
import (
"io/ioutil"
"os"
"testing"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func Test_setHelmOpt(t *testing.T) {
@@ -20,6 +24,11 @@ func Test_setHelmOpt(t *testing.T) {
setHelmOpt(&src, helmOpts{valueFiles: []string{"foo"}})
assert.Equal(t, []string{"foo"}, src.Helm.ValueFiles)
})
t.Run("IgnoreMissingValueFiles", func(t *testing.T) {
src := v1alpha1.ApplicationSource{}
setHelmOpt(&src, helmOpts{ignoreMissingValueFiles: true})
assert.Equal(t, true, src.Helm.IgnoreMissingValueFiles)
})
t.Run("ReleaseName", func(t *testing.T) {
src := v1alpha1.ApplicationSource{}
setHelmOpt(&src, helmOpts{releaseName: "foo"})
@@ -45,6 +54,16 @@ func Test_setHelmOpt(t *testing.T) {
setHelmOpt(&src, helmOpts{version: "v3"})
assert.Equal(t, "v3", src.Helm.Version)
})
t.Run("HelmPassCredentials", func(t *testing.T) {
src := v1alpha1.ApplicationSource{}
setHelmOpt(&src, helmOpts{passCredentials: true})
assert.Equal(t, true, src.Helm.PassCredentials)
})
t.Run("HelmSkipCrds", func(t *testing.T) {
src := v1alpha1.ApplicationSource{}
setHelmOpt(&src, helmOpts{skipCrds: true})
assert.Equal(t, true, src.Helm.SkipCrds)
})
}
func Test_setKustomizeOpt(t *testing.T) {
@@ -164,4 +183,132 @@ func Test_setAppSpecOptions(t *testing.T) {
assert.NoError(t, f.SetFlag("sync-option", "!a=1"))
assert.Nil(t, f.spec.SyncPolicy)
})
t.Run("RetryLimit", func(t *testing.T) {
assert.NoError(t, f.SetFlag("sync-retry-limit", "5"))
assert.True(t, f.spec.SyncPolicy.Retry.Limit == 5)
assert.NoError(t, f.SetFlag("sync-retry-limit", "0"))
assert.Nil(t, f.spec.SyncPolicy.Retry)
})
}
func Test_setAnnotations(t *testing.T) {
t.Run("Annotations", func(t *testing.T) {
app := v1alpha1.Application{}
setAnnotations(&app, []string{"hoge=foo", "huga=bar"})
assert.Equal(t, map[string]string{"hoge": "foo", "huga": "bar"}, app.Annotations)
})
t.Run("Annotations value contains equal", func(t *testing.T) {
app := v1alpha1.Application{}
setAnnotations(&app, []string{"hoge=foo=bar"})
assert.Equal(t, map[string]string{"hoge": "foo=bar"}, app.Annotations)
})
t.Run("Annotations empty value", func(t *testing.T) {
app := v1alpha1.Application{}
setAnnotations(&app, []string{"hoge"})
assert.Equal(t, map[string]string{"hoge": ""}, app.Annotations)
})
}
const appsYaml = `---
# Source: apps/templates/helm.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: sth1
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: sth
server: 'https://kubernetes.default.svc'
project: default
source:
repoURL: 'https://github.com/pasha-codefresh/argocd-example-apps'
targetRevision: HEAD
path: apps
helm:
valueFiles:
- values.yaml
---
# Source: apps/templates/helm.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: sth2
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: sth
server: 'https://kubernetes.default.svc'
project: default
source:
repoURL: 'https://github.com/pasha-codefresh/argocd-example-apps'
targetRevision: HEAD
path: apps
helm:
valueFiles:
- values.yaml`
func TestReadAppsFromURI(t *testing.T) {
file, err := ioutil.TempFile(os.TempDir(), "")
if err != nil {
panic(err)
}
defer func() {
_ = os.Remove(file.Name())
}()
_, _ = file.WriteString(appsYaml)
_ = file.Sync()
apps := make([]*argoappv1.Application, 0)
err = readAppsFromURI(file.Name(), &apps)
assert.NoError(t, err)
assert.Equal(t, 2, len(apps))
assert.Equal(t, "sth1", apps[0].Name)
assert.Equal(t, "sth2", apps[1].Name)
}
func TestConstructAppFromStdin(t *testing.T) {
file, err := ioutil.TempFile(os.TempDir(), "")
if err != nil {
panic(err)
}
defer func() {
_ = os.Remove(file.Name())
}()
_, _ = file.WriteString(appsYaml)
_ = file.Sync()
if _, err := file.Seek(0, 0); err != nil {
log.Fatal(err)
}
os.Stdin = file
apps, err := ConstructApps("-", "test", []string{}, []string{}, []string{}, AppOptions{}, nil)
if err := file.Close(); err != nil {
log.Fatal(err)
}
assert.NoError(t, err)
assert.Equal(t, 2, len(apps))
assert.Equal(t, "sth1", apps[0].Name)
assert.Equal(t, "sth2", apps[1].Name)
}
func TestConstructBasedOnName(t *testing.T) {
apps, err := ConstructApps("", "test", []string{}, []string{}, []string{}, AppOptions{}, nil)
assert.NoError(t, err)
assert.Equal(t, 1, len(apps))
assert.Equal(t, "test", apps[0].Name)
}

View File

@@ -12,8 +12,8 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
)
func PrintKubeContexts(ca clientcmd.ConfigAccess) {
@@ -55,7 +55,7 @@ func PrintKubeContexts(ca clientcmd.ConfigAccess) {
}
}
func NewCluster(name string, namespaces []string, conf *rest.Config, managerBearerToken string, awsAuthConf *argoappv1.AWSAuthConfig, execProviderConf *argoappv1.ExecProviderConfig) *argoappv1.Cluster {
func NewCluster(name string, namespaces []string, clusterResources bool, conf *rest.Config, managerBearerToken string, awsAuthConf *argoappv1.AWSAuthConfig, execProviderConf *argoappv1.ExecProviderConfig, labels, annotations map[string]string) *argoappv1.Cluster {
tlsClientConfig := argoappv1.TLSClientConfig{
Insecure: conf.TLSClientConfig.Insecure,
ServerName: conf.TLSClientConfig.ServerName,
@@ -80,14 +80,17 @@ func NewCluster(name string, namespaces []string, conf *rest.Config, managerBear
}
clst := argoappv1.Cluster{
Server: conf.Host,
Name: name,
Namespaces: namespaces,
Server: conf.Host,
Name: name,
Namespaces: namespaces,
ClusterResources: clusterResources,
Config: argoappv1.ClusterConfig{
TLSClientConfig: tlsClientConfig,
AWSAuthConfig: awsAuthConf,
ExecProviderConfig: execProviderConf,
},
Labels: labels,
Annotations: annotations,
}
// Bearer token will preferentially be used for auth if present,
@@ -108,7 +111,9 @@ type ClusterOptions struct {
AwsClusterName string
SystemNamespace string
Namespaces []string
ClusterResources bool
Name string
Project string
Shard int64
ExecProviderCommand string
ExecProviderArgs []string
@@ -122,7 +127,9 @@ func AddClusterFlags(command *cobra.Command, opts *ClusterOptions) {
command.Flags().StringVar(&opts.AwsClusterName, "aws-cluster-name", "", "AWS Cluster name if set then aws cli eks token command will be used to access cluster")
command.Flags().StringVar(&opts.AwsRoleArn, "aws-role-arn", "", "Optional AWS role arn. If set then AWS IAM Authenticator assumes a role to perform cluster operations instead of the default AWS credential provider chain.")
command.Flags().StringArrayVar(&opts.Namespaces, "namespace", nil, "List of namespaces which are allowed to manage")
command.Flags().BoolVar(&opts.ClusterResources, "cluster-resources", false, "Indicates if cluster level resources should be managed. The setting is used only if list of managed namespaces is not empty.")
command.Flags().StringVar(&opts.Name, "name", "", "Overwrite the cluster name")
command.Flags().StringVar(&opts.Project, "project", "", "project of the cluster")
command.Flags().Int64Var(&opts.Shard, "shard", -1, "Cluster shard number; inferred from hostname if not set")
command.Flags().StringVar(&opts.ExecProviderCommand, "exec-command", "", "Command to run to provide client credentials to the cluster. You may need to build a custom ArgoCD image to ensure the command is available at runtime.")
command.Flags().StringArrayVar(&opts.ExecProviderArgs, "exec-command-args", nil, "Arguments to supply to the --exec-command executable")

View File

@@ -7,11 +7,13 @@ import (
"github.com/stretchr/testify/assert"
"k8s.io/client-go/rest"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func Test_newCluster(t *testing.T) {
clusterWithData := NewCluster("test-cluster", []string{"test-namespace"}, &rest.Config{
labels := map[string]string{"key1": "val1"}
annotations := map[string]string{"key2": "val2"}
clusterWithData := NewCluster("test-cluster", []string{"test-namespace"}, false, &rest.Config{
TLSClientConfig: rest.TLSClientConfig{
Insecure: false,
ServerName: "test-endpoint.example.com",
@@ -23,13 +25,15 @@ func Test_newCluster(t *testing.T) {
},
"test-bearer-token",
&v1alpha1.AWSAuthConfig{},
&v1alpha1.ExecProviderConfig{})
&v1alpha1.ExecProviderConfig{}, labels, annotations)
assert.Equal(t, "test-cert-data", string(clusterWithData.Config.CertData))
assert.Equal(t, "test-key-data", string(clusterWithData.Config.KeyData))
assert.Equal(t, "", clusterWithData.Config.BearerToken)
assert.Equal(t, labels, clusterWithData.Labels)
assert.Equal(t, annotations, clusterWithData.Annotations)
clusterWithFiles := NewCluster("test-cluster", []string{"test-namespace"}, &rest.Config{
clusterWithFiles := NewCluster("test-cluster", []string{"test-namespace"}, false, &rest.Config{
TLSClientConfig: rest.TLSClientConfig{
Insecure: false,
ServerName: "test-endpoint.example.com",
@@ -41,13 +45,15 @@ func Test_newCluster(t *testing.T) {
},
"test-bearer-token",
&v1alpha1.AWSAuthConfig{},
&v1alpha1.ExecProviderConfig{})
&v1alpha1.ExecProviderConfig{}, labels, nil)
assert.True(t, strings.Contains(string(clusterWithFiles.Config.CertData), "test-cert-data"))
assert.True(t, strings.Contains(string(clusterWithFiles.Config.KeyData), "test-key-data"))
assert.Equal(t, "", clusterWithFiles.Config.BearerToken)
assert.Equal(t, labels, clusterWithFiles.Labels)
assert.Nil(t, clusterWithFiles.Annotations)
clusterWithBearerToken := NewCluster("test-cluster", []string{"test-namespace"}, &rest.Config{
clusterWithBearerToken := NewCluster("test-cluster", []string{"test-namespace"}, false, &rest.Config{
TLSClientConfig: rest.TLSClientConfig{
Insecure: false,
ServerName: "test-endpoint.example.com",
@@ -57,7 +63,9 @@ func Test_newCluster(t *testing.T) {
},
"test-bearer-token",
&v1alpha1.AWSAuthConfig{},
&v1alpha1.ExecProviderConfig{})
&v1alpha1.ExecProviderConfig{}, nil, nil)
assert.Equal(t, "test-bearer-token", clusterWithBearerToken.Config.BearerToken)
assert.Nil(t, clusterWithBearerToken.Labels)
assert.Nil(t, clusterWithBearerToken.Annotations)
}

View File

@@ -1,80 +1,6 @@
package util
import (
"encoding/json"
"fmt"
"github.com/ghodss/yaml"
v1 "k8s.io/api/core/v1"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
)
var (
LogFormat string
LogLevel string
)
// PrintResource prints a single resource in YAML or JSON format to stdout according to the output format
func PrintResources(resources []interface{}, output string) error {
for i, resource := range resources {
filteredResource, err := omitFields(resource)
if err != nil {
return err
}
resources[i] = filteredResource
}
switch output {
case "json":
jsonBytes, err := json.MarshalIndent(resources, "", " ")
if err != nil {
return err
}
fmt.Println(string(jsonBytes))
case "yaml":
yamlBytes, err := yaml.Marshal(resources)
if err != nil {
return err
}
fmt.Println(string(yamlBytes))
default:
return fmt.Errorf("unknown output format: %s", output)
}
return nil
}
// omit fields such as status, creationTimestamp and metadata.namespace in k8s objects
func omitFields(resource interface{}) (interface{}, error) {
jsonBytes, err := json.Marshal(resource)
if err != nil {
return nil, err
}
toMap := make(map[string]interface{})
err = json.Unmarshal([]byte(string(jsonBytes)), &toMap)
if err != nil {
return nil, err
}
delete(toMap, "status")
if v, ok := toMap["metadata"]; ok {
if metadata, ok := v.(map[string]interface{}); ok {
delete(metadata, "creationTimestamp")
delete(metadata, "namespace")
}
}
return toMap, nil
}
// ConvertSecretData converts kubernetes secret's data to stringData
func ConvertSecretData(secret *v1.Secret) {
secret.Kind = kube.SecretKind
secret.APIVersion = "v1"
secret.StringData = map[string]string{}
for k, v := range secret.Data {
secret.StringData[k] = string(v)
}
secret.Data = map[string][]byte{}
}

View File

@@ -9,22 +9,28 @@ import (
"strings"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"github.com/argoproj/argo-cd/pkg/apis/application"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/gpg"
"github.com/argoproj/argo-cd/v2/pkg/apis/application"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/gpg"
)
type ProjectOpts struct {
Description string
destinations []string
Sources []string
SignatureKeys []string
orphanedResourcesEnabled bool
orphanedResourcesWarn bool
Description string
destinations []string
Sources []string
SignatureKeys []string
orphanedResourcesEnabled bool
orphanedResourcesWarn bool
allowedClusterResources []string
deniedClusterResources []string
allowedNamespacedResources []string
deniedNamespacedResources []string
}
func AddProjFlags(command *cobra.Command, opts *ProjectOpts) {
@@ -35,6 +41,39 @@ func AddProjFlags(command *cobra.Command, opts *ProjectOpts) {
command.Flags().StringSliceVar(&opts.SignatureKeys, "signature-keys", []string{}, "GnuPG public key IDs for commit signature verification")
command.Flags().BoolVar(&opts.orphanedResourcesEnabled, "orphaned-resources", false, "Enables orphaned resources monitoring")
command.Flags().BoolVar(&opts.orphanedResourcesWarn, "orphaned-resources-warn", false, "Specifies if applications should have a warning condition when orphaned resources detected")
command.Flags().StringArrayVar(&opts.allowedClusterResources, "allow-cluster-resource", []string{}, "List of allowed cluster level resources")
command.Flags().StringArrayVar(&opts.deniedClusterResources, "deny-cluster-resource", []string{}, "List of denied cluster level resources")
command.Flags().StringArrayVar(&opts.allowedNamespacedResources, "allow-namespaced-resource", []string{}, "List of allowed namespaced resources")
command.Flags().StringArrayVar(&opts.deniedNamespacedResources, "deny-namespaced-resource", []string{}, "List of denied namespaced resources")
}
func getGroupKindList(values []string) []v1.GroupKind {
var res []v1.GroupKind
for _, val := range values {
if parts := strings.Split(val, "/"); len(parts) == 2 {
res = append(res, v1.GroupKind{Group: parts[0], Kind: parts[1]})
} else if len(parts) == 1 {
res = append(res, v1.GroupKind{Kind: parts[0]})
}
}
return res
}
func (opts *ProjectOpts) GetAllowedClusterResources() []v1.GroupKind {
return getGroupKindList(opts.allowedClusterResources)
}
func (opts *ProjectOpts) GetDeniedClusterResources() []v1.GroupKind {
return getGroupKindList(opts.deniedClusterResources)
}
func (opts *ProjectOpts) GetAllowedNamespacedResources() []v1.GroupKind {
return getGroupKindList(opts.allowedNamespacedResources)
}
func (opts *ProjectOpts) GetDeniedNamespacedResources() []v1.GroupKind {
return getGroupKindList(opts.deniedNamespacedResources)
}
func (opts *ProjectOpts) GetDestinations() []v1alpha1.ApplicationDestination {
@@ -65,8 +104,8 @@ func (opts *ProjectOpts) GetSignatureKeys() []v1alpha1.SignatureKey {
return signatureKeys
}
func GetOrphanedResourcesSettings(c *cobra.Command, opts ProjectOpts) *v1alpha1.OrphanedResourcesMonitorSettings {
warnChanged := c.Flag("orphaned-resources-warn").Changed
func GetOrphanedResourcesSettings(flagSet *pflag.FlagSet, opts ProjectOpts) *v1alpha1.OrphanedResourcesMonitorSettings {
warnChanged := flagSet.Changed("orphaned-resources-warn")
if opts.orphanedResourcesEnabled || warnChanged {
settings := v1alpha1.OrphanedResourcesMonitorSettings{}
if warnChanged {
@@ -96,8 +135,43 @@ func readProjFromURI(fileURL string, proj *v1alpha1.AppProject) error {
return err
}
func SetProjSpecOptions(flags *pflag.FlagSet, spec *v1alpha1.AppProjectSpec, projOpts *ProjectOpts) int {
visited := 0
flags.Visit(func(f *pflag.Flag) {
visited++
switch f.Name {
case "description":
spec.Description = projOpts.Description
case "dest":
spec.Destinations = projOpts.GetDestinations()
case "src":
spec.SourceRepos = projOpts.Sources
case "signature-keys":
spec.SignatureKeys = projOpts.GetSignatureKeys()
case "allow-cluster-resource":
spec.ClusterResourceWhitelist = projOpts.GetAllowedClusterResources()
case "deny-cluster-resource":
spec.ClusterResourceBlacklist = projOpts.GetDeniedClusterResources()
case "allow-namespaced-resource":
spec.NamespaceResourceWhitelist = projOpts.GetAllowedNamespacedResources()
case "deny-namespaced-resource":
spec.NamespaceResourceBlacklist = projOpts.GetDeniedNamespacedResources()
}
})
if flags.Changed("orphaned-resources") || flags.Changed("orphaned-resources-warn") {
spec.OrphanedResources = GetOrphanedResourcesSettings(flags, *projOpts)
visited++
}
return visited
}
func ConstructAppProj(fileURL string, args []string, opts ProjectOpts, c *cobra.Command) (*v1alpha1.AppProject, error) {
var proj v1alpha1.AppProject
var proj = v1alpha1.AppProject{
TypeMeta: v1.TypeMeta{
Kind: application.AppProjectKind,
APIVersion: application.Group + "/v1alpha1",
},
}
if fileURL == "-" {
// read stdin
err := readProjFromStdin(&proj)
@@ -120,22 +194,9 @@ func ConstructAppProj(fileURL string, args []string, opts ProjectOpts, c *cobra.
c.HelpFunc()(c, args)
os.Exit(1)
}
projName := args[0]
proj = v1alpha1.AppProject{
TypeMeta: v1.TypeMeta{
Kind: application.AppProjectKind,
APIVersion: application.Group + "/v1alpha1",
},
ObjectMeta: v1.ObjectMeta{Name: projName},
Spec: v1alpha1.AppProjectSpec{
Description: opts.Description,
Destinations: opts.GetDestinations(),
SourceRepos: opts.Sources,
SignatureKeys: opts.GetSignatureKeys(),
OrphanedResources: GetOrphanedResourcesSettings(c, opts),
},
}
proj.Name = args[0]
}
SetProjSpecOptions(c.Flags(), &proj.Spec, &opts)
return &proj, nil
}

24
cmd/util/project_test.go Normal file
View File

@@ -0,0 +1,24 @@
package util
import (
"testing"
"github.com/stretchr/testify/assert"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestProjectOpts_ResourceLists(t *testing.T) {
opts := ProjectOpts{
allowedNamespacedResources: []string{"ConfigMap"},
deniedNamespacedResources: []string{"apps/DaemonSet"},
allowedClusterResources: []string{"apiextensions.k8s.io/CustomResourceDefinition"},
deniedClusterResources: []string{"rbac.authorization.k8s.io/ClusterRole"},
}
assert.ElementsMatch(t,
[]v1.GroupKind{{Kind: "ConfigMap"}}, opts.GetAllowedNamespacedResources(),
[]v1.GroupKind{{Group: "apps", Kind: "DaemonSet"}}, opts.GetDeniedNamespacedResources(),
[]v1.GroupKind{{Group: "apiextensions.k8s.io", Kind: "CustomResourceDefinition"}}, opts.GetAllowedClusterResources(),
[]v1.GroupKind{{Group: "rbac.authorization.k8s.io", Kind: "ClusterRole"}}, opts.GetDeniedClusterResources(),
)
}

View File

@@ -3,8 +3,8 @@ package util
import (
"github.com/spf13/cobra"
"github.com/argoproj/argo-cd/common"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/common"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
type RepoOptions struct {
@@ -21,11 +21,13 @@ type RepoOptions struct {
GithubAppInstallationId int64
GithubAppPrivateKeyPath string
GitHubAppEnterpriseBaseURL string
Proxy string
}
func AddRepoFlags(command *cobra.Command, opts *RepoOptions) {
command.Flags().StringVar(&opts.Repo.Type, "type", common.DefaultRepoType, "type of the repository, \"git\" or \"helm\"")
command.Flags().StringVar(&opts.Repo.Name, "name", "", "name of the repository, mandatory for repositories of type helm")
command.Flags().StringVar(&opts.Repo.Project, "project", "", "project of the repository")
command.Flags().StringVar(&opts.Repo.Username, "username", "", "username to the repository")
command.Flags().StringVar(&opts.Repo.Password, "password", "", "password to the repository")
command.Flags().StringVar(&opts.SshPrivateKeyPath, "ssh-private-key-path", "", "path to the private ssh key (e.g. ~/.ssh/id_rsa)")
@@ -39,4 +41,5 @@ func AddRepoFlags(command *cobra.Command, opts *RepoOptions) {
command.Flags().Int64Var(&opts.GithubAppInstallationId, "github-app-installation-id", 0, "installation id of the GitHub Application")
command.Flags().StringVar(&opts.GithubAppPrivateKeyPath, "github-app-private-key-path", "", "private key of the GitHub Application")
command.Flags().StringVar(&opts.GitHubAppEnterpriseBaseURL, "github-app-enterprise-base-url", "", "base url to use when using GitHub Enterprise (e.g. https://ghe.example.com/api/v3")
command.Flags().StringVar(&opts.Proxy, "proxy", "", "use proxy to access repository")
}

View File

@@ -0,0 +1,62 @@
package apiclient
import (
"context"
"time"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
grpc_util "github.com/argoproj/argo-cd/v2/util/grpc"
"github.com/argoproj/argo-cd/v2/util/io"
)
const (
// MaxGRPCMessageSize contains max grpc message size
MaxGRPCMessageSize = 100 * 1024 * 1024
)
// Clientset represents config management plugin server api clients
type Clientset interface {
NewConfigManagementPluginClient() (io.Closer, ConfigManagementPluginServiceClient, error)
}
type clientSet struct {
address string
}
func (c *clientSet) NewConfigManagementPluginClient() (io.Closer, ConfigManagementPluginServiceClient, error) {
conn, err := NewConnection(c.address)
if err != nil {
return nil, nil, err
}
return conn, NewConfigManagementPluginServiceClient(conn), nil
}
func NewConnection(address string) (*grpc.ClientConn, error) {
retryOpts := []grpc_retry.CallOption{
grpc_retry.WithMax(3),
grpc_retry.WithBackoff(grpc_retry.BackoffLinear(1000 * time.Millisecond)),
}
unaryInterceptors := []grpc.UnaryClientInterceptor{grpc_retry.UnaryClientInterceptor(retryOpts...)}
dialOpts := []grpc.DialOption{
grpc.WithStreamInterceptor(grpc_retry.StreamClientInterceptor(retryOpts...)),
grpc.WithUnaryInterceptor(grpc_middleware.ChainUnaryClient(unaryInterceptors...)),
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxGRPCMessageSize), grpc.MaxCallSendMsgSize(MaxGRPCMessageSize)),
}
dialOpts = append(dialOpts, grpc.WithInsecure())
conn, err := grpc_util.BlockingDial(context.Background(), "unix", address, nil, dialOpts...)
if err != nil {
log.Errorf("Unable to connect to config management plugin service with address %s", address)
return nil, err
}
return conn, nil
}
// NewConfigManagementPluginClientSet creates new instance of config management plugin server Clientset
func NewConfigManagementPluginClientSet(address string) Clientset {
return &clientSet{address: address}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,91 @@
package plugin
import (
"fmt"
"strings"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/argoproj/argo-cd/v2/common"
configUtil "github.com/argoproj/argo-cd/v2/util/config"
)
const (
ConfigManagementPluginKind string = "ConfigManagementPlugin"
)
type PluginConfig struct {
metav1.TypeMeta `json:",inline"`
Metadata metav1.ObjectMeta `json:"metadata"`
Spec PluginConfigSpec `json:"spec"`
}
type PluginConfigSpec struct {
Version string `json:"version"`
Init Command `json:"init,omitempty"`
Generate Command `json:"generate"`
Discover Discover `json:"discover"`
AllowConcurrency bool `json:"allowConcurrency"`
LockRepo bool `json:"lockRepo"`
}
//Discover holds find and fileName
type Discover struct {
Find Find `json:"find"`
FileName string `json:"fileName"`
}
// Command holds binary path and arguments list
type Command struct {
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
}
// Find holds find command or glob pattern
type Find struct {
Command
Glob string `json:"glob"`
}
func ReadPluginConfig(filePath string) (*PluginConfig, error) {
path := fmt.Sprintf("%s/%s", strings.TrimRight(filePath, "/"), common.PluginConfigFileName)
var config PluginConfig
err := configUtil.UnmarshalLocalFile(path, &config)
if err != nil {
return nil, err
}
if err = ValidatePluginConfig(config); err != nil {
return nil, err
}
return &config, nil
}
func ValidatePluginConfig(config PluginConfig) error {
if config.Metadata.Name == "" {
return fmt.Errorf("invalid plugin configuration file. metadata.name should be non-empty.")
}
if config.TypeMeta.Kind != ConfigManagementPluginKind {
return fmt.Errorf("invalid plugin configuration file. kind should be %s, found %s", ConfigManagementPluginKind, config.TypeMeta.Kind)
}
if len(config.Spec.Generate.Command) == 0 {
return fmt.Errorf("invalid plugin configuration file. spec.generate command should be non-empty")
}
if config.Spec.Discover.Find.Glob == "" && len(config.Spec.Discover.Find.Command.Command) == 0 && config.Spec.Discover.FileName == "" {
return fmt.Errorf("invalid plugin configuration file. atleast one of discover.find.command or discover.find.glob or discover.fineName should be non-empty")
}
return nil
}
func (cfg *PluginConfig) Address() string {
var address string
pluginSockFilePath := common.GetPluginSockFilePath()
if cfg.Spec.Version != "" {
address = fmt.Sprintf("%s/%s-%s.sock", pluginSockFilePath, cfg.Metadata.Name, cfg.Spec.Version)
} else {
address = fmt.Sprintf("%s/%s.sock", pluginSockFilePath, cfg.Metadata.Name)
}
return address
}

223
cmpserver/plugin/plugin.go Normal file
View File

@@ -0,0 +1,223 @@
package plugin
import (
"bytes"
"context"
"errors"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/argoproj/pkg/rand"
"github.com/argoproj/argo-cd/v2/util/buffered_context"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/mattn/go-zglob"
log "github.com/sirupsen/logrus"
"github.com/argoproj/argo-cd/v2/cmpserver/apiclient"
)
// cmpTimeoutBuffer is the amount of time before the request deadline to timeout server-side work. It makes sure there's
// enough time before the client times out to send a meaningful error message.
const cmpTimeoutBuffer = 100 * time.Millisecond
// Service implements ConfigManagementPluginService interface
type Service struct {
initConstants CMPServerInitConstants
}
type CMPServerInitConstants struct {
PluginConfig PluginConfig
}
// NewService returns a new instance of the ConfigManagementPluginService
func NewService(initConstants CMPServerInitConstants) *Service {
return &Service{
initConstants: initConstants,
}
}
func runCommand(ctx context.Context, command Command, path string, env []string) (string, error) {
if len(command.Command) == 0 {
return "", fmt.Errorf("Command is empty")
}
cmd := exec.CommandContext(ctx, command.Command[0], append(command.Command[1:], command.Args...)...)
cmd.Env = env
cmd.Dir = path
execId, err := rand.RandString(5)
if err != nil {
return "", err
}
logCtx := log.WithFields(log.Fields{"execID": execId})
// log in a way we can copy-and-paste into a terminal
args := strings.Join(cmd.Args, " ")
logCtx.WithFields(log.Fields{"dir": cmd.Dir}).Info(args)
var stdout bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
// Make sure the command is killed immediately on timeout. https://stackoverflow.com/a/38133948/684776
cmd.SysProcAttr = newSysProcAttr(true)
start := time.Now()
err = cmd.Start()
if err != nil {
return "", err
}
go func() {
<-ctx.Done()
// Kill by group ID to make sure child processes are killed. The - tells `kill` that it's a group ID.
// Since we didn't set Pgid in SysProcAttr, the group ID is the same as the process ID. https://pkg.go.dev/syscall#SysProcAttr
_ = sysCallKill(-cmd.Process.Pid)
}()
err = cmd.Wait()
duration := time.Since(start)
output := stdout.String()
logCtx.WithFields(log.Fields{"duration": duration}).Debug(output)
if err != nil {
err := newCmdError(args, errors.New(err.Error()), strings.TrimSpace(stderr.String()))
logCtx.Error(err.Error())
return strings.TrimSuffix(output, "\n"), err
}
return strings.TrimSuffix(output, "\n"), nil
}
type CmdError struct {
Args string
Stderr string
Cause error
}
func (ce *CmdError) Error() string {
res := fmt.Sprintf("`%v` failed %v", ce.Args, ce.Cause)
if ce.Stderr != "" {
res = fmt.Sprintf("%s: %s", res, ce.Stderr)
}
return res
}
func newCmdError(args string, cause error, stderr string) *CmdError {
return &CmdError{Args: args, Stderr: stderr, Cause: cause}
}
// Environ returns a list of environment variables in name=value format from a list of variables
func environ(envVars []*apiclient.EnvEntry) []string {
var environ []string
for _, item := range envVars {
if item != nil && item.Name != "" && item.Value != "" {
environ = append(environ, fmt.Sprintf("%s=%s", item.Name, item.Value))
}
}
return environ
}
// GenerateManifest runs generate command from plugin config file and returns generated manifest files
func (s *Service) GenerateManifest(ctx context.Context, q *apiclient.ManifestRequest) (*apiclient.ManifestResponse, error) {
bufferedCtx, cancel := buffered_context.WithEarlierDeadline(ctx, cmpTimeoutBuffer)
defer cancel()
if deadline, ok := bufferedCtx.Deadline(); ok {
log.Infof("Generating manifests with deadline %v from now", time.Until(deadline))
} else {
log.Info("Generating manifests with no request-level timeout")
}
config := s.initConstants.PluginConfig
env := append(os.Environ(), environ(q.Env)...)
if len(config.Spec.Init.Command) > 0 {
_, err := runCommand(bufferedCtx, config.Spec.Init, q.AppPath, env)
if err != nil {
return &apiclient.ManifestResponse{}, err
}
}
out, err := runCommand(bufferedCtx, config.Spec.Generate, q.AppPath, env)
if err != nil {
return &apiclient.ManifestResponse{}, err
}
manifests, err := kube.SplitYAMLToString([]byte(out))
if err != nil {
return &apiclient.ManifestResponse{}, err
}
return &apiclient.ManifestResponse{
Manifests: manifests,
}, err
}
// MatchRepository checks whether the application repository type is supported by config management plugin server
func (s *Service) MatchRepository(ctx context.Context, q *apiclient.RepositoryRequest) (*apiclient.RepositoryResponse, error) {
bufferedCtx, cancel := buffered_context.WithEarlierDeadline(ctx, cmpTimeoutBuffer)
defer cancel()
var repoResponse apiclient.RepositoryResponse
config := s.initConstants.PluginConfig
if config.Spec.Discover.FileName != "" {
log.Debugf("config.Spec.Discover.FileName is provided")
pattern := strings.TrimSuffix(q.Path, "/") + "/" + strings.TrimPrefix(config.Spec.Discover.FileName, "/")
matches, err := filepath.Glob(pattern)
if err != nil || len(matches) == 0 {
log.Debugf("Could not find match for pattern %s. Error is %v.", pattern, err)
return &repoResponse, err
} else if len(matches) > 0 {
repoResponse.IsSupported = true
return &repoResponse, nil
}
}
if config.Spec.Discover.Find.Glob != "" {
log.Debugf("config.Spec.Discover.Find.Glob is provided")
pattern := strings.TrimSuffix(q.Path, "/") + "/" + strings.TrimPrefix(config.Spec.Discover.Find.Glob, "/")
// filepath.Glob doesn't have '**' support hence selecting third-party lib
// https://github.com/golang/go/issues/11862
matches, err := zglob.Glob(pattern)
if err != nil || len(matches) == 0 {
log.Debugf("Could not find match for pattern %s. Error is %v.", pattern, err)
return &repoResponse, err
} else if len(matches) > 0 {
repoResponse.IsSupported = true
return &repoResponse, nil
}
}
log.Debugf("Going to try runCommand.")
find, err := runCommand(bufferedCtx, config.Spec.Discover.Find.Command, q.Path, os.Environ())
if err != nil {
return &repoResponse, err
}
var isSupported bool
if find != "" {
isSupported = true
}
return &apiclient.RepositoryResponse{
IsSupported: isSupported,
}, nil
}
// GetPluginConfig returns plugin config
func (s *Service) GetPluginConfig(ctx context.Context, q *apiclient.ConfigRequest) (*apiclient.ConfigResponse, error) {
config := s.initConstants.PluginConfig
return &apiclient.ConfigResponse{
AllowConcurrency: config.Spec.AllowConcurrency,
LockRepo: config.Spec.LockRepo,
}, nil
}

View File

@@ -0,0 +1,61 @@
syntax = "proto3";
option go_package = "github.com/argoproj/argo-cd/v2/cmpserver/apiclient";
package plugin;
import "k8s.io/api/core/v1/generated.proto";
// ManifestRequest is a query for manifest generation.
message ManifestRequest {
// Name of the application for which the request is triggered
string appName = 1;
string appPath = 2;
string repoPath = 3;
bool noCache = 4;
repeated EnvEntry env = 5;
}
// EnvEntry represents an entry in the application's environment
message EnvEntry {
// Name is the name of the variable, usually expressed in uppercase
string name = 1;
// Value is the value of the variable
string value = 2;
}
message ManifestResponse {
repeated string manifests = 1;
string sourceType = 2;
}
message RepositoryRequest {
string path = 1;
repeated EnvEntry env = 2;
}
message RepositoryResponse {
bool isSupported = 1;
}
message ConfigRequest {
}
message ConfigResponse {
bool allowConcurrency = 1;
bool lockRepo = 2;
}
// ConfigManagementPlugin Service
service ConfigManagementPluginService {
// GenerateManifest generates manifest for application in specified repo name and revision
rpc GenerateManifest(ManifestRequest) returns (ManifestResponse) {
}
// MatchRepository returns whether or not the given path is supported by the plugin
rpc MatchRepository(RepositoryRequest) returns (RepositoryResponse) {
}
// Get configuration of the plugin
rpc GetPluginConfig(ConfigRequest) returns (ConfigResponse) {
}
}

View File

@@ -0,0 +1,83 @@
package plugin
import (
"context"
"os"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/argoproj/argo-cd/v2/cmpserver/apiclient"
)
func newService(configFilePath string) (*Service, error) {
config, err := ReadPluginConfig(configFilePath)
if err != nil {
return nil, err
}
initConstants := CMPServerInitConstants{
PluginConfig: *config,
}
service := &Service{
initConstants: initConstants,
}
return service, nil
}
func TestMatchRepository(t *testing.T) {
configFilePath := "./testdata/ksonnet/config"
service, err := newService(configFilePath)
require.NoError(t, err)
q := apiclient.RepositoryRequest{}
path, err := os.Getwd()
require.NoError(t, err)
q.Path = path
res1, err := service.MatchRepository(context.Background(), &q)
require.NoError(t, err)
require.True(t, res1.IsSupported)
}
func Test_Negative_ConfigFile_DoesnotExist(t *testing.T) {
configFilePath := "./testdata/kustomize-neg/config"
service, err := newService(configFilePath)
require.Error(t, err)
require.Nil(t, service)
}
func TestGenerateManifest(t *testing.T) {
configFilePath := "./testdata/kustomize/config"
service, err := newService(configFilePath)
require.NoError(t, err)
q := apiclient.ManifestRequest{}
res1, err := service.GenerateManifest(context.Background(), &q)
require.NoError(t, err)
require.NotNil(t, res1)
expectedOutput := "{\"apiVersion\":\"v1\",\"data\":{\"foo\":\"bar\"},\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"my-map\"}}"
if res1 != nil {
require.Equal(t, expectedOutput, res1.Manifests[0])
}
}
// TestRunCommandContextTimeout makes sure the command dies at timeout rather than sleeping past the timeout.
func TestRunCommandContextTimeout(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 990*time.Millisecond)
defer cancel()
// Use a subshell so there's a child command.
command := Command{
Command: []string{"sh", "-c"},
Args: []string{"sleep 5"},
}
before := time.Now()
_, err := runCommand(ctx, command, "", []string{})
after := time.Now()
assert.Error(t, err) // The command should time out, causing an error.
assert.Less(t, after.Sub(before), 1*time.Second)
}

View File

@@ -0,0 +1,16 @@
//go:build !windows
// +build !windows
package plugin
import (
"syscall"
)
func newSysProcAttr(setpgid bool) *syscall.SysProcAttr {
return &syscall.SysProcAttr{Setpgid: setpgid}
}
func sysCallKill(pid int) error {
return syscall.Kill(pid, syscall.SIGKILL)
}

View File

@@ -0,0 +1,16 @@
//go:build windows
// +build windows
package plugin
import (
"syscall"
)
func newSysProcAttr(setpgid bool) *syscall.SysProcAttr {
return &syscall.SysProcAttr{}
}
func sysCallKill(pid int) error {
return nil
}

View File

@@ -0,0 +1,15 @@
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: ksonnet
spec:
version: v1.0
init:
command: [ks, version]
generate:
command: [sh, -c, "ks show $ARGOCD_APP_ENV"]
discover:
find:
glob: "**/*/main.jsonnet"
allowConcurrency: false
lockRepo: false

View File

Some files were not shown because too many files have changed in this diff Show More