Compare commits

..

1 Commits

Author SHA1 Message Date
crenshaw-dev
1d77740f95 Bump version to 2.13.6
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-24 19:14:03 +00:00
93 changed files with 161 additions and 464 deletions

View File

@@ -1 +1 @@
2.13.9
2.13.6

View File

@@ -142,7 +142,6 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
// desiredApplications is the main list of all expected Applications from all generators in this appset.
desiredApplications, applicationSetReason, err := template.GenerateApplications(logCtx, applicationSetInfo, r.Generators, r.Renderer, r.Client)
if err != nil {
logCtx.Errorf("unable to generate applications: %v", err)
_ = r.setApplicationSetStatusCondition(ctx,
&applicationSetInfo,
argov1alpha1.ApplicationSetCondition{
@@ -152,8 +151,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
Status: argov1alpha1.ApplicationSetConditionStatusTrue,
}, parametersGenerated,
)
// In order for the controller SDK to respect RequeueAfter, the error must be nil
return ctrl.Result{RequeueAfter: ReconcileRequeueOnValidationError}, nil
return ctrl.Result{RequeueAfter: ReconcileRequeueOnValidationError}, err
}
parametersGenerated = true

View File

@@ -1884,7 +1884,7 @@ func TestRequeueGeneratorFails(t *testing.T) {
}
res, err := r.Reconcile(context.Background(), req)
require.NoError(t, err)
require.Error(t, err)
assert.Equal(t, ReconcileRequeueOnValidationError, res.RequeueAfter)
}

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -5,7 +5,7 @@
replicaCount: 1
image:
repository: quay.io/argoprojlabs/argocd-e2e-container
repository: gcr.io/heptio-images/ks-guestbook-demo
tag: 0.1
pullPolicy: IfNotPresent

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -14,7 +14,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -97,7 +97,7 @@ func NewGenAppSpecCommand() *cobra.Command {
argocd admin app generate-spec nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Generate declarative config for a Kustomize app
argocd admin app generate-spec kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image quay.io/argoprojlabs/argocd-e2e-container:0.1
argocd admin app generate-spec kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
# Generate declarative config for a app using a custom tool:
argocd admin app generate-spec kasane --repo https://github.com/argoproj/argocd-example-apps.git --path plugins/kasane --dest-namespace default --dest-server https://kubernetes.default.svc --config-management-plugin kasane

View File

@@ -138,7 +138,7 @@ func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra.
argocd app create nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Create a Kustomize app
argocd app create kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image quay.io/argoprojlabs/argocd-e2e-container:0.1
argocd app create kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
# Create a MultiSource app while yaml file contains an application with multiple sources
argocd app create guestbook --file <path-to-yaml-file>

View File

@@ -45,7 +45,7 @@ func AddRepoFlags(command *cobra.Command, opts *RepoOptions) {
command.Flags().StringVar(&opts.GithubAppPrivateKeyPath, "github-app-private-key-path", "", "private key of the GitHub Application")
command.Flags().StringVar(&opts.GitHubAppEnterpriseBaseURL, "github-app-enterprise-base-url", "", "base url to use when using GitHub Enterprise (e.g. https://ghe.example.com/api/v3")
command.Flags().StringVar(&opts.Proxy, "proxy", "", "use proxy to access repository")
command.Flags().StringVar(&opts.NoProxy, "no-proxy", "", "don't access these targets via proxy")
command.Flags().StringVar(&opts.Proxy, "no-proxy", "", "don't access these targets via proxy")
command.Flags().StringVar(&opts.GCPServiceAccountKeyPath, "gcp-service-account-key-path", "", "service account key for the Google Cloud Platform")
command.Flags().BoolVar(&opts.ForceHttpBasicAuth, "force-http-basic-auth", false, "whether to force use of basic auth when connecting repository via HTTP")
}

View File

@@ -6,7 +6,7 @@ metadata:
deployment.kubernetes.io/revision: '9'
iksm-version: '2.0'
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"argocd.argoproj.io/tracking-id":"guestbook:apps/Deployment:default/kustomize-guestbook-ui","iksm-version":"2.0"},"name":"kustomize-guestbook-ui","namespace":"default"},"spec":{"replicas":4,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook-ui"}},"template":{"metadata":{"labels":{"app":"guestbook-ui"}},"spec":{"containers":[{"env":[{"name":"SOME_ENV_VAR","value":"some_value"}],"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook-ui","ports":[{"containerPort":80}],"resources":{"requests":{"cpu":"50m","memory":"100Mi"}}}]}}}}
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"argocd.argoproj.io/tracking-id":"guestbook:apps/Deployment:default/kustomize-guestbook-ui","iksm-version":"2.0"},"name":"kustomize-guestbook-ui","namespace":"default"},"spec":{"replicas":4,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook-ui"}},"template":{"metadata":{"labels":{"app":"guestbook-ui"}},"spec":{"containers":[{"env":[{"name":"SOME_ENV_VAR","value":"some_value"}],"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook-ui","ports":[{"containerPort":80}],"resources":{"requests":{"cpu":"50m","memory":"100Mi"}}}]}}}}
creationTimestamp: '2022-01-05T15:45:21Z'
generation: 119
managedFields:
@@ -137,7 +137,7 @@ spec:
- env:
- name: SOME_ENV_VAR
value: some_value
image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
imagePullPolicy: IfNotPresent
name: guestbook-ui
ports:

View File

@@ -6,7 +6,7 @@ metadata:
deployment.kubernetes.io/revision: '9'
iksm-version: '2.0'
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"argocd.argoproj.io/tracking-id":"guestbook:apps/Deployment:default/kustomize-guestbook-ui","iksm-version":"2.0"},"name":"kustomize-guestbook-ui","namespace":"default"},"spec":{"replicas":4,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook-ui"}},"template":{"metadata":{"labels":{"app":"guestbook-ui"}},"spec":{"containers":[{"env":[{"name":"SOME_ENV_VAR","value":"some_value"}],"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook-ui","ports":[{"containerPort":80}],"resources":{"requests":{"cpu":"50m","memory":"100Mi"}}}]}}}}
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"argocd.argoproj.io/tracking-id":"guestbook:apps/Deployment:default/kustomize-guestbook-ui","iksm-version":"2.0"},"name":"kustomize-guestbook-ui","namespace":"default"},"spec":{"replicas":4,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook-ui"}},"template":{"metadata":{"labels":{"app":"guestbook-ui"}},"spec":{"containers":[{"env":[{"name":"SOME_ENV_VAR","value":"some_value"}],"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook-ui","ports":[{"containerPort":80}],"resources":{"requests":{"cpu":"50m","memory":"100Mi"}}}]}}}}
creationTimestamp: '2022-01-05T15:45:21Z'
generation: 119
managedFields:
@@ -137,7 +137,7 @@ spec:
- env:
- name: SOME_ENV_VAR
value: some_value
image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
imagePullPolicy: IfNotPresent
name: guestbook-ui
ports:

View File

@@ -25,7 +25,7 @@ spec:
value: yet_another_value
- name: SOME_ENV_VAR
value: different_value!
image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: guestbook-ui
image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
env:
- name: SOME_ENV_VAR
value: some_value

View File

@@ -21,7 +21,7 @@ spec:
- env:
- name: SOME_ENV_VAR
value: some_value
image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -119,7 +119,7 @@ spec:
forceCommonLabels: false
forceCommonAnnotations: false
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.2
- gcr.io/heptio-images/ks-guestbook-demo:0.2
- my-app=gcr.io/my-repo/my-app:0.1
namespace: custom-namespace
replicas:

View File

@@ -25,7 +25,7 @@ argocd admin app generate-spec APPNAME [flags]
argocd admin app generate-spec nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Generate declarative config for a Kustomize app
argocd admin app generate-spec kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image quay.io/argoprojlabs/argocd-e2e-container:0.1
argocd admin app generate-spec kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
# Generate declarative config for a app using a custom tool:
argocd admin app generate-spec kasane --repo https://github.com/argoproj/argocd-example-apps.git --path plugins/kasane --dest-namespace default --dest-server https://kubernetes.default.svc --config-management-plugin kasane

View File

@@ -24,7 +24,7 @@ argocd app create APPNAME [flags]
argocd app create nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
# Create a Kustomize app
argocd app create kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image quay.io/argoprojlabs/argocd-e2e-container:0.1
argocd app create kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image gcr.io/heptio-images/ks-guestbook-demo:0.1
# Create a MultiSource app while yaml file contains an application with multiple sources
argocd app create guestbook --file <path-to-yaml-file>

View File

@@ -65,7 +65,7 @@ Example:
```yaml
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.2
- gcr.io/heptio-images/ks-guestbook-demo:0.2
```
The `.argocd-source` is trying to solve two following main use cases:

10
go.mod
View File

@@ -25,7 +25,7 @@ require (
github.com/cyphar/filepath-securejoin v0.3.6
github.com/dustin/go-humanize v1.0.1
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/expr-lang/expr v1.17.2
github.com/expr-lang/expr v1.16.9
github.com/felixge/httpsnoop v1.0.4
github.com/fsnotify/fsnotify v1.7.0
github.com/gfleury/go-bitbucket-v1 v0.0.0-20220301131131-8e7ed04b843e
@@ -83,12 +83,12 @@ require (
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
golang.org/x/crypto v0.32.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/net v0.33.0
golang.org/x/oauth2 v0.23.0
golang.org/x/sync v0.10.0
golang.org/x/term v0.28.0
golang.org/x/term v0.27.0
golang.org/x/time v0.6.0
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/grpc v1.66.2
@@ -136,7 +136,7 @@ require (
github.com/distribution/reference v0.5.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-fed/httpsig v1.1.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-github/v62 v62.0.0 // indirect
@@ -150,7 +150,7 @@ require (
go.opencensus.io v0.24.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.23.0 // indirect
google.golang.org/api v0.132.0 // indirect

20
go.sum
View File

@@ -247,8 +247,8 @@ github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
github.com/expr-lang/expr v1.17.2 h1:o0A99O/Px+/DTjEnQiodAgOIK9PPxL8DtXhBRKC+Iso=
github.com/expr-lang/expr v1.17.2/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=
github.com/expr-lang/expr v1.16.9 h1:WUAzmR0JNI9JCiF0/ewwHB1gmcGw5wW7nWt8gc6PpCI=
github.com/expr-lang/expr v1.16.9/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
@@ -296,8 +296,8 @@ github.com/go-git/go-git/v5 v5.13.1/go.mod h1:qryJB4cSBoq3FRoBRf5A77joojuBcmPJ0q
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE=
github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA=
github.com/go-jose/go-jose/v4 v4.0.2 h1:R3l3kkBds16bO7ZFAEEcofK0MkrAJt3jlJznWZG0nvk=
github.com/go-jose/go-jose/v4 v4.0.2/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
@@ -1039,8 +1039,8 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
@@ -1222,8 +1222,8 @@ golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -1248,8 +1248,8 @@ golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

View File

@@ -1,4 +1,4 @@
#!/bin/bash
set -eux -o pipefail
KUSTOMIZE_VERSION=4.5.7 "$(dirname $0)/../install.sh" helm kustomize protoc
KUSTOMIZE_VERSION=4.5.7 "$(dirname $0)/../install.sh" kustomize protoc

View File

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

View File

@@ -22571,7 +22571,7 @@ spec:
key: applicationsetcontroller.webhook.parallelism.limit
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -22689,7 +22689,7 @@ spec:
- argocd
- admin
- redis-initial-password
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: IfNotPresent
name: secret-init
securityContext:
@@ -22942,7 +22942,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -22994,7 +22994,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -23284,7 +23284,7 @@ spec:
key: controller.ignore.normalizer.jq.timeout
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

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

View File

@@ -12,7 +12,7 @@ patches:
images:
- name: quay.io/argoproj/argocd
newName: quay.io/argoproj/argocd
newTag: v2.13.9
newTag: v2.13.6
resources:
- ../../base/application-controller
- ../../base/applicationset-controller

View File

@@ -1100,13 +1100,7 @@ spec:
args:
- /readonly/haproxy_init.sh
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
null
volumeMounts:
- name: config-volume
mountPath: /readonly
@@ -1118,13 +1112,7 @@ spec:
image: public.ecr.aws/docker/library/haproxy:2.6.17-alpine
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
null
env:
- name: AUTH
valueFrom:
@@ -1228,14 +1216,7 @@ spec:
args:
- /readonly-config/init.sh
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
env:
- name: SENTINEL_ID_0
value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6
@@ -1265,14 +1246,7 @@ spec:
args:
- /data/conf/redis.conf
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
env:
- name: AUTH
valueFrom:
@@ -1328,14 +1302,7 @@ spec:
args:
- /data/conf/sentinel.conf
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
env:
- name: AUTH
valueFrom:
@@ -1385,14 +1352,7 @@ spec:
args:
- /readonly-config/fix-split-brain.sh
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
env:
- name: SENTINEL_ID_0
value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6

View File

@@ -5,7 +5,6 @@ helm dependency update ./chart
AUTOGENMSG="# This is an auto-generated file. DO NOT EDIT"
echo "${AUTOGENMSG}" > ./chart/upstream.yaml
helm version
helm template argocd ./chart \
--namespace argocd \
--values ./chart/values.yaml \

View File

@@ -23914,7 +23914,7 @@ spec:
key: applicationsetcontroller.webhook.parallelism.limit
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -24049,7 +24049,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -24137,7 +24137,7 @@ spec:
key: notificationscontroller.repo.server.plaintext
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -24256,7 +24256,7 @@ spec:
- argocd
- admin
- redis-initial-password
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: IfNotPresent
name: secret-init
securityContext:
@@ -24537,7 +24537,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -24589,7 +24589,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -24943,7 +24943,7 @@ spec:
key: applicationsetcontroller.enable.scm.providers
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -25269,7 +25269,7 @@ spec:
key: controller.ignore.normalizer.jq.timeout
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -1694,7 +1694,7 @@ spec:
key: applicationsetcontroller.webhook.parallelism.limit
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -1829,7 +1829,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -1917,7 +1917,7 @@ spec:
key: notificationscontroller.repo.server.plaintext
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -2036,7 +2036,7 @@ spec:
- argocd
- admin
- redis-initial-password
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: IfNotPresent
name: secret-init
securityContext:
@@ -2317,7 +2317,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -2369,7 +2369,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -2723,7 +2723,7 @@ spec:
key: applicationsetcontroller.enable.scm.providers
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -3049,7 +3049,7 @@ spec:
key: controller.ignore.normalizer.jq.timeout
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-application-controller
ports:

16
manifests/install.yaml generated
View File

@@ -23031,7 +23031,7 @@ spec:
key: applicationsetcontroller.webhook.parallelism.limit
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -23166,7 +23166,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -23254,7 +23254,7 @@ spec:
key: notificationscontroller.repo.server.plaintext
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -23354,7 +23354,7 @@ spec:
- argocd
- admin
- redis-initial-password
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: IfNotPresent
name: secret-init
securityContext:
@@ -23607,7 +23607,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -23659,7 +23659,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -24011,7 +24011,7 @@ spec:
key: applicationsetcontroller.enable.scm.providers
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -24337,7 +24337,7 @@ spec:
key: controller.ignore.normalizer.jq.timeout
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -811,7 +811,7 @@ spec:
key: applicationsetcontroller.webhook.parallelism.limit
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-applicationset-controller
ports:
@@ -946,7 +946,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: copyutil
securityContext:
@@ -1034,7 +1034,7 @@ spec:
key: notificationscontroller.repo.server.plaintext
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
tcpSocket:
@@ -1134,7 +1134,7 @@ spec:
- argocd
- admin
- redis-initial-password
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: IfNotPresent
name: secret-init
securityContext:
@@ -1387,7 +1387,7 @@ spec:
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
@@ -1439,7 +1439,7 @@ spec:
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
name: copyutil
securityContext:
allowPrivilegeEscalation: false
@@ -1791,7 +1791,7 @@ spec:
key: applicationsetcontroller.enable.scm.providers
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
livenessProbe:
httpGet:
@@ -2117,7 +2117,7 @@ spec:
key: controller.ignore.normalizer.jq.timeout
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:v2.13.9
image: quay.io/argoproj/argocd:v2.13.6
imagePullPolicy: Always
name: argocd-application-controller
ports:

View File

@@ -5,7 +5,6 @@ import (
"net/url"
"strings"
"github.com/argoproj/argo-cd/v2/common"
"github.com/argoproj/argo-cd/v2/util/cert"
"github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/helm"
@@ -284,33 +283,6 @@ func (m *Repository) StringForLogging() string {
return fmt.Sprintf("&Repository{Repo: %q, Type: %q, Name: %q, Project: %q}", m.Repo, m.Type, m.Name, m.Project)
}
// Sanitized returns a copy of the Repository with sensitive information removed.
func (repo *Repository) Sanitized() *Repository {
return &Repository{
Repo: repo.Repo,
Type: repo.Type,
Name: repo.Name,
Insecure: repo.IsInsecure(),
EnableLFS: repo.EnableLFS,
EnableOCI: repo.EnableOCI,
Proxy: repo.Proxy,
NoProxy: repo.NoProxy,
Project: repo.Project,
ForceHttpBasicAuth: repo.ForceHttpBasicAuth,
InheritedCreds: repo.InheritedCreds,
GithubAppId: repo.GithubAppId,
GithubAppInstallationId: repo.GithubAppInstallationId,
GitHubAppEnterpriseBaseURL: repo.GitHubAppEnterpriseBaseURL,
}
}
func (repo *Repository) Normalize() *Repository {
if repo.Type == "" {
repo.Type = common.DefaultRepoType
}
return repo
}
// Repositories defines a list of Repository configurations
type Repositories []*Repository

View File

@@ -1918,30 +1918,6 @@ type Cluster struct {
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,13,opt,name=annotations"`
}
func (c *Cluster) Sanitized() *Cluster {
return &Cluster{
ID: c.ID,
Server: c.Server,
Name: c.Name,
Project: c.Project,
Namespaces: c.Namespaces,
Shard: c.Shard,
Labels: c.Labels,
Annotations: c.Annotations,
ClusterResources: c.ClusterResources,
ConnectionState: c.ConnectionState,
ServerVersion: c.ServerVersion,
Info: c.Info,
RefreshRequestedAt: c.RefreshRequestedAt,
Config: ClusterConfig{
AWSAuthConfig: c.Config.AWSAuthConfig,
TLSClientConfig: TLSClientConfig{
Insecure: c.Config.Insecure,
},
},
}
}
// Equals returns true if two cluster objects are considered to be equal
func (c *Cluster) Equals(other *Cluster) bool {
if c.Server != other.Server {

View File

@@ -4251,58 +4251,3 @@ func TestAppProject_ValidateDestinationServiceAccount(t *testing.T) {
}
}
}
func TestSanitized(t *testing.T) {
now := metav1.Now()
cluster := &Cluster{
ID: "123",
Server: "https://example.com",
Name: "example",
ServerVersion: "v1.0.0",
Namespaces: []string{"default", "kube-system"},
Project: "default",
Labels: map[string]string{
"env": "production",
},
Annotations: map[string]string{
"annotation-key": "annotation-value",
},
ConnectionState: ConnectionState{
Status: ConnectionStatusSuccessful,
Message: "Connection successful",
ModifiedAt: &now,
},
Config: ClusterConfig{
Username: "admin",
Password: "password123",
BearerToken: "abc",
TLSClientConfig: TLSClientConfig{
Insecure: true,
},
ExecProviderConfig: &ExecProviderConfig{
Command: "test",
},
},
}
assert.Equal(t, &Cluster{
ID: "123",
Server: "https://example.com",
Name: "example",
ServerVersion: "v1.0.0",
Namespaces: []string{"default", "kube-system"},
Project: "default",
Labels: map[string]string{"env": "production"},
Annotations: map[string]string{"annotation-key": "annotation-value"},
ConnectionState: ConnectionState{
Status: ConnectionStatusSuccessful,
Message: "Connection successful",
ModifiedAt: &now,
},
Config: ClusterConfig{
TLSClientConfig: TLSClientConfig{
Insecure: true,
},
},
}, cluster.Sanitized())
}

View File

@@ -1855,7 +1855,7 @@ func TestGetAppDetailsWithAppParameterFile(t *testing.T) {
},
})
require.NoError(t, err)
assert.Equal(t, []string{"quay.io/argoprojlabs/argocd-e2e-container:0.2"}, details.Kustomize.Images)
assert.EqualValues(t, []string{"gcr.io/heptio-images/ks-guestbook-demo:0.2"}, details.Kustomize.Images)
})
})
t.Run("No app specific override", func(t *testing.T) {
@@ -1869,7 +1869,7 @@ func TestGetAppDetailsWithAppParameterFile(t *testing.T) {
AppName: "testapp",
})
require.NoError(t, err)
assert.Equal(t, []string{"quay.io/argoprojlabs/argocd-e2e-container:0.2"}, details.Kustomize.Images)
assert.EqualValues(t, []string{"gcr.io/heptio-images/ks-guestbook-demo:0.2"}, details.Kustomize.Images)
})
})
t.Run("Only app specific override", func(t *testing.T) {
@@ -1883,7 +1883,7 @@ func TestGetAppDetailsWithAppParameterFile(t *testing.T) {
AppName: "testapp",
})
require.NoError(t, err)
assert.Equal(t, []string{"quay.io/argoprojlabs/argocd-e2e-container:0.3"}, details.Kustomize.Images)
assert.EqualValues(t, []string{"gcr.io/heptio-images/ks-guestbook-demo:0.3"}, details.Kustomize.Images)
})
})
t.Run("App specific override", func(t *testing.T) {
@@ -1897,7 +1897,7 @@ func TestGetAppDetailsWithAppParameterFile(t *testing.T) {
AppName: "testapp",
})
require.NoError(t, err)
assert.Equal(t, []string{"quay.io/argoprojlabs/argocd-e2e-container:0.3"}, details.Kustomize.Images)
assert.EqualValues(t, []string{"gcr.io/heptio-images/ks-guestbook-demo:0.3"}, details.Kustomize.Images)
})
})
t.Run("App specific overrides containing non-mergeable field", func(t *testing.T) {
@@ -1911,7 +1911,7 @@ func TestGetAppDetailsWithAppParameterFile(t *testing.T) {
AppName: "unmergeable",
})
require.NoError(t, err)
assert.Equal(t, []string{"quay.io/argoprojlabs/argocd-e2e-container:0.3"}, details.Kustomize.Images)
assert.EqualValues(t, []string{"gcr.io/heptio-images/ks-guestbook-demo:0.3"}, details.Kustomize.Images)
})
})
t.Run("Broken app-specific overrides", func(t *testing.T) {
@@ -1980,7 +1980,7 @@ func TestGenerateManifestsWithAppParameterFile(t *testing.T) {
require.True(t, ok)
image, ok, _ := unstructured.NestedString(containers[0].(map[string]interface{}), "image")
require.True(t, ok)
assert.Equal(t, "quay.io/argoprojlabs/argocd-e2e-container:0.2", image)
assert.Equal(t, "gcr.io/heptio-images/ks-guestbook-demo:0.2", image)
})
})
@@ -2009,7 +2009,7 @@ func TestGenerateManifestsWithAppParameterFile(t *testing.T) {
require.True(t, ok)
image, ok, _ := unstructured.NestedString(containers[0].(map[string]interface{}), "image")
require.True(t, ok)
assert.Equal(t, "quay.io/argoprojlabs/argocd-e2e-container:0.2", image)
assert.Equal(t, "gcr.io/heptio-images/ks-guestbook-demo:0.2", image)
})
})
@@ -2039,7 +2039,7 @@ func TestGenerateManifestsWithAppParameterFile(t *testing.T) {
require.True(t, ok)
image, ok, _ := unstructured.NestedString(containers[0].(map[string]interface{}), "image")
require.True(t, ok)
assert.Equal(t, "quay.io/argoprojlabs/argocd-e2e-container:0.3", image)
assert.Equal(t, "gcr.io/heptio-images/ks-guestbook-demo:0.3", image)
})
})
@@ -2090,7 +2090,7 @@ func TestGenerateManifestsWithAppParameterFile(t *testing.T) {
require.True(t, ok)
image, ok, _ := unstructured.NestedString(containers[0].(map[string]interface{}), "image")
require.True(t, ok)
assert.Equal(t, "quay.io/argoprojlabs/argocd-e2e-container:0.1", image)
assert.Equal(t, "gcr.io/heptio-images/ks-guestbook-demo:0.1", image)
})
})

