Compare commits

...

6 Commits

Author SHA1 Message Date
argo-bot
7af9dfb352 Bump version to 2.1.2 2021-09-02 17:58:03 +00:00
argo-bot
8a39759eb3 Bump version to 2.1.2 2021-09-02 17:57:49 +00:00
Alexander Matyushentsev
3981432899 fix: cluster filter popping out of box (#7135)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-02 10:55:50 -07:00
Alexander Matyushentsev
af2e16fcaf fix: gracefully shutdown metrics server when dex config changes (#7138)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-01 18:58:30 -07:00
Alexander Matyushentsev
d34bf2cf14 fix: upgrade gitops engine version to v0.4.1 (#7088)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-09-01 16:57:50 -07:00
May Zhang
194b2894ef fix: repository name already exists when multiple helm dependencies f… (#7096)
* fix: repository name already exists when multiple helm dependencies from same private repo server

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

* fix: add test cases

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

* fix: clean up

Signed-off-by: May Zhang <may_zhang@intuit.com>
2021-09-01 14:56:38 -07:00
20 changed files with 93 additions and 24 deletions

View File

@@ -1 +1 @@
2.1.1
2.1.2

2
go.mod
View File

@@ -7,7 +7,7 @@ require (
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.4.0
github.com/argoproj/gitops-engine v0.4.1
github.com/argoproj/pkg v0.9.1
github.com/bombsimon/logrusr v1.0.0
github.com/bradleyfalzon/ghinstallation v1.1.1

4
go.sum
View File

@@ -96,8 +96,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.4.0 h1:h141jAgWhgp1iGAgfHM1Hg1POvszDNmqyEfTFHsG1CA=
github.com/argoproj/gitops-engine v0.4.0/go.mod h1:EdFe8qIOqsmbyxRhtIydU4BUeyZ4VTsY6R3XVQhU9LA=
github.com/argoproj/gitops-engine v0.4.1 h1:kBAAWVUBfnhD40sRIEr3XcUcPZHODOmwSXSpySmVWR0=
github.com/argoproj/gitops-engine v0.4.1/go.mod h1:EdFe8qIOqsmbyxRhtIydU4BUeyZ4VTsY6R3XVQhU9LA=
github.com/argoproj/pkg v0.9.1 h1:osfOS3QkzfRf+W43lbCZb0o0bzrBweQhL+U3rgEg+5M=
github.com/argoproj/pkg v0.9.1/go.mod h1:ra+bQPmbVAoEL+gYSKesuigt4m49i3Qa3mE/xQcjCiA=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=

View File

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

View File

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

View File

@@ -3684,7 +3684,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -3895,7 +3895,7 @@ spec:
key: reposerver.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -4144,7 +4144,7 @@ spec:
key: server.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -4340,7 +4340,7 @@ spec:
key: controller.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -1071,7 +1071,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -1282,7 +1282,7 @@ spec:
key: reposerver.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -1531,7 +1531,7 @@ spec:
key: server.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -1727,7 +1727,7 @@ spec:
key: controller.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -3049,7 +3049,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -3224,7 +3224,7 @@ spec:
key: reposerver.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -3469,7 +3469,7 @@ spec:
key: server.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -3659,7 +3659,7 @@ spec:
key: controller.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -436,7 +436,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
name: copyutil
volumeMounts:
@@ -611,7 +611,7 @@ spec:
key: reposerver.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -856,7 +856,7 @@ spec:
key: server.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -1046,7 +1046,7 @@ spec:
key: controller.default.cache.expiration
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.1.1
image: quay.io/argoproj/argocd:v2.1.2
imagePullPolicy: Always
livenessProbe:
httpGet:

View File

@@ -490,7 +490,7 @@ func getHelmDependencyRepos(appPath string) ([]*v1alpha1.Repository, error) {
if u, err := url.Parse(r.Repository); err == nil && (u.Scheme == "https" || u.Scheme == "oci") {
repo := &v1alpha1.Repository{
Repo: r.Repository,
Name: u.Host,
Name: r.Repository,
}
repos = append(repos, repo)
}

View File

@@ -372,6 +372,9 @@ func (a *ArgoCDServer) Run(ctx context.Context, port int, metricsPort int) {
a.stopCh = make(chan struct{})
<-a.stopCh
errors.CheckError(conn.Close())
if err := metricsServ.Shutdown(ctx); err != nil {
log.Fatalf("Failed to gracefully shutdown metrics server: %v", err)
}
}
func (a *ArgoCDServer) Initialized() bool {

View File

@@ -128,6 +128,11 @@ func (c *Context) HTTPSCredentialsUserPassAdded() *Context {
return c
}
func (c *Context) HelmHTTPSCredentialsUserPassAdded() *Context {
repos.AddHelmHTTPSCredentialsTLSClientCert()
return c
}
func (c *Context) HelmoOCICredentialsWithoutUserPassAdded() *Context {
repos.AddHelmoOCICredentialsWithoutUserPass()
return c

View File

@@ -86,6 +86,7 @@ const (
RepoURLTypeSSHSubmodule = "ssh-sub"
RepoURLTypeSSHSubmoduleParent = "ssh-par"
RepoURLTypeHelm = "helm"
RepoURLTypeHelmParent = "helm-par"
RepoURLTypeHelmOCI = "helm-oci"
GitUsername = "admin"
GitPassword = "password"
@@ -246,6 +247,9 @@ func RepoURL(urlType RepoURLType) string {
// Default - file based Git repository
case RepoURLTypeHelm:
return GetEnvWithDefault(EnvRepoURLTypeHelm, "https://localhost:9444/argo-e2e/testdata.git/helm-repo/local")
// When Helm Repo has sub repos, this is the parent repo URL
case RepoURLTypeHelmParent:
return GetEnvWithDefault(EnvRepoURLTypeHelm, "https://localhost:9444/argo-e2e/testdata.git/helm-repo")
case RepoURLTypeHelmOCI:
return HelmOCIRegistryURL
default:

View File

@@ -116,6 +116,25 @@ func AddHTTPSCredentialsTLSClientCert() {
errors.FailOnErr(fixture.RunCli(args...))
}
// AddHelmHTTPSCredentialsTLSClientCert adds credentials for Helm repos to context
func AddHelmHTTPSCredentialsTLSClientCert() {
certPath, err := filepath.Abs("../fixture/certs/argocd-test-client.crt")
errors.CheckError(err)
keyPath, err := filepath.Abs("../fixture/certs/argocd-test-client.key")
errors.CheckError(err)
args := []string{
"repocreds",
"add",
fixture.RepoURL(fixture.RepoURLTypeHelmParent),
"--username", fixture.GitUsername,
"--password", fixture.GitPassword,
"--tls-client-cert-path", certPath,
"--tls-client-cert-key-path", keyPath,
"--type", "helm",
}
errors.FailOnErr(fixture.RunCli(args...))
}
// AddHelmoOCICredentialsWithoutUserPass adds credentials for Helm OIC repo to context
func AddHelmoOCICredentialsWithoutUserPass() {
args := []string{"repocreds", "add", fixture.RepoURL(fixture.RepoURLTypeHelmOCI),

View File

@@ -350,6 +350,21 @@ func TestHelmWithDependencies(t *testing.T) {
testHelmWithDependencies(t, "helm-with-dependencies", false)
}
func TestHelmWithMultipleDependencies(t *testing.T) {
SkipOnEnv(t, "HELM")
Given(t).Path("helm-with-multiple-dependencies").
CustomCACertAdded().
// these are slow tests
Timeout(30).
HelmHTTPSCredentialsUserPassAdded().
When().
Create().
Sync().
Then().
Expect(SyncStatusIs(SyncStatusCodeSynced))
}
func TestHelm2WithDependencies(t *testing.T) {
SkipOnEnv(t, "HELM", "HELM2")
testHelmWithDependencies(t, "helm2-with-dependencies", false)

View File

View File

View File

@@ -0,0 +1,13 @@
apiVersion: v1
entries:
helm:
- created: 2019-07-08T23:26:50.723856689Z
urls:
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm-1.0.0.tgz
version: 1.0.0
helm2:
- created: "2020-03-02T08:16:19.960425-08:00"
name: helm2
urls:
- http://127.0.0.1:9080/argo-e2e/testdata.git/helm-repo/helm2-1.0.0.tgz
version: 1.0.0

View File

@@ -0,0 +1,10 @@
apiVersion: v2
name: helm-with-dependencies
version: v1.0.0
dependencies:
- name: helm
repository: "https://localhost:9444/argo-e2e/testdata.git/helm-repo/local"
version: v1.0.0
- name: helm2
repository: "https://localhost:9444/argo-e2e/testdata.git/helm-repo/local2"
version: v1.0.0

View File

@@ -45,7 +45,7 @@ export const CheckboxRow = (props: {value: boolean; onChange?: (value: boolean)
}}
/>
{props.option.icon && <div style={{marginRight: '5px'}}>{props.option.icon}</div>}
<div className='checkbox__item__label'>{props.option.label}</div>
<div className='filter__item__label'>{props.option.label}</div>
<div style={{marginLeft: 'auto'}}>{props.option.count}</div>
</div>
);