Compare commits

...

55 Commits

Author SHA1 Message Date
argo-bot
504da424c2 Bump version to 2.5.1 2022-11-01 21:01:33 +00:00
argo-bot
24cc8578fd Bump version to 2.5.1 2022-11-01 21:01:24 +00:00
argo-bot
b895da4577 Bump version to 2.5.0 2022-10-25 14:23:02 +00:00
argo-bot
5a62dbd336 Bump version to 2.5.0 2022-10-25 14:22:54 +00:00
Michael Crenshaw
c7a0978271 chore: don't generate release notes
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-25 10:22:08 -04:00
Chromo-residuum-opec
872e1f2f5a 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:11:53 -04:00
Michael Crenshaw
fe565dc2d9 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:21:13 -04:00
Michael Crenshaw
1b65c3f330 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:20:32 -04:00
Alex Eftimie
fdd2e982c5 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:18:35 -04:00
Allex
49235d5525 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:24 -04:00
Michael Crenshaw
0cf224c958 chore: upgrade actions/checkout to v3, i.e. Node.js 16 (#10947)
* chore: updgrade actions/checkout to v3, i.e. Node.js 16

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

* more node 12

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

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-19 10:32:33 -04:00
34FathomBelow
664224fe14 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:41 -04:00
Jessie Teng
351cab4c2a fix: Resource list in sync page msg style#10887 (#10970)
* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Resource list in sync page msg style#10887

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>
2022-10-18 14:01:44 -04:00
argo-bot
c615c8a56d Bump version to 2.5.0-rc3 2022-10-17 17:34:56 +00:00
argo-bot
048275cb93 Bump version to 2.5.0-rc3 2022-10-17 17:34:48 +00:00
34FathomBelow
df8f70aac8 chore: sign checksums file for release binaries (#10963)
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-17 13:03:50 -04:00
Michael Crenshaw
40ce041aa7 fix: upgrade Helm to avoid disk use issue (#8773) (#10937)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-17 12:44:36 -04:00
34FathomBelow
68df7d8dda 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 12:37:44 -04:00
Michael Crenshaw
d9004fc748 chore: upgrade dex to v2.35.3 to avoid CVE-2022-27665 (#10939)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-17 12:30:27 -04:00
34FathomBelow
84680ba0ff docs: release signature verification (#10967)
* chore: release signature documentation

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

* fixed typos

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

* fixed requested changes

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

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
2022-10-17 11:49:00 -04:00
Aiman Fatima
9f5111d474 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:24 -04:00
Chris Davis
cd3ce58df4 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:53:54 -07:00
Mayursinh Sarvaiya
39f9565e34 feat(ui): notification subscriptions edit field #10310 (#10839)
* feat(ui): notification subscriptions edit field

> this new field is just an abstraction of relevant annotations

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>

* fix: codeql regex issue

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>

Signed-off-by: Mayursinh Sarvaiya <marvinduff97@gmail.com>
2022-10-14 13:07:33 -07:00
Alexander Matyushentsev
2d9f13d0bb fix: Resource list loading slowly due to Sync Wave sorting (#10932)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2022-10-13 17:49:15 -07:00
Michael Crenshaw
b735c00761 docs: appset PR generator docs fixes (#10567)
* docs: appset PR generator docs fixes

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

* oh, that field is actually a thing

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

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 11:30:41 -04:00
Michael Crenshaw
aae9a24cbd docs: add link to 2.4-2.5 upgrade guide (#10808)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 11:29:41 -04:00
Michael Crenshaw
dde489db1c docs: more docs for directory apps (#10879)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-12 11:19:28 -04:00
Michael Crenshaw
d0b20b06dc 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:00 -04:00
karengineering
2ccb96086f fix: add applicationsets to RBAC policy (#10810) (#10891)
Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>

Signed-off-by: Karengineering <49111213+karengineering@users.noreply.github.com>
2022-10-11 17:01:13 -04:00
argo-bot
ba4c562508 Bump version to 2.5.0-rc2 2022-10-11 19:01:45 +00:00
argo-bot
701b3403c5 Bump version to 2.5.0-rc2 2022-10-11 19:01:38 +00:00
Michael Crenshaw
f927aaeddd chore: add script to generate release notes (#10806)
* chore: add script to generate release notes

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

* newlines look bad in the release markdown rendering on GitHub

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

* use diff instead of comp

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

* use auto-generated docs

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

* pre-pended, not appended

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

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-11 14:54:49 -04:00
Mayursinh Sarvaiya
e0ffec8a63 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:29 -04:00
Nir Shtein
a04d634fba 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:03 -04:00
Sakshi Jain
0b076c13a0 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:23 -04:00
Michael Crenshaw
d33981ffa2 docs: more versioned docs fixes (#10342)
* docs: remove more version notes - rely on docs versioning

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

* missed some things

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

Signed-off-by: CI <michael@crenshaw.dev>
2022-10-08 15:09:07 -04:00
toyamagu
2b62aa7d92 docs: fix examples for ArgoCD ApplicationSet Git Generator (#10857)
* Doc: ArgoCD ApplicationSet Git directory

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

* Docs: use "my-project" rather than default project

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

Signed-off-by: toyamagu <toyamagu2021@gmail.com>
2022-10-08 14:44:55 -04:00
Michael Crenshaw
dfbcf757b9 fix: duplicate source namespace validation (#10853)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-10-08 14:31:47 -04:00
Michael Crenshaw
d5feafc654 docs: remove unused plugin config fields (#10304)
* docs: remove unused plugin config fields

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

* fix codegen

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

Signed-off-by: CI <michael@crenshaw.dev>
2022-10-07 19:44:15 -04:00
Tsubasa Nagasawa
f47a5f90c2 fix: applicationset controller should respect logging flags (#10513)
* Align logging setup with other controllers

Signed-off-by: toVersus <toversus2357@gmail.com>

Signed-off-by: toVersus <toversus2357@gmail.com>
2022-10-07 17:34:35 -04:00
Thijs van Tol
faa01bb6f9 fix: show revision in badge when param is true (#10545)
* fix: show revision in badge when param is true

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* Update badge.go

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* Update badge.go

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* pr feedback

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
2022-10-07 17:13:38 -04:00
Matt Morrison
1e1a744604 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:37:37 -04:00
Minchao
aca9ed2030 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:33 -04:00
Lars Kellogg-Stedman
b83554fca8 docs: Correct grammar issues in docs on manifest path annotations (#10776)
The "Webhook and Manifest Paths Annotation" section of the documentation
contained a number of grammar and spelling issues as well as what appeared
to be some unintentionally pasted text.

This commit attempts to address these issues.

Signed-off-by: Lars Kellogg-Stedman <lars@oddbit.com>

Signed-off-by: Lars Kellogg-Stedman <lars@oddbit.com>
2022-10-07 15:33:50 -04:00
Denis Krivenko
3275337a26 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:59 -04:00
Eddie Knight
89b6fe01a6 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:41:59 -04:00
jannfis
1fe1a0060b fix: Unbreak app refresh from panel list (#10825)
Signed-off-by: jannfis <jann@mistrust.net>

Signed-off-by: jannfis <jann@mistrust.net>
2022-10-07 11:53:07 -04:00
Richard Jennings
de72cb1686 fix: add applicationset to crds generated by gen-crd-spec (#10833)
* add applicationset to crds generated

Signed-off-by: Richard Jennings <richardjennings@gmail.com>

* update applicationset crd

Signed-off-by: Richard Jennings <richardjennings@gmail.com>

* remove description from applicationset crd

Signed-off-by: Richard Jennings <richardjennings@gmail.com>

Signed-off-by: Richard Jennings <richardjennings@gmail.com>
2022-10-07 10:52:38 -04:00
Leonardo Luz Almeida
2e24cdc7ea docs: Add example about how to patch with SSA syncs (#10829)
* docs: Add example about how to patch with SSA syncs

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

* docs: minor fixes

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

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-10-06 15:43:49 -04:00
jannfis
ebf367497b 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:18 -04:00
rumstead
277c6adaf1 docs: Update link to resource customizations (#10827) (#10828)
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
2022-10-06 12:04:21 -04:00
Abhishek Veeramalla
20ce840a2d chore: update Server-Side Apply docs for patching of existing rresources (#10822)
Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
2022-10-06 11:17:28 -04:00
Remington Breeze
20776419d8 fix: Add filter icon to help users find filters (#10809)
* fix: add clear indicator that filters are now in sidebar

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

* address code review

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

Signed-off-by: Remington Breeze <remington@breeze.software>
2022-10-05 16:52:17 -07:00
argo-bot
2bf51f401d Bump version to 2.5.0-rc1 2022-10-05 16:59:55 +00:00
argo-bot
6a4468ce6b Bump version to 2.5.0-rc1 2022-10-05 16:59:47 +00:00
110 changed files with 1803 additions and 1755 deletions

View File

@@ -18,15 +18,18 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check-go:
name: Ensure Go modules synchronicity
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Download all Go modules
@@ -42,9 +45,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Restore go build cache
@@ -59,13 +62,16 @@ 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-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Run golangci-lint
@@ -86,11 +92,11 @@ jobs:
- name: Create checkout directory
run: mkdir -p ~/go/src/github.com/argoproj
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- 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@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
@@ -149,11 +155,11 @@ jobs:
- name: Create checkout directory
run: mkdir -p ~/go/src/github.com/argoproj
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- 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@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
@@ -200,9 +206,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Create symlink in GOPATH
@@ -244,7 +250,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
@@ -281,7 +287,7 @@ jobs:
sonar_secret: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Restore node dependency cache
@@ -360,9 +366,9 @@ jobs:
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: GH actions workaround - Kill XSP4 process
@@ -406,7 +412,7 @@ jobs:
git config --global user.email "john.doe@example.com"
- name: Pull Docker image required for tests
run: |
docker pull ghcr.io/dexidp/dex:v2.35.1-distroless
docker pull ghcr.io/dexidp/dex:v2.35.3-distroless
docker pull argoproj/argo-cd-ci-builder:v1.0.0
docker pull redis:7.0.5-alpine
- name: Create target directory for binaries in the build-process

View File

@@ -13,8 +13,15 @@ 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
@@ -22,7 +29,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -16,14 +16,19 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
publish:
permissions:
contents: write # for git to push upgrade commit if not already deployed
if: github.repository == 'argoproj/argo-cd'
runs-on: ubuntu-22.04
env:
GOPATH: /home/runner/work/argo-cd/argo-cd
steps:
- uses: actions/setup-go@v1
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- uses: actions/checkout@master
@@ -47,8 +52,8 @@ jobs:
DOCKER_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
# build
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- run: |
IMAGE_PLATFORMS=linux/amd64
if [[ "${{ github.event_name }}" == "push" || "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]
@@ -61,6 +66,22 @@ jobs:
-t quay.io/argoproj/argocd:latest .
working-directory: ./src/github.com/argoproj/argo-cd
# sign container images
- name: Install cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.13.0'
- name: Sign Argo CD latest image
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY quay.io/argoproj/argocd:latest
# 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'

View File

@@ -14,8 +14,13 @@ on:
env:
GOLANG_VERSION: '1.18'
permissions:
contents: read
jobs:
prepare-release:
permissions:
contents: write # To push changes to release branch
name: Perform automatic release on trigger ${{ github.ref }}
if: github.repository == 'argoproj/argo-cd'
runs-on: ubuntu-22.04
@@ -38,7 +43,7 @@ jobs:
GIT_EMAIL: argoproj@gmail.com
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@@ -142,7 +147,7 @@ jobs:
echo "RELEASE_NOTES=${RELEASE_NOTES}" >> $GITHUB_ENV
- name: Setup Golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
@@ -195,8 +200,8 @@ jobs:
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
if: ${{ env.DRY_RUN != 'true' }}
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Build and push Docker image for release
run: |
set -ue
@@ -209,6 +214,22 @@ jobs:
./dist/argocd-linux-amd64 version --client
if: ${{ env.DRY_RUN != 'true' }}
- name: Install cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.13.0'
- name: Sign Argo CD container images and assets
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
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
@@ -265,6 +286,14 @@ jobs:
cd /tmp && tar -zcf sbom.tar.gz *.spdx
if: ${{ env.DRY_RUN != 'true' }}
- name: Sign sbom
run: |
cosign sign-blob --key env://COSIGN_PRIVATE_KEY /tmp/sbom.tar.gz > /tmp/sbom.tar.gz.sig
env:
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
if: ${{ env.DRY_RUN != 'true' }}
- name: Create GitHub release
uses: softprops/action-gh-release@v1
env:
@@ -274,10 +303,11 @@ jobs:
tag_name: ${{ env.RELEASE_TAG }}
draft: ${{ env.DRAFT_RELEASE }}
prerelease: ${{ env.PRE_RELEASE }}
body: ${{ steps.release-notes.outputs.content }}
body: ${{ steps.release-notes.outputs.content }} # Pre-pended to the generated notes
files: |
dist/argocd-*
/tmp/sbom.tar.gz
/tmp/sbom.tar.gz.sig
if: ${{ env.DRY_RUN != 'true' }}
- name: Update homebrew formula

View File

@@ -2,14 +2,20 @@ name: Snyk report update
on:
schedule:
- cron: '0 0 * * 0' # midnight every Sunday
permissions:
contents: read
jobs:
snyk-report:
permissions:
contents: write # To push snyk reports
if: github.repository == 'argoproj/argo-cd'
name: Update Snyk report in the docs directory
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build reports

View File

@@ -576,7 +576,7 @@ applicationset-controller:
.PHONY: checksums
checksums:
for f in ./dist/$(BIN_NAME)-*; do openssl dgst -sha256 "$$f" | awk ' { print $$2 }' > "$$f".sha256 ; done
sha256sum ./dist/$(BIN_NAME)-* | awk -F './dist/' '{print $$1 $$2}' > ./dist/$(BIN_NAME)-$(TARGET_VERSION)-checksums.txt
.PHONY: snyk-container-tests
snyk-container-tests:

View File

@@ -1 +1 @@
2.5.0
2.5.1

View File

@@ -19,7 +19,6 @@ import (
"fmt"
"time"
"github.com/go-logr/logr"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
apierr "k8s.io/apimachinery/pkg/api/errors"
@@ -62,7 +61,6 @@ var (
// ApplicationSetReconciler reconciles a ApplicationSet object
type ApplicationSetReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
Generators map[string]generators.Generator
@@ -77,15 +75,14 @@ type ApplicationSetReconciler struct {
// +kubebuilder:rbac:groups=argoproj.io,resources=applicationsets/status,verbs=get;update;patch
func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = r.Log.WithValues("applicationset", req.NamespacedName)
_ = log.WithField("applicationset", req.NamespacedName)
logCtx := log.WithField("applicationset", req.NamespacedName)
var applicationSetInfo argov1alpha1.ApplicationSet
parametersGenerated := false
if err := r.Get(ctx, req.NamespacedName, &applicationSetInfo); err != nil {
if client.IgnoreNotFound(err) != nil {
log.WithError(err).Infof("unable to get ApplicationSet: '%v' ", err)
logCtx.WithError(err).Infof("unable to get ApplicationSet: '%v' ", err)
}
return ctrl.Result{}, client.IgnoreNotFound(err)
}
@@ -123,7 +120,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
//
// Changes to watched resources will cause this to be reconciled sooner than
// the RequeueAfter time.
log.Errorf("error occurred during application validation: %s", err.Error())
logCtx.Errorf("error occurred during application validation: %s", err.Error())
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
@@ -148,7 +145,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
var message string
for _, v := range validateErrors {
message = v.Error()
log.Errorf("validation error found during application validation: %s", message)
logCtx.Errorf("validation error found during application validation: %s", message)
}
if len(validateErrors) > 1 {
// Only the last message gets added to the appset status, to keep the size reasonable.
@@ -215,7 +212,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
delete(applicationSetInfo.Annotations, common.AnnotationApplicationSetRefresh)
err := r.Client.Update(ctx, &applicationSetInfo)
if err != nil {
log.Warnf("error occurred while updating ApplicationSet: %v", err)
logCtx.Warnf("error occurred while updating ApplicationSet: %v", err)
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argov1alpha1.ApplicationSetCondition{
@@ -230,7 +227,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
}
requeueAfter := r.getMinRequeueAfter(&applicationSetInfo)
log.WithField("requeueAfter", requeueAfter).Info("end reconcile")
logCtx.WithField("requeueAfter", requeueAfter).Info("end reconcile")
if len(validateErrors) == 0 {
if err := r.setApplicationSetStatusCondition(ctx,

View File

@@ -1832,7 +1832,6 @@ func TestReconcilerValidationErrorBehaviour(t *testing.T) {
}}, nil)
r := ApplicationSetReconciler{
Log: ctrl.Log.WithName("controllers").WithName("ApplicationSet"),
Client: client,
Scheme: scheme,
Renderer: &utils.Render{},
@@ -1908,7 +1907,6 @@ func TestSetApplicationSetStatusCondition(t *testing.T) {
client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(&appSet).Build()
r := ApplicationSetReconciler{
Log: ctrl.Log.WithName("controllers").WithName("ApplicationSet"),
Client: client,
Scheme: scheme,
Renderer: &utils.Render{},

View File

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

View File

@@ -1,417 +0,0 @@
# This is an auto-generated file. DO NOT EDIT
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusterworkflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: ClusterWorkflowTemplate
listKind: ClusterWorkflowTemplateList
plural: clusterworkflowtemplates
shortNames:
- clusterwftmpl
- cwft
singular: clusterworkflowtemplate
scope: Cluster
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cronworkflows.argoproj.io
spec:
group: argoproj.io
names:
kind: CronWorkflow
listKind: CronWorkflowList
plural: cronworkflows
shortNames:
- cwf
- cronwf
singular: cronworkflow
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workfloweventbindings.argoproj.io
spec:
group: argoproj.io
names:
kind: WorkflowEventBinding
listKind: WorkflowEventBindingList
plural: workfloweventbindings
shortNames:
- wfeb
singular: workfloweventbinding
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workflows.argoproj.io
spec:
additionalPrinterColumns:
- JSONPath: .status.phase
description: Status of the workflow
name: Status
type: string
- JSONPath: .status.startedAt
description: When the workflow was started
format: date-time
name: Age
type: date
group: argoproj.io
names:
kind: Workflow
listKind: WorkflowList
plural: workflows
shortNames:
- wf
singular: workflow
scope: Namespaced
subresources: {}
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: WorkflowTemplate
listKind: WorkflowTemplateList
plural: workflowtemplates
shortNames:
- wftmpl
singular: workflowtemplate
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-server
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-role
rules:
- apiGroups:
- ""
resources:
- pods
- pods/exec
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- create
- apiGroups:
- argoproj.io
resources:
- workflowtemplates
- workflowtemplates/finalizers
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- argoproj.io
resources:
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-server-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- create
- apiGroups:
- ""
resources:
- pods
- pods/exec
- pods/log
verbs:
- get
- list
- watch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- watch
- create
- patch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- argoproj.io
resources:
- workflows
- workfloweventbindings
- workflowtemplates
- cronworkflows
- cronworkflows/finalizers
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-role
subjects:
- kind: ServiceAccount
name: argo
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-server-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-server-role
subjects:
- kind: ServiceAccount
name: argo-server
---
apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-controller-configmap
---
apiVersion: v1
kind: Service
metadata:
name: argo-server
spec:
ports:
- name: web
port: 2746
targetPort: 2746
selector:
app: argo-server
---
apiVersion: v1
kind: Service
metadata:
name: workflow-controller-metrics
spec:
ports:
- name: metrics
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: workflow-controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-server
spec:
selector:
matchLabels:
app: argo-server
template:
metadata:
labels:
app: argo-server
spec:
containers:
- args:
- server
- --namespaced
image: argoproj/argocli:v2.12.5
name: argo-server
ports:
- containerPort: 2746
name: web
readinessProbe:
httpGet:
path: /
port: 2746
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 20
volumeMounts:
- mountPath: /tmp
name: tmp
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo-server
volumes:
- emptyDir: {}
name: tmp
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
spec:
selector:
matchLabels:
app: workflow-controller
template:
metadata:
labels:
app: workflow-controller
spec:
containers:
- args:
- --configmap
- workflow-controller-configmap
- --executor-image
- argoproj/argoexec:v2.12.5
- --namespaced
command:
- workflow-controller
image: argoproj/workflow-controller:v2.12.5
livenessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 30
periodSeconds: 30
name: workflow-controller
ports:
- containerPort: 9090
name: metrics
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo

View File

@@ -11,4 +11,4 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "1.0"
appVersion: "1.0"

View File

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

View File

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

View File

@@ -1,417 +0,0 @@
# This is an auto-generated file. DO NOT EDIT
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusterworkflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: ClusterWorkflowTemplate
listKind: ClusterWorkflowTemplateList
plural: clusterworkflowtemplates
shortNames:
- clusterwftmpl
- cwft
singular: clusterworkflowtemplate
scope: Cluster
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cronworkflows.argoproj.io
spec:
group: argoproj.io
names:
kind: CronWorkflow
listKind: CronWorkflowList
plural: cronworkflows
shortNames:
- cwf
- cronwf
singular: cronworkflow
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workfloweventbindings.argoproj.io
spec:
group: argoproj.io
names:
kind: WorkflowEventBinding
listKind: WorkflowEventBindingList
plural: workfloweventbindings
shortNames:
- wfeb
singular: workfloweventbinding
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workflows.argoproj.io
spec:
additionalPrinterColumns:
- JSONPath: .status.phase
description: Status of the workflow
name: Status
type: string
- JSONPath: .status.startedAt
description: When the workflow was started
format: date-time
name: Age
type: date
group: argoproj.io
names:
kind: Workflow
listKind: WorkflowList
plural: workflows
shortNames:
- wf
singular: workflow
scope: Namespaced
subresources: {}
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: workflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: WorkflowTemplate
listKind: WorkflowTemplateList
plural: workflowtemplates
shortNames:
- wftmpl
singular: workflowtemplate
scope: Namespaced
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-server
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-role
rules:
- apiGroups:
- ""
resources:
- pods
- pods/exec
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- apiGroups:
- argoproj.io
resources:
- workflows
- workflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- create
- apiGroups:
- argoproj.io
resources:
- workflowtemplates
- workflowtemplates/finalizers
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- argoproj.io
resources:
- cronworkflows
- cronworkflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: argo-server-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- create
- apiGroups:
- ""
resources:
- pods
- pods/exec
- pods/log
verbs:
- get
- list
- watch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- watch
- create
- patch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- list
- apiGroups:
- argoproj.io
resources:
- workflows
- workfloweventbindings
- workflowtemplates
- cronworkflows
- cronworkflows/finalizers
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-role
subjects:
- kind: ServiceAccount
name: argo
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: argo-server-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argo-server-role
subjects:
- kind: ServiceAccount
name: argo-server
---
apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-controller-configmap
---
apiVersion: v1
kind: Service
metadata:
name: argo-server
spec:
ports:
- name: web
port: 2746
targetPort: 2746
selector:
app: argo-server
---
apiVersion: v1
kind: Service
metadata:
name: workflow-controller-metrics
spec:
ports:
- name: metrics
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: workflow-controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argo-server
spec:
selector:
matchLabels:
app: argo-server
template:
metadata:
labels:
app: argo-server
spec:
containers:
- args:
- server
- --namespaced
image: argoproj/argocli:v2.12.5
name: argo-server
ports:
- containerPort: 2746
name: web
readinessProbe:
httpGet:
path: /
port: 2746
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 20
volumeMounts:
- mountPath: /tmp
name: tmp
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo-server
volumes:
- emptyDir: {}
name: tmp
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: workflow-controller
spec:
selector:
matchLabels:
app: workflow-controller
template:
metadata:
labels:
app: workflow-controller
spec:
containers:
- args:
- --configmap
- workflow-controller-configmap
- --executor-image
- argoproj/argoexec:v2.12.5
- --namespaced
command:
- workflow-controller
image: argoproj/workflow-controller:v2.12.5
livenessProbe:
httpGet:
path: /metrics
port: metrics
initialDelaySeconds: 30
periodSeconds: 30
name: workflow-controller
ports:
- containerPort: 9090
name: metrics
nodeSelector:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
serviceAccountName: argo

View File

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

View File

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

View File

@@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
revision: HEAD
directories:
- path: applicationset/examples/git-generator-directory/excludes/cluster-addons/*
- exclude: true
path: applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook
template:
metadata:
name: '{{path.basename}}'
spec:
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -2,7 +2,9 @@ apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
namespace: argocd
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/argoproj/argo-cd.git
@@ -15,7 +17,7 @@ spec:
metadata:
name: '{{.path.basename}}'
spec:
project: default
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
@@ -23,3 +25,6 @@ spec:
destination:
server: https://kubernetes.default.svc
namespace: '{{.path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -2,6 +2,7 @@ apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
namespace: argocd
spec:
generators:
- git:
@@ -13,7 +14,7 @@ spec:
metadata:
name: '{{path.basename}}'
spec:
project: default
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
@@ -21,3 +22,6 @@ spec:
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

View File

@@ -2,6 +2,7 @@ apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-addons
namespace: argocd
spec:
goTemplate: true
generators:
@@ -14,7 +15,7 @@ spec:
metadata:
name: '{{.path.basename}}'
spec:
project: default
project: "my-project"
source:
repoURL: https://github.com/argoproj/argo-cd.git
targetRevision: HEAD
@@ -22,3 +23,6 @@ spec:
destination:
server: https://kubernetes.default.svc
namespace: '{{.path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true

4
argocd-cosign.pub Normal file
View File

@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEesHEB7vX5Y2RxXypjMy1nI1z7iRG
JI9/gt/sYqzpsa65aaNP4npM43DDxoIy/MQBo9s/mxGxmA+8UXeDpVC9vw==
-----END PUBLIC KEY-----

View File

@@ -21,6 +21,10 @@ p, role:admin, applications, delete, */*, allow
p, role:admin, applications, sync, */*, allow
p, role:admin, applications, override, */*, allow
p, role:admin, applications, action/*, */*, allow
p, role:admin, applicationsets, get, */*, allow
p, role:admin, applicationsets, create, */*, allow
p, role:admin, applicationsets, update, */*, allow
p, role:admin, applicationsets, delete, */*, allow
p, role:admin, certificates, create, *, allow
p, role:admin, certificates, update, *, allow
p, role:admin, certificates, delete, *, allow
@@ -39,4 +43,4 @@ p, role:admin, gpgkeys, delete, *, allow
p, role:admin, exec, create, */*, allow
g, role:admin, role:readonly
g, admin, role:admin
g, admin, role:admin
1 # Built-in policy which defines two roles: role:readonly and role:admin,
21 p, role:admin, applications, action/*, */*, allow
22 p, role:admin, certificates, create, *, allow p, role:admin, applicationsets, get, */*, allow
23 p, role:admin, certificates, update, *, allow p, role:admin, applicationsets, create, */*, allow
24 p, role:admin, applicationsets, update, */*, allow
25 p, role:admin, applicationsets, delete, */*, allow
26 p, role:admin, certificates, create, *, allow
27 p, role:admin, certificates, update, *, allow
28 p, role:admin, certificates, delete, *, allow
29 p, role:admin, clusters, create, *, allow
30 p, role:admin, clusters, update, *, allow
43 g, admin, role:admin
44
45
46

View File

@@ -7423,6 +7423,10 @@
"status": {
"type": "string"
},
"syncWave": {
"type": "string",
"format": "int64"
},
"version": {
"type": "string"
}

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"net/http"
"os"
"strings"
"time"
"github.com/argoproj/pkg/stats"
@@ -16,6 +15,7 @@ import (
"github.com/argoproj/argo-cd/v2/applicationset/generators"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
"github.com/argoproj/argo-cd/v2/applicationset/webhook"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/reposerver/askpass"
"github.com/argoproj/argo-cd/v2/util/env"
@@ -56,8 +56,6 @@ func NewCommand() *cobra.Command {
policy string
debugLog bool
dryRun bool
logFormat string
logLevel string
)
scheme := runtime.NewScheme()
_ = clientgoscheme.AddToScheme(scheme)
@@ -79,6 +77,9 @@ func NewCommand() *cobra.Command {
},
)
cli.SetLogFormat(cmdutil.LogFormat)
cli.SetLogLevel(cmdutil.LogLevel)
restConfig, err := clientConfig.ClientConfig()
if err != nil {
return err
@@ -86,21 +87,6 @@ func NewCommand() *cobra.Command {
restConfig.UserAgent = fmt.Sprintf("argocd-applicationset-controller/%s (%s)", vers.Version, vers.Platform)
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)
}
policyObj, exists := utils.Policies[policy]
if !exists {
log.Info("Policy value can be: sync, create-only, create-update")
@@ -184,7 +170,6 @@ func NewCommand() *cobra.Command {
if err = (&controllers.ApplicationSetReconciler{
Generators: topLevelGenerators,
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controllers").WithName("ApplicationSet"),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("applicationset-controller"),
Renderer: &utils.Render{},
@@ -217,9 +202,9 @@ func NewCommand() *cobra.Command {
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", "argocd-repo-server:8081", "Argo CD repo server address")
command.Flags().StringVar(&policy, "policy", "sync", "Modify how application is synced between the generator and the cluster. Default is 'sync' (create & update & delete), options: 'create-only', 'create-update' (no deletion)")
command.Flags().BoolVar(&debugLog, "debug", false, "Print debug logs. Takes precedence over loglevel")
command.Flags().StringVar(&logLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
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(&dryRun, "dry-run", false, "Enable dry run mode")
command.Flags().StringVar(&logFormat, "logformat", "text", "Set the logging format. One of: text|json")
return &command
}

View File

@@ -25,8 +25,6 @@ type PluginConfigSpec struct {
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

View File

@@ -11,5 +11,3 @@ spec:
discover:
find:
glob: "**/*/main.jsonnet"
allowConcurrency: false
lockRepo: false

View File

@@ -12,5 +12,3 @@ spec:
find:
command: [sh, -c, find . -name kustomization.yaml]
glob: "**/*/kustomization.yaml"
allowConcurrency: true
lockRepo: false

View File

@@ -12,5 +12,3 @@ spec:
find:
command: [sh, -c, find . -name kustomization.yaml]
glob: "**/*/kustomization.yaml"
allowConcurrency: true
lockRepo: false

View File

@@ -14,6 +14,7 @@ import (
hookutil "github.com/argoproj/gitops-engine/pkg/sync/hook"
"github.com/argoproj/gitops-engine/pkg/sync/ignore"
resourceutil "github.com/argoproj/gitops-engine/pkg/sync/resource"
"github.com/argoproj/gitops-engine/pkg/sync/syncwaves"
kubeutil "github.com/argoproj/gitops-engine/pkg/utils/kube"
log "github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -524,6 +525,9 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *ap
Hook: hookutil.IsHook(obj),
RequiresPruning: targetObj == nil && liveObj != nil && isSelfReferencedObj,
}
if targetObj != nil {
resState.SyncWave = int64(syncwaves.Wave(targetObj))
}
var diffResult diff.DiffResult
if i < len(diffResults.Diffs) {

View File

@@ -11,15 +11,6 @@ $ curl $ARGOCD_SERVER/api/v1/session -d $'{"username":"admin","password":"passwo
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1Njc4MTIzODcsImlzcyI6ImFyZ29jZCIsIm5iZiI6MTU2NzgxMjM4Nywic3ViIjoiYWRtaW4ifQ.ejyTgFxLhuY9mOBtKhcnvobg3QZXJ4_RusN_KIdVwao"}
```
> <=v1.2
Then pass using the HTTP `SetCookie` header, prefixing with `argocd.token`:
```bash
$ curl $ARGOCD_SERVER/api/v1/applications --cookie "argocd.token=$ARGOCD_TOKEN"
{"metadata":{"selfLink":"/apis/argoproj.io/v1alpha1/namespaces/argocd/applications","resourceVersion":"37755"},"items":...}
```
Then pass using the HTTP `Authorization` header, prefixing with `Bearer `:
```bash

View File

@@ -81,11 +81,6 @@ might decide to refresh `stable` repo. As workaround override
```yaml
data:
# v1.2 or earlier use `helm.repositories`
helm.repositories: |
- url: http://<internal-helm-repo-host>:8080
name: stable
# v1.3 or later use `repositories` with `type: helm`
repositories: |
- type: helm
url: http://<internal-helm-repo-host>:8080

View File

@@ -99,10 +99,12 @@ spec:
value: bar
# Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during
# manifest generation. This takes precedence over the `include` field.
exclude: string
# To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{config.yaml,env-use2/*}'
exclude: 'config.yaml'
# Include contains a glob pattern to match paths against that should be explicitly included during manifest
# generation. If this field is set, only matching manifests will be included.
include: string
# To match multiple patterns, wrap the patterns in {} and separate them with commas. For example: '{*.yml,*.yaml}'
include: '*.yaml'
# plugin specific config
plugin:

View File

@@ -45,7 +45,7 @@ spec:
- path: applicationset/examples/git-generator-directory/cluster-addons/*
template:
metadata:
name: '{{path[0]}}'
name: '{{path.basename}}'
spec:
project: "my-project"
source:
@@ -55,6 +55,9 @@ spec:
destination:
server: https://kubernetes.default.svc
namespace: '{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
```
(*The full example can be found [here](https://github.com/argoproj/argo-cd/tree/master/applicationset/examples/git-generator-directory).*)

View File

@@ -10,6 +10,8 @@ metadata:
spec:
generators:
- pullRequest:
# When using a Pull Request generator, the ApplicationSet controller polls every `requeueAfterSeconds` interval (defaulting to every 30 minutes) to detect changes.
requeueAfterSeconds: 1800
# See below for provider specific options.
github:
# ...
@@ -181,7 +183,7 @@ If you want to access a private repository, you must also provide the credential
## Filters
Filters allow selecting which pull requests to generate for. Each filter can declare one or more conditions, all of which must pass. If multiple filters are present, any can match for a repository to be included. If no filters are specified, all pull requests will be processed.
Currently, only a subset of filters is available when comparing with SCM provider filters.
Currently, only a subset of filters is available when comparing with [SCM provider](Generators-SCM-Provider.md) filters.
```yaml
apiVersion: argoproj.io/v1alpha1
@@ -190,7 +192,7 @@ metadata:
name: myapps
spec:
generators:
- scmProvider:
- pullRequest:
# ...
# Include any pull request ending with "argocd". (optional)
filters:
@@ -201,6 +203,7 @@ spec:
* `branchMatch`: A regexp matched against source branch names.
[GitHub](#github) and [GitLab](#gitlab) also support a `labels` filter.
## Template

View File

@@ -61,7 +61,7 @@ number of allowed concurrent kubectl fork/execs.
* The controller uses Kubernetes watch APIs to maintain lightweight Kubernetes cluster cache. This allows to avoid querying Kubernetes during app reconciliation and significantly improve
performance. For performance reasons controller monitors and caches only preferred the version of a resource. During reconciliation, the controller might have to convert cached resource from
preferred version into a version of the resource stored in Git. If `kubectl convert` fails because conversion is not supported then controller falls back to Kubernetes API query which slows down
reconciliation. In this case advice user-preferred resource version in Git.
reconciliation. In this case, we advise you to use the preferred resource version in Git.
* The controller polls Git every 3m by default. You can increase this duration using `timeout.reconciliation` setting in the `argocd-cm` ConfigMap. The value of `timeout.reconciliation` is a duration string e.g `60s`, `1m`, `1h` or `1d`.
@@ -126,20 +126,17 @@ If the manifest generation has no side effects then requests are processed in pa
### Webhook and Manifest Paths Annotation
Argo CD aggressively caches generated manifests and uses repository commit SHA as a cache key. A new commit to the Git repository invalidates cache for all applications configured in the repository
that again negatively affect mono repositories with multiple applications. You might use [webhooks](https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/webhook.md) and `argocd.argoproj.io/manifest-generate-paths` Application
CRD annotation to solve this problem and improve performance.
Argo CD aggressively caches generated manifests and uses the repository commit SHA as a cache key. A new commit to the Git repository invalidates the cache for all applications configured in the repository.
This can negatively affect repositories with multiple applications. You can use [webhooks](https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/webhook.md) and the `argocd.argoproj.io/manifest-generate-paths` Application CRD annotation to solve this problem and improve performance.
The `argocd.argoproj.io/manifest-generate-paths` contains a semicolon-separated list of paths within the Git repository that are used during manifest generation. The webhook compares paths specified in the annotation
with the changed files specified in the webhook payload. If non of the changed files are located in the paths then webhook don't trigger application reconciliation and re-uses previously generated manifests cache for a new commit.
The `argocd.argoproj.io/manifest-generate-paths` annotation contains a semicolon-separated list of paths within the Git repository that are used during manifest generation. The webhook compares paths specified in the annotation with the changed files specified in the webhook payload. If no modified files match the paths specified in `argocd.argoproj.io/manifest-generate-paths`, then the webhook will not trigger application reconciliation and the existing cache will be considered valid for the new commit.
Installations that use a different repo for each app are **not** subject to this behavior and will likely get no benefit from using these annotations.
Installations that use a different repository for each application are **not** subject to this behavior and will likely get no benefit from using these annotations.
!!! note
Application manifest paths annotation support depends on the git provider used for the Application. It is currently only supported for GitHub, GitLab, and Gogs based repos
I'm using `.Second()` modifier to avoid distracting users who already rely on `--app-resync` flag.
Application manifest paths annotation support depends on the git provider used for the Application. It is currently only supported for GitHub, GitLab, and Gogs based repos.
* **Relative path** The annotation might contains relative path. In this case the path is considered relative to the path specified in the application source:
* **Relative path** The annotation might contain a relative path. In this case the path is considered relative to the path specified in the application source:
```yaml
apiVersion: argoproj.io/v1alpha1
@@ -157,7 +154,8 @@ spec:
path: guestbook
# ...
```
* **Absolute path** The annotation value might be an absolute path started from '/'. In this case path is considered as an absolute path within the Git repository:
* **Absolute path** The annotation value might be an absolute path starting with '/'. In this case path is considered as an absolute path within the Git repository:
```yaml
apiVersion: argoproj.io/v1alpha1

View File

@@ -9,7 +9,7 @@ Metrics about applications. Scraped at the `argocd-metrics:8082/metrics` endpoin
|--------|:----:|-------------|
| `argocd_app_info` | gauge | Information about Applications. It contains labels such as `sync_status` and `health_status` that reflect the application state in ArgoCD. |
| `argocd_app_k8s_request_total` | counter | Number of kubernetes requests executed during application reconciliation |
| `argocd_app_labels` | gauge | Argo Application labels converted to Prometheus labels. Disabled by default. See section bellow about how to enable it. |
| `argocd_app_labels` | gauge | Argo Application labels converted to Prometheus labels. Disabled by default. See section below about how to enable it. |
| `argocd_app_reconcile` | histogram | Application reconciliation performance. |
| `argocd_app_sync_total` | counter | Counter for application sync history |
| `argocd_cluster_api_resource_objects` | gauge | Number of k8s resource objects in the cache. |
@@ -41,7 +41,7 @@ Some examples are:
As the Application labels are specific to each company, this feature is disabled by default. To enable it, add the
`--metrics-application-labels` flag to the ArgoCD application controller.
The example bellow will expose the ArgoCD Application labels `team-name` and `business-unit` to Prometheus:
The example below will expose the ArgoCD Application labels `team-name` and `business-unit` to Prometheus:
containers:
- command:

View File

@@ -46,7 +46,7 @@ subresources of an application.
#### The `action` action
The `action` action corresponds to either built-in resource customizations defined
[in the Argo CD repository](https://github.com/argoproj/argo-cd/search?q=filename%3Aaction.lua+path%3Aresource_customizations),
[in the Argo CD repository](https://github.com/argoproj/argo-cd/tree/master/resource_customizations),
or to [custom resource actions](resource_actions.md#custom-resource-actions) defined by you.
The `action` path is of the form `action/<api-group>/<Kind>/<action-name>`. For
example, a resource customization path
@@ -86,6 +86,10 @@ configures a custom role, named `org-admin`. The role is assigned to any user wh
`your-github-org:your-team` group. All other users get the default policy of `role:readonly`,
which cannot modify Argo CD settings.
!!! warning
All authenticated users get _at least_ the permissions granted by the default policy. This access cannot be blocked
by a `deny` rule. Instead, restrict the default policy and then grant permissions to individual roles as needed.
*ArgoCD ConfigMap `argocd-rbac-cm` Example:*
```yaml

View File

@@ -0,0 +1,32 @@
# Verification of Argo CD signatures
All Argo CD container images are signed by cosign. Checksums are created for the CLI binaries and then signed to ensure integrity.
## Prerequisites
- Cosign [installation instructions](https://docs.sigstore.dev/cosign/installation)
- Obtain or have a copy of the [public key](https://github.com/argoproj/argo-cd/blob/master/argocd-cosign.pub) ```argocd-cosign.pub```
Once you have installed cosign, you can use [argocd-cosign.pub](https://github.com/argoproj/argo-cd/blob/master/argocd-cosign.pub) to verify the signed assets or container images.
```
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEesHEB7vX5Y2RxXypjMy1nI1z7iRG
JI9/gt/sYqzpsa65aaNP4npM43DDxoIy/MQBo9s/mxGxmA+8UXeDpVC9vw==
-----END PUBLIC KEY-----
```
## Verification of container images
```bash
cosign verify --key argocd-cosign.pub quay.io/argoproj/argocd:latest
Verification for quay.io/argoproj/argocd:latest --
The following checks were performed on each of these signatures:
* The cosign claims were validated
* The signatures were verified against the specified public key
...
```
## Verification of signed assets
```bash
cosign verify-blob --key cosign.pub --signature $(cat argocd-$VERSION-checksums.sig) argocd-$VERSION-checksums.txt
Verified OK
```

View File

@@ -112,7 +112,7 @@ The bundled Kustomize version has been upgraded from 4.4.1 to 4.5.7.
## Upgraded Helm Version
Note that bundled Helm version has been upgraded from 3.9.0 to 3.10.0.
Note that bundled Helm version has been upgraded from 3.9.0 to 3.10.1.
## Upgraded HAProxy version

View File

@@ -37,6 +37,7 @@ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/<v
<hr/>
* [v2.4 to v2.5](./2.4-2.5.md)
* [v2.3 to v2.4](./2.3-2.4.md)
* [v2.2 to v2.3](./2.2-2.3.md)
* [v2.1 to v2.2](./2.1-2.2.md)

View File

@@ -168,7 +168,6 @@ spec:
check:
- command: [-f ./main.ts]
glob: "main.ts"
allowConcurrency: true # enables generating multiple manifests in parallel.
```
#### Config Management Plugin API Server (cmp-server)
@@ -320,6 +319,5 @@ spec:
check:
- command: [-f ./main.ts]
glob: "main.ts"
allowConcurrency: true # enables generating multiple manifests in parallel.
```
2. Something magically patches the relevant manifest to add the sidecar.

View File

@@ -81,7 +81,7 @@ data:
- '.webhooks[]?.clientConfig.caBundle'
```
Resource customization can also be configured to ignore all differences made by a managedField.manager at the system level. The example bellow shows how to configure Argo CD to ignore changes made by `kube-controller-manager` in `Deployment` resources.
Resource customization can also be configured to ignore all differences made by a managedField.manager at the system level. The example below shows how to configure Argo CD to ignore changes made by `kube-controller-manager` in `Deployment` resources.
```yaml
data:
@@ -90,7 +90,7 @@ data:
- kube-controller-manager
```
It is possible to configure ignoreDifferences to be applied to all resources in every Application managed by an Argo CD instance. In order to do so, resource customizations can be configured like in the example bellow:
It is possible to configure ignoreDifferences to be applied to all resources in every Application managed by an Argo CD instance. In order to do so, resource customizations can be configured like in the example below:
```yaml
data:

View File

@@ -0,0 +1,129 @@
# Directory
A directory-type application loads plain manifest files from `.yml`, `.yaml`, and `.json` files. A directory-type
application may be created from the UI, CLI, or declaratively. This is the declarative syntax:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
spec:
destination:
namespace: default
server: https://kubernetes.default.svc
project: default
source:
path: guestbook
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
```
It's unnecessary to explicitly add the `spec.source.directory` field except to add additional configuration options.
Argo CD will automatically detect that the source repository/path contains plain manifest files.
## Enabling Recursive Resource Detection
By default, directory applications will only include the files from the root of the configured repository/path.
To enable recursive resource detection, set the `recurse` option.
```bash
argocd app set guestbook --directory-recurse
```
To do the same thing declaratively, use this syntax:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
directory:
recurse: true
```
## Including/Excluding Files
### Including Only Certain Files
To include only certain files/directories in a directory application, set the `include` option. The value is a glob
pattern.
For example, if you want to include only `.yaml` files, you can use this pattern:
```shell
argocd app set guestbook --directory-include "*.yaml"
```
!!! note
It is important to quote `*.yaml` so that the shell does not expand the pattern before sending it to Argo CD.
It is also possible to include multiple patterns. Wrap the patterns with `{}` and separate them with commas. To include
`.yml` and `.yaml` files, use this pattern:
```shell
argocd app set guestbook --directory-include "{*.yml,*.yaml}"
```
To include only a certain directory, use a pattern like this:
```shell
argocd app set guestbook --directory-include "some-directory/*"
```
To accomplish the same thing declaratively, use this syntax:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
directory:
include: 'some-directory/*'
```
### Excluding Certain Files
It is possible to exclude files matching a pattern from directory applications. For example, in a repository containing
some manifests and also a non-manifest YAML file, you could exclude the config file like this:
```shell
argocd app set guestbook --directory-exclude "config.yaml"
```
It is possible to exclude more than one pattern. For example, a config file and an irrelevant directory:
```shell
argocd app set guestbook --directory-exclude "{config.yaml,env-use2/*}"
```
If both `include` and `exclude` are specified, then the Application will include all files which match the `include`
pattern and do not match the `exclude` pattern. For example, consider this source repository:
```
config.json
deployment.yaml
env-use2/
configmap.yaml
env-usw2/
configmap.yaml
```
To exclude `config.json` and the `env-usw2` directory, you could use this combination of patterns:
```shell
argocd app set guestbook --directory-include "*.yaml" --directory-exclude "{config.json,env-usw2/*}"
```
This would be the declarative syntax:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
directory:
exclude: '{config.json,env-usw2/*}'
include: '*.yaml'
```

View File

@@ -34,11 +34,6 @@ or UI:
1. Click `Connect` to test the connection and have the repository added
> earlier than v1.2
1. Navigate to `Settings/Repositories`
1. Click `Connect Repo` button and enter HTTPS credentials
![connect repo](../assets/connect-repo.png)
#### Access Token
@@ -109,14 +104,6 @@ Using the UI:
!!!note
When your SSH repository is served from a non-standard port, you have to use `ssh://`-style URLs to specify your repository. The scp-style `git@yourgit.com:yourrepo` URLs do **not** support port specification, and will treat any port number as part of the repository's path.
> earlier than v1.2
The Argo CD UI don't support configuring SSH credentials. The SSH credentials can only be configured using the Argo CD CLI:
```
argocd repo add git@github.com:argoproj/argocd-example-apps.git --ssh-private-key-path ~/.ssh/id_rsa
```
### GitHub App Credential
Private repositories that are hosted on GitHub.com or GitHub Enterprise can be accessed using credentials from a GitHub Application. Consult the [GitHub documentation](https://docs.github.com/en/developers/apps/about-apps#about-github-apps) on how to create an application.
@@ -268,12 +255,6 @@ It is possible to add and remove TLS certificates using the ArgoCD web UI:
You can also manage TLS certificates in a declarative, self-managed ArgoCD setup. All TLS certificates are stored in the ConfigMap object `argocd-tls-cert-cm`.
Please refer to the [Operator Manual](../../operator-manual/declarative-setup/#repositories-using-self-signed-tls-certificates-or-are-signed-by-custom-ca) for more information.
> Before v1.2
We do not currently have first-class support for this. See [#1513](https://github.com/argoproj/argo-cd/issues/1513).
As a work-around, you can customize your Argo CD image. See [#1344](https://github.com/argoproj/argo-cd/issues/1344#issuecomment-479811810)
## Unknown SSH Hosts
If you are using a privately hosted Git service over SSH, then you have the following options:
@@ -351,28 +332,7 @@ It is possible to add and remove SSH known hosts entries using the ArgoCD web UI
### Managing SSH known hosts data using declarative setup
You can also manage SSH known hosts entries in a declarative, self-managed ArgoCD setup. All SSH public host keys are stored in the ConfigMap object `argocd-ssh-known-hosts-cm`. For more details, please refer to the [Operator Manual](../../operator-manual/declarative-setup/#ssh-known-host-public-keys)
> Before v1.2
(1) You can customize the Argo CD Docker image by adding the host's SSH public key to `/etc/ssh/ssh_known_hosts`. Additional entries to this file can be generated using the `ssh-keyscan` utility (e.g. `ssh-keyscan your-private-git-server.com`. For more information see [example](https://github.com/argoproj/argo-cd/tree/master/examples/known-hosts) which demonstrates how `/etc/ssh/ssh_known_hosts` can be customized.
!!! note
The `/etc/ssh/ssh_known_hosts` should include Git host on each Argo CD deployment as well as on a computer where `argocd repo add` is executed. After resolving issue
[#1514](https://github.com/argoproj/argo-cd/issues/1514) only `argocd-repo-server` deployment has to be customized.
(1) Add repository using Argo CD CLI and `--insecure-ignore-host-key` flag:
```bash
argocd repo add git@github.com:argoproj/argocd-example-apps.git --ssh-private-key-path ~/.ssh/id_rsa --insecure-ignore-host-key
```
!!! warning "Don't use in production"
The `--insecure-ignore-host-key` should not be used in production as this is subject to man-in-the-middle attacks.
!!! warning "This does not work for Kustomize remote bases or custom plugins"
For Kustomize support, see [#827](https://github.com/argoproj/argo-cd/issues/827).
You can also manage SSH known hosts entries in a declarative, self-managed ArgoCD setup. All SSH public host keys are stored in the ConfigMap object `argocd-ssh-known-hosts-cm`. For more details, please refer to the [Operator Manual](../operator-manual/declarative-setup.md#ssh-known-host-public-keys).
## Git Submodules
@@ -380,5 +340,5 @@ Submodules are supported and will be picked up automatically. If the submodule r
## Declarative Configuration
See [declarative setup](../../operator-manual/declarative-setup#repositories)
See [declarative setup](../operator-manual/declarative-setup.md#repositories)

View File

@@ -25,12 +25,10 @@ The sync-status panel shows that pruning was skipped, and why:
![sync option no prune](../assets/sync-option-no-prune-sync-status.png)
The app will be out of sync if ArgoCD expects a resource to be pruned. You may wish to use this along with [compare options](compare-options.md).
The app will be out of sync if Argo CD expects a resource to be pruned. You may wish to use this along with [compare options](compare-options.md).
## Disable Kubectl Validation
>v1.2
For a certain class of objects, it is necessary to `kubectl apply` them using the `--validate=false` flag. Examples of this are kubernetes types which uses `RawExtension`, such as [ServiceCatalog](https://github.com/kubernetes-incubator/service-catalog/blob/master/pkg/apis/servicecatalog/v1beta1/types.go#L497). You can do using this annotations:
@@ -44,13 +42,11 @@ If you want to exclude a whole class of objects globally, consider setting `reso
## Skip Dry Run for new custom resources types
>v1.6
When syncing a custom resource which is not yet known to the cluster, there are generally two options:
1) The CRD manifest is part of the same sync. Then ArgoCD will automatically skip the dry run, the CRD will be applied and the resource can be created.
1) The CRD manifest is part of the same sync. Then Argo CD will automatically skip the dry run, the CRD will be applied and the resource can be created.
2) In some cases the CRD is not part of the sync, but it could be created in another way, e.g. by a controller in the cluster. An example is [gatekeeper](https://github.com/open-policy-agent/gatekeeper),
which creates CRDs in response to user defined `ConstraintTemplates`. ArgoCD cannot find the CRD in the sync and will fail with the error `the server could not find the requested resource`.
which creates CRDs in response to user defined `ConstraintTemplates`. Argo CD cannot find the CRD in the sync and will fail with the error `the server could not find the requested resource`.
To skip the dry run for missing resource types, use the following annotation:
@@ -64,7 +60,7 @@ The dry run will still be executed if the CRD is already present in the cluster.
## Selective Sync
Currently when syncing using auto sync ArgoCD applies every object in the application.
Currently when syncing using auto sync Argo CD applies every object in the application.
For applications containing thousands of objects this takes quite a long time and puts undue pressure on the api server.
Turning on selective sync option which will sync only out-of-sync resources.
@@ -129,7 +125,7 @@ metadata:
## Replace Resource Instead Of Applying Changes
By default, ArgoCD executes `kubectl apply` operation to apply the configuration stored in Git. In some cases
By default, Argo CD executes `kubectl apply` operation to apply the configuration stored in Git. In some cases
`kubectl apply` is not suitable. For example, resource spec might be too big and won't fit into
`kubectl.kubernetes.io/last-applied-configuration` annotation that is added by `kubectl apply`. In such cases you
might use `Replace=true` sync option:
@@ -144,7 +140,7 @@ spec:
- Replace=true
```
If the `Replace=true` sync option is set the ArgoCD will use `kubectl replace` or `kubectl create` command to apply changes.
If the `Replace=true` sync option is set the Argo CD will use `kubectl replace` or `kubectl create` command to apply changes.
This can also be configured at individual resource level.
```yaml
@@ -155,10 +151,25 @@ metadata:
## Server-Side Apply
By default, ArgoCD executes `kubectl apply` operation to apply the configuration stored in Git. This is a client
side operation that relies on `kubectl.kubernetes.io/last-applied-configuration` annotation to store the previous
resource state. In some cases the resource is too big to fit in 262144 bytes allowed annotation size. In this case
server-side apply can be used to avoid this issue as the annotation is not used in this case.
This option enables Kubernetes
[Server-Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/).
By default, Argo CD executes `kubectl apply` operation to apply the configuration stored in Git.
This is a client side operation that relies on `kubectl.kubernetes.io/last-applied-configuration`
annotation to store the previous resource state.
However, there are some cases where you want to use `kubectl apply --server-side` over `kubectl apply`:
- Resource is too big to fit in 262144 bytes allowed annotation size. In this case
server-side apply can be used to avoid this issue as the annotation is not used in this case.
- Patching of existing resources on the cluster that are not fully managed by Argo CD.
- Use a more declarative approach, which tracks a user's field management, rather than a user's last
applied state.
If `ServerSideApply=true` sync option is set, Argo CD will use `kubectl apply --server-side`
command to apply changes.
It can be enabled at the application level like in the example below:
```yaml
apiVersion: argoproj.io/v1alpha1
@@ -169,20 +180,50 @@ spec:
- ServerSideApply=true
```
If the `ServerSideApply=true` sync option is set the ArgoCD will use `kubectl apply --server-side` command to apply changes.
To enable ServerSideApply just for an individual resource, the sync-option annotation
can be used:
This can also be configured at individual resource level.
```yaml
metadata:
annotations:
argocd.argoproj.io/sync-options: ServerSideApply=true
```
ServerSideApply can also be used to patch existing resources by providing a partial
yaml. For example, if there is a requirement to update just the number of replicas
in a given Deployment, the following yaml can be provided to Argo CD:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment
spec:
replicas: 3
```
Note that by the Deployment schema specification, this isn't a valid manifest. In this
case an additional sync option *must* be provided to skip schema validation. The example
below shows how to configure the application to enable the two necessary sync options:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
syncOptions:
- ServerSideApply=true
- Validate=false
```
In this case, Argo CD will use `kubectl apply --server-side --validate=false` command
to apply changes.
Note: [`Replace=true`](#replace-resource-instead-of-applying-changes) takes precedence over `ServerSideApply=true`.
## Fail the sync if a shared resource is found
By default, ArgoCD will apply all manifests found in the git path configured in the Application regardless if the resources defined in the yamls are already applied by another Application. If the `FailOnSharedResource` sync option is set, ArgoCD will fail the sync whenever it finds a resource in the current Application that is already applied in the cluster by another Application.
By default, Argo CD will apply all manifests found in the git path configured in the Application regardless if the resources defined in the yamls are already applied by another Application. If the `FailOnSharedResource` sync option is set, Argo CD will fail the sync whenever it finds a resource in the current Application that is already applied in the cluster by another Application.
```yaml
apiVersion: argoproj.io/v1alpha1
@@ -195,7 +236,7 @@ spec:
## Respect ignore difference configs
This sync option is used to enable ArgoCD to consider the configurations made in the `spec.ignoreDifferences` attribute also during the sync stage. By default, ArgoCD uses the `ignoreDifferences` config just for computing the diff between the live and desired state which defines if the application is synced or not. However during the sync stage, the desired state is applied as-is. The patch is calculated using a 3-way-merge between the live state the desired state and the `last-applied-configuration` annotation. This sometimes leads to an undesired results. This behavior can be changed by setting the `RespectIgnoreDifferences=true` sync option like in the example bellow:
This sync option is used to enable Argo CD to consider the configurations made in the `spec.ignoreDifferences` attribute also during the sync stage. By default, Argo CD uses the `ignoreDifferences` config just for computing the diff between the live and desired state which defines if the application is synced or not. However during the sync stage, the desired state is applied as-is. The patch is calculated using a 3-way-merge between the live state the desired state and the `last-applied-configuration` annotation. This sometimes leads to an undesired results. This behavior can be changed by setting the `RespectIgnoreDifferences=true` sync option like in the example below:
```yaml
apiVersion: argoproj.io/v1alpha1
@@ -213,7 +254,7 @@ spec:
- RespectIgnoreDifferences=true
```
The example above shows how an ArgoCD Application can be configured so it will ignore the `spec.replicas` field from the desired state (git) during the sync stage. This is achieve by calculating and pre-patching the desired state before applying it in the cluster. Note that the `RespectIgnoreDifferences` sync option is only effective when the resource is already created in the cluster. If the Application is being created and no live state exists, the desired state is applied as-is.
The example above shows how an Argo CD Application can be configured so it will ignore the `spec.replicas` field from the desired state (git) during the sync stage. This is achieve by calculating and pre-patching the desired state before applying it in the cluster. Note that the `RespectIgnoreDifferences` sync option is only effective when the resource is already created in the cluster. If the Application is being created and no live state exists, the desired state is applied as-is.
## Create Namespace

View File

@@ -20,6 +20,8 @@ For Helm, all versions are [Semantic Versions](https://semver.org/). As a result
| Track minor releases (e.g. in QA) | Use a range | `1.*` or `>=1.0.0 <2.0.0` |
| Use the latest (e.g. in local development) | Use star range | `*` or `>=0.0.0` |
**Note for OCI Helm repositories**: the only available strategy is "Pin to a version".
[Read about version ranges](https://www.telerik.com/blogs/the-mystical-magical-semver-ranges-used-by-npm-bower)
## Git

View File

@@ -17,8 +17,9 @@ import (
var (
kindToCRDPath = map[string]string{
application.ApplicationFullName: "manifests/crds/application-crd.yaml",
application.AppProjectFullName: "manifests/crds/appproject-crd.yaml",
application.ApplicationFullName: "manifests/crds/application-crd.yaml",
application.AppProjectFullName: "manifests/crds/appproject-crd.yaml",
application.ApplicationSetFullName: "manifests/crds/applicationset-crd.yaml",
}
)
@@ -54,7 +55,7 @@ func getCustomResourceDefinitions() map[string]*extensionsobj.CustomResourceDefi
removeValidation(un, "status")
}
crd := toCRD(un)
crd := toCRD(un, un.GetName() == "applicationsets.argoproj.io")
crd.Labels = map[string]string{
"app.kubernetes.io/name": crd.Name,
"app.kubernetes.io/part-of": "argocd",
@@ -81,7 +82,10 @@ func removeValidation(un *unstructured.Unstructured, path string) {
unstructured.RemoveNestedField(un.Object, schemaPath...)
}
func toCRD(un *unstructured.Unstructured) *extensionsobj.CustomResourceDefinition {
func toCRD(un *unstructured.Unstructured, removeDesc bool) *extensionsobj.CustomResourceDefinition {
if removeDesc {
removeDescription(un.Object)
}
unBytes, err := json.Marshal(un)
checkErr(err)
@@ -92,6 +96,25 @@ func toCRD(un *unstructured.Unstructured) *extensionsobj.CustomResourceDefinitio
return &crd
}
func removeDescription(v interface{}) {
switch v := v.(type) {
case []interface{}:
for _, v := range v {
removeDescription(v)
}
case map[string]interface{}:
if _, ok := v["description"]; ok {
_, ok := v["description"].(string)
if ok {
delete(v, "description")
}
}
for _, v := range v {
removeDescription(v)
}
}
}
func checkErr(err error) {
if err != nil {
panic(err)

105
hack/generate-release-notes.sh Executable file
View File

@@ -0,0 +1,105 @@
#!/usr/bin/env bash
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
cat <<-EOM
USAGE:
generate-release-notes.sh NEW_REF OLD_REF NEW_VERSION
EXAMPLES:
# For releasing a new minor version:
generate-release-notes.sh release-2.5 release-2.4 v2.5.0-rc1 > /tmp/release.md
# For a patch release:
generate-release-notes.sh release-2.4 v2.4.13 v2.4.14 > /tmp/release.md
EOM
exit 1
fi
function to_list_items() {
sed 's/^/- /'
}
function strip_last_word() {
sed 's/ [^ ]*$//'
}
function nonempty_line_count() {
sed '/^\s*$/d' | wc -l | tr -d ' \n'
}
function only_last_word() {
awk 'NF>1{print $NF}'
}
new_ref=$1
old_ref=$2
version=$3
cat <<-EOM
## Quick Start
### Non-HA:
\`\`\`shell
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$version/manifests/install.yaml
\`\`\`
### HA:
\`\`\`shell
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$version/manifests/ha/install.yaml
\`\`\`
## Release signatures
All Argo CD container images and CLI binaries are signed by cosign. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets.md/) on how to verify the signatures.
\`\`\`shell
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEesHEB7vX5Y2RxXypjMy1nI1z7iRG
JI9/gt/sYqzpsa65aaNP4npM43DDxoIy/MQBo9s/mxGxmA+8UXeDpVC9vw==
-----END PUBLIC KEY-----
\`\`\`
## Upgrading
If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation.
EOM
# Adapted from https://stackoverflow.com/a/67029088/684776
less_log=$(git log --pretty="format:%s %ae" --cherry-pick --left-only --no-merges "$new_ref...$old_ref")
more_log=$(git log --pretty="format:%s %ae" "$new_ref..$old_ref")
new_commits=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$less_log") <(echo "$more_log") | grep -v "Merge pull request from GHSA")
new_commits_no_email=$(echo "$new_commits" | strip_last_word)
contributors_num=$(echo "$new_commits" | only_last_word | sort -u | nonempty_line_count)
new_commits_num=$(echo "$new_commits" | nonempty_line_count)
features_num=$(echo "$new_commits_no_email" | grep '^feat' | nonempty_line_count)
fixes_num=$(echo "$new_commits_no_email" | grep '^fix' | nonempty_line_count)
previous_contributors=$(git log --pretty="format:%an %ae" "$old_ref" | sort -uf)
all_contributors=$(git log --pretty="format:%an %ae" "$new_ref" | sort -uf)
new_contributors=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$all_contributors") <(echo "$previous_contributors"))
new_contributors_num=$(echo "$new_contributors" | only_last_word | nonempty_line_count) # Count contributors by email
new_contributors_names=$(echo "$new_contributors" | strip_last_word | to_list_items)
new_contributors_message=""
if [ "$new_contributors_num" -gt 0 ]; then
new_contributors_message=" ($new_contributors_num of them new)"
fi
echo "## Changes"
echo
echo "This release includes $new_commits_num contributions from $contributors_num contributors$new_contributors_message with $features_num features and $fixes_num bug fixes."
echo
if [ "$new_contributors_num" -lt 20 ] && [ "$new_contributors_num" -gt 0 ]; then
echo "A special thanks goes to the $new_contributors_num new contributors:"
echo "$new_contributors_names"
echo
fi

View File

@@ -0,0 +1 @@
c12d2cd638f2d066fec123d0bd7f010f32c643afdf288d39a4610b1f9cb32af3 helm-v3.10.1-linux-amd64.tar.gz

View File

@@ -0,0 +1 @@
d04b38d439ab8655abb4cb9ccc1efa8a3fe95f3f68af46d9137c6b7985491833 helm-v3.10.1-linux-arm64.tar.gz

View File

@@ -0,0 +1 @@
855ab37613b393c68d50b4355273df2322f27db08b1deca8807bac80343a8a64 helm-v3.10.1-linux-ppc64le.tar.gz

View File

@@ -0,0 +1 @@
e51220b4582a3cad4b45330c96e1b0408d33e25f90a9e66b06649903acf1bed1 helm-v3.10.1-linux-s390x.tar.gz

View File

@@ -11,7 +11,7 @@
# Use ./hack/installers/checksums/add-helm-checksums.sh and
# add-kustomize-checksums.sh to help download checksums.
###############################################################################
helm3_version=3.10.0
helm3_version=3.10.1
kubectl_version=1.17.8
kubectx_version=0.6.3
kustomize4_version=4.5.7

View File

@@ -30,6 +30,7 @@ cleanup() {
if test "${NEW_TAG}" = "" -o "${GIT_REMOTE}" = ""; then
echo "!! Usage: $0 <release tag> <remote> [path to release notes file]" >&2
echo "You can use generate-release-notes.sh to generate the release notes file." >&2
exit 1
fi

View File

@@ -37,7 +37,7 @@ spec:
type: RuntimeDefault
containers:
- name: dex
image: ghcr.io/dexidp/dex:v2.35.1-distroless
image: ghcr.io/dexidp/dex:v2.35.3-distroless
imagePullPolicy: Always
command: [/shared/argocd-dex, rundex]
env:

View File

@@ -5,7 +5,7 @@ kind: Kustomization
images:
- name: quay.io/argoproj/argocd
newName: quay.io/argoproj/argocd
newTag: latest
newTag: v2.5.1
resources:
- ./application-controller
- ./dex

View File

@@ -336,8 +336,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -682,8 +682,7 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management plugin
specific options
description: Plugin holds config management plugin specific options
properties:
env:
description: Env is a list of environment variable entries
@@ -1038,8 +1037,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -1410,8 +1409,8 @@ spec:
from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin
specific options
properties:
env:
description: Env is a list of environment variable
@@ -1754,8 +1753,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -1846,6 +1845,9 @@ spec:
description: SyncStatusCode is a type which represents possible
comparison results
type: string
syncWave:
format: int64
type: integer
version:
type: string
type: object
@@ -2092,8 +2094,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -2159,6 +2161,7 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: applicationsets.argoproj.io
app.kubernetes.io/part-of: argocd
name: applicationsets.argoproj.io
spec:
group: argoproj.io
@@ -9632,7 +9635,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -9890,7 +9893,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -9941,7 +9944,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -10148,7 +10151,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -12,4 +12,4 @@ resources:
images:
- name: quay.io/argoproj/argocd
newName: quay.io/argoproj/argocd
newTag: latest
newTag: v2.5.1

View File

@@ -335,8 +335,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -681,8 +681,7 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management plugin
specific options
description: Plugin holds config management plugin specific options
properties:
env:
description: Env is a list of environment variable entries
@@ -1037,8 +1036,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -1409,8 +1408,8 @@ spec:
from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin
specific options
properties:
env:
description: Env is a list of environment variable
@@ -1753,8 +1752,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -1845,6 +1844,9 @@ spec:
description: SyncStatusCode is a type which represents possible
comparison results
type: string
syncWave:
format: int64
type: integer
version:
type: string
type: object
@@ -2091,8 +2093,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable

View File

@@ -3,6 +3,7 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: applicationsets.argoproj.io
app.kubernetes.io/part-of: argocd
name: applicationsets.argoproj.io
spec:
group: argoproj.io

View File

@@ -11,7 +11,7 @@ patchesStrategicMerge:
images:
- name: quay.io/argoproj/argocd
newName: quay.io/argoproj/argocd
newTag: latest
newTag: v2.5.1
resources:
- ../../base/application-controller
- ../../base/applicationset-controller

View File

@@ -336,8 +336,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -682,8 +682,7 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management plugin
specific options
description: Plugin holds config management plugin specific options
properties:
env:
description: Env is a list of environment variable entries
@@ -1038,8 +1037,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -1410,8 +1409,8 @@ spec:
from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin
specific options
properties:
env:
description: Env is a list of environment variable
@@ -1754,8 +1753,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -1846,6 +1845,9 @@ spec:
description: SyncStatusCode is a type which represents possible
comparison results
type: string
syncWave:
format: int64
type: integer
version:
type: string
type: object
@@ -2092,8 +2094,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -2159,6 +2161,7 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: applicationsets.argoproj.io
app.kubernetes.io/part-of: argocd
name: applicationsets.argoproj.io
spec:
group: argoproj.io
@@ -10881,7 +10884,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -10962,7 +10965,7 @@ spec:
key: dexserver.disable.tls
name: argocd-cmd-params-cm
optional: true
image: ghcr.io/dexidp/dex:v2.35.1-distroless
image: ghcr.io/dexidp/dex:v2.35.3-distroless
imagePullPolicy: Always
name: dex
ports:
@@ -10991,7 +10994,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -11044,7 +11047,7 @@ spec:
containers:
- command:
- argocd-notifications
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -11341,7 +11344,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -11392,7 +11395,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -11665,7 +11668,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -11900,7 +11903,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -1550,7 +1550,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -1631,7 +1631,7 @@ spec:
key: dexserver.disable.tls
name: argocd-cmd-params-cm
optional: true
image: ghcr.io/dexidp/dex:v2.35.1-distroless
image: ghcr.io/dexidp/dex:v2.35.3-distroless
imagePullPolicy: Always
name: dex
ports:
@@ -1660,7 +1660,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -1713,7 +1713,7 @@ spec:
containers:
- command:
- argocd-notifications
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -2010,7 +2010,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -2061,7 +2061,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -2334,7 +2334,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -2569,7 +2569,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -336,8 +336,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -682,8 +682,7 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management plugin
specific options
description: Plugin holds config management plugin specific options
properties:
env:
description: Env is a list of environment variable entries
@@ -1038,8 +1037,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable entries
@@ -1410,8 +1409,8 @@ spec:
from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin
specific options
properties:
env:
description: Env is a list of environment variable
@@ -1754,8 +1753,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -1846,6 +1845,9 @@ spec:
description: SyncStatusCode is a type which represents possible
comparison results
type: string
syncWave:
format: int64
type: integer
version:
type: string
type: object
@@ -2092,8 +2094,8 @@ spec:
and is only valid for applications sourced from Git.
type: string
plugin:
description: ConfigManagementPlugin holds config management
plugin specific options
description: Plugin holds config management plugin specific
options
properties:
env:
description: Env is a list of environment variable
@@ -2159,6 +2161,7 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: applicationsets.argoproj.io
app.kubernetes.io/part-of: argocd
name: applicationsets.argoproj.io
spec:
group: argoproj.io
@@ -9952,7 +9955,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -10033,7 +10036,7 @@ spec:
key: dexserver.disable.tls
name: argocd-cmd-params-cm
optional: true
image: ghcr.io/dexidp/dex:v2.35.1-distroless
image: ghcr.io/dexidp/dex:v2.35.3-distroless
imagePullPolicy: Always
name: dex
ports:
@@ -10062,7 +10065,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -10115,7 +10118,7 @@ spec:
containers:
- command:
- argocd-notifications
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -10368,7 +10371,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -10419,7 +10422,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -10688,7 +10691,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -10921,7 +10924,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -621,7 +621,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -702,7 +702,7 @@ spec:
key: dexserver.disable.tls
name: argocd-cmd-params-cm
optional: true
image: ghcr.io/dexidp/dex:v2.35.1-distroless
image: ghcr.io/dexidp/dex:v2.35.3-distroless
imagePullPolicy: Always
name: dex
ports:
@@ -731,7 +731,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -784,7 +784,7 @@ spec:
containers:
- command:
- argocd-notifications
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -1037,7 +1037,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -1088,7 +1088,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -1357,7 +1357,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -1590,7 +1590,7 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.5.1
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -35,6 +35,7 @@ nav:
- Security:
- Overview: operator-manual/security.md
- snyk/index.md
- operator-manual/signed-release-assets.md
- operator-manual/tls.md
- operator-manual/cluster-bootstrapping.md
- operator-manual/secret-management.md
@@ -124,6 +125,7 @@ nav:
- user-guide/kustomize.md
- user-guide/helm.md
- user-guide/jsonnet.md
- user-guide/directory.md
- user-guide/config-management-plugins.md
- user-guide/tool_detection.md
- user-guide/projects.md

View File

@@ -1,10 +1,10 @@
package v1alpha1
import (
fmt "fmt"
"fmt"
"sort"
"strconv"
strings "strings"
"strings"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/glob"
@@ -167,6 +167,10 @@ func (p *AppProject) ValidateProject() error {
}
key := fmt.Sprintf("%s/%s", dest.Server, dest.Namespace)
if dest.Server == "" && dest.Name != "" {
// destination cluster set using name instead of server endpoint
key = fmt.Sprintf("%s/%s", dest.Name, dest.Namespace)
}
if _, ok := destKeys[key]; ok {
return status.Errorf(codes.InvalidArgument, "destination '%s' already added", key)
}
@@ -176,9 +180,9 @@ func (p *AppProject) ValidateProject() error {
srcNamespaces := make(map[string]bool)
for _, ns := range p.Spec.SourceNamespaces {
if _, ok := srcNamespaces[ns]; ok {
return status.Errorf(codes.InvalidArgument, "source namespaces '%s' already added", ns)
return status.Errorf(codes.InvalidArgument, "source namespace '%s' already added", ns)
}
destKeys[ns] = true
srcNamespaces[ns] = true
}
srcRepos := make(map[string]bool)

File diff suppressed because it is too large Load Diff

View File

@@ -322,7 +322,7 @@ message ApplicationSource {
// Directory holds path/directory specific options
optional ApplicationSourceDirectory directory = 10;
// ConfigManagementPlugin holds config management plugin specific options
// Plugin holds config management plugin specific options
optional ApplicationSourcePlugin plugin = 11;
// Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.
@@ -1525,6 +1525,8 @@ message ResourceStatus {
optional bool hook = 8;
optional bool requiresPruning = 9;
optional int64 syncWave = 10;
}
// RetryStrategy contains information about the strategy to apply when a sync failed

View File

@@ -1209,7 +1209,7 @@ func schema_pkg_apis_application_v1alpha1_ApplicationSource(ref common.Reference
},
"plugin": {
SchemaProps: spec.SchemaProps{
Description: "ConfigManagementPlugin holds config management plugin specific options",
Description: "Plugin holds config management plugin specific options",
Ref: ref("github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourcePlugin"),
},
},
@@ -5258,6 +5258,12 @@ func schema_pkg_apis_application_v1alpha1_ResourceStatus(ref common.ReferenceCal
Format: "",
},
},
"syncWave": {
SchemaProps: spec.SchemaProps{
Type: []string{"integer"},
Format: "int64",
},
},
},
},
},

View File

@@ -166,7 +166,7 @@ type ApplicationSource struct {
Kustomize *ApplicationSourceKustomize `json:"kustomize,omitempty" protobuf:"bytes,8,opt,name=kustomize"`
// Directory holds path/directory specific options
Directory *ApplicationSourceDirectory `json:"directory,omitempty" protobuf:"bytes,10,opt,name=directory"`
// ConfigManagementPlugin holds config management plugin specific options
// Plugin holds config management plugin specific options
Plugin *ApplicationSourcePlugin `json:"plugin,omitempty" protobuf:"bytes,11,opt,name=plugin"`
// Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.
Chart string `json:"chart,omitempty" protobuf:"bytes,12,opt,name=chart"`
@@ -1185,6 +1185,7 @@ type ResourceStatus struct {
Health *HealthStatus `json:"health,omitempty" protobuf:"bytes,7,opt,name=health"`
Hook bool `json:"hook,omitempty" protobuf:"bytes,8,opt,name=hook"`
RequiresPruning bool `json:"requiresPruning,omitempty" protobuf:"bytes,9,opt,name=requiresPruning"`
SyncWave int64 `json:"syncWave,omitempty" protobuf:"bytes,10,opt,name=syncWave"`
}
// GroupKindVersion returns the GVK schema type for given resource status

View File

@@ -582,6 +582,25 @@ func TestAppProject_ValidateDestinations(t *testing.T) {
p.Spec.Destinations = []ApplicationDestination{validDestination, validDestination}
err = p.ValidateProject()
assert.Error(t, err)
cluster1Destination := ApplicationDestination{
Name: "cluster1",
Namespace: "some-namespace",
}
cluster2Destination := ApplicationDestination{
Name: "cluster2",
Namespace: "some-namespace",
}
// allow multiple destinations with blank server, same namespace but unique cluster name
p.Spec.Destinations = []ApplicationDestination{cluster1Destination, cluster2Destination}
err = p.ValidateProject()
assert.NoError(t, err)
t.Run("must reject duplicate source namespaces", func(t *testing.T) {
p.Spec.SourceNamespaces = []string{"argocd", "argocd"}
err = p.ValidateProject()
assert.Error(t, err)
})
}
// TestValidateRoleName tests for an invalid role name

View File

@@ -3,17 +3,21 @@ if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
health_status.message = condition.message
if condition.reason == "Successful" then
if condition.type == "Successful" and condition.status == "True" then
health_status.status = "Healthy"
elseif condition.reason == "Running" then
health_status.status = "Progressing"
else
health_status.status = "Degraded"
return health_status
end
if condition.type == "Failure" and condition.status == "True" then
health_status.status = "Degraded"
return health_status
end
if condition.type == "Running" and condition.reason == "Running" then
health_status.status = "Progressing"
return health_status
end
return health_status
end
end
end
health_status.status = "Progressing"
health_status.message = "Waiting for Kiali"
return health_status
return health_status

View File

@@ -9,5 +9,5 @@ tests:
inputPath: testdata/degraded.yaml
- healthStatus:
status: Healthy
message: "Awaiting next reconciliation"
message: "Last reconciliation succeeded"
inputPath: testdata/healthy.yaml

View File

@@ -14,14 +14,24 @@ metadata:
spec: {}
status:
conditions:
- ansibleResult:
changed: 1
completion: 2020-06-08T13:41:20.133525
failures: 0
ok: 56
skipped: 82
lastTransitionTime: "2020-06-04T17:47:31Z"
message: Error Reconciling
reason: null
status: "True"
type: Running
- lastTransitionTime: '2022-10-19T09:44:32Z'
message: ''
reason: ''
status: 'False'
type: Failure
- ansibleResult:
changed: 18
completion: '2022-10-19T09:44:32.289505'
failures: 0
ok: 101
skipped: 101
lastTransitionTime: '2022-10-19T09:43:39Z'
message: Awaiting next reconciliation
reason: Successful
status: 'True'
type: Running
- lastTransitionTime: '2022-10-19T09:44:32Z'
message: Error Reconciling
reason: Failure
status: 'True'
type: Failure

View File

@@ -14,14 +14,24 @@ metadata:
spec: {}
status:
conditions:
- ansibleResult:
changed: 1
completion: 2020-06-08T13:41:20.133525
failures: 0
ok: 56
skipped: 82
lastTransitionTime: "2020-06-04T17:47:31Z"
message: Awaiting next reconciliation
reason: Successful
status: "True"
type: Running
- lastTransitionTime: '2022-10-19T09:44:32Z'
message: ''
reason: ''
status: 'False'
type: Failure
- ansibleResult:
changed: 18
completion: '2022-10-19T09:44:32.289505'
failures: 0
ok: 101
skipped: 101
lastTransitionTime: '2022-10-19T09:43:39Z'
message: Awaiting next reconciliation
reason: Successful
status: 'True'
type: Running
- lastTransitionTime: '2022-10-19T09:44:32Z'
message: Last reconciliation succeeded
reason: Successful
status: 'True'
type: Successful

View File

@@ -36,11 +36,21 @@ if obj.status ~= nil then
health_status.message = obj.status.currentState
return health_status
end
if obj.status.currentState == "Tenant credentials are not set properly" then
health_status.status = "Degraded"
health_status.message = obj.status.currentState
return health_status
end
if obj.status.currentState == "Different versions across MinIO Pools" then
health_status.status = "Degraded"
health_status.message = obj.status.currentState
return health_status
end
if obj.status.currentState == "Pool Decommissioning Not Allowed" then
health_status.status = "Degraded"
health_status.message = obj.status.currentState
return health_status
end
health_status.status = "Progressing"
health_status.message = obj.status.currentState
return health_status

View File

@@ -23,10 +23,18 @@ tests:
status: Degraded
message: "Another MinIO Tenant already exists in the namespace"
inputPath: testdata/another_tenant_exists.yaml
- healthStatus:
status: Degraded
message: "Tenant credentials are not set properly"
inputPath: testdata/incorrect_tenant_credentials.yaml
- healthStatus:
status: Degraded
message: "Different versions across MinIO Pools"
inputPath: testdata/versions_mismatch.yaml
- healthStatus:
status: Degraded
message: "Pool Decommissioning Not Allowed"
inputPath: testdata/pool_decommissioning_not_allowed.yaml
- healthStatus:
status: Progressing
message: "<unknown status message>"

View File

@@ -0,0 +1,13 @@
apiVersion: minio.min.io/v2
kind: Tenant
metadata:
name: minio-tenant
spec:
image: minio/minio:latest
pools:
- name: pool-0
servers: 1
volumesPerServer: 4
status:
revision: 0
currentState: Tenant credentials are not set properly

View File

@@ -0,0 +1,13 @@
apiVersion: minio.min.io/v2
kind: Tenant
metadata:
name: minio-tenant
spec:
image: minio/minio:latest
pools:
- name: pool-0
servers: 1
volumesPerServer: 4
status:
revision: 0
currentState: Pool Decommissioning Not Allowed

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"net/http"
"regexp"
"strings"
healthutil "github.com/argoproj/gitops-engine/pkg/health"
"k8s.io/apimachinery/pkg/api/errors"
@@ -107,7 +108,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}
//Sample url: http://localhost:8080/api/badge?name=123&revision=true
if _, ok := r.URL.Query()["revision"]; ok && enabled {
if revisionParam, ok := r.URL.Query()["revision"]; ok && enabled && strings.EqualFold(revisionParam[0], "true") {
revisionEnabled = true
}

View File

@@ -9,5 +9,3 @@ spec:
discover:
find:
glob: "**/kustomization.yaml"
allowConcurrency: true
lockRepo: false

View File

@@ -762,6 +762,8 @@ func Declarative(filename string, values interface{}) (string, error) {
}
func CreateSubmoduleRepos(repoType string) {
oldEnv := os.Getenv("GIT_ALLOW_PROTOCOL")
CheckError(os.Setenv("GIT_ALLOW_PROTOCOL", "file"))
// set-up submodule repo
FailOnErr(Run("", "cp", "-Rf", "testdata/git-submodule/", submoduleDirectory()))
@@ -793,6 +795,8 @@ func CreateSubmoduleRepos(repoType string) {
FailOnErr(Run(submoduleParentDirectory(), "git", "remote", "add", "origin", os.Getenv("ARGOCD_E2E_GIT_SERVICE_SUBMODULE_PARENT")))
FailOnErr(Run(submoduleParentDirectory(), "git", "push", "origin", "master", "-f"))
}
CheckError(os.Setenv("GIT_ALLOW_PROTOCOL", oldEnv))
}
// RestartRepoServer performs a restart of the repo server deployment and waits

View File

@@ -9,5 +9,3 @@ spec:
discover:
find:
command: [sh, -c, find . -name env.yaml]
allowConcurrency: true
lockRepo: false

View File

@@ -12,5 +12,3 @@ spec:
find:
command: [sh, -c, find . -name kustomization.yaml]
glob: "**/kustomization.yaml"
allowConcurrency: true
lockRepo: false

View File

@@ -42,6 +42,7 @@ $header: 120px;
&__warning {
font-size: 0.8em;
color: darken($argo-status-warning-color, 20%);
min-height: 1.2rem;
}
&__refreshing-label {

View File

@@ -211,6 +211,7 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
resource.health = status.health;
resource.status = status.status;
resource.hook = status.hook;
resource.syncWave = status.syncWave;
resource.requiresPruning = status.requiresPruning;
}
resources.set(node.uid || AppUtils.nodeKey(node), resource);
@@ -450,75 +451,49 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
quickStarts={node => AppUtils.renderResourceButtons(node, application, tree, this.appContext, this.appChanged)}
/>
)) || (
<DataLoader
input={{filteredRes: filteredRes.map(res => AppUtils.nodeKey(res))}}
load={async () => {
const liveStatePromises = filteredRes.map(async resource => {
const resourceRow: any = {...resource, group: resource.group || ''};
const liveState =
typeof resource.group !== 'undefined' &&
(await services.applications
.getResource(application.metadata.name, application.metadata.namespace, resource)
.catch(() => null));
if (liveState?.metadata?.annotations?.[models.AnnotationHookKey]) {
resourceRow.syncOrder = liveState?.metadata.annotations[models.AnnotationHookKey];
if (liveState?.metadata?.annotations?.[models.AnnotationSyncWaveKey]) {
resourceRow.syncOrder =
resourceRow.syncOrder + ': ' + liveState?.metadata.annotations[models.AnnotationSyncWaveKey];
}
} else {
resourceRow.syncOrder = '-';
}
return resourceRow;
});
return await Promise.all(liveStatePromises);
}}>
{(filteredResWithSyncInfo: any[]) => (
<div>
<DataLoader load={() => services.viewPreferences.getPreferences()}>
{viewPref => (
<ApplicationDetailsFilters
pref={pref}
tree={tree}
onSetFilter={setFilter}
onClearFilter={clearFilter}
collapsed={viewPref.hideSidebar}
resourceNodes={filteredResWithSyncInfo}
/>
)}
</DataLoader>
{(filteredResWithSyncInfo.length > 0 && (
<Paginate
page={this.state.page}
data={filteredResWithSyncInfo}
onPageChange={page => this.setState({page})}
preferencesKey='application-details'>
{data => (
<ApplicationResourceList
onNodeClick={fullName => this.selectNode(fullName)}
resources={data}
nodeMenu={node =>
AppUtils.renderResourceMenu(
{...node, root: node},
application,
tree,
this.appContext,
this.appChanged,
() => this.getApplicationActionMenu(application, false)
)
}
/>
)}
</Paginate>
)) || (
<EmptyState icon='fa fa-search'>
<h4>No resources found</h4>
<h5>Try to change filter criteria</h5>
</EmptyState>
<div>
<DataLoader load={() => services.viewPreferences.getPreferences()}>
{viewPref => (
<ApplicationDetailsFilters
pref={pref}
tree={tree}
onSetFilter={setFilter}
onClearFilter={clearFilter}
collapsed={viewPref.hideSidebar}
resourceNodes={filteredRes}
/>
)}
</DataLoader>
{(filteredRes.length > 0 && (
<Paginate
page={this.state.page}
data={filteredRes}
onPageChange={page => this.setState({page})}
preferencesKey='application-details'>
{data => (
<ApplicationResourceList
onNodeClick={fullName => this.selectNode(fullName)}
resources={data}
nodeMenu={node =>
AppUtils.renderResourceMenu(
{...node, root: node},
application,
tree,
this.appContext,
this.appChanged,
() => this.getApplicationActionMenu(application, false)
)
}
/>
)}
</div>
</Paginate>
)) || (
<EmptyState icon='fa fa-search'>
<h4>No resources found</h4>
<h5>Try to change filter criteria</h5>
</EmptyState>
)}
</DataLoader>
</div>
)}
</div>
<SlidingPanel isShown={this.state.groupedResources.length > 0} onClose={() => this.closeGroupedNodesPanel()}>
@@ -770,7 +745,7 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
private onAppDeleted() {
this.appContext.apis.notifications.show({type: NotificationType.Success, content: `Application '${this.props.match.params.name}' was deleted`});
this.appContext.apis.navigation.goto('/applications', {view: 'tiles'});
this.appContext.apis.navigation.goto('/applications');
}
private async updateApp(app: appModels.Application, query: {validate?: boolean}) {

View File

@@ -55,7 +55,7 @@ export const ApplicationResourceList = ({
)}
</div>
<div className='columns small-2 xxxlarge-2'>{[res.group, res.kind].filter(item => !!item).join('/')}</div>
<div className='columns small-1 xxxlarge-2'>{res.syncOrder}</div>
<div className='columns small-1 xxxlarge-2'>{res.syncWave || '-'}</div>
<div className='columns small-3 xxxlarge-3'>{res.namespace}</div>
<div className='columns small-2 xxxlarge-2'>
{res.health && (

View File

@@ -84,13 +84,15 @@ export const ApplicationRetryOptions = ({
initValues,
field = 'retryStrategy',
retry,
setRetry
setRetry,
id
}: {
formApi: FormApi;
field?: string;
initValues?: models.RetryStrategy;
retry?: boolean;
setRetry?: (value: boolean) => any;
id?: string;
}) => {
const [retryInternal, setRetryInternal] = React.useState(!!initValues);
@@ -118,8 +120,8 @@ export const ApplicationRetryOptions = ({
const isChecked = setRetry != null ? retry : retryInternal;
return (
<div className='application-retry-options'>
<Checkbox id='retry' checked={isChecked} onChange={val => toggleRetry(val)} />
<label htmlFor='retry'>Retry</label>
<Checkbox id={`retry-${id}`} checked={isChecked} onChange={val => toggleRetry(val)} />
<label htmlFor={`retry-${id}`}>Retry</label>
{isChecked && <ApplicationRetryForm initValues={initValues} field={field} />}
</div>
);

View File

@@ -25,6 +25,8 @@ import {ComparisonStatusIcon, HealthStatusIcon, syncStatusMessage, urlPattern, f
import {ApplicationRetryOptions} from '../application-retry-options/application-retry-options';
import {ApplicationRetryView} from '../application-retry-view/application-retry-view';
import {Link} from 'react-router-dom';
import {EditNotificationSubscriptions, useEditNotificationSubscriptions} from './edit-notification-subscriptions';
import {EditAnnotations} from './edit-annotations';
require('./application-summary.scss');
@@ -34,12 +36,21 @@ function swap(array: any[], a: number, b: number) {
return array;
}
export const ApplicationSummary = (props: {app: models.Application; updateApp: (app: models.Application, query: {validate?: boolean}) => Promise<any>}) => {
export interface ApplicationSummaryProps {
app: models.Application;
updateApp: (app: models.Application, query: {validate?: boolean}) => Promise<any>;
}
export const ApplicationSummary = (props: ApplicationSummaryProps) => {
const app = JSON.parse(JSON.stringify(props.app)) as models.Application;
const isHelm = app.spec.source.hasOwnProperty('chart');
const initialState = app.spec.destination.server === undefined ? 'NAME' : 'URL';
const [destFormat, setDestFormat] = React.useState(initialState);
const [changeSync, setChangeSync] = React.useState(false);
const notificationSubscriptions = useEditNotificationSubscriptions(app.metadata.annotations || {});
const updateApp = notificationSubscriptions.withNotificationSubscriptions(props.updateApp);
const attributes = [
{
title: 'PROJECT',
@@ -66,7 +77,12 @@ export const ApplicationSummary = (props: {app: models.Application; updateApp: (
.join(' ')}
</Expandable>
),
edit: (formApi: FormApi) => <FormField formApi={formApi} field='metadata.annotations' component={MapInputField} />
edit: (formApi: FormApi) => <EditAnnotations formApi={formApi} app={app} />
},
{
title: 'NOTIFICATION SUBSCRIPTIONS',
view: false, // eventually the subscription input values will be merged in 'ANNOTATIONS', therefore 'ANNOATIONS' section is responsible to represent subscription values,
edit: () => <EditNotificationSubscriptions {...notificationSubscriptions} />
},
{
title: 'CLUSTER',
@@ -319,7 +335,7 @@ export const ApplicationSummary = (props: {app: models.Application; updateApp: (
updatedApp.spec.syncPolicy = {};
}
updatedApp.spec.syncPolicy.automated = {prune, selfHeal};
await props.updateApp(updatedApp, {validate: false});
await updateApp(updatedApp, {validate: false});
} catch (e) {
ctx.notifications.show({
content: <ErrorNotification title={`Unable to "${confirmationTitle.replace(/\?/g, '')}:`} e={e} />,
@@ -338,7 +354,7 @@ export const ApplicationSummary = (props: {app: models.Application; updateApp: (
setChangeSync(true);
const updatedApp = JSON.parse(JSON.stringify(props.app)) as models.Application;
updatedApp.spec.syncPolicy.automated = null;
await props.updateApp(updatedApp, {validate: false});
await updateApp(updatedApp, {validate: false});
} catch (e) {
ctx.notifications.show({
content: <ErrorNotification title='Unable to disable Auto-Sync' e={e} />,
@@ -433,7 +449,7 @@ export const ApplicationSummary = (props: {app: models.Application; updateApp: (
</div>
)}
<EditablePanel
save={props.updateApp}
save={updateApp}
validate={input => ({
'spec.project': !input.spec.project && 'Project name is required',
'spec.destination.server': !input.spec.destination.server && input.spec.destination.hasOwnProperty('server') && 'Cluster server is required',
@@ -442,6 +458,7 @@ export const ApplicationSummary = (props: {app: models.Application; updateApp: (
values={app}
title={app.metadata.name.toLocaleUpperCase()}
items={attributes}
onModeSwitch={() => notificationSubscriptions.onResetNotificationSubscriptions()}
/>
<Consumer>
{ctx => (
@@ -546,7 +563,16 @@ export const ApplicationSummary = (props: {app: models.Application; updateApp: (
)}
</Consumer>
<BadgePanel app={props.app.metadata.name} />
<EditablePanel save={props.updateApp} values={app} title='INFO' items={infoItems} onModeSwitch={() => setAdjustedCount(0)} />
<EditablePanel
save={updateApp}
values={app}
title='INFO'
items={infoItems}
onModeSwitch={() => {
setAdjustedCount(0);
notificationSubscriptions.onResetNotificationSubscriptions();
}}
/>
</div>
);
};

View File

@@ -0,0 +1,33 @@
import * as React from 'react';
import {FormField} from 'argo-ui';
import {FormApi} from 'react-form';
import * as models from '../../../shared/models';
import {MapInputField} from '../../../shared/components';
import {notificationSubscriptionsParser} from './edit-notification-subscriptions';
export const EditAnnotations = (props: {formApi: FormApi; app: models.Application}) => {
const once = React.useRef(false);
const removeNotificationSubscriptionRelatedAnnotations = () => {
const notificationSubscriptions = notificationSubscriptionsParser.annotationsToSubscriptions(props.app.metadata.annotations);
if (notificationSubscriptions.length > 0) {
const annotationsWithoutNotificationSubscriptions = props.app.metadata.annotations || {};
for (const notificationSubscriptionAnnotation of notificationSubscriptions) {
const key = notificationSubscriptionsParser.subscriptionToAnnotationKey(notificationSubscriptionAnnotation);
delete annotationsWithoutNotificationSubscriptions[key];
}
props.formApi.setValue('metadata.annotations', annotationsWithoutNotificationSubscriptions);
}
};
if (!once.current) {
once.current = true;
removeNotificationSubscriptionRelatedAnnotations();
}
return <FormField formApi={props.formApi} field='metadata.annotations' component={MapInputField} />;
};

View File

@@ -0,0 +1,28 @@
.edit-notification-subscriptions {
border-bottom: none;
&__subscription {
display: flex;
align-items: flex-end;
gap: 8px;
margin-bottom: 12px;
}
&__autocomplete-wrapper {
border-bottom: none;
}
&__input-prefix {
font-size: 12px;
width: fit-content !important;
}
input.argo-field + div {
z-index: 100 !important;
}
.button-close {
margin-top: auto !important;
margin-bottom: auto !important;
}
}

View File

@@ -0,0 +1,220 @@
import {Autocomplete} from 'argo-ui';
import * as React from 'react';
import {DataLoader} from '../../../shared/components';
import * as models from '../../../shared/models';
import {services} from '../../../shared/services';
import {ApplicationSummaryProps} from './application-summary';
require('./edit-notification-subscriptions.scss');
export const NOTIFICATION_SUBSCRIPTION_ANNOTATION_PREFIX = 'notifications.argoproj.io/subscribe';
export const NOTIFICATION_SUBSCRIPTION_ANNOTATION_REGEX = new RegExp(`^notifications\.argoproj\.io\/subscribe\.[a-zA-Z-]{1,100}\.[a-zA-Z-]{1,100}$`);
export type TNotificationSubscription = {
trigger: string;
// notification service name
service: string;
// a semicolon separated list of recipients
value: string;
};
export const notificationSubscriptionsParser = {
annotationsToSubscriptions: (annotations: models.Application['metadata']['annotations']): TNotificationSubscription[] => {
const subscriptions: TNotificationSubscription[] = [];
for (const [key, value] of Object.entries(annotations || {})) {
if (NOTIFICATION_SUBSCRIPTION_ANNOTATION_REGEX.test(key)) {
try {
const [trigger, service] = key.slice(NOTIFICATION_SUBSCRIPTION_ANNOTATION_PREFIX.length + 1 /* for dot "." */).split('.');
subscriptions.push({trigger, service, value});
} catch (e) {
// console.error(`annotationsToSubscriptions parsing issue for ${key}`);
throw new Error(e);
}
}
}
return subscriptions;
},
subscriptionsToAnnotations: (subscriptions: TNotificationSubscription[]): models.Application['metadata']['annotations'] => {
const annotations: models.Application['metadata']['annotations'] = {};
for (const subscription of subscriptions || []) {
annotations[notificationSubscriptionsParser.subscriptionToAnnotationKey(subscription)] = subscription.value;
}
return annotations;
},
subscriptionToAnnotationKey: (subscription: TNotificationSubscription): string =>
`${NOTIFICATION_SUBSCRIPTION_ANNOTATION_PREFIX}.${subscription.trigger}.${subscription.service}`
};
/**
* split the notification subscription related annotation to have it in seperate edit field
* this hook will emit notification subscription state, controller & merge utility to core annotations helpful when final submit
*/
export const useEditNotificationSubscriptions = (annotations: models.Application['metadata']['annotations']) => {
const [subscriptions, setSubscriptions] = React.useState(notificationSubscriptionsParser.annotationsToSubscriptions(annotations));
const onAddNewSubscription = () => {
const lastSubscription = subscriptions[subscriptions.length - 1];
if (subscriptions.length === 0 || lastSubscription.trigger || lastSubscription.service || lastSubscription.value) {
setSubscriptions([
...subscriptions,
{
trigger: '',
service: '',
value: ''
}
]);
}
};
const onEditSubscription = (idx: number, subscription: TNotificationSubscription) => {
const existingSubscription = subscriptions.findIndex((sub, toFindIdx) => toFindIdx !== idx && sub.service === subscription.service && sub.trigger === subscription.trigger);
let newSubscriptions = [...subscriptions];
if (existingSubscription !== -1) {
// remove existing subscription
newSubscriptions = newSubscriptions.filter((_, newSubscriptionIdx) => newSubscriptionIdx !== existingSubscription);
// decrement index because one value is removed
idx--;
}
if (idx === -1) {
newSubscriptions = [subscription];
} else {
newSubscriptions = newSubscriptions.map((oldSubscription, oldSubscriptionIdx) => (oldSubscriptionIdx === idx ? subscription : oldSubscription));
}
setSubscriptions(newSubscriptions);
};
const onRemoveSubscription = (idx: number) => idx >= 0 && setSubscriptions(subscriptions.filter((_, i) => i !== idx));
const withNotificationSubscriptions = (updateApp: ApplicationSummaryProps['updateApp']) => (...args: Parameters<ApplicationSummaryProps['updateApp']>) => {
const app = args[0];
const notificationSubscriptionsRaw = notificationSubscriptionsParser.subscriptionsToAnnotations(subscriptions);
if (Object.keys(notificationSubscriptionsRaw)?.length) {
app.metadata.annotations = {
...notificationSubscriptionsRaw,
...(app.metadata.annotations || {})
};
}
return updateApp(app, args[1]);
};
const onResetNotificationSubscriptions = () => setSubscriptions(notificationSubscriptionsParser.annotationsToSubscriptions(annotations));
return {
/**
* abstraction of notification subscription annotations in edit view
*/
subscriptions,
onAddNewSubscription,
onEditSubscription,
onRemoveSubscription,
/**
* merge abstracted 'subscriptions' into core 'metadata.annotations' in form submit
*/
withNotificationSubscriptions,
onResetNotificationSubscriptions
};
};
export interface EditNotificationSubscriptionsProps extends ReturnType<typeof useEditNotificationSubscriptions> {}
export const EditNotificationSubscriptions = ({subscriptions, onAddNewSubscription, onEditSubscription, onRemoveSubscription}: EditNotificationSubscriptionsProps) => {
return (
<div className='edit-notification-subscriptions argo-field'>
{subscriptions.map((subscription, idx) => (
<div className='edit-notification-subscriptions__subscription' key={idx}>
<input className='argo-field edit-notification-subscriptions__input-prefix' disabled={true} value={NOTIFICATION_SUBSCRIPTION_ANNOTATION_PREFIX} />
<b>&nbsp;.&nbsp;</b>
<DataLoader load={() => services.notification.listTriggers().then(triggers => triggers.map(trigger => trigger.name))}>
{triggersList => (
<Autocomplete
wrapperProps={{
className: 'argo-field edit-notification-subscriptions__autocomplete-wrapper'
}}
inputProps={{
className: 'argo-field',
placeholder: 'on-sync-running',
title: 'Trigger'
}}
value={subscription.trigger}
onChange={e => {
onEditSubscription(idx, {
...subscription,
trigger: e.target.value
});
}}
items={triggersList}
onSelect={trigger => onEditSubscription(idx, {...subscription, trigger})}
filterSuggestions={true}
qeid='application-edit-notification-subscription-trigger'
/>
)}
</DataLoader>
<b>&nbsp;.&nbsp;</b>
<DataLoader load={() => services.notification.listServices().then(_services => _services.map(service => service.name))}>
{serviceList => (
<Autocomplete
wrapperProps={{
className: 'argo-field edit-notification-subscriptions__autocomplete-wrapper'
}}
inputProps={{
className: 'argo-field',
placeholder: 'slack',
title: 'Service'
}}
value={subscription.service}
onChange={e => {
onEditSubscription(idx, {
...subscription,
service: e.target.value
});
}}
items={serviceList}
onSelect={service => onEditSubscription(idx, {...subscription, service})}
filterSuggestions={true}
qeid='application-edit-notification-subscription-service'
/>
)}
</DataLoader>
&nbsp;=&nbsp;
<input
autoComplete='fake'
className='argo-field'
placeholder='my-channel1; my-channel2'
title='Value'
value={subscription.value}
onChange={e => {
onEditSubscription(idx, {
...subscription,
value: e.target.value
});
}}
qe-id='application-edit-notification-subscription-value'
/>
<button className='button-close'>
<i className='fa fa-times' style={{cursor: 'pointer'}} onClick={() => onRemoveSubscription(idx)} />
</button>
</div>
))}
{subscriptions.length === 0 && <label>No items</label>}
<div>
<button className='argo-button argo-button--base argo-button--short' onClick={() => onAddNewSubscription()}>
<i className='fa fa-plus' style={{cursor: 'pointer'}} />
</button>
</div>
</div>
);
};

View File

@@ -11,6 +11,7 @@ export const FORCE_WARNING = `The resources will be synced using '--force' that
export interface ApplicationSyncOptionProps {
options: string[];
onChanged: (updatedOptions: string[]) => any;
id?: string;
}
function selectOption(name: string, label: string, defaultVal: string, values: string[], props: ApplicationSyncOptionProps) {
@@ -47,7 +48,7 @@ function booleanOption(name: string, label: string, defaultVal: boolean, props:
return (
<React.Fragment>
<Checkbox
id={`sync-option-${name}`}
id={`sync-option-${name}-${props.id}`}
checked={checked}
onChange={(val: boolean) => {
if (index < 0) {
@@ -58,7 +59,7 @@ function booleanOption(name: string, label: string, defaultVal: boolean, props:
}
}}
/>
<label htmlFor={`sync-option-${name}`}>{label}</label>{' '}
<label htmlFor={`sync-option-${name}-${props.id}`}>{label}</label>{' '}
{warning && (
<>
<Tooltip content={warning}>
@@ -115,7 +116,7 @@ export const ApplicationSyncOptions = (props: ApplicationSyncOptionProps) => (
</div>
);
export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi: ReactForm.FieldApi}) => {
export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi: ReactForm.FieldApi; id?: string}) => {
const {
fieldApi: {getValue, setValue, setTouched}
} = props;
@@ -125,7 +126,7 @@ export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi:
{Object.keys(ManualSyncFlags).map(flag => (
<React.Fragment key={flag}>
<Checkbox
id={`sync-option-${flag}`}
id={`sync-option-${flag}-${props.id}`}
checked={val[flag]}
onChange={(newVal: boolean) => {
setTouched(true);
@@ -134,7 +135,7 @@ export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi:
setValue(update);
}}
/>
<label htmlFor={`sync-option-${flag}`}>{ManualSyncFlags[flag as keyof typeof ManualSyncFlags]}</label>{' '}
<label htmlFor={`sync-option-${flag}-${props.id}`}>{ManualSyncFlags[flag as keyof typeof ManualSyncFlags]}</label>{' '}
</React.Fragment>
))}
</div>

View File

@@ -8,6 +8,10 @@
display: inline-block;
margin-right: 0.3em;
label {
cursor: pointer;
}
label::before,
label::after {
vertical-align: middle;

View File

@@ -137,10 +137,15 @@ export const ApplicationSyncPanel = ({application, selectedResource, hide}: {app
formApi.setTouched('syncOptions', true);
formApi.setValue('syncOptions', opts);
}}
id='application-sync-panel'
/>
</div>
<ApplicationRetryOptions formApi={formApi} initValues={application.spec.syncPolicy ? application.spec.syncPolicy.retry : null} />
<ApplicationRetryOptions
id='application-sync-panel'
formApi={formApi}
initValues={application.spec.syncPolicy ? application.spec.syncPolicy.retry : null}
/>
<label>Synchronize resources:</label>
<div style={{float: 'right'}}>
@@ -176,9 +181,9 @@ export const ApplicationSyncPanel = ({application, selectedResource, hide}: {app
none
</a>
</div>
{!formApi.values.resources.every((item: boolean) => item) && (
<div className='application-details__warning'>WARNING: partial synchronization is not recorded in history</div>
)}
<div className='application-details__warning'>
{!formApi.values.resources.every((item: boolean) => item) && <div>WARNING: partial synchronization is not recorded in history</div>}
</div>
<div>
{application.status.resources
.filter(item => !item.hook)

View File

@@ -308,18 +308,18 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => {
const loaderRef = React.useRef<DataLoader>();
const {List, Summary, Tiles} = AppsListViewKey;
function refreshApp(appName: string) {
function refreshApp(appName: string, appNamespace: string) {
// app refreshing might be done too quickly so that UI might miss it due to event batching
// add refreshing annotation in the UI to improve user experience
if (loaderRef.current) {
const applications = loaderRef.current.getData() as models.Application[];
const app = applications.find(item => item.metadata.name === appName);
const app = applications.find(item => item.metadata.name === appName && item.metadata.namespace === appNamespace);
if (app) {
AppUtils.setAppRefreshing(app);
loaderRef.current.setData(applications);
}
}
services.applications.get(appName, 'normal');
services.applications.get(appName, appNamespace, 'normal');
}
function onFilterPrefChanged(ctx: ContextApis, newPref: AppsListPreferences) {

View File

@@ -141,10 +141,11 @@ export const ApplicationsSyncPanel = ({show, apps, hide}: {show: boolean; apps:
formApi.setTouched('syncOptions', true);
formApi.setValue('syncOptions', opts);
}}
id='applications-sync-panel'
/>
</div>
<ApplicationRetryOptions formApi={formApi} />
<ApplicationRetryOptions id='applications-sync-panel' formApi={formApi} />
<ApplicationSelector apps={apps} formApi={formApi} />
</div>

View File

@@ -11,6 +11,11 @@
label {
color: #6D7F8B;
font-size: 15px;
cursor: pointer;
}
input {
cursor: pointer;
}
}

Some files were not shown because too many files have changed in this diff Show More