View File

@@ -1,4 +1,4 @@
aloi
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.2
- gcr.io/heptio-images/ks-guestbook-demo:0.2

View File

@@ -1,3 +1,3 @@
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.3
- gcr.io/heptio-images/ks-guestbook-demo:0.3

View File

@@ -1,6 +1,6 @@
repo: https://somewhere
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.3
- gcr.io/heptio-images/ks-guestbook-demo:0.3
invalid:
- I don't know

View File

@@ -1,3 +1,3 @@
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.2
- gcr.io/heptio-images/ks-guestbook-demo:0.2

View File

@@ -12,7 +12,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: guestbook-ui
ports:
- containerPort: 81

View File

@@ -4,5 +4,5 @@ kind: Kustomization
resources:
- guestbook.yaml
images:
- name: quay.io/argoprojlabs/argocd-e2e-container
- name: gcr.io/heptio-images/ks-guestbook-demo
newTag: "0.1"

View File

@@ -1,3 +1,3 @@
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.3
- gcr.io/heptio-images/ks-guestbook-demo:0.3

View File

@@ -12,7 +12,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: guestbook-ui
ports:
- containerPort: 81

View File

@@ -4,5 +4,5 @@ kind: Kustomization
resources:
- guestbook.yaml
images:
- name: quay.io/argoprojlabs/argocd-e2e-container
- name: gcr.io/heptio-images/ks-guestbook-demo
newTag: "0.1"

