Compare commits

...

22 Commits

Author SHA1 Message Date
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
57 changed files with 577 additions and 490 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

@@ -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 +1 @@
2.0.0
2.0.0-rc2

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

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

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

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

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

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

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

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

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

4
go.mod
View File

@@ -1,13 +1,13 @@
module github.com/argoproj/argo-cd
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.1
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.1 h1:wM4RUzH54sWdchD7Ws8UdAIsjk08BmjN9bLuW79xKWk=
github.com/argoproj/gitops-engine v0.3.1/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

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

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

View File

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

View File

@@ -12,5 +12,5 @@ helm template argocd ./chart \
>> ./chart/upstream_orig.yaml
sed -e 's/check inter 1s/check inter 3s/' ./chart/upstream_orig.yaml >> ./chart/upstream.yaml && rm ./chart/upstream_orig.yaml
sed -i 's/timeout server 30s/timeout server 6m/' ./chart/upstream.yaml
sed -i 's/timeout client 30s/timeout client 6m/' ./chart/upstream.yaml
sed -i.bak 's/timeout server 30s/timeout server 6m/' ./chart/upstream.yaml && rm ./chart/upstream.yaml.bak
sed -i.bak 's/timeout client 30s/timeout client 6m/' ./chart/upstream.yaml && rm ./chart/upstream.yaml.bak

View File

