Compare commits

...

50 Commits

Author SHA1 Message Date
argo-bot
9a7b0bc350 Bump version to 2.0.2 2021-05-20 19:23:09 +00:00
argo-bot
ecb935fb97 Bump version to 2.0.2 2021-05-20 19:22:57 +00:00
Alexander Matyushentsev
c207dec78a fix: enable access to metrics port in embedded network policies (#6277)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-20 08:53:42 -07:00
Alexander Matyushentsev
d12b049cda fix: display log streaming error in logs viewer (#6100) (#6273)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-20 08:53:35 -07:00
Remington Breeze
becc64519d fix(ui): Don't count errored or completed neighbor pods toward resource consumption (#6259)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-19 10:05:19 -07:00
jannfis
4accaa5400 fix(backport-2.0): Enable kex algo diffie-hellman-group-exchange-sha256 for go-git ssh (#6256)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-18 19:26:02 +02:00
Joe Bowbeer
beb9370450 fix: copy github app key from repocreds (#6197)
* fix: copy github app key from repocreds

Fixes #6196

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

* Add GitHub App to unit test

Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2021-05-15 17:22:14 +02:00
Jonah Back
1c698f7113 fix: copy github app key from repocreds (#6140)
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-05-15 17:20:53 +02:00
jannfis
6ca3c5e342 chore: Allow ingress traffic to argocd-server by default (#6179)
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-11 18:54:17 -10:00
Remington Breeze
f3175a85e5 fix(ui): UI crashes after reinstalling ArgoCD (#6218)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-05-11 18:03:33 -10:00
Alexander Matyushentsev
bf1a9bc45c feat: add network policies to restrict traffic flow between argocd components (#6156)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-05-11 18:03:21 -10:00
Alexander Matyushentsev
95ada89c5e Revert "feat: Add health checks for kubernetes-external-secrets (#5435)"
This reverts commit 65ecd87027.
2021-04-16 15:02:57 -07:00
argo-bot
33eaf11e3a Bump version to 2.0.1 2021-04-15 22:24:00 +00:00
argo-bot
231ba90a19 Bump version to 2.0.1 2021-04-15 22:23:46 +00:00
Petr Drastil
7d39152c8c fix: spark application check fails on missing section (#6036)
* fix: spark application check fails on missing section

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2021-04-15 15:18:02 -07:00
rumstead
2bbb0b1a1a Adding explicit bind to redis and sentinel for IPv4 clusters #5957 (#6005)
* fix(redis-ha): Adding explicit bind to redis and sentinel config to support IPv4 clusters. Closes #5957

Signed-off-by: Ryan Umstead <ryan.umstead@blackrock.com>
2021-04-12 14:09:12 -07:00
Jonah Back
85728a6dbf fix: use correct field for evaluating whether or not GitHub Enterprise is selected (#5987)
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-04-12 14:03:55 -07:00
argo-bot
f5119c0668 Bump version to 2.0.0 2021-04-07 05:53:45 +00:00
argo-bot
a7b922ee1b Bump version to 2.0.0 2021-04-07 05:53:33 +00:00
Chetan Banavikalmutt
3fa44ed469 feat: allow per-version kustomize options (#5967)
Allow adding build options that are specific to a kustomize version instead of using the same default options for each version.

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-04-06 09:31:04 -07:00
argo-bot
2784b38886 Bump version to 2.0.0-rc4 2021-04-05 23:06:39 +00:00
argo-bot
273803b3d2 Bump version to 2.0.0-rc4 2021-04-05 23:06:21 +00:00
Alexander Matyushentsev
a6426362a9 fix: upgrade gitops-engine to v0.3.2 2021-04-05 15:53:46 -07:00
Alexander Matyushentsev
e513106b1b fix: correct package name in Makefile (#5960)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-04 12:52:56 -07:00
argo-bot
9a07ef0298 Bump version to 2.0.0-rc3 2021-04-02 17:40:28 +00:00
argo-bot
6d0c57ce4f Bump version to 2.0.0-rc3 2021-04-02 17:40:10 +00:00
jannfis
0e818af4d3 chore: Upgrade Go module to v2 (#5931)
* chore: Upgrade Go module to v2

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

* Restore import order

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

* fix knowntypes_normalizer codegen error

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

* fix codegen

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

* fix Procfile

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

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-01 13:11:49 -07:00
Alexander Matyushentsev
5854255462 fix: support loading oci helm dependencies referenced by chart stored in non-oci repo (#5917)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-30 11:15:47 -07:00
argo-bot
9603ae3776 Bump version to 2.0.0-rc2 2021-03-29 21:19:03 +00:00
argo-bot
983f475e7e Bump version to 2.0.0-rc2 2021-03-29 21:18:43 +00:00
Austin Smart
dc27288a78 fix: Use helm login for Oci helm repos. #5856 (#5887)
fix: Use helm login for Oci helm repos. #5856 (#5887)

Signed-off-by: Austin Smart <austin@austinsmart.com>
2021-03-29 13:59:28 -07:00
Alexander Matyushentsev
4da950b0b7 chore: regenerate manifests
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-29 11:46:29 -07:00
Alexander Matyushentsev
bb59b76387 chore: regenerate manifests
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-29 11:12:40 -07:00
jannfis
8735507018 chore: Some linter issues with golangci-lint 1.38 (#5894)
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-29 09:39:08 -07:00
Alexander Matyushentsev
ebb69802b3 fix: fix incorrect OCI Helm registiries assumptions (#5888)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-29 09:38:58 -07:00
May Zhang
1d6c1964fc fix: documentation update for argocd-util settings rbac (#5879)
* fix: documentation update for argocd-util settings rbac

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

* fix: documentation update for argocd-util settings rbac

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-29 09:38:54 -07:00
May Zhang
482584e9f3 fix: global project info is missing in UI (#5861)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-29 09:38:39 -07:00
May Zhang
e147173baf fix: add prefix sync for CLI argocd app flag --retry-limit, --retry-b… (#5876)
* fix: add prefix sync for CLI argocd app flag --retry-limit, --retry-backoff-duration, --retry-backoff-factor and --retry-backoff-max-duration

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-29 09:38:32 -07:00
Alexander Matyushentsev
5f98dbadc5 fix: upgrade gitops engine to v0.3.1
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-29 09:38:20 -07:00
Alexander Matyushentsev
b35e56448b fix: non-cascading application delete is broken (#5875)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-29 09:37:28 -07:00
Remington Breeze
99de7a3d8f fix(ui): Pod logs filter did not refresh on button click. Also add tooltip for clarification (#5858)
Signed-off-by: Remington Breeze <remington@breeze.software>
2021-03-29 09:37:24 -07:00
Alexander Matyushentsev
2ed880a927 chore: fix 'make codegen-local' on mac (#5847)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-03-29 09:37:20 -07:00
Chetan Banavikalmutt
185cdbd099 feat: add exit-code flag to app diff command (#5852)
Using exit-code flag we could control the exit status of the command when there's a diff.

Example:

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

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

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
2021-03-29 09:37:16 -07:00
Kshama Jain
6bef28cfd8 fix: get correct username from jwt token subject (#5836) (#5848)
* fix: get correct username from jwt token subject

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
2021-03-29 09:36:52 -07:00
jannfis
21206e0bac chore: Fix manifest generation in release and make quay.io the lead (#5831)
* chore: Fix manifest generation in release and make quay.io the lead

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

* Fix docker push command

Signed-off-by: jannfis <jann@mistrust.net>
2021-03-29 09:36:47 -07:00
May Zhang
1999ac9715 fix: application specific parameter override is not reflected in application parameters tab (#5845)
Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-29 09:36:01 -07:00
William Tam
2491c3c660 chore: Separate "online" mode from "production" mode in yarn build (#5830)
* Separate "online" mode from "production" mode in yarn build
Signed-off-by: William Tam <email.wtam@gmail.com>

* Signed-off-by: William Tam <email.wtam@gmail.com>
Fix typo
2021-03-22 12:37:53 +00:00
May Zhang
28b2e05daa fix: error when reset application parameters from UI (#5828)
* fix: error when reset kustomize parameters from UI

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

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

This reverts commit 126f210a

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

* fix: error when reset kustomize parameters from UI

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-03-20 11:36:33 -07:00
argo-bot
0ca643f027 Bump version to 2.0.0-rc1 2021-03-19 21:17:57 +00:00
argo-bot
20eae2aebd Bump version to 2.0.0-rc1 2021-03-19 21:17:42 +00:00
356 changed files with 4214 additions and 3337 deletions

View File

@@ -259,6 +259,7 @@ jobs:
yarn build
env:
NODE_ENV: production
NODE_ONLINE_ENV: online
working-directory: ui/
- name: Run ESLint
run: yarn lint

View File

@@ -18,7 +18,7 @@ jobs:
# The name of the tag as supplied by the GitHub event
SOURCE_TAG: ${{ github.ref }}
# The image namespace where Docker image will be published to
IMAGE_NAMESPACE: argoproj
IMAGE_NAMESPACE: quay.io/argoproj
# Whether to create & push image and release assets
DRY_RUN: false
# Whether a draft release should be created, instead of public one
@@ -197,11 +197,12 @@ jobs:
QUAY_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
run: |
set -ue
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
docker push ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
docker login quay.io --username "${QUAY_USERNAME}" --password "${QUAY_TOKEN}"
docker tag ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION} quay.io/${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
docker push quay.io/${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
docker push ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION}
# Remove the following when Docker Hub is gone
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
docker tag ${IMAGE_NAMESPACE}/argocd:v${TARGET_VERSION} argoproj/argocd:v${TARGET_VERSION}
docker push argoproj/argocd:v${TARGET_VERSION}
if: ${{ env.DRY_RUN != 'true' }}
- name: Read release notes file

View File

@@ -97,7 +97,7 @@ ADD ["ui/", "."]
ARG ARGO_VERSION=latest
ENV ARGO_VERSION=$ARGO_VERSION
RUN NODE_ENV='production' yarn build
RUN NODE_ENV='production' NODE_ONLINE_ENV='online' yarn build
####################################################################################################
# Argo CD Build stage which performs the actual build of Argo CD binaries

View File

@@ -1,4 +1,4 @@
PACKAGE=github.com/argoproj/argo-cd/common
PACKAGE=github.com/argoproj/argo-cd/v2/common
CURRENT_DIR=$(shell pwd)
DIST_DIR=${CURRENT_DIR}/dist
CLI_NAME=argocd
@@ -309,7 +309,7 @@ mod-download: test-tools-image
.PHONY: mod-download-local
mod-download-local:
go mod download
go mod download && go mod tidy # go mod download changes go.sum https://github.com/golang/go/issues/42970
.PHONY: mod-vendor
mod-vendor: test-tools-image

View File

@@ -1,6 +1,6 @@
controller: sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-application-controller go run ./cmd/main.go --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
api-server: sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-server go run ./cmd/main.go --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --disable-auth=${ARGOCD_E2E_DISABLE_AUTH:-'true'} --insecure --dex-server http://localhost:${ARGOCD_E2E_DEX_PORT:-5556} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --port ${ARGOCD_E2E_APISERVER_PORT:-8080} --staticassets ui/dist/app"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/cmd gendexcfg -o `pwd`/dist/dex.yaml && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:v2.27.0 serve /dex.yaml"
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v2/cmd gendexcfg -o `pwd`/dist/dex.yaml && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:v2.27.0 serve /dex.yaml"
redis: docker run --rm --name argocd-redis -i -p ${ARGOCD_E2E_REDIS_PORT:-6379}:${ARGOCD_E2E_REDIS_PORT:-6379} redis:6.2.1-alpine --save "" --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}
repo-server: sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-repo-server go run ./cmd/main.go --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379}"
ui: sh -c 'cd ui && ${ARGOCD_E2E_YARN_CMD:-yarn} start'

View File

@@ -1 +1 @@
2.0.0
2.0.2

View File

@@ -3948,6 +3948,9 @@
"type": "object",
"title": "RepoAppDetailsQuery contains query information for app details request",
"properties": {
"appName": {
"type": "string"
},
"source": {
"$ref": "#/definitions/v1alpha1ApplicationSource"
}

View File

@@ -13,21 +13,21 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller"
"github.com/argoproj/argo-cd/controller/sharding"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/util/cache"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/env"
"github.com/argoproj/argo-cd/util/errors"
kubeutil "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/util/tls"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller"
"github.com/argoproj/argo-cd/v2/controller/sharding"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/env"
"github.com/argoproj/argo-cd/v2/util/errors"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/argoproj/argo-cd/v2/util/tls"
)
const (

View File

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

View File

@@ -14,21 +14,21 @@ import (
"github.com/spf13/cobra"
"google.golang.org/grpc/health/grpc_health_v1"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/reposerver"
"github.com/argoproj/argo-cd/reposerver/apiclient"
reposervercache "github.com/argoproj/argo-cd/reposerver/cache"
"github.com/argoproj/argo-cd/reposerver/metrics"
"github.com/argoproj/argo-cd/reposerver/repository"
cacheutil "github.com/argoproj/argo-cd/util/cache"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/env"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/gpg"
"github.com/argoproj/argo-cd/util/healthz"
ioutil "github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/tls"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/reposerver"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
reposervercache "github.com/argoproj/argo-cd/v2/reposerver/cache"
"github.com/argoproj/argo-cd/v2/reposerver/metrics"
"github.com/argoproj/argo-cd/v2/reposerver/repository"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/env"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/gpg"
"github.com/argoproj/argo-cd/v2/util/healthz"
ioutil "github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/tls"
)
const (

View File

@@ -12,18 +12,18 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/server"
servercache "github.com/argoproj/argo-cd/server/cache"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/env"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/tls"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/server"
servercache "github.com/argoproj/argo-cd/v2/server/cache"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/env"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/tls"
)
const (

View File

@@ -20,23 +20,23 @@ import (
kubecache "k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller"
"github.com/argoproj/argo-cd/controller/cache"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
appinformers "github.com/argoproj/argo-cd/pkg/client/informers/externalversions"
"github.com/argoproj/argo-cd/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/util/cache"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
kubeutil "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/settings"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller"
"github.com/argoproj/argo-cd/v2/controller/cache"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
appinformers "github.com/argoproj/argo-cd/v2/pkg/client/informers/externalversions"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/settings"
)
func NewAppCommand() *cobra.Command {

View File

@@ -3,7 +3,7 @@ package commands
import (
"testing"
"github.com/argoproj/argo-cd/test"
"github.com/argoproj/argo-cd/v2/test"
clustermocks "github.com/argoproj/gitops-engine/pkg/cache/mocks"
"github.com/argoproj/gitops-engine/pkg/health"
@@ -16,16 +16,16 @@ import (
kubefake "k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/cache"
"github.com/argoproj/argo-cd/common"
statecache "github.com/argoproj/argo-cd/controller/cache"
cachemocks "github.com/argoproj/argo-cd/controller/cache/mocks"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appfake "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/reposerver/apiclient/mocks"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
statecache "github.com/argoproj/argo-cd/v2/controller/cache"
cachemocks "github.com/argoproj/argo-cd/v2/controller/cache/mocks"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appfake "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient/mocks"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/settings"
)
func TestGetReconcileResults(t *testing.T) {

View File

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

View File

@@ -18,9 +18,9 @@ import (
"k8s.io/client-go/dynamic"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
)
// NewExportCommand defines a new command for exporting Kubernetes and Argo CD resources.

View File

@@ -16,17 +16,17 @@ import (
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller/sharding"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
cacheutil "github.com/argoproj/argo-cd/util/cache"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
kubeutil "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/settings"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller/sharding"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
kubeutil "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/settings"
)
func NewClusterCommand(pathOpts *clientcmd.PathOptions) *cobra.Command {

View File

@@ -7,12 +7,12 @@ import (
"path/filepath"
"strings"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
appclient "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/typed/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
appclient "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/typed/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/spf13/cobra"

View File

@@ -17,10 +17,10 @@ import (
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"

View File

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

View File

@@ -13,13 +13,13 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/settings"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/settings"
)
const (

View File

@@ -23,13 +23,13 @@ import (
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/argo/normalizers"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/lua"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/argo/normalizers"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/lua"
"github.com/argoproj/argo-cd/v2/util/settings"
)
type settingsOpts struct {

View File

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

View File

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

View File

@@ -9,9 +9,9 @@ import (
"os"
"testing"
"github.com/argoproj/argo-cd/common"
utils "github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
utils "github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"

View File

@@ -16,15 +16,15 @@ import (
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
accountpkg "github.com/argoproj/argo-cd/pkg/apiclient/account"
"github.com/argoproj/argo-cd/pkg/apiclient/session"
"github.com/argoproj/argo-cd/server/rbacpolicy"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/localconfig"
sessionutil "github.com/argoproj/argo-cd/util/session"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
accountpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/account"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/session"
"github.com/argoproj/argo-cd/v2/server/rbacpolicy"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/localconfig"
sessionutil "github.com/argoproj/argo-cd/v2/util/session"
)
func NewAccountCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
@@ -99,7 +99,7 @@ func NewAccountUpdatePasswordCommand(clientOpts *argocdclient.ClientOptions) *co
errors.CheckError(err)
claims, err := configCtx.User.Claims()
errors.CheckError(err)
tokenString := passwordLogin(acdClient, claims.Subject, newPassword)
tokenString := passwordLogin(acdClient, localconfig.GetUsername(claims.Subject), newPassword)
localCfg.UpsertUser(localconfig.User{
Name: localCfg.CurrentContext,
AuthToken: tokenString,

View File

@@ -30,28 +30,28 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/pointer"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller"
"github.com/argoproj/argo-cd/pkg/apiclient"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/pkg/apiclient/application"
applicationpkg "github.com/argoproj/argo-cd/pkg/apiclient/application"
clusterpkg "github.com/argoproj/argo-cd/pkg/apiclient/cluster"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apiclient/settings"
settingspkg "github.com/argoproj/argo-cd/pkg/apiclient/settings"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
repoapiclient "github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/reposerver/repository"
"github.com/argoproj/argo-cd/util/argo"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
argoio "github.com/argoproj/argo-cd/util/io"
argokube "github.com/argoproj/argo-cd/util/kube"
"github.com/argoproj/argo-cd/util/templates"
"github.com/argoproj/argo-cd/util/text/label"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller"
"github.com/argoproj/argo-cd/v2/pkg/apiclient"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
applicationpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
clusterpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
settingspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
repoapiclient "github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/reposerver/repository"
"github.com/argoproj/argo-cd/v2/util/argo"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
argoio "github.com/argoproj/argo-cd/v2/util/io"
argokube "github.com/argoproj/argo-cd/v2/util/kube"
"github.com/argoproj/argo-cd/v2/util/templates"
"github.com/argoproj/argo-cd/v2/util/text/label"
)
var (
@@ -798,6 +798,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
var (
refresh bool
hardRefresh bool
exitCode bool
local string
revision string
localRepoRoot string
@@ -901,7 +902,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
_ = cli.PrintDiff(item.key.Name, live, target)
}
}
if foundDiffs {
if foundDiffs && exitCode {
os.Exit(1)
}
@@ -909,6 +910,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co
}
command.Flags().BoolVar(&refresh, "refresh", false, "Refresh application data when retrieving")
command.Flags().BoolVar(&hardRefresh, "hard-refresh", false, "Refresh application data as well as target manifests cache")
command.Flags().BoolVar(&exitCode, "exit-code", true, "Return non-zero exit code when there is a diff")
command.Flags().StringVar(&local, "local", "", "Compare live app to a local manifests")
command.Flags().StringVar(&revision, "revision", "", "Compare live app to a particular revision")
command.Flags().StringVar(&localRepoRoot, "local-repo-root", "/", "Path to the repository root. Used together with --local allows setting the repository root")

View File

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

View File

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

View File

@@ -12,14 +12,14 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
"github.com/argoproj/argo-cd/common"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
clusterpkg "github.com/argoproj/argo-cd/pkg/apiclient/cluster"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/clusterauth"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
"github.com/argoproj/argo-cd/v2/common"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
clusterpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/clusterauth"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewClusterCommand returns a new instance of an `argocd cluster` command

View File

@@ -5,7 +5,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func Test_printClusterTable(t *testing.T) {

View File

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

View File

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

View File

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

View File

@@ -19,17 +19,17 @@ import (
"github.com/spf13/cobra"
"golang.org/x/oauth2"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
sessionpkg "github.com/argoproj/argo-cd/pkg/apiclient/session"
settingspkg "github.com/argoproj/argo-cd/pkg/apiclient/settings"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
grpc_util "github.com/argoproj/argo-cd/util/grpc"
"github.com/argoproj/argo-cd/util/io"
jwtutil "github.com/argoproj/argo-cd/util/jwt"
"github.com/argoproj/argo-cd/util/localconfig"
oidcutil "github.com/argoproj/argo-cd/util/oidc"
"github.com/argoproj/argo-cd/util/rand"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
sessionpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/session"
settingspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/settings"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
grpc_util "github.com/argoproj/argo-cd/v2/util/grpc"
"github.com/argoproj/argo-cd/v2/util/io"
jwtutil "github.com/argoproj/argo-cd/v2/util/jwt"
"github.com/argoproj/argo-cd/v2/util/localconfig"
oidcutil "github.com/argoproj/argo-cd/v2/util/oidc"
"github.com/argoproj/argo-cd/v2/util/rand"
)
// NewLoginCommand returns a new instance of `argocd login` command

View File

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

View File

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

View File

@@ -17,15 +17,15 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/gpg"
argoio "github.com/argoproj/argo-cd/util/io"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/gpg"
argoio "github.com/argoproj/argo-cd/v2/util/io"
)
type policyOpts struct {

View File

@@ -12,12 +12,12 @@ import (
jwtgo "github.com/dgrijalva/jwt-go/v4"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/jwt"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/jwt"
)
const (

View File

@@ -10,11 +10,11 @@ import (
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/pkg/apiclient/project"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/io"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
projectpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/project"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewProjectWindowsCommand returns a new instance of the `argocd proj windows` command

View File

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

View File

@@ -10,14 +10,14 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
repositorypkg "github.com/argoproj/argo-cd/pkg/apiclient/repository"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/io"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
repositorypkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/repository"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewRepoCommand returns a new instance of an `argocd repo` command

View File

@@ -10,13 +10,13 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
repocredspkg "github.com/argoproj/argo-cd/pkg/apiclient/repocreds"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/io"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
repocredspkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/repocreds"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/io"
)
// NewRepoCredsCommand returns a new instance of an `argocd repocreds` command

View File

@@ -4,12 +4,12 @@ import (
"github.com/spf13/cobra"
"k8s.io/client-go/tools/clientcmd"
cmdutil "github.com/argoproj/argo-cd/cmd/util"
argocdclient "github.com/argoproj/argo-cd/pkg/apiclient"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/localconfig"
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/util/cli"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/localconfig"
)
func init() {

View File

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

View File

@@ -7,12 +7,12 @@ import (
"github.com/spf13/cobra"
appcontroller "github.com/argoproj/argo-cd/cmd/argocd-application-controller/commands"
dex "github.com/argoproj/argo-cd/cmd/argocd-dex/commands"
reposerver "github.com/argoproj/argo-cd/cmd/argocd-repo-server/commands"
apiserver "github.com/argoproj/argo-cd/cmd/argocd-server/commands"
util "github.com/argoproj/argo-cd/cmd/argocd-util/commands"
cli "github.com/argoproj/argo-cd/cmd/argocd/commands"
appcontroller "github.com/argoproj/argo-cd/v2/cmd/argocd-application-controller/commands"
dex "github.com/argoproj/argo-cd/v2/cmd/argocd-dex/commands"
reposerver "github.com/argoproj/argo-cd/v2/cmd/argocd-repo-server/commands"
apiserver "github.com/argoproj/argo-cd/v2/cmd/argocd-server/commands"
util "github.com/argoproj/argo-cd/v2/cmd/argocd-util/commands"
cli "github.com/argoproj/argo-cd/v2/cmd/argocd/commands"
)
const (

View File

@@ -15,12 +15,12 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/text/label"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/text/label"
)
type AppOptions struct {
@@ -111,10 +111,10 @@ func AddAppFlags(command *cobra.Command, opts *AppOptions) {
command.Flags().StringArrayVar(&opts.kustomizeCommonAnnotations, "kustomize-common-annotation", []string{}, "Set common labels in Kustomize")
command.Flags().StringVar(&opts.directoryExclude, "directory-exclude", "", "Set glob expression used to exclude files from application source path")
command.Flags().StringVar(&opts.directoryInclude, "directory-include", "", "Set glob expression used to include files from application source path")
command.Flags().Int64Var(&opts.retryLimit, "retry-limit", 0, "Max number of allowed sync retries")
command.Flags().DurationVar(&opts.retryBackoffDuration, "retry-backoff-duration", common.DefaultSyncRetryDuration, "Retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().DurationVar(&opts.retryBackoffMaxDuration, "retry-backoff-max-duration", common.DefaultSyncRetryMaxDuration, "Max retry backoff duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().Int64Var(&opts.retryBackoffFactor, "retry-backoff-factor", common.DefaultSyncRetryFactor, "Factor multiplies the base duration after each failed retry")
command.Flags().Int64Var(&opts.retryLimit, "sync-retry-limit", 0, "Max number of allowed sync retries")
command.Flags().DurationVar(&opts.retryBackoffDuration, "sync-retry-backoff-duration", common.DefaultSyncRetryDuration, "Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().DurationVar(&opts.retryBackoffMaxDuration, "sync-retry-backoff-max-duration", common.DefaultSyncRetryMaxDuration, "Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h)")
command.Flags().Int64Var(&opts.retryBackoffFactor, "sync-retry-backoff-factor", common.DefaultSyncRetryFactor, "Factor multiplies the base duration after each failed sync retry")
}
func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, appOpts *AppOptions) int {
@@ -248,7 +248,7 @@ func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap
if spec.SyncPolicy.IsZero() {
spec.SyncPolicy = nil
}
case "retry-limit":
case "sync-retry-limit":
if appOpts.retryLimit > 0 {
if spec.SyncPolicy == nil {
spec.SyncPolicy = &argoappv1.SyncPolicy{}
@@ -268,7 +268,7 @@ func SetAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap
spec.SyncPolicy.Retry = nil
}
} else {
log.Fatalf("Invalid retry-limit [%d]", appOpts.retryLimit)
log.Fatalf("Invalid sync-retry-limit [%d]", appOpts.retryLimit)
}
}
})

View File

@@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func Test_setHelmOpt(t *testing.T) {
@@ -165,10 +165,10 @@ func Test_setAppSpecOptions(t *testing.T) {
assert.Nil(t, f.spec.SyncPolicy)
})
t.Run("RetryLimit", func(t *testing.T) {
assert.NoError(t, f.SetFlag("retry-limit", "5"))
assert.NoError(t, f.SetFlag("sync-retry-limit", "5"))
assert.True(t, f.spec.SyncPolicy.Retry.Limit == 5)
assert.NoError(t, f.SetFlag("retry-limit", "0"))
assert.Nil(t, f.spec.SyncPolicy)
assert.NoError(t, f.SetFlag("sync-retry-limit", "0"))
assert.Nil(t, f.spec.SyncPolicy.Retry)
})
}

View File

@@ -12,8 +12,8 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/errors"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/errors"
)
func PrintKubeContexts(ca clientcmd.ConfigAccess) {

View File

@@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"k8s.io/client-go/rest"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func Test_newCluster(t *testing.T) {

View File

@@ -13,10 +13,10 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"github.com/argoproj/argo-cd/pkg/apis/application"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/config"
"github.com/argoproj/argo-cd/util/gpg"
"github.com/argoproj/argo-cd/v2/pkg/apis/application"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/config"
"github.com/argoproj/argo-cd/v2/util/gpg"
)
type ProjectOpts struct {

View File

@@ -3,8 +3,8 @@ package util
import (
"github.com/spf13/cobra"
"github.com/argoproj/argo-cd/common"
appsv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/common"
appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
type RepoOptions struct {

View File

@@ -39,22 +39,22 @@ import (
// make sure to register workqueue prometheus metrics
_ "k8s.io/component-base/metrics/prometheus/workqueue"
"github.com/argoproj/argo-cd/common"
statecache "github.com/argoproj/argo-cd/controller/cache"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application"
appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/pkg/client/informers/externalversions/application/v1alpha1"
applisters "github.com/argoproj/argo-cd/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/util/argo"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/errors"
"github.com/argoproj/argo-cd/util/glob"
logutils "github.com/argoproj/argo-cd/util/log"
settings_util "github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
statecache "github.com/argoproj/argo-cd/v2/controller/cache"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application"
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/pkg/client/informers/externalversions/application/v1alpha1"
applisters "github.com/argoproj/argo-cd/v2/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/util/argo"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/errors"
"github.com/argoproj/argo-cd/v2/util/glob"
logutils "github.com/argoproj/argo-cd/v2/util/log"
settings_util "github.com/argoproj/argo-cd/v2/util/settings"
)
const (
@@ -413,11 +413,13 @@ func (ctrl *ApplicationController) getAppHosts(a *appv1.Application, appNodes []
appPods[kube.NewResourceKey(node.Group, node.Kind, node.Namespace, node.Name)] = true
}
}
allNodesInfo := map[string]statecache.NodeInfo{}
allPodsByNode := map[string][]statecache.PodInfo{}
appPodsByNode := map[string][]statecache.PodInfo{}
err := ctrl.stateCache.IterateResources(a.Spec.Destination.Server, func(res *clustercache.Resource, info *statecache.ResourceInfo) {
key := res.ResourceKey()
switch {
case info.NodeInfo != nil && key.Group == "" && key.Kind == "Node":
allNodesInfo[key.Name] = *info.NodeInfo
@@ -464,7 +466,7 @@ func (ctrl *ApplicationController) getAppHosts(a *appv1.Application, appNodes []
for _, pod := range neighbors {
for name, resource := range pod.ResourceRequests {
if !supportedResourceNames[name] {
if !supportedResourceNames[name] || pod.Phase == v1.PodSucceeded || pod.Phase == v1.PodFailed {
continue
}
info := resources[name]

View File

@@ -10,7 +10,7 @@ import (
clustercache "github.com/argoproj/gitops-engine/pkg/cache"
statecache "github.com/argoproj/argo-cd/controller/cache"
statecache "github.com/argoproj/argo-cd/v2/controller/cache"
"github.com/argoproj/gitops-engine/pkg/cache/mocks"
synccommon "github.com/argoproj/gitops-engine/pkg/sync/common"
@@ -29,16 +29,16 @@ import (
kubetesting "k8s.io/client-go/testing"
"k8s.io/client-go/tools/cache"
"github.com/argoproj/argo-cd/common"
mockstatecache "github.com/argoproj/argo-cd/controller/cache/mocks"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/reposerver/apiclient"
mockrepoclient "github.com/argoproj/argo-cd/reposerver/apiclient/mocks"
"github.com/argoproj/argo-cd/test"
cacheutil "github.com/argoproj/argo-cd/util/cache"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
mockstatecache "github.com/argoproj/argo-cd/v2/controller/cache/mocks"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
mockrepoclient "github.com/argoproj/argo-cd/v2/reposerver/apiclient/mocks"
"github.com/argoproj/argo-cd/v2/test"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/settings"
)
type namespacedResource struct {

View File

@@ -18,14 +18,14 @@ import (
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller/metrics"
appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/argo"
"github.com/argoproj/argo-cd/util/db"
logutils "github.com/argoproj/argo-cd/util/log"
"github.com/argoproj/argo-cd/util/lua"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller/metrics"
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/argo"
"github.com/argoproj/argo-cd/v2/util/db"
logutils "github.com/argoproj/argo-cd/v2/util/log"
"github.com/argoproj/argo-cd/v2/util/lua"
"github.com/argoproj/argo-cd/v2/util/settings"
)
type LiveStateCache interface {
@@ -56,6 +56,7 @@ type ObjectUpdatedHandler = func(managedByApp map[string]bool, ref v1.ObjectRefe
type PodInfo struct {
NodeName string
ResourceRequests v1.ResourceList
Phase v1.PodPhase
}
type NodeInfo struct {

View File

@@ -9,7 +9,7 @@ import (
"github.com/argoproj/gitops-engine/pkg/cache/mocks"
"github.com/stretchr/testify/mock"
appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func TestHandleModEvent_HasChanges(t *testing.T) {

View File

@@ -11,9 +11,9 @@ import (
"k8s.io/apimachinery/pkg/runtime"
resourcehelper "k8s.io/kubectl/pkg/util/resource"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/util/resource"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/resource"
)
func populateNodeInfo(un *unstructured.Unstructured, res *ResourceInfo) {
@@ -324,7 +324,7 @@ func populatePodInfo(un *unstructured.Unstructured, res *ResourceInfo) {
}
req, _ := resourcehelper.PodRequestsAndLimits(&pod)
res.PodInfo = &PodInfo{NodeName: pod.Spec.NodeName, ResourceRequests: req}
res.PodInfo = &PodInfo{NodeName: pod.Spec.NodeName, ResourceRequests: req, Phase: pod.Status.Phase}
res.Info = append(res.Info, v1alpha1.InfoItem{Name: "Node", Value: pod.Spec.NodeName})
res.Info = append(res.Info, v1alpha1.InfoItem{Name: "Containers", Value: fmt.Sprintf("%d/%d", readyContainers, totalContainers)})

View File

@@ -15,7 +15,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func strToUnstructured(jsonStr string) *unstructured.Unstructured {

View File

@@ -7,7 +7,7 @@ import (
cache "github.com/argoproj/gitops-engine/pkg/cache"
controllercache "github.com/argoproj/argo-cd/controller/cache"
controllercache "github.com/argoproj/argo-cd/v2/controller/cache"
kube "github.com/argoproj/gitops-engine/pkg/utils/kube"
@@ -19,7 +19,7 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1alpha1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
// LiveStateCache is an autogenerated mock type for the LiveStateCache type

View File

@@ -10,12 +10,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"github.com/argoproj/argo-cd/controller/metrics"
appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/util/argo"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/v2/controller/metrics"
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/argo"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/db"
)
const (

View File

@@ -6,14 +6,14 @@ import (
"testing"
"time"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appsfake "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/fake"
appinformers "github.com/argoproj/argo-cd/pkg/client/informers/externalversions/application/v1alpha1"
applisters "github.com/argoproj/argo-cd/pkg/client/listers/application/v1alpha1"
cacheutil "github.com/argoproj/argo-cd/util/cache"
"github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appsfake "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake"
appinformers "github.com/argoproj/argo-cd/v2/pkg/client/informers/externalversions/application/v1alpha1"
applisters "github.com/argoproj/argo-cd/v2/pkg/client/listers/application/v1alpha1"
cacheutil "github.com/argoproj/argo-cd/v2/util/cache"
"github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/settings"
clustercache "github.com/argoproj/gitops-engine/pkg/cache"
"github.com/stretchr/testify/assert"

View File

@@ -16,10 +16,10 @@ import (
log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/labels"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
applister "github.com/argoproj/argo-cd/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/util/git"
"github.com/argoproj/argo-cd/util/healthz"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
applister "github.com/argoproj/argo-cd/v2/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/healthz"
)
type MetricsServer struct {

View File

@@ -17,10 +17,10 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/cache"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned/fake"
appinformer "github.com/argoproj/argo-cd/pkg/client/informers/externalversions"
applister "github.com/argoproj/argo-cd/pkg/client/listers/application/v1alpha1"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake"
appinformer "github.com/argoproj/argo-cd/v2/pkg/client/informers/externalversions"
applister "github.com/argoproj/argo-cd/v2/pkg/client/listers/application/v1alpha1"
)
const fakeApp = `

View File

@@ -6,7 +6,7 @@ import (
"github.com/argoproj/pkg/kubeclientmetrics"
"k8s.io/client-go/rest"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
// AddMetricsTransportWrapper adds a transport wrapper which increments 'argocd_app_k8s_request_total' counter on each kubernetes request

View File

@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
func InferShard() (int, error) {

View File

@@ -3,7 +3,7 @@ package sharding
import (
"testing"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
)

View File

@@ -22,21 +22,21 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/cache"
"github.com/argoproj/argo-cd/common"
statecache "github.com/argoproj/argo-cd/controller/cache"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/util/argo"
appstatecache "github.com/argoproj/argo-cd/util/cache/appstate"
"github.com/argoproj/argo-cd/util/db"
"github.com/argoproj/argo-cd/util/gpg"
argohealth "github.com/argoproj/argo-cd/util/health"
"github.com/argoproj/argo-cd/util/io"
"github.com/argoproj/argo-cd/util/settings"
"github.com/argoproj/argo-cd/util/stats"
"github.com/argoproj/argo-cd/v2/common"
statecache "github.com/argoproj/argo-cd/v2/controller/cache"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/util/argo"
appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate"
"github.com/argoproj/argo-cd/v2/util/db"
"github.com/argoproj/argo-cd/v2/util/gpg"
argohealth "github.com/argoproj/argo-cd/v2/util/health"
"github.com/argoproj/argo-cd/v2/util/io"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/argoproj/argo-cd/v2/util/stats"
)
type resourceInfoProviderStub struct {
@@ -348,9 +348,11 @@ func (m *appStateManager) diffArrayCached(configArray []*unstructured.Unstructur
}
dr = res
}
diffResultList.Diffs[i] = *dr
if dr != nil && dr.Modified {
diffResultList.Modified = true
if dr != nil {
diffResultList.Diffs[i] = *dr
if dr.Modified {
diffResultList.Modified = true
}
}
}

View File

@@ -17,10 +17,10 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"github.com/argoproj/argo-cd/common"
argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/test"
"github.com/argoproj/argo-cd/v2/common"
argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/test"
)
// TestCompareAppStateEmpty tests comparison when both git and live have no objects

View File

@@ -16,14 +16,14 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
cdcommon "github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/controller/metrics"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
listersv1alpha1 "github.com/argoproj/argo-cd/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/util/argo"
logutils "github.com/argoproj/argo-cd/util/log"
"github.com/argoproj/argo-cd/util/lua"
"github.com/argoproj/argo-cd/util/rand"
cdcommon "github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/controller/metrics"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
listersv1alpha1 "github.com/argoproj/argo-cd/v2/pkg/client/listers/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/argo"
logutils "github.com/argoproj/argo-cd/v2/util/log"
"github.com/argoproj/argo-cd/v2/util/lua"
"github.com/argoproj/argo-cd/v2/util/rand"
)
var syncIdPrefix uint64 = 0

View File

@@ -11,9 +11,9 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/reposerver/apiclient"
"github.com/argoproj/argo-cd/test"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/test"
)
func TestPersistRevisionHistory(t *testing.T) {

View File

@@ -224,7 +224,11 @@ data:
# Build options/parameters to use with `kustomize build` (optional)
kustomize.buildOptions: --load_restrictor none
# Additional Kustomize versions and corresponding binary paths
# Per-version build options and binary paths
kustomize.path.v3.9.1: /custom-tools/kustomize_3_9
kustomize.buildOptions.v3.9.1: --enable_kyaml true
# Additional Kustomize versions and corresponding binary paths (deprecated)
kustomize.version.v3.5.1: /custom-tools/kustomize_3_5_1
kustomize.version.v3.5.4: /custom-tools/kustomize_3_5_4

View File

@@ -33,55 +33,55 @@ argocd-util app generate-spec APPNAME [flags]
### Options
```
--allow-empty Set allow zero live resources when sync is automated
--auto-prune Set automatic pruning when sync is automated
--config-management-plugin string Config management plugin name
--dest-name string K8s cluster Name (e.g. minikube)
--dest-namespace string K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)
--dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc)
--directory-exclude string Set glob expression used to exclude files from application source path
--directory-include string Set glob expression used to include files from application source path
--directory-recurse Recurse directory
--env string Application environment to monitor
-f, --file string Filename or URL to Kubernetes manifests for the app
--helm-chart string Helm Chart name
--helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
--helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
--helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
--helm-version string Helm version
-h, --help help for generate-spec
--jsonnet-ext-var-code stringArray Jsonnet ext var
--jsonnet-ext-var-str stringArray Jsonnet string ext var
--jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot)
--jsonnet-tla-code stringArray Jsonnet top level code arguments
--jsonnet-tla-str stringArray Jsonnet top level string arguments
--kustomize-common-annotation stringArray Set common labels in Kustomize
--kustomize-common-label stringArray Set common labels in Kustomize
--kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
--kustomize-version string Kustomize version
-l, --label stringArray Labels to apply to the app
--name string A name for the app, ignored if a file is set (DEPRECATED)
--nameprefix string Kustomize nameprefix
--namesuffix string Kustomize namesuffix
-o, --output string Output format. One of: json|yaml (default "yaml")
-p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
--path string Path in repository to the app directory, ignored if a file is set
--plugin-env stringArray Additional plugin envs
--project string Application project name
--release-name string Helm release-name
--repo string Repository URL, ignored if a file is set
--retry-backoff-duration duration Retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
--retry-backoff-factor int Factor multiplies the base duration after each failed retry (default 2)
--retry-backoff-max-duration duration Max retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
--retry-limit int Max number of allowed sync retries
--revision string The tracking source branch, tag, commit or Helm chart version the application will sync to
--revision-history-limit int How many items to keep in revision history (default 10)
--self-heal Set self healing when sync is automated
--sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
--sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
--validate Validation of repo and cluster (default true)
--values stringArray Helm values file(s) to use
--values-literal-file string Filename or URL to import as a literal Helm values block
--allow-empty Set allow zero live resources when sync is automated
--auto-prune Set automatic pruning when sync is automated
--config-management-plugin string Config management plugin name
--dest-name string K8s cluster Name (e.g. minikube)
--dest-namespace string K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)
--dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc)
--directory-exclude string Set glob expression used to exclude files from application source path
--directory-include string Set glob expression used to include files from application source path
--directory-recurse Recurse directory
--env string Application environment to monitor
-f, --file string Filename or URL to Kubernetes manifests for the app
--helm-chart string Helm Chart name
--helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
--helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
--helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
--helm-version string Helm version
-h, --help help for generate-spec
--jsonnet-ext-var-code stringArray Jsonnet ext var
--jsonnet-ext-var-str stringArray Jsonnet string ext var
--jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot)
--jsonnet-tla-code stringArray Jsonnet top level code arguments
--jsonnet-tla-str stringArray Jsonnet top level string arguments
--kustomize-common-annotation stringArray Set common labels in Kustomize
--kustomize-common-label stringArray Set common labels in Kustomize
--kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
--kustomize-version string Kustomize version
-l, --label stringArray Labels to apply to the app
--name string A name for the app, ignored if a file is set (DEPRECATED)
--nameprefix string Kustomize nameprefix
--namesuffix string Kustomize namesuffix
-o, --output string Output format. One of: json|yaml (default "yaml")
-p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
--path string Path in repository to the app directory, ignored if a file is set
--plugin-env stringArray Additional plugin envs
--project string Application project name
--release-name string Helm release-name
--repo string Repository URL, ignored if a file is set
--revision string The tracking source branch, tag, commit or Helm chart version the application will sync to
--revision-history-limit int How many items to keep in revision history (default 10)
--self-heal Set self healing when sync is automated
--sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
--sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
--sync-retry-backoff-duration duration Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
--sync-retry-backoff-factor int Factor multiplies the base duration after each failed sync retry (default 2)
--sync-retry-backoff-max-duration duration Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
--sync-retry-limit int Max number of allowed sync retries
--validate Validation of repo and cluster (default true)
--values stringArray Helm values file(s) to use
--values-literal-file string Filename or URL to import as a literal Helm values block
```
### SEE ALSO

View File

@@ -1,20 +0,0 @@
## argocd-util rbac
Validate and test RBAC configuration
```
argocd-util rbac [flags]
```
### Options
```
-h, --help help for rbac
```
### SEE ALSO
* [argocd-util](argocd-util.md) - argocd-util tools used by Argo CD
* [argocd-util rbac can](argocd-util_rbac_can.md) - Check RBAC permissions for a role or subject
* [argocd-util rbac validate](argocd-util_rbac_validate.md) - Validate RBAC policy

View File

@@ -1,70 +0,0 @@
## argocd-util rbac can
Check RBAC permissions for a role or subject
### Synopsis
Check whether a given role or subject has appropriate RBAC permissions to do
something.
```
argocd-util rbac can ROLE/SUBJECT ACTION RESOURCE [SUB-RESOURCE] [flags]
```
### Examples
```
# Check whether role some:role has permissions to create an application in the
# 'default' project, using a local policy.csv file
argocd-util rbac can some:role create application 'default/app' --policy-file policy.csv
# Policy file can also be K8s config map with data keys like argocd-rbac-cm,
# i.e. 'policy.csv' and (optionally) 'policy.default'
argocd-util rbac can some:role create application 'default/app' --policy-file argocd-rbac-cm.yaml
# If --policy-file is not given, the ConfigMap 'argocd-rbac-cm' from K8s is
# used. You need to specify the argocd namespace, and make sure that your
# current Kubernetes context is pointing to the cluster Argo CD is running in
argocd-util rbac can some:role create application 'default/app' --namespace argocd
# You can override a possibly configured default role
argocd-util rbac can someuser create application 'default/app' --default-role role:readonly
```
### Options
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--default-role string name of the default role to use
-h, --help help for can
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to a kube config. Only required if out-of-cluster
-n, --namespace string If present, the namespace scope for this CLI request
--password string Password for basic authentication to the API server
--policy-file string path to the policy file to use
-q, --quiet quiet mode - do not print results to stdout
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
--server string The address and port of the Kubernetes API server
--strict whether to perform strict check on action and resource names (default true)
--tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used.
--token string Bearer token for authentication to the API server
--use-builtin-policy whether to also use builtin-policy (default true)
--user string The name of the kubeconfig user to use
--username string Username for basic authentication to the API server
```
### SEE ALSO
* [argocd-util rbac](argocd-util_rbac.md) - Validate and test RBAC configuration

View File

@@ -1,26 +0,0 @@
## argocd-util rbac validate
Validate RBAC policy
### Synopsis
Validates an RBAC policy for being syntactically correct. The policy must be
a local file, and in either CSV or K8s ConfigMap format.
```
argocd-util rbac validate --policy-file=POLICYFILE [flags]
```
### Options
```
-h, --help help for validate
--policy-file string path to the policy file to use
```
### SEE ALSO
* [argocd-util rbac](argocd-util_rbac.md) - Validate and test RBAC configuration

View File

@@ -19,19 +19,19 @@ argocd-util settings rbac can ROLE/SUBJECT ACTION RESOURCE [SUB-RESOURCE] [flags
# Check whether role some:role has permissions to create an application in the
# 'default' project, using a local policy.csv file
argocd-util rbac can some:role create application 'default/app' --policy-file policy.csv
argocd-util settings rbac can some:role create application 'default/app' --policy-file policy.csv
# Policy file can also be K8s config map with data keys like argocd-rbac-cm,
# i.e. 'policy.csv' and (optionally) 'policy.default'
argocd-util rbac can some:role create application 'default/app' --policy-file argocd-rbac-cm.yaml
argocd-util settings rbac can some:role create application 'default/app' --policy-file argocd-rbac-cm.yaml
# If --policy-file is not given, the ConfigMap 'argocd-rbac-cm' from K8s is
# used. You need to specify the argocd namespace, and make sure that your
# current Kubernetes context is pointing to the cluster Argo CD is running in
argocd-util rbac can some:role create application 'default/app' --namespace argocd
argocd-util settings rbac can some:role create application 'default/app' --namespace argocd
# You can override a possibly configured default role
argocd-util rbac can someuser create application 'default/app' --default-role role:readonly
argocd-util settings rbac can someuser create application 'default/app' --default-role role:readonly
```

View File

@@ -33,55 +33,55 @@ argocd app create APPNAME [flags]
### Options
```
--allow-empty Set allow zero live resources when sync is automated
--auto-prune Set automatic pruning when sync is automated
--config-management-plugin string Config management plugin name
--dest-name string K8s cluster Name (e.g. minikube)
--dest-namespace string K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)
--dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc)
--directory-exclude string Set glob expression used to exclude files from application source path
--directory-include string Set glob expression used to include files from application source path
--directory-recurse Recurse directory
--env string Application environment to monitor
-f, --file string Filename or URL to Kubernetes manifests for the app
--helm-chart string Helm Chart name
--helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
--helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
--helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
--helm-version string Helm version
-h, --help help for create
--jsonnet-ext-var-code stringArray Jsonnet ext var
--jsonnet-ext-var-str stringArray Jsonnet string ext var
--jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot)
--jsonnet-tla-code stringArray Jsonnet top level code arguments
--jsonnet-tla-str stringArray Jsonnet top level string arguments
--kustomize-common-annotation stringArray Set common labels in Kustomize
--kustomize-common-label stringArray Set common labels in Kustomize
--kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
--kustomize-version string Kustomize version
-l, --label stringArray Labels to apply to the app
--name string A name for the app, ignored if a file is set (DEPRECATED)
--nameprefix string Kustomize nameprefix
--namesuffix string Kustomize namesuffix
-p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
--path string Path in repository to the app directory, ignored if a file is set
--plugin-env stringArray Additional plugin envs
--project string Application project name
--release-name string Helm release-name
--repo string Repository URL, ignored if a file is set
--retry-backoff-duration duration Retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
--retry-backoff-factor int Factor multiplies the base duration after each failed retry (default 2)
--retry-backoff-max-duration duration Max retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
--retry-limit int Max number of allowed sync retries
--revision string The tracking source branch, tag, commit or Helm chart version the application will sync to
--revision-history-limit int How many items to keep in revision history (default 10)
--self-heal Set self healing when sync is automated
--sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
--sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
--upsert Allows to override application with the same name even if supplied application spec is different from existing spec
--validate Validation of repo and cluster (default true)
--values stringArray Helm values file(s) to use
--values-literal-file string Filename or URL to import as a literal Helm values block
--allow-empty Set allow zero live resources when sync is automated
--auto-prune Set automatic pruning when sync is automated
--config-management-plugin string Config management plugin name
--dest-name string K8s cluster Name (e.g. minikube)
--dest-namespace string K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)
--dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc)
--directory-exclude string Set glob expression used to exclude files from application source path
--directory-include string Set glob expression used to include files from application source path
--directory-recurse Recurse directory
--env string Application environment to monitor
-f, --file string Filename or URL to Kubernetes manifests for the app
--helm-chart string Helm Chart name
--helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
--helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
--helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
--helm-version string Helm version
-h, --help help for create
--jsonnet-ext-var-code stringArray Jsonnet ext var
--jsonnet-ext-var-str stringArray Jsonnet string ext var
--jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot)
--jsonnet-tla-code stringArray Jsonnet top level code arguments
--jsonnet-tla-str stringArray Jsonnet top level string arguments
--kustomize-common-annotation stringArray Set common labels in Kustomize
--kustomize-common-label stringArray Set common labels in Kustomize
--kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
--kustomize-version string Kustomize version
-l, --label stringArray Labels to apply to the app
--name string A name for the app, ignored if a file is set (DEPRECATED)
--nameprefix string Kustomize nameprefix
--namesuffix string Kustomize namesuffix
-p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
--path string Path in repository to the app directory, ignored if a file is set
--plugin-env stringArray Additional plugin envs
--project string Application project name
--release-name string Helm release-name
--repo string Repository URL, ignored if a file is set
--revision string The tracking source branch, tag, commit or Helm chart version the application will sync to
--revision-history-limit int How many items to keep in revision history (default 10)
--self-heal Set self healing when sync is automated
--sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
--sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
--sync-retry-backoff-duration duration Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
--sync-retry-backoff-factor int Factor multiplies the base duration after each failed sync retry (default 2)
--sync-retry-backoff-max-duration duration Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
--sync-retry-limit int Max number of allowed sync retries
--upsert Allows to override application with the same name even if supplied application spec is different from existing spec
--validate Validation of repo and cluster (default true)
--values stringArray Helm values file(s) to use
--values-literal-file string Filename or URL to import as a literal Helm values block
```
### Options inherited from parent commands

View File

@@ -15,6 +15,7 @@ argocd app diff APPNAME [flags]
### Options
```
--exit-code Return non-zero exit code when there is a diff (default true)
--hard-refresh Refresh application data as well as target manifests cache
-h, --help help for diff
--local string Compare live app to a local manifests

View File

@@ -9,51 +9,51 @@ argocd app set APPNAME [flags]
### Options
```
--allow-empty Set allow zero live resources when sync is automated
--auto-prune Set automatic pruning when sync is automated
--config-management-plugin string Config management plugin name
--dest-name string K8s cluster Name (e.g. minikube)
--dest-namespace string K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)
--dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc)
--directory-exclude string Set glob expression used to exclude files from application source path
--directory-include string Set glob expression used to include files from application source path
--directory-recurse Recurse directory
--env string Application environment to monitor
--helm-chart string Helm Chart name
--helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
--helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
--helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
--helm-version string Helm version
-h, --help help for set
--jsonnet-ext-var-code stringArray Jsonnet ext var
--jsonnet-ext-var-str stringArray Jsonnet string ext var
--jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot)
--jsonnet-tla-code stringArray Jsonnet top level code arguments
--jsonnet-tla-str stringArray Jsonnet top level string arguments
--kustomize-common-annotation stringArray Set common labels in Kustomize
--kustomize-common-label stringArray Set common labels in Kustomize
--kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
--kustomize-version string Kustomize version
--nameprefix string Kustomize nameprefix
--namesuffix string Kustomize namesuffix
-p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
--path string Path in repository to the app directory, ignored if a file is set
--plugin-env stringArray Additional plugin envs
--project string Application project name
--release-name string Helm release-name
--repo string Repository URL, ignored if a file is set
--retry-backoff-duration duration Retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
--retry-backoff-factor int Factor multiplies the base duration after each failed retry (default 2)
--retry-backoff-max-duration duration Max retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
--retry-limit int Max number of allowed sync retries
--revision string The tracking source branch, tag, commit or Helm chart version the application will sync to
--revision-history-limit int How many items to keep in revision history (default 10)
--self-heal Set self healing when sync is automated
--sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
--sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
--validate Validation of repo and cluster (default true)
--values stringArray Helm values file(s) to use
--values-literal-file string Filename or URL to import as a literal Helm values block
--allow-empty Set allow zero live resources when sync is automated
--auto-prune Set automatic pruning when sync is automated
--config-management-plugin string Config management plugin name
--dest-name string K8s cluster Name (e.g. minikube)
--dest-namespace string K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)
--dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc)
--directory-exclude string Set glob expression used to exclude files from application source path
--directory-include string Set glob expression used to include files from application source path
--directory-recurse Recurse directory
--env string Application environment to monitor
--helm-chart string Helm Chart name
--helm-set stringArray Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
--helm-set-file stringArray Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
--helm-set-string stringArray Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
--helm-version string Helm version
-h, --help help for set
--jsonnet-ext-var-code stringArray Jsonnet ext var
--jsonnet-ext-var-str stringArray Jsonnet string ext var
--jsonnet-libs stringArray Additional jsonnet libs (prefixed by repoRoot)
--jsonnet-tla-code stringArray Jsonnet top level code arguments
--jsonnet-tla-str stringArray Jsonnet top level string arguments
--kustomize-common-annotation stringArray Set common labels in Kustomize
--kustomize-common-label stringArray Set common labels in Kustomize
--kustomize-image stringArray Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
--kustomize-version string Kustomize version
--nameprefix string Kustomize nameprefix
--namesuffix string Kustomize namesuffix
-p, --parameter stringArray set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
--path string Path in repository to the app directory, ignored if a file is set
--plugin-env stringArray Additional plugin envs
--project string Application project name
--release-name string Helm release-name
--repo string Repository URL, ignored if a file is set
--revision string The tracking source branch, tag, commit or Helm chart version the application will sync to
--revision-history-limit int How many items to keep in revision history (default 10)
--self-heal Set self healing when sync is automated
--sync-option Prune=false Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
--sync-policy string Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
--sync-retry-backoff-duration duration Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
--sync-retry-backoff-factor int Factor multiplies the base duration after each failed sync retry (default 2)
--sync-retry-backoff-max-duration duration Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
--sync-retry-limit int Max number of allowed sync retries
--validate Validation of repo and cluster (default true)
--values stringArray Helm values file(s) to use
--values-literal-file string Filename or URL to import as a literal Helm values block
```
### Options inherited from parent commands

View File

@@ -23,7 +23,7 @@ Read more about [private repos](private-repositories.md).
## `kustomize build` Options/Parameters
To provide build options to `kustomize build` add a property to the ArgoCD CM under data:
To provide build options to `kustomize build` of default kustomize version, use `kustomize.buildOptions` field of `argocd-cm` ConfigMap. Use `kustomize.buildOptions.<version>` to register version specific build options.
```yaml
apiVersion: v1
@@ -36,12 +36,13 @@ metadata:
app.kubernetes.io/part-of: argocd
data:
kustomize.buildOptions: --load_restrictor none
kustomize.buildOptions.v3.9.1: --output /tmp
```
## Custom Kustomize versions
Argo CD supports using multiple kustomize versions simultaneously and specifies required version per application.
To add additional versions make sure required versions are [bundled](../operator-manual/custom_tools.md) and then
use `kustomize.version.<version>` fields of `argocd-cm` ConfigMap to register bundled additional versions.
use `kustomize.path.<version>` fields of `argocd-cm` ConfigMap to register bundled additional versions.
```yaml
apiVersion: v1
@@ -53,8 +54,8 @@ metadata:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
kustomize.version.v3.5.1: /custom-tools/kustomize_3_5_1
kustomize.version.v3.5.4: /custom-tools/kustomize_3_5_4
kustomize.path.v3.5.1: /custom-tools/kustomize_3_5_1
kustomize.path.v3.5.4: /custom-tools/kustomize_3_5_4
```
Once a new version is configured you can reference it in Application spec as following:

6
go.mod
View File

@@ -1,13 +1,13 @@
module github.com/argoproj/argo-cd
module github.com/argoproj/argo-cd/v2
go 1.14
go 1.16
require (
github.com/Masterminds/semver v1.5.0
github.com/TomOnTime/utfutil v0.0.0-20180511104225-09c41003ee1d
github.com/alicebob/miniredis v2.5.0+incompatible
github.com/alicebob/miniredis/v2 v2.14.2
github.com/argoproj/gitops-engine v0.3.0
github.com/argoproj/gitops-engine v0.3.2
github.com/argoproj/pkg v0.2.0
github.com/bombsimon/logrusr v1.0.0
github.com/bradleyfalzon/ghinstallation v1.1.1

5
go.sum
View File

@@ -86,8 +86,8 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/argoproj/gitops-engine v0.3.0 h1:emDED8sHRX81mQOi8C24oW1wTJ3peXRHI6RJlvZWHkk=
github.com/argoproj/gitops-engine v0.3.0/go.mod h1:IBHhAkqlC+3r/wBWUitWSidQhPzlLoSTWp2htq3dyQk=
github.com/argoproj/gitops-engine v0.3.2 h1:m5bjOk/bWwMsFBGFpurdK31/hC5UuLMQn0hAd51TlEk=
github.com/argoproj/gitops-engine v0.3.2/go.mod h1:IBHhAkqlC+3r/wBWUitWSidQhPzlLoSTWp2htq3dyQk=
github.com/argoproj/pkg v0.2.0 h1:ETgC600kr8WcAi3MEVY5sA1H7H/u1/IysYOobwsZ8No=
github.com/argoproj/pkg v0.2.0/go.mod h1:F4TZgInLUEjzsWFB/BTJBsewoEy0ucnKSq6vmQiD/yc=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -218,7 +218,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=

View File

@@ -19,7 +19,7 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/clientcmd"
"github.com/argoproj/argo-cd/util/cli"
"github.com/argoproj/argo-cd/v2/util/cli"
// load the gcp plugin (required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"

View File

@@ -8,7 +8,7 @@ import (
"os/exec"
"strings"
"github.com/argoproj/argo-cd/pkg/apis/application"
"github.com/argoproj/argo-cd/v2/pkg/apis/application"
"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/ghodss/yaml"

View File

@@ -32,7 +32,7 @@ go build -i -o dist/protoc-gen-gogo ./vendor/k8s.io/code-generator/cmd/go-to-pro
# --apimachinery-packages= option so that go-to-protobuf can locate the types, but prefixed with a
# '-' so that go-to-protobuf will not generate .proto files for it.
PACKAGES=(
github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1
github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1
)
APIMACHINERY_PKGS=(
+k8s.io/apimachinery/pkg/util/intstr
@@ -43,6 +43,9 @@ APIMACHINERY_PKGS=(
k8s.io/api/core/v1
)
export GO111MODULE=on
[ -e ./v2 ] || ln -s . v2
${PROJECT_ROOT}/dist/go-to-protobuf \
--go-header-file=${PROJECT_ROOT}/hack/custom-boilerplate.go.txt \
--packages=$(IFS=, ; echo "${PACKAGES[*]}") \
@@ -85,6 +88,7 @@ for i in ${PROTO_FILES}; do
--swagger_out=logtostderr=true:. \
$i
done
[ -e ./v2 ] && rm -rf v2
# collect_swagger gathers swagger files into a subdirectory
collect_swagger() {

View File

@@ -1,4 +1,4 @@
#!/bin/bash
set -eux -o pipefail
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.26.0
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.38.0

View File

@@ -7,7 +7,6 @@ import (
"go/types"
"io/ioutil"
"os"
"runtime"
"strings"
"github.com/spf13/cobra"
@@ -38,14 +37,8 @@ func newCommand() *cobra.Command {
packagePath := args[1]
outputPath := args[2]
var imprt types.Importer
if runtime.GOOS == "linux" {
// nolint:staticcheck
imprt = importer.For("source", nil)
} else {
imprt = importer.Default()
}
// nolint:staticcheck
imprt := importer.For("source", nil)
pkg, err := imprt.Import(packagePath)
if err != nil {
return err

View File

@@ -6,7 +6,7 @@ which godepgraph || go get github.com/kisielk/godepgraph
which go-junit-report || go get github.com/jstemmer/go-junit-report
export GO111MODULE=off
if godepgraph -s github.com/argoproj/argo-cd/pkg/apiclient | grep packr; then
if godepgraph -s github.com/argoproj/argo-cd/v2/pkg/apiclient | grep packr; then
echo apiclient package should not depend on packr
exit 1
fi

View File

@@ -33,7 +33,11 @@ export GO111MODULE=off
sed -e '/go install/d' ${CODEGEN_PKG}/generate-groups.sh > ${TARGET_SCRIPT}
export GO111MODULE=on
[ -e ./v2 ] || ln -s . v2
bash -x ${TARGET_SCRIPT} "deepcopy,client,informer,lister" \
github.com/argoproj/argo-cd/pkg/client github.com/argoproj/argo-cd/pkg/apis \
github.com/argoproj/argo-cd/v2/pkg/client github.com/argoproj/argo-cd/v2/pkg/apis \
"application:v1alpha1" \
--go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
[ -e ./v2 ] && rm -rf v2

View File

@@ -12,12 +12,17 @@ VERSION="v1alpha1"
export GO111MODULE=off
go build -o dist/openapi-gen ${CODEGEN_PKG}/cmd/openapi-gen
export GO111MODULE=on
[ -e ./v2 ] || ln -s . v2
./dist/openapi-gen \
--go-header-file ${PROJECT_ROOT}/hack/custom-boilerplate.go.txt \
--input-dirs github.com/argoproj/argo-cd/pkg/apis/application/${VERSION} \
--output-package github.com/argoproj/argo-cd/pkg/apis/application/${VERSION} \
--input-dirs github.com/argoproj/argo-cd/v2/pkg/apis/application/${VERSION} \
--output-package github.com/argoproj/argo-cd/v2/pkg/apis/application/${VERSION} \
--report-filename pkg/apis/api-rules/violation_exceptions.list \
$@
[ -e ./v2 ] && rm -rf v2
export GO111MODULE=off
go build -o ./dist/gen-crd-spec ${PROJECT_ROOT}/hack/gen-crd-spec
./dist/gen-crd-spec

View File

@@ -0,0 +1,15 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: argocd-application-controller-network-policy
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-application-controller
ingress:
- from:
- namespaceSelector: { }
ports:
- port: 8082
policyTypes:
- Ingress

View File

@@ -7,3 +7,4 @@ resources:
- argocd-application-controller-rolebinding.yaml
- argocd-application-controller-statefulset.yaml
- argocd-metrics.yaml
- argocd-application-controller-network-policy.yaml

View File

@@ -0,0 +1,22 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: argocd-dex-server-network-policy
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-dex-server
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
ports:
- protocol: TCP
port: 5556
- protocol: TCP
port: 5557
- protocol: TCP
port: 5558

View File

@@ -7,3 +7,4 @@ resources:
- argocd-dex-server-rolebinding.yaml
- argocd-dex-server-sa.yaml
- argocd-dex-server-service.yaml
- argocd-dex-server-network-policy.yaml

View File

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

View File

@@ -0,0 +1,24 @@
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: argocd-redis-network-policy
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-redis
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
- podSelector:
matchLabels:
app.kubernetes.io/name: argocd-repo-server
- podSelector:
matchLabels:
app.kubernetes.io/name: argocd-application-controller
ports:
- protocol: TCP
port: 6379

View File

@@ -7,6 +7,7 @@ resources:
- argocd-redis-rolebinding.yaml
- argocd-redis-sa.yaml
- argocd-redis-service.yaml
- argocd-redis-network-policy.yaml
vars:
- name: ARGOCD_REDIS_SERVICE

View File

@@ -0,0 +1,25 @@
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: argocd-repo-server-network-policy
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-repo-server
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
- podSelector:
matchLabels:
app.kubernetes.io/name: argocd-application-controller
ports:
- protocol: TCP
port: 8081
- from:
- namespaceSelector: { }
ports:
- port: 8084

View File

@@ -4,3 +4,4 @@ kind: Kustomization
resources:
- argocd-repo-server-deployment.yaml
- argocd-repo-server-service.yaml
- argocd-repo-server-network-policy.yaml

View File

@@ -0,0 +1,12 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: argocd-server-network-policy
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
ingress:
- {}
policyTypes:
- Ingress

View File

@@ -8,3 +8,4 @@ resources:
- argocd-server-sa.yaml
- argocd-server-service.yaml
- argocd-server-metrics.yaml
- argocd-server-network-policy.yaml

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