View File

@@ -12,7 +12,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:{{.Values.image.tag}}
- image: gcr.io/heptio-images/ks-guestbook-demo:{{.Values.image.tag}}
name: guestbook-ui
ports:
- containerPort: 81

View File

@@ -1,3 +1,3 @@
kustomize:
images:
- quay.io/argoprojlabs/argocd-e2e-container:0.2
- gcr.io/heptio-images/ks-guestbook-demo:0.2

View File

@@ -12,7 +12,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: guestbook-ui
ports:
- containerPort: 81

View File

@@ -4,5 +4,5 @@ kind: Kustomization
resources:
- guestbook.yaml
images:
- name: quay.io/argoprojlabs/argocd-e2e-container
- name: gcr.io/heptio-images/ks-guestbook-demo
newTag: "0.1"

View File

@@ -1,6 +1,6 @@
{
containerPort: 80,
image: "quay.io/argoprojlabs/argocd-e2e-container:0.2",
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2",
name: "guestbook-ui",
replicas: 1,
servicePort: 80,

View File

@@ -1,6 +1,6 @@
{
containerPort: 80,
image: "quay.io/argoprojlabs/argocd-e2e-container:0.2",
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2",
name: "guestbook-ui",
replicas: 1,
servicePort: 80,

View File

@@ -28,7 +28,7 @@ spec:
app: guestbook-bluegreen
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-bluegreen
ports:
- containerPort: 80

View File

@@ -28,7 +28,7 @@ spec:
app: guestbook-bluegreen
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-bluegreen
ports:
- containerPort: 80

View File

@@ -28,7 +28,7 @@ spec:
app: guestbook-bluegreen
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-bluegreen
ports:
- containerPort: 80

View File

@@ -29,7 +29,7 @@ spec:
app: guestbook-bluegreen
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-bluegreen
ports:
- containerPort: 80

View File

@@ -28,7 +28,7 @@ spec:
app: guestbook-bluegreen
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook-bluegreen
ports:
- containerPort: 80

View File

@@ -32,7 +32,7 @@ spec:
app: ks-guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: ks-guestbook-ui
ports:
- containerPort: 80

View File

@@ -31,7 +31,7 @@ spec:
app: ks-guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: ks-guestbook-ui
ports:
- containerPort: 83

View File

@@ -32,7 +32,7 @@ spec:
app: ks-guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: ks-guestbook-ui
ports:
- containerPort: 83

View File

@@ -32,7 +32,7 @@ spec:
app: guestbook-canary
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.2'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.2'
name: guestbook-canary
ports:
- containerPort: 80

View File

@@ -3,7 +3,7 @@ kind: Rollout
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook-canary","ksonnet.io/component":"guestbook-ui"},"name":"guestbook-canary","namespace":"default"},"spec":{"minReadySeconds":10,"replicas":5,"selector":{"matchLabels":{"app":"guestbook-canary"}},"strategy":{"canary":{"maxSurge":1,"maxUnavailable":0,"steps":[{"setWeight":20},{"pause":{"duration":30}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook-canary"}},"spec":{"containers":[{"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook-canary","ports":[{"containerPort":80}]}]}}}}
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook-canary","ksonnet.io/component":"guestbook-ui"},"name":"guestbook-canary","namespace":"default"},"spec":{"minReadySeconds":10,"replicas":5,"selector":{"matchLabels":{"app":"guestbook-canary"}},"strategy":{"canary":{"maxSurge":1,"maxUnavailable":0,"steps":[{"setWeight":20},{"pause":{"duration":30}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook-canary"}},"spec":{"containers":[{"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook-canary","ports":[{"containerPort":80}]}]}}}}
rollout.argoproj.io/revision: '1'
clusterName: ''
creationTimestamp: '2019-05-01T21:55:30Z'
@@ -39,7 +39,7 @@ spec:
app: guestbook-canary
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
name: guestbook-canary
ports:
- containerPort: 80