@@ -3176,7 +3176,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -3310,7 +3310,7 @@ spec:
- argocd-repo-server
- --redis
- argocd-redis-ha-haproxy:6379
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -3411,7 +3411,7 @@ spec:
env:
- name: ARGOCD_API_SERVER_REPLICAS
value: "2"
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -3506,7 +3506,7 @@ spec:
- "10"
- --redis
- argocd-redis-ha-haproxy:6379
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -3091,7 +3091,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -3225,7 +3225,7 @@ spec:
- argocd-repo-server
- --redis
- argocd-redis-ha-haproxy:6379
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -3326,7 +3326,7 @@ spec:
env:
- name: ARGOCD_API_SERVER_REPLICAS
value: "2"
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -3421,7 +3421,7 @@ spec:
- "10"
- --redis
- argocd-redis-ha-haproxy:6379
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -2544,7 +2544,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -2644,7 +2644,7 @@ spec:
- argocd-repo-server
- --redis
- argocd-redis:6379
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -2740,7 +2740,7 @@ spec:
- argocd-server
- --staticassets
- /shared/app
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -2833,7 +2833,7 @@ spec:
- "20"
- --operation-processors
- "10"
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -2459,7 +2459,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -2559,7 +2559,7 @@ spec:
- argocd-repo-server
- --redis
- argocd-redis:6379
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -2655,7 +2655,7 @@ spec:
- argocd-server
- --staticassets
- /shared/app
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -2748,7 +2748,7 @@ spec:
- "20"
- --operation-processors
- "10"
image: quay.io/argoproj/argocd:latest
image: quay.io/argoproj/argocd:v2.0.0-rc2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -150,6 +150,7 @@ func (m *AppInfo) GetPath() string {
// RepoAppDetailsQuery contains query information for app details request
type RepoAppDetailsQuery struct {
Source *v1alpha1.ApplicationSource `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
AppName string `protobuf:"bytes,2,opt,name=appName,proto3" json:"appName,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -195,6 +196,13 @@ func (m *RepoAppDetailsQuery) GetSource() *v1alpha1.ApplicationSource {
return nil
}
func (m *RepoAppDetailsQuery) GetAppName() string {
if m != nil {
return m.AppName
}
return ""
}
// RepoAppsResponse contains applications of specified repository
type RepoAppsResponse struct {
Items []*AppInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
@@ -637,74 +645,75 @@ func init() {
}
var fileDescriptor_8d38260443475705 = []byte{
// 1063 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1c, 0x45,
0x13, 0xd6, 0xd8, 0xce, 0xc6, 0x6e, 0x7f, 0x64, 0xd3, 0xce, 0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 0x40, 0x0c, 0x0a, 0xc6, 0xb5, 0xbd, 0x7b, 0x1a,
0xce, 0x1b, 0xfe, 0xae, 0x1d, 0xaa, 0x6b, 0x55, 0x43, 0x55, 0xab, 0xd1, 0x46, 0x75, 0x9b, 0xa2,
0x24, 0xc6, 0x4b, 0x27, 0xbb, 0x7d, 0x86, 0x64, 0xf8, 0x18, 0x2d, 0x7c, 0x4c, 0xe3, 0x48, 0xcb,
0x6a, 0x3f, 0x14, 0xf1, 0x8d, 0xa1, 0xe9, 0x51, 0x7c, 0x40, 0x56, 0x64, 0xdb, 0x30, 0xd9, 0xee,
0x91, 0x3b, 0x55, 0x77, 0xb9, 0x97, 0xa6, 0xb2, 0x4a, 0x6e, 0x6d, 0xfd, 0x76, 0xb2, 0xec, 0xfc,
0x7e, 0xb2, 0xec, 0xfc, 0x79, 0xb2, 0xec, 0x7c, 0xfa, 0xe6, 0x19, 0x7e, 0x5a, 0x42, 0xf3, 0x99,
0x57, 0xfa, 0xc3, 0x38, 0xa8, 0x99, 0x5f, 0x8c, 0x37, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x2b,
0xf1, 0xe2, 0xa9, 0x7b, 0x0d, 0x00, 0x00,
// 1073 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6e, 0x1c, 0x45,
0x10, 0xd6, 0xd8, 0xce, 0xda, 0x6e, 0xff, 0x64, 0xd3, 0x0e, 0x61, 0xd8, 0x38, 0x8e, 0xd5, 0x09,
0x91, 0xb1, 0xc2, 0x4c, 0x6c, 0x40, 0x8a, 0x82, 0x00, 0xf9, 0x27, 0x0a, 0x16, 0x16, 0x81, 0x89,
0x8c, 0x04, 0x12, 0x42, 0xed, 0xd9, 0xf2, 0xee, 0xe0, 0xd9, 0xe9, 0xa6, 0xbb, 0x77, 0x91, 0x15,
0xe5, 0xc2, 0x29, 0x1c, 0x38, 0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, 0xf9, 0xcf, 0x68, 0x1c, 0x69, 0x59, 0xed, 0x87, 0x22, 0xbe, 0x3a, 0x30,
0x3d, 0x8a, 0x0f, 0xc8, 0x8a, 0x6c, 0xeb, 0x26, 0xdb, 0x6d, 0x72, 0xb3, 0xea, 0x2e, 0xf7, 0xd2,
0x54, 0x56, 0xc9, 0xcd, 0xcd, 0x3f, 0x8e, 0x97, 0x9c, 0x3f, 0x8f, 0x97, 0x9c, 0xbf, 0x8f, 0x97,
0x9c, 0x2f, 0xde, 0x3e, 0xc5, 0xff, 0x4c, 0x68, 0x3e, 0xf3, 0x4a, 0x3f, 0x1f, 0xfb, 0x35, 0xf3,
0xf7, 0xf1, 0xd6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x47, 0x07, 0x4d, 0x4e, 0x96, 0x0d, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1391,6 +1400,13 @@ func (m *RepoAppDetailsQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.AppName) > 0 {
i -= len(m.AppName)
copy(dAtA[i:], m.AppName)
i = encodeVarintRepository(dAtA, i, uint64(len(m.AppName)))
i--
dAtA[i] = 0x12
}
if m.Source != nil {
{
size, err := m.Source.MarshalToSizedBuffer(dAtA[:i])
@@ -1804,6 +1820,10 @@ func (m *RepoAppDetailsQuery) Size() (n int) {
l = m.Source.Size()
n += 1 + l + sovRepository(uint64(l))
}
l = len(m.AppName)
if l > 0 {
n += 1 + l + sovRepository(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@@ -2268,6 +2288,38 @@ func (m *RepoAppDetailsQuery) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AppName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRepository
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRepository
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRepository
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AppName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRepository(dAtA[iNdEx:])

View File

@@ -191,7 +191,7 @@ func (a *ApplicationSource) IsHelmOci() bool {
if a.Chart == "" {
return false
}
return helm.IsHelmOciChart(a.Chart)
return helm.IsHelmOciRepo(a.RepoURL)
}
// IsZero returns true if the application source is considered empty

View File

@@ -232,17 +232,13 @@ func (s *Service) runRepoOperation(
}
if source.IsHelm() {
version, err := semver.NewVersion(revision)
if err != nil {
return nil, err
}
if settings.noCache {
err = helmClient.CleanChartCache(source.Chart, version)
err = helmClient.CleanChartCache(source.Chart, revision)
if err != nil {
return nil, err
}
}
chartPath, closer, err := helmClient.ExtractChart(source.Chart, version)
chartPath, closer, err := helmClient.ExtractChart(source.Chart, revision)
if err != nil {
return nil, err
}
@@ -458,7 +454,7 @@ func (s *Service) getManifestCacheEntry(cacheKey string, q *apiclient.ManifestRe
func getHelmRepos(repositories []*v1alpha1.Repository) []helm.HelmRepository {
repos := make([]helm.HelmRepository, 0)
for _, repo := range repositories {
repos = append(repos, helm.HelmRepository{Name: repo.Name, Repo: repo.Repo, Creds: repo.GetHelmCreds()})
repos = append(repos, helm.HelmRepository{Name: repo.Name, Repo: repo.Repo, Creds: repo.GetHelmCreds(), EnableOci: repo.EnableOCI})
}
return repos
}
@@ -1301,13 +1297,12 @@ func (s *Service) newClientResolveRevision(repo *v1alpha1.Repository, revision s
}
func (s *Service) newHelmClientResolveRevision(repo *v1alpha1.Repository, revision string, chart string, noCache bool) (helm.Client, string, error) {
helmClient := s.newHelmClient(repo.Repo, repo.GetHelmCreds(), repo.EnableOCI || helm.IsHelmOciChart(chart))
if helm.IsVersion(revision) {
enableOCI := repo.EnableOCI || helm.IsHelmOciRepo(repo.Repo)
helmClient := s.newHelmClient(repo.Repo, repo.GetHelmCreds(), enableOCI)
// OCI helm registers don't support semver ranges. Assuming that given revision is exact version
if helm.IsVersion(revision) || enableOCI {
return helmClient, revision, nil
}
if repo.EnableOCI {
return nil, "", errors.New("OCI helm registers don't support semver ranges. Exact revision must be specified.")
}
constraints, err := semver.NewConstraint(revision)
if err != nil {
return nil, "", fmt.Errorf("invalid revision '%s': %v", revision, err)

View File

@@ -14,7 +14,6 @@ import (
"testing"
"time"
"github.com/Masterminds/semver"
"github.com/ghodss/yaml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
@@ -64,10 +63,6 @@ func newServiceWithMocks(root string, signed bool) (*Service, *gitmocks.Client)
}
func newServiceWithOpt(cf clientFunc) (*Service, *gitmocks.Client) {
// root, err := filepath.Abs(root)
// if err != nil {
// panic(err)
// }
helmClient := &helmmocks.Client{}
gitClient := &gitmocks.Client{}
cf(gitClient)
@@ -77,9 +72,9 @@ func newServiceWithOpt(cf clientFunc) (*Service, *gitmocks.Client) {
), RepoServerInitConstants{ParallelismLimit: 1})
chart := "my-chart"
version := semver.MustParse("1.1.0")
version := "1.1.0"
helmClient.On("GetIndex", true).Return(&helm.Index{Entries: map[string]helm.Entries{
chart: {{Version: "1.0.0"}, {Version: version.String()}},
chart: {{Version: "1.0.0"}, {Version: version}},
}}, nil)
helmClient.On("ExtractChart", chart, version).Return("./testdata/my-chart", io.NopCloser, nil)
helmClient.On("CleanChartCache", chart, version).Return(nil)
@@ -353,11 +348,11 @@ func TestManifestGenErrorCacheByNumRequests(t *testing.T) {
if adjustedInvocation < service.initConstants.PauseGenerationAfterFailedGenerationAttempts {
// GenerateManifest should not return cached errors for the first X responses, where X is the FailGenAttempts constants
assert.True(t, !isCachedError)
require.False(t, isCachedError)
assert.True(t, cachedManifestResponse != nil)
require.NotNil(t, cachedManifestResponse)
// nolint:staticcheck
assert.True(t, cachedManifestResponse.ManifestResponse == nil)
assert.Nil(t, cachedManifestResponse.ManifestResponse)
// nolint:staticcheck
assert.True(t, cachedManifestResponse.FirstFailureTimestamp != 0)
@@ -371,9 +366,9 @@ func TestManifestGenErrorCacheByNumRequests(t *testing.T) {
// GenerateManifest SHOULD return cached errors for the next X responses, where X is the
// PauseGenerationOnFailureForRequests constant
assert.True(t, isCachedError)
assert.True(t, cachedManifestResponse != nil)
require.NotNil(t, cachedManifestResponse)
// nolint:staticcheck
assert.True(t, cachedManifestResponse.ManifestResponse == nil)
assert.Nil(t, cachedManifestResponse.ManifestResponse)
// nolint:staticcheck
assert.True(t, cachedManifestResponse.FirstFailureTimestamp != 0)

View File

@@ -736,7 +736,7 @@ func (s *Server) Watch(q *application.ApplicationQuery, ws application.Applicati
}
func (s *Server) validateAndNormalizeApp(ctx context.Context, app *appv1.Application, validate bool) error {
proj, err := s.appclientset.ArgoprojV1alpha1().AppProjects(s.ns).Get(ctx, app.Spec.GetProject(), metav1.GetOptions{})
proj, err := argo.GetAppProject(&app.Spec, applisters.NewAppProjectLister(s.projInformer.GetIndexer()), s.ns, s.settingsMgr)
if err != nil {
if apierr.IsNotFound(err) {
return status.Errorf(codes.InvalidArgument, "application references project %s which does not exist", app.Spec.Project)

View File

@@ -246,6 +246,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *repositorypkg.RepoAppDeta
Source: q.Source,
Repos: helmRepos,
KustomizeOptions: kustomizeOptions,
AppName: q.AppName,
})
}

View File

@@ -28,6 +28,7 @@ message AppInfo {
// RepoAppDetailsQuery contains query information for app details request
message RepoAppDetailsQuery {
github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSource source = 1;
string appName = 2;
}
// RepoAppsResponse contains applications of specified repository

View File

@@ -414,11 +414,12 @@ export const ApplicationCreatePanel = (props: {
repoURL: app.spec.source.repoURL,
path: app.spec.source.path,
chart: app.spec.source.chart,
targetRevision: app.spec.source.targetRevision
targetRevision: app.spec.source.targetRevision,
appName: app.metadata.name
}}
load={async src => {
if (src.repoURL && src.targetRevision && (src.path || src.chart)) {
return services.repos.appDetails(src).catch(() => ({
return services.repos.appDetails(src, src.appName).catch(() => ({
type: 'Directory',
details: {}
}));

View File

@@ -79,8 +79,8 @@ export const ApplicationDeploymentHistory = ({
source={{...recentDeployments[index].source, targetRevision: recentDeployments[index].revision}}
/>
<DataLoader
input={{...recentDeployments[index].source, targetRevision: recentDeployments[index].revision}}
load={src => services.repos.appDetails(src)}>
input={{...recentDeployments[index].source, targetRevision: recentDeployments[index].revision, appName: app.metadata.name}}
load={src => services.repos.appDetails(src, src.appName)}>
{(details: models.RepoAppDetails) => (
<div>
<ApplicationParameters

View File

@@ -379,9 +379,9 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{nam
content: (
<DataLoader
key='appDetails'
input={application.spec.source}
load={src =>
services.repos.appDetails(src).catch(() => ({
input={application}
load={app =>
services.repos.appDetails(app.spec.source, app.metadata.name).catch(() => ({
type: 'Directory' as appModels.AppSourceType,
path: application.spec.source.path
}))

View File

@@ -352,6 +352,9 @@ export const ApplicationParameters = (props: {
function isDefined(item: any) {
return item !== null && item !== undefined;
}
function isDefinedWithVersion(item: any) {
return item !== null && item !== undefined && item.match(/:/);
}
if (input.spec.source.helm && input.spec.source.helm.parameters) {
input.spec.source.helm.parameters = input.spec.source.helm.parameters.filter(isDefined);
@@ -360,7 +363,7 @@ export const ApplicationParameters = (props: {
input.spec.source.ksonnet.parameters = input.spec.source.ksonnet.parameters.filter(isDefined);
}
if (input.spec.source.kustomize && input.spec.source.kustomize.images) {
input.spec.source.kustomize.images = input.spec.source.kustomize.images.filter(isDefined);
input.spec.source.kustomize.images = input.spec.source.kustomize.images.filter(isDefinedWithVersion);
}
await props.save(input);
setRemovedOverrides(new Array<boolean>());

View File

@@ -3,7 +3,6 @@ import * as classNames from 'classnames';
import * as React from 'react';
import {useState} from 'react';
import {Link} from 'react-router-dom';
import {Observable} from 'rxjs';
import * as models from '../../../shared/models';
import {services} from '../../../shared/services';
@@ -43,11 +42,29 @@ export const PodsLogsViewer = (props: PodLogsProps & {fullscreen?: boolean}) =>
literal: string;
inverse: boolean;
}
const [filterText, setFilterText] = useState('');
const [filter, setFilter] = useState({inverse: false, literal: ''} as FilterData);
const filterQuery = () => {
return filter.literal && `${filter.inverse ? '!' : ''}${filter.literal}`;
const formatFilter = (f: FilterData): string => {
return f.literal && `${f.inverse ? '!' : ''}${f.literal}`;
};
const [filterQuery, setFilterQuery] = React.useState(formatFilter(filter));
React.useEffect(() => {
setFilterQuery(formatFilter(filter));
if (loader) {
loader.reload();
}
}, [filter]);
React.useEffect(() => {
const to = setTimeout(() => {
setFilter({...filter, literal: filterText});
}, 500);
return () => clearTimeout(to);
}, [filterText]);
const fullscreenURL =
`/applications/${props.applicationName}/${props.namespace}/${props.containerName}/logs?` +
`podName=${props.podName}&group=${props.group}&kind=${props.kind}&name=${props.name}`;
@@ -119,7 +136,6 @@ export const PodsLogsViewer = (props: PodLogsProps & {fullscreen?: boolean}) =>
</button>
<button
className='argo-button argo-button--base'
style={{width: '100px'}}
onClick={async () => {
const downloadURL = services.applications.getDownloadLogsURL(
props.applicationName,
@@ -138,29 +154,20 @@ export const PodsLogsViewer = (props: PodLogsProps & {fullscreen?: boolean}) =>
</Link>
)}
<div className='pod-logs-viewer__filter'>
<button
className={`argo-button argo-button--base${filter.inverse ? '' : '-o'}`}
onClick={() => setFilter({...filter, inverse: !filter.inverse})}
style={{marginRight: '10px'}}>
!
</button>
<Tooltip content={`Show lines that ${!filter.inverse ? '' : 'do not'} match filter`}>
<button
className={`argo-button argo-button--base${filter.inverse ? '' : '-o'}`}
onClick={() => setFilter({...filter, inverse: !filter.inverse})}
style={{marginRight: '10px'}}>
!
</button>
</Tooltip>
<input
ref={input => {
if (input) {
Observable.fromEvent(input, 'keyup')
.debounceTime(500)
.subscribe(() => {
if (loader) {
loader.reload();
}
});
}
}}
type='text'
placeholder='Filter string'
className='argo-field'
value={filter.literal}
onChange={e => setFilter({...filter, literal: e.target.value})}
value={filterText}
onChange={e => setFilterText(e.target.value)}
style={{padding: 0}}
/>
</div>
@@ -185,7 +192,7 @@ export const PodsLogsViewer = (props: PodLogsProps & {fullscreen?: boolean}) =>
maxLines * (page.number + 1),
prefs.appDetails.followLogs && page.number === 0,
page.untilTimes[page.untilTimes.length - 1],
filterQuery()
filterQuery
)
// show only current page lines
.scan((lines, logEntry) => {

View File

@@ -50,6 +50,26 @@ function loadGlobal(name: string) {
merged.clusterResourceWhitelist = merged.clusterResourceWhitelist.concat(proj.spec.clusterResourceWhitelist || []);
merged.namespaceResourceBlacklist = merged.namespaceResourceBlacklist.concat(proj.spec.namespaceResourceBlacklist || []);
merged.namespaceResourceWhitelist = merged.namespaceResourceWhitelist.concat(proj.spec.namespaceResourceWhitelist || []);
merged.sourceRepos = merged.sourceRepos.concat(proj.spec.sourceRepos || []);
merged.destinations = merged.destinations.concat(proj.spec.destinations || []);
merged.sourceRepos = merged.sourceRepos.filter((item, index) => {
return (
index ===
merged.sourceRepos.findIndex(obj => {
return obj === item;
})
);
});
merged.destinations = merged.destinations.filter((item, index) => {
return (
index ===
merged.destinations.findIndex(obj => {
return obj.server === item.server && obj.namespace === item.namespace;
})
);
});
merged.clusterResourceBlacklist = merged.clusterResourceBlacklist.filter((item, index) => {
return (

View File

@@ -3,7 +3,7 @@ import * as React from 'react';
import {FormApi} from 'react-form';
import {EditablePanel} from '../../../shared/components';
import {GroupKind, Groups, Project, ProjectSpec, ResourceKinds} from '../../../shared/models';
import {ApplicationDestination, GroupKind, Groups, Project, ProjectSpec, ResourceKinds} from '../../../shared/models';
function removeEl(items: any[], index: number) {
return items.slice(0, index).concat(items.slice(index + 1));
@@ -69,6 +69,71 @@ function viewList(type: field, proj: Project) {
);
}
const sourceReposInfoByField: {[type: string]: {title: string; helpText: string}} = {
sourceRepos: {
title: 'source repositories',
helpText: 'Git repositories where application manifests are permitted to be retrieved from'
}
};
function viewSourceReposInfoList(type: field, proj: Project) {
const info = sourceReposInfoByField[type];
const list = proj.spec[type] as Array<string>;
return (
<React.Fragment>
<p className='project-details__list-title'>
{info.title} {helpTip(info.helpText)}
</p>
{(list || []).length > 0 ? (
<React.Fragment>
{list.map((repo, i) => (
<div className='row white-box__details-row' key={i}>
<div className='columns small-12'>{repo}</div>
</div>
))}
</React.Fragment>
) : (
<p>The {info.title} is empty</p>
)}
</React.Fragment>
);
}
const destinationsInfoByField: {[type: string]: {title: string; helpText: string}} = {
destinations: {
title: 'destinations',
helpText: 'Cluster and namespaces where applications are permitted to be deployed to'
}
};
function viewDestinationsInfoList(type: field, proj: Project) {
const info = destinationsInfoByField[type];
const list = proj.spec[type] as Array<ApplicationDestination>;
return (
<React.Fragment>
<p className='project-details__list-title'>
{info.title} {helpTip(info.helpText)}
</p>
{(list || []).length > 0 ? (
<React.Fragment>
<div className='row white-box__details-row'>
<div className='columns small-4'>Server</div>
<div className='columns small-8'>Namespace</div>
</div>
{list.map((destination, i) => (
<div className='row white-box__details-row' key={i}>
<div className='columns small-4'>{destination.server}</div>
<div className='columns small-8'>{destination.namespace}</div>
</div>
))}
</React.Fragment>
) : (
<p>The {info.title} is empty</p>
)}
</React.Fragment>
);
}
function editList(type: field, formApi: FormApi) {
const info = infoByField[type];
@@ -114,6 +179,8 @@ export const ResourceListsPanel = ({proj, saveProject, title}: {proj: Project; t
{Object.keys(infoByField).map(key => (
<React.Fragment key={key}>{viewList(key as field, proj)}</React.Fragment>
))}
{!proj.metadata && Object.keys(sourceReposInfoByField).map(key => <React.Fragment key={key}>{viewSourceReposInfoList(key as field, proj)}</React.Fragment>)}
{!proj.metadata && Object.keys(destinationsInfoByField).map(key => <React.Fragment key={key}>{viewDestinationsInfoList(key as field, proj)}</React.Fragment>)}
</React.Fragment>
}
edit={

View File

@@ -113,7 +113,7 @@ export class ApplicationsService {
public delete(name: string, propagationPolicy: string): Promise<boolean> {
let cascade = true;
if (propagationPolicy === 'orphan') {
if (propagationPolicy === 'non-cascading') {
propagationPolicy = '';
cascade = false;
}

View File

@@ -129,10 +129,10 @@ export class RepositoriesService {
return requests.get(`/repositories/${encodeURIComponent(repo)}/helmcharts`).then(res => (res.body.items as models.HelmChart[]) || []);
}
public appDetails(source: models.ApplicationSource): Promise<models.RepoAppDetails> {
public appDetails(source: models.ApplicationSource, appName: string): Promise<models.RepoAppDetails> {
return requests
.post(`/repositories/${encodeURIComponent(source.repoURL)}/appdetails`)
.send({source})
.send({source, appName})
.then(res => res.body as models.RepoAppDetails);
}
}

View File

@@ -8,7 +8,9 @@ const webpack = require('webpack');
const path = require('path');
const isProd = process.env.NODE_ENV === 'production';
console.log(`Bundling in ${isProd ? 'production' : 'development'} mode...`);
const isOnline = process.env.NODE_ONLINE_ENV === 'online';
console.log(`Bundling in ${isProd ? 'production' : 'development'} mode ${isOnline ? 'online' : 'offline'}...`);
const proxyConf = {
'target': process.env.ARGOCD_API_URL || 'http://localhost:8080',
@@ -57,6 +59,7 @@ const config = {
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
'process.env.NODE_ONLINE_ENV': JSON.stringify(process.env.NODE_ONLINE_ENV || 'offline'),
SYSTEM_INFO: JSON.stringify({
version: process.env.ARGO_VERSION || 'latest',
}),
@@ -89,7 +92,7 @@ const config = {
filename: 'fonts.css',
// local: false in dev prevents pulling fonts on each code change
// https://github.com/gabiseabra/google-fonts-webpack-plugin/issues/2
local: isProd,
local: isOnline,
path: 'assets/fonts/google-fonts'
})
],

View File

@@ -3,6 +3,7 @@ package argo
import (
"context"
"encoding/json"
"errors"
"fmt"
"strings"
"time"
@@ -172,6 +173,9 @@ func TestRepo(repo *argoappv1.Repository) error {
},
"helm": func() error {
if repo.EnableOCI {
if !helm.IsHelmOciRepo(repo.Repo) {
return errors.New("OCI Helm repository URL should include hostname and port only")
}
_, err := helm.NewClient(repo.Repo, repo.GetHelmCreds(), repo.EnableOCI).TestHelmOCI()
return err
} else {

View File

@@ -743,3 +743,9 @@ func TestFilterByName(t *testing.T) {
assert.Len(t, res, 0)
})
}
func TestTestRepoOCI(t *testing.T) {
err := TestRepo(&argoappv1.Repository{Repo: "https://demo.goharbor.io", Type: "helm", EnableOCI: true})
assert.Error(t, err)
assert.Equal(t, "OCI Helm repository URL should include hostname and port only", err.Error())
}

View File

@@ -16,16 +16,13 @@ import (
"strings"
"time"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/util/env"
"github.com/Masterminds/semver"
"github.com/argoproj/pkg/sync"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/util/cache"
"github.com/argoproj/argo-cd/util/env"
executil "github.com/argoproj/argo-cd/util/exec"
"github.com/argoproj/argo-cd/util/io"
)
@@ -47,8 +44,8 @@ type Creds struct {
}
type Client interface {
CleanChartCache(chart string, version *semver.Version) error
ExtractChart(chart string, version *semver.Version) (string, io.Closer, error)
CleanChartCache(chart string, version string) error
ExtractChart(chart string, version string) (string, io.Closer, error)
GetIndex(noCache bool) (*Index, error)
TestHelmOCI() (bool, error)
}
@@ -97,11 +94,11 @@ func (c *nativeHelmChart) ensureHelmChartRepoPath() error {
return nil
}
func (c *nativeHelmChart) CleanChartCache(chart string, version *semver.Version) error {
func (c *nativeHelmChart) CleanChartCache(chart string, version string) error {
return os.RemoveAll(c.getCachedChartPath(chart, version))
}
func (c *nativeHelmChart) ExtractChart(chart string, version *semver.Version) (string, io.Closer, error) {
func (c *nativeHelmChart) ExtractChart(chart string, version string) (string, io.Closer, error) {
err := c.ensureHelmChartRepoPath()
if err != nil {
return "", nil, err
@@ -158,13 +155,13 @@ func (c *nativeHelmChart) ExtractChart(chart string, version *semver.Version) (s
}
// 'helm chart pull' ensures that chart is downloaded into local repository cache
_, err = helmCmd.ChartPull(c.repoURL, chart, version.String())
_, err = helmCmd.ChartPull(c.repoURL, chart, version)
if err != nil {
return "", nil, err
}
// 'helm chart export' copies cached chart into temp directory
_, err = helmCmd.ChartExport(c.repoURL, chart, version.String(), tempDest)
_, err = helmCmd.ChartExport(c.repoURL, chart, version, tempDest)
if err != nil {
return "", nil, err
}
@@ -177,7 +174,7 @@ func (c *nativeHelmChart) ExtractChart(chart string, version *semver.Version) (s
return "", nil, err
}
} else {
_, err = helmCmd.Fetch(c.repoURL, chart, version.String(), tempDest, c.creds)
_, err = helmCmd.Fetch(c.repoURL, chart, version, tempDest, c.creds)
if err != nil {
return "", nil, err
}
@@ -352,11 +349,16 @@ func normalizeChartName(chart string) string {
return nc
}
func (c *nativeHelmChart) getCachedChartPath(chart string, version *semver.Version) string {
return path.Join(c.repoPath, fmt.Sprintf("%s-%v.tgz", strings.ReplaceAll(chart, "/", "_"), version))
func (c *nativeHelmChart) getCachedChartPath(chart string, version string) string {
return path.Join(c.repoPath, fmt.Sprintf("%s-%s.tgz", strings.ReplaceAll(chart, "/", "_"), version))
}
// Only OCI registries support storing charts under sub-directories.
func IsHelmOciChart(chart string) bool {
return strings.Contains(chart, "/")
// Ensures that given OCI registries URL does not have protocol
func IsHelmOciRepo(repoURL string) bool {
if repoURL == "" {
return false
}
parsed, err := url.Parse(repoURL)
// the URL parser treat hostname as either path or opaque if scheme is not specified, so hostname must be empty
return err == nil && parsed.Host == ""
}

View File

@@ -5,7 +5,6 @@ import (
"testing"
"time"
"github.com/Masterminds/semver"
"github.com/stretchr/testify/assert"
"github.com/argoproj/argo-cd/util/io"
@@ -50,7 +49,7 @@ func TestIndex(t *testing.T) {
func Test_nativeHelmChart_ExtractChart(t *testing.T) {
client := NewClient("https://argoproj.github.io/argo-helm", Creds{}, false)
path, closer, err := client.ExtractChart("argo-cd", semver.MustParse("0.7.1"))
path, closer, err := client.ExtractChart("argo-cd", "0.7.1")
assert.NoError(t, err)
defer io.Close(closer)
info, err := os.Stat(path)
@@ -88,3 +87,10 @@ func Test_normalizeChartName(t *testing.T) {
assert.Equal(t, n, "myorg/..")
})
}
func TestIsHelmOciRepo(t *testing.T) {
assert.True(t, IsHelmOciRepo("demo.goharbor.io"))
assert.True(t, IsHelmOciRepo("demo.goharbor.io:8080"))
assert.False(t, IsHelmOciRepo("https://demo.goharbor.io"))
assert.False(t, IsHelmOciRepo("https://demo.goharbor.io:8080"))
}

View File

@@ -17,8 +17,9 @@ import (
type HelmRepository struct {
Creds
Name string
Repo string
Name string
Repo string
EnableOci bool
}
// Helm provides wrapper functionality around the `helm` command.
@@ -67,10 +68,26 @@ func (h *helm) Template(templateOpts *TemplateOpts) (string, error) {
func (h *helm) DependencyBuild() error {
for _, repo := range h.repos {
_, err := h.cmd.RepoAdd(repo.Name, repo.Repo, repo.Creds)
if repo.EnableOci {
h.cmd.IsHelmOci = true
_, err := h.cmd.Login(repo.Repo, repo.Creds)
h.cmd.IsHelmOci = false
if err != nil {
return err
defer func() {
h.cmd.IsHelmOci = true
_, _ = h.cmd.Logout(repo.Repo, repo.Creds)
h.cmd.IsHelmOci = false
}()
if err != nil {
return err
}
} else {
_, err := h.cmd.RepoAdd(repo.Name, repo.Repo, repo.Creds)
if err != nil {
return err
}
}
}
h.repos = nil

View File

@@ -7,8 +7,6 @@ import (
io "github.com/argoproj/argo-cd/util/io"
mock "github.com/stretchr/testify/mock"
semver "github.com/Masterminds/semver"
)
// Client is an autogenerated mock type for the Client type
@@ -17,11 +15,11 @@ type Client struct {
}
// CleanChartCache provides a mock function with given fields: chart, version
func (_m *Client) CleanChartCache(chart string, version *semver.Version) error {
func (_m *Client) CleanChartCache(chart string, version string) error {
ret := _m.Called(chart, version)
var r0 error
if rf, ok := ret.Get(0).(func(string, *semver.Version) error); ok {
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(chart, version)
} else {
r0 = ret.Error(0)
@@ -31,18 +29,18 @@ func (_m *Client) CleanChartCache(chart string, version *semver.Version) error {
}
// ExtractChart provides a mock function with given fields: chart, version
func (_m *Client) ExtractChart(chart string, version *semver.Version) (string, io.Closer, error) {
func (_m *Client) ExtractChart(chart string, version string) (string, io.Closer, error) {
ret := _m.Called(chart, version)
var r0 string
if rf, ok := ret.Get(0).(func(string, *semver.Version) string); ok {
if rf, ok := ret.Get(0).(func(string, string) string); ok {
r0 = rf(chart, version)
} else {
r0 = ret.Get(0).(string)
}
var r1 io.Closer
if rf, ok := ret.Get(1).(func(string, *semver.Version) io.Closer); ok {
if rf, ok := ret.Get(1).(func(string, string) io.Closer); ok {
r1 = rf(chart, version)
} else {
if ret.Get(1) != nil {
@@ -51,7 +49,7 @@ func (_m *Client) ExtractChart(chart string, version *semver.Version) (string, i
}
var r2 error
if rf, ok := ret.Get(2).(func(string, *semver.Version) error); ok {
if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(chart, version)
} else {
r2 = ret.Error(2)

View File

@@ -5,6 +5,7 @@ import (
"os"
"os/user"
"path"
"strings"
"github.com/dgrijalva/jwt-go/v4"
@@ -262,3 +263,12 @@ func DefaultLocalConfigPath() (string, error) {
}
return path.Join(dir, "config"), nil
}
// Get username from subject in a claim
func GetUsername(subject string) string {
parts := strings.Split(subject, ":")
if len(parts) > 0 {
return parts[0]
}
return subject
}

View File

@@ -0,0 +1,13 @@
package localconfig
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetUsername(t *testing.T) {
assert.Equal(t, "admin", GetUsername("admin:login"))
assert.Equal(t, "admin", GetUsername("admin"))
assert.Equal(t, "", GetUsername(""))
}