mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-18 22:38:48 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7af9dfb352 | ||
|
|
8a39759eb3 | ||
|
|
3981432899 | ||
|
|
af2e16fcaf | ||
|
|
d34bf2cf14 | ||
|
|
194b2894ef |
2
go.mod
2
go.mod
@@ -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
4
go.sum
@@ -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=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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)
|
||||
|
||||
0
test/e2e/testdata/helm-repo/local2/helm-1.0.0.tgz
vendored
Normal file
0
test/e2e/testdata/helm-repo/local2/helm-1.0.0.tgz
vendored
Normal file
0
test/e2e/testdata/helm-repo/local2/helm2-1.0.0.tgz
vendored
Normal file
0
test/e2e/testdata/helm-repo/local2/helm2-1.0.0.tgz
vendored
Normal file
13
test/e2e/testdata/helm-repo/local2/index.yaml
vendored
Normal file
13
test/e2e/testdata/helm-repo/local2/index.yaml
vendored
Normal 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
|
||||
10
test/e2e/testdata/helm-with-multiple-dependencies/Chart.yaml
vendored
Normal file
10
test/e2e/testdata/helm-with-multiple-dependencies/Chart.yaml
vendored
Normal 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
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user