View File

@@ -3,7 +3,7 @@ kind: Rollout
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook-canary","ksonnet.io/component":"guestbook-ui"},"name":"guestbook-canary","namespace":"default"},"spec":{"minReadySeconds":10,"replicas":5,"selector":{"matchLabels":{"app":"guestbook-canary"}},"strategy":{"canary":{"maxSurge":1,"maxUnavailable":0,"steps":[{"setWeight":20},{"pause":{"duration":30}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook-canary"}},"spec":{"containers":[{"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook-canary","ports":[{"containerPort":80}]}]}}}}
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook-canary","ksonnet.io/component":"guestbook-ui"},"name":"guestbook-canary","namespace":"default"},"spec":{"minReadySeconds":10,"replicas":5,"selector":{"matchLabels":{"app":"guestbook-canary"}},"strategy":{"canary":{"maxSurge":1,"maxUnavailable":0,"steps":[{"setWeight":20},{"pause":{"duration":30}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook-canary"}},"spec":{"containers":[{"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook-canary","ports":[{"containerPort":80}]}]}}}}
rollout.argoproj.io/revision: '1'
clusterName: ''
creationTimestamp: '2019-05-01T21:55:30Z'
@@ -39,7 +39,7 @@ spec:
app: guestbook-canary
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
name: guestbook-canary
ports:
- containerPort: 80

View File

@@ -3,7 +3,7 @@ kind: Rollout
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook-canary","ksonnet.io/component":"guestbook-ui"},"name":"guestbook-canary","namespace":"default"},"spec":{"minReadySeconds":10,"replicas":5,"selector":{"matchLabels":{"app":"guestbook-canary"}},"strategy":{"canary":{"maxSurge":1,"maxUnavailable":0,"steps":[{"setWeight":20},{"pause":{"duration":30}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook-canary"}},"spec":{"containers":[{"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook-canary","ports":[{"containerPort":80}]}]}}}}
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook-canary","ksonnet.io/component":"guestbook-ui"},"name":"guestbook-canary","namespace":"default"},"spec":{"minReadySeconds":10,"replicas":5,"selector":{"matchLabels":{"app":"guestbook-canary"}},"strategy":{"canary":{"maxSurge":1,"maxUnavailable":0,"steps":[{"setWeight":20},{"pause":{"duration":30}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook-canary"}},"spec":{"containers":[{"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook-canary","ports":[{"containerPort":80}]}]}}}}
rollout.argoproj.io/revision: '2'
clusterName: ''
creationTimestamp: '2019-05-01T21:55:30Z'
@@ -33,7 +33,7 @@ spec:
app: guestbook-canary
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.2'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.2'
name: guestbook-canary
ports:
- containerPort: 80

View File

@@ -3,7 +3,7 @@ kind: Rollout
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"name":"example-rollout-canary","namespace":"default"},"spec":{"minReadySeconds":30,"replicas":5,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook"}},"strategy":{"canary":{"steps":[{"setWeight":20},{"pause":{"duration":20}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook"}},"spec":{"containers":[{"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook","ports":[{"containerPort":80}]}]}}}}
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"name":"example-rollout-canary","namespace":"default"},"spec":{"minReadySeconds":30,"replicas":5,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook"}},"strategy":{"canary":{"steps":[{"setWeight":20},{"pause":{"duration":20}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook"}},"spec":{"containers":[{"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook","ports":[{"containerPort":80}]}]}}}}
rollout.argoproj.io/revision: "3"
creationTimestamp: "2019-10-20T15:42:26Z"
generation: 101
@@ -28,7 +28,7 @@ spec:
app: guestbook
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: guestbook
ports:
- containerPort: 80

View File

@@ -31,7 +31,7 @@ spec:
app: guestbook-canary
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.2'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.2'
name: guestbook-canary
ports:
- containerPort: 80

View File

@@ -3,7 +3,7 @@ kind: Rollout
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"name":"example-rollout-canary","namespace":"default"},"spec":{"minReadySeconds":30,"replicas":5,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook"}},"strategy":{"canary":{"steps":[{"setWeight":20},{"pause":{"duration":20}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook"}},"spec":{"containers":[{"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook","ports":[{"containerPort":80}]}]}}}}
{"apiVersion":"argoproj.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"name":"example-rollout-canary","namespace":"default"},"spec":{"minReadySeconds":30,"replicas":5,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook"}},"strategy":{"canary":{"steps":[{"setWeight":20},{"pause":{"duration":20}},{"setWeight":40},{"pause":{}}]}},"template":{"metadata":{"labels":{"app":"guestbook"}},"spec":{"containers":[{"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook","ports":[{"containerPort":80}]}]}}}}
rollout.argoproj.io/revision: "2"
clusterName: ""
creationTimestamp: 2019-04-26T20:17:43Z
@@ -35,7 +35,7 @@ spec:
app: guestbook
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook
ports:
- containerPort: 80

View File

@@ -38,7 +38,7 @@ spec:
release: guestbook-bluegreen
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.3'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.3'
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:

View File

@@ -20,7 +20,7 @@ spec:
app: guestbook
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2
name: guestbook
status:
HPAReplicas: 5

View File

@@ -1,5 +1,4 @@
hs = {}
if obj.status == nil then
hs.status = "Progressing"
hs.message = "Waiting for the status to be reported"
@@ -8,7 +7,7 @@ end
-- A policy will not have a compliant field but will have a placement key set if
-- it is not being applied to any clusters
if obj.status.compliant == nil and obj.status.status == nil and obj.status.placement ~= nil and #obj.status.placement > 0 then
if obj.status.compliant == nil and #obj.status.placement > 0 and obj.status.status == nil then
hs.status = "Healthy"
hs.message = "No clusters match this policy"
return hs
@@ -25,8 +24,6 @@ if obj.status.compliant == "Compliant" then
else
hs.status = "Degraded"
end
-- Collect NonCompliant clusters for the policy
noncompliants = {}
if obj.status.status ~= nil then
-- "root" policy
@@ -53,5 +50,4 @@ elseif obj.status.details ~= nil then
hs.message = "NonCompliant templates: " .. table.concat(noncompliants, ", ")
end
end
return hs

View File

@@ -19,10 +19,6 @@ tests:
status: Progressing
message: Waiting for the status to be reported
inputPath: testdata/progressing_no_status.yaml
- healthStatus:
status: Progressing
message: Waiting for the status to be reported
inputPath: testdata/progressing_nil_status.yaml
- healthStatus:
status: Healthy
message: No clusters match this policy

View File

@@ -1,51 +0,0 @@
apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
annotations:
argocd.argoproj.io/compare-options: IgnoreExtraneous
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
labels:
argocd.argoproj.io/instance: acm
name: acm-hub-ca-policy
namespace: open-cluster-management
spec:
disabled: false
policy-templates:
- objectDefinition:
apiVersion: policy.open-cluster-management.io/v1
kind: ConfigurationPolicy
metadata:
name: acm-hub-ca-config-policy
spec:
namespaceSelector:
include:
- default
object-templates:
- complianceType: mustonlyhave
objectDefinition:
apiVersion: v1
data:
hub-kube-root-ca.crt: '{{hub fromConfigMap "" "kube-root-ca.crt" "ca.crt"
| base64enc hub}}'
hub-openshift-service-ca.crt: '{{hub fromConfigMap "" "openshift-service-ca.crt"
"service-ca.crt" | base64enc hub}}'
kind: Secret
metadata:
name: hub-ca
namespace: golang-external-secrets
type: Opaque
- complianceType: mustonlyhave
objectDefinition:
apiVersion: v1
data:
hub-kube-root-ca.crt: |
{{hub fromConfigMap "" "kube-root-ca.crt" "ca.crt" | autoindent hub}}
hub-openshift-service-ca.crt: |
{{hub fromConfigMap "" "openshift-service-ca.crt" "service-ca.crt" | autoindent hub}}
kind: ConfigMap
metadata:
name: trusted-hub-bundle
namespace: imperative
remediationAction: enforce
severity: medium
remediationAction: enforce

View File

@@ -49,4 +49,3 @@ spec:
remediationAction: enforce
severity: medium
remediationAction: enforce
status: {}

View File

@@ -24,7 +24,7 @@ spec:
app: guestbook-canary
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
name: guestbook-canary
ports:
- containerPort: 80
@@ -49,6 +49,6 @@ status:
selector: app=guestbook-canary
liveVersionDate: "2022-07-14T07:56:27.000Z"
liveVersionImages:
rollouts-demo: quay.io/argoprojlabs/argocd-e2e-container:0.1
rollouts-demo: gcr.io/heptio-images/ks-guestbook-demo:0.1
phase: Healthy
revision: "9"

View File

@@ -2646,7 +2646,7 @@ func (s *Server) GetApplicationSyncWindows(ctx context.Context, q *application.A
func (s *Server) inferResourcesStatusHealth(app *appv1.Application) {
if app.Status.ResourceHealthSource == appv1.ResourceHealthLocationAppTree {
tree := &appv1.ApplicationTree{}
if err := s.cache.GetAppResourcesTree(app.InstanceName(s.ns), tree); err == nil {
if err := s.cache.GetAppResourcesTree(app.Name, tree); err == nil {
healthByKey := map[kube.ResourceKey]*appv1.HealthStatus{}
for _, node := range tree.Nodes {
healthByKey[kube.NewResourceKey(node.Group, node.Kind, node.Namespace, node.Name)] = node.Health

View File

@@ -457,8 +457,19 @@ func (s *Server) RotateAuth(ctx context.Context, q *cluster.ClusterQuery) (*clus
}
func (s *Server) toAPIResponse(clust *appv1.Cluster) *appv1.Cluster {
clust = clust.Sanitized()
_ = s.cache.GetClusterInfo(clust.Server, &clust.Info)
clust.Config.Password = ""
clust.Config.BearerToken = ""
clust.Config.TLSClientConfig.KeyData = nil
if clust.Config.ExecProviderConfig != nil {
// We can't know what the user has put into args or
// env vars on the exec provider that might be sensitive
// (e.g. --private-key=XXX, PASSWORD=XXX)
// Implicitly assumes the command executable name is non-sensitive
clust.Config.ExecProviderConfig.Env = make(map[string]string)
clust.Config.ExecProviderConfig.Args = nil
}
// populate deprecated fields for backward compatibility
// nolint:staticcheck
clust.ServerVersion = clust.Info.ServerVersion

View File

@@ -311,20 +311,12 @@ func (s *Server) GetDetailedProject(ctx context.Context, q *project.ProjectQuery
}
proj.NormalizeJWTTokens()
globalProjects := argo.GetGlobalProjects(proj, listersv1alpha1.NewAppProjectLister(s.projInformer.GetIndexer()), s.settingsMgr)
var apiRepos []*v1alpha1.Repository
for _, repo := range repositories {
apiRepos = append(apiRepos, repo.Normalize().Sanitized())
}
var apiClusters []*v1alpha1.Cluster
for _, cluster := range clusters {
apiClusters = append(apiClusters, cluster.Sanitized())
}
return &project.DetailedProjectsResponse{
GlobalProjects: globalProjects,
Project: proj,
Repositories: apiRepos,
Clusters: apiClusters,
Repositories: repositories,
Clusters: clusters,
}, err
}

View File

@@ -315,7 +315,7 @@ func TestRepositoryServer(t *testing.T) {
testRepo := &appsv1.Repository{
Repo: url,
Type: "git",
Username: "",
Username: "foo",
InheritedCreds: true,
}
db.On("ListRepositories", context.TODO()).Return([]*appsv1.Repository{testRepo}, nil)

View File

@@ -65,7 +65,7 @@ func TestMultiSourceAppWithHelmExternalValueFiles(t *testing.T) {
RepoURL: RepoURL(RepoURLTypeFile),
Ref: "values",
}, {
RepoURL: RepoURL(RepoURLTypeFile),
RepoURL: "https://github.com/argoproj/argocd-example-apps.git",
TargetRevision: "HEAD",
Path: "helm-guestbook",
Helm: &ApplicationSourceHelm{
@@ -107,13 +107,9 @@ func TestMultiSourceAppWithHelmExternalValueFiles(t *testing.T) {
for _, r := range app.Status.Resources {
statusByName[r.Name] = r.Status
}
// check if the app has 3 resources, guestbook and 2 pods
assert.Len(t, statusByName, 1)
assert.Equal(t, SyncStatusCodeSynced, statusByName["guestbook-ui"])
// Confirm that the deployment has 3 replicas.
output, err := Run("", "kubectl", "get", "deployment", "guestbook-ui", "-n", DeploymentNamespace(), "-o", "jsonpath={.spec.replicas}")
require.NoError(t, err)
assert.Equal(t, "3", output, "Expected 3 replicas for the helm-guestbook deployment")
assert.Equal(t, SyncStatusCodeSynced, statusByName["helm-guestbook"])
})
}

View File

@@ -1,3 +0,0 @@
apiVersion: v2
version: 1.0.0
name: helm-guestbook

View File

@@ -1,23 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
labels:
test: "true"
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.2
imagePullPolicy: IfNotPresent
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -1,10 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: guestbook-ui
spec:
ports:
- port: 80
targetPort: 80
selector:
app: guestbook-ui

View File

@@ -1 +0,0 @@
replicas: 1

View File

@@ -1,6 +1,6 @@
function (
containerPort=80,
image="quay.io/argoprojlabs/argocd-e2e-container:0.2",
image="gcr.io/heptio-images/ks-guestbook-demo:0.2",
name="jsonnet-guestbook-ui",
replicas=1,
servicePort=80,

View File

@@ -8,7 +8,7 @@
// Each object below should correspond to a component in the components/ directory
"guestbook-ui": {
containerPort: 80,
image: "quay.io/argoprojlabs/argocd-e2e-container:0.2",
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2",
name: "ks-guestbook-ui",
replicas: 0,
servicePort: 80,

View File

@@ -1,6 +1,5 @@
import {GitUrl} from 'git-url-parse';
import {isSHA} from './revision';
import {isValidURL} from '../../shared/utils';
const GitUrlParse = require('git-url-parse');
@@ -20,11 +19,7 @@ export function repoUrl(url: string): string {
return null;
}
const parsedUrl = `${protocol(parsed.protocol)}://${parsed.resource}/${parsed.owner}/${parsed.name}`;
if (!isValidURL(parsedUrl)) {
return null;
}
return parsedUrl;
return `${protocol(parsed.protocol)}://${parsed.resource}/${parsed.owner}/${parsed.name}`;
} catch {
return null;
}

View File

@@ -6,7 +6,6 @@ import (
"regexp"
"strings"
kubeutil "github.com/argoproj/gitops-engine/pkg/utils/kube"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/argoproj/argo-cd/v2/common"
@@ -242,11 +241,6 @@ func (rt *resourceTracking) Normalize(config, live *unstructured.Unstructured, l
return nil
}
if kubeutil.IsCRD(live) {
// CRDs don't get tracking annotations.
return nil
}
annotation, err := argokube.GetAppInstanceAnnotation(config, common.AnnotationKeyAppInstance)
if err != nil {
return err

View File

@@ -203,50 +203,6 @@ func TestResourceIdNormalizer_Normalize(t *testing.T) {
assert.False(t, hasOldLabel)
}
func TestResourceIdNormalizer_NormalizeCRD(t *testing.T) {
rt := NewResourceTracking()
// live object is a CRD resource
liveObj := &unstructured.Unstructured{
Object: map[string]any{
"apiVersion": "apiextensions.k8s.io/v1",
"kind": "CustomResourceDefinition",
"metadata": map[string]any{
"name": "crontabs.stable.example.com",
"labels": map[string]any{
common.LabelKeyAppInstance: "my-app",
},
},
"spec": map[string]any{
"group": "stable.example.com",
"scope": "Namespaced",
},
},
}
// config object is a CRD resource
configObj := &unstructured.Unstructured{
Object: map[string]any{
"apiVersion": "apiextensions.k8s.io/v1",
"kind": "CustomResourceDefinition",
"metadata": map[string]any{
"name": "crontabs.stable.example.com",
"labels": map[string]any{
common.LabelKeyAppInstance: "my-app",
},
},
"spec": map[string]any{
"group": "stable.example.com",
"scope": "Namespaced",
},
},
}
require.NoError(t, rt.Normalize(configObj, liveObj, common.LabelKeyAppInstance, string(TrackingMethodAnnotation)))
// the normalization should not apply any changes to the live object
require.NotContains(t, liveObj.GetAnnotations(), common.AnnotationKeyAppInstance)
}
func TestResourceIdNormalizer_Normalize_ConfigHasOldLabel(t *testing.T) {
rt := NewResourceTracking()

View File

@@ -17,7 +17,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: 'quay.io/argoprojlabs/argocd-e2e-container:0.1'
- image: 'gcr.io/heptio-images/ks-guestbook-demo:0.1'
name: guestbook-ui
ports:
- containerPort: 80

View File

@@ -4,7 +4,7 @@ metadata:
annotations:
deployment.kubernetes.io/revision: "1"
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook"},"name":"kustomize-guestbook-ui","namespace":"default"},"spec":{"replicas":1,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook-ui"}},"template":{"metadata":{"labels":{"app":"guestbook-ui"}},"spec":{"containers":[{"image":"quay.io/argoprojlabs/argocd-e2e-container:0.1","name":"guestbook-ui","ports":[{"containerPort":80}]}]}}}}
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"guestbook"},"name":"kustomize-guestbook-ui","namespace":"default"},"spec":{"replicas":1,"revisionHistoryLimit":3,"selector":{"matchLabels":{"app":"guestbook-ui"}},"template":{"metadata":{"labels":{"app":"guestbook-ui"}},"spec":{"containers":[{"image":"gcr.io/heptio-images/ks-guestbook-demo:0.1","name":"guestbook-ui","ports":[{"containerPort":80}]}]}}}}
creationTimestamp: "2021-12-01T20:36:10Z"
generation: 4
labels:
@@ -126,7 +126,7 @@ spec:
app: guestbook-ui
spec:
containers:
- image: quay.io/argoprojlabs/argocd-e2e-container:0.1
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
imagePullPolicy: IfNotPresent
name: guestbook-ui
ports: