Skip to content

Commit 38ff211

Browse files
authored
Merge branch 'master' into fix-maxprocs
2 parents abbcd79 + 3070297 commit 38ff211

File tree

150 files changed

+14440
-5278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+14440
-5278
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ updates:
3131
directory: "/"
3232
schedule:
3333
interval: "daily"
34+
ignore:
35+
# We use consistent go and node versions across a lot of different files, and updating via dependabot would cause
36+
# drift among those files.
37+
# Use `make update-go` and `make update-node` to update these versions.
38+
- dependency-name: "library/golang"
39+
- dependency-name: "library/node"
3440

3541
- package-ecosystem: "docker"
3642
directory: "/test/container/"

.github/workflows/ci-build.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
env:
1515
# Golang version to use across CI steps
16-
GOLANG_VERSION: '1.22'
16+
GOLANG_VERSION: '1.23.1'
1717

1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
@@ -110,7 +110,7 @@ jobs:
110110
- name: Run golangci-lint
111111
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
112112
with:
113-
version: v1.58.2
113+
version: v1.61.0
114114
args: --verbose
115115

116116
test-go:
@@ -305,7 +305,7 @@ jobs:
305305
- name: Setup NodeJS
306306
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
307307
with:
308-
node-version: '21.6.1'
308+
node-version: '22.8.0'
309309
- name: Restore node dependency cache
310310
id: cache-dependencies
311311
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
@@ -373,7 +373,7 @@ jobs:
373373
run: |
374374
go tool covdata percent -i=test-results,e2e-code-coverage/applicationset-controller,e2e-code-coverage/repo-server,e2e-code-coverage/app-controller -o test-results/full-coverage.out
375375
- name: Upload code coverage information to codecov.io
376-
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
376+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
377377
with:
378378
file: test-results/full-coverage.out
379379
fail_ci_if_error: true

.github/workflows/image-reuse.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143

144144
- name: Build and push container image
145145
id: image
146-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 #v6.7.0
146+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 #v6.9.0
147147
with:
148148
context: .
149149
platforms: ${{ inputs.platforms }}

.github/workflows/image.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: ./.github/workflows/image-reuse.yaml
5353
with:
5454
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
55-
go-version: 1.22
55+
go-version: 1.23.1
5656
platforms: ${{ needs.set-vars.outputs.platforms }}
5757
push: false
5858

@@ -68,7 +68,7 @@ jobs:
6868
quay_image_name: quay.io/argoproj/argocd:latest
6969
ghcr_image_name: ghcr.io/argoproj/argo-cd/argocd:${{ needs.set-vars.outputs.image-tag }}
7070
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
71-
go-version: 1.22
71+
go-version: 1.23.1
7272
platforms: ${{ needs.set-vars.outputs.platforms }}
7373
push: true
7474
secrets:

.github/workflows/release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
permissions: {}
1111

1212
env:
13-
GOLANG_VERSION: '1.22' # Note: go-version must also be set in job argocd-image.with.go-version
13+
GOLANG_VERSION: '1.23.1' # Note: go-version must also be set in job argocd-image.with.go-version
1414

1515
jobs:
1616
argocd-image:
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
quay_image_name: quay.io/argoproj/argocd:${{ github.ref_name }}
2525
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
26-
go-version: 1.22
26+
go-version: 1.23.1
2727
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
2828
push: true
2929
secrets:

.github/workflows/update-go.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Update golang version on a daily basis and open a PR.
2+
name: Update Go
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
update-go:
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
if: github.repository == 'argoproj/argo-cd'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: imjasonh/setup-crane@31b88efe9de28ae0ffa220711af4b60be9435f6e # v0.4
23+
- name: Update Go
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
make update-go
28+
29+
# If there are no changes, quit early.
30+
if [[ -z $(git status -s) ]]; then
31+
echo "No changes detected"
32+
exit 0
33+
fi
34+
35+
pr_branch="update-go-$(echo $RANDOM | md5sum | head -c 20)"
36+
git checkout -b "$pr_branch"
37+
git config --global user.email '[email protected]'
38+
git config --global user.name 'CI'
39+
git add .
40+
git commit -m "[Bot] chore(dep): Update Go" --signoff
41+
git push --set-upstream origin "$pr_branch"
42+
gh pr create -B master -H "$pr_branch" --title '[Bot] chore(dep): Update Go' --body ''

.github/workflows/update-node.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Update Node version on a daily basis and open a PR.
2+
name: Update Node
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
update-node:
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
if: github.repository == 'argoproj/argo-cd'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: imjasonh/setup-crane@31b88efe9de28ae0ffa220711af4b60be9435f6e # v0.4
23+
- name: Update Node
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
make update-node
28+
29+
# If there are no changes, quit early.
30+
if [[ -z $(git status -s) ]]; then
31+
echo "No changes detected"
32+
exit 0
33+
fi
34+
35+
pr_branch="update-node-$(echo $RANDOM | md5sum | head -c 20)"
36+
git checkout -b "$pr_branch"
37+
git config --global user.email '[email protected]'
38+
git config --global user.name 'CI'
39+
git add .
40+
git commit -m "[Bot] chore(dep): Update Node" --signoff
41+
git push --set-upstream origin "$pr_branch"
42+
gh pr create -B master -H "$pr_branch" --title '[Bot] chore(dep): Update Node' --body ''

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG BASE_IMAGE=docker.io/library/ubuntu:24.04@sha256:3f85b7caad41a95462cf5b787d8
44
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
55
# Also used as the image in CI jobs so needs all dependencies
66
####################################################################################################
7-
FROM docker.io/library/golang:1.23.1@sha256:2fe82a3f3e006b4f2a316c6a21f62b66e1330ae211d039bb8d1128e12ed57bf1 AS builder
7+
FROM docker.io/library/golang:1.23.1@sha256:4f063a24d429510e512cc730c3330292ff49f3ade3ae79bda8f84a24fa25ecb0 AS builder
88

99
RUN echo 'deb http://archive.debian.org/debian buster-backports main' >> /etc/apt/sources.list
1010

@@ -83,7 +83,7 @@ WORKDIR /home/argocd
8383
####################################################################################################
8484
# Argo CD UI stage
8585
####################################################################################################
86-
FROM --platform=$BUILDPLATFORM docker.io/library/node:22.9.0@sha256:cbe2d5f94110cea9817dd8c5809d05df49b4bd1aac5203f3594d88665ad37988 AS argocd-ui
86+
FROM --platform=$BUILDPLATFORM docker.io/library/node:22.9.0@sha256:69e667a79aa41ec0db50bc452a60e705ca16f35285eaf037ebe627a65a5cdf52 AS argocd-ui
8787

8888
WORKDIR /src
8989
COPY ["ui/package.json", "ui/yarn.lock", "./"]
@@ -101,7 +101,7 @@ RUN HOST_ARCH=$TARGETARCH NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OP
101101
####################################################################################################
102102
# Argo CD Build stage which performs the actual build of Argo CD binaries
103103
####################################################################################################
104-
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.23.1@sha256:2fe82a3f3e006b4f2a316c6a21f62b66e1330ae211d039bb8d1128e12ed57bf1 AS argocd-build
104+
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.23.1@sha256:4f063a24d429510e512cc730c3330292ff49f3ade3ae79bda8f84a24fa25ecb0 AS argocd-build
105105

106106
WORKDIR /go/src/github.com/argoproj/argo-cd
107107

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,14 @@ snyk-non-container-tests:
631631
snyk-report:
632632
./hack/snyk-report.sh $(target_branch)
633633

634+
.PHONY: update-go
635+
update-go:
636+
./hack/update-go.sh
637+
638+
.PHONY: update-node
639+
update-node:
640+
./hack/update-node.sh
641+
634642
.PHONY: help
635643
help:
636644
@echo 'Note: Generally an item w/ (-local) will run inside docker unless you use the -local variant'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Participation in the Argo CD project is governed by the [CNCF Code of Conduct](h
5656
### Blogs and Presentations
5757

5858
1. [Awesome-Argo: A Curated List of Awesome Projects and Resources Related to Argo](https://github.com/terrytangyuan/awesome-argo)
59-
1. [Unveil the Secret Ingredients of Continuous Delivery at Enterprise Scale with Argo CD](https://akuity.io/blog/unveil-the-secret-ingredients-of-continuous-delivery-at-enterprise-scale-with-argocd-kubecon-china-2021/)
59+
1. [Unveil the Secret Ingredients of Continuous Delivery at Enterprise Scale with Argo CD](https://akuity.io/blog/secret-ingredients-of-continuous-delivery-at-enterprise-scale-with-argocd/)
6060
1. [GitOps Without Pipelines With ArgoCD Image Updater](https://youtu.be/avPUQin9kzU)
6161
1. [Combining Argo CD (GitOps), Crossplane (Control Plane), And KubeVela (OAM)](https://youtu.be/eEcgn_gU3SM)
6262
1. [How to Apply GitOps to Everything - Combining Argo CD and Crossplane](https://youtu.be/yrj4lmScKHQ)

USERS.md

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ Currently, the following organizations are **officially** using Argo CD:
242242
1. [Optoro](https://www.optoro.com/)
243243
1. [Orbital Insight](https://orbitalinsight.com/)
244244
1. [Oscar Health Insurance](https://hioscar.com/)
245+
1. [Outpost24](https://outpost24.com/)
245246
1. [p3r](https://www.p3r.one/)
246247
1. [Packlink](https://www.packlink.com/)
247248
1. [PagerDuty](https://www.pagerduty.com/)

applicationset/controllers/applicationset_controller.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ import (
5252
"github.com/argoproj/argo-cd/v2/util/db"
5353

5454
argov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
55-
appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
5655
argoutil "github.com/argoproj/argo-cd/v2/util/argo"
5756
"github.com/argoproj/argo-cd/v2/util/argo/normalizers"
5857

@@ -79,7 +78,6 @@ type ApplicationSetReconciler struct {
7978
Recorder record.EventRecorder
8079
Generators map[string]generators.Generator
8180
ArgoDB db.ArgoDB
82-
ArgoAppClientset appclientset.Interface
8381
KubeClientset kubernetes.Interface
8482
Policy argov1alpha1.ApplicationsSyncPolicy
8583
EnablePolicyOverride bool
@@ -97,6 +95,7 @@ type ApplicationSetReconciler struct {
9795
// +kubebuilder:rbac:groups=argoproj.io,resources=applicationsets/status,verbs=get;update;patch
9896

9997
func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
98+
startReconcile := time.Now()
10099
logCtx := log.WithField("applicationset", req.NamespacedName)
101100

102101
var applicationSetInfo argov1alpha1.ApplicationSet
@@ -334,7 +333,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
334333
requeueAfter = ReconcileRequeueOnValidationError
335334
}
336335

337-
logCtx.WithField("requeueAfter", requeueAfter).Info("end reconcile")
336+
logCtx.WithField("requeueAfter", requeueAfter).Info("end reconcile in ", time.Since(startReconcile))
338337

339338
return ctrl.Result{
340339
RequeueAfter: requeueAfter,
@@ -472,7 +471,9 @@ func (r *ApplicationSetReconciler) validateGeneratedApplications(ctx context.Con
472471
errorsByIndex[i] = fmt.Errorf("ApplicationSet %s contains applications with duplicate name: %s", applicationSetInfo.Name, app.Name)
473472
continue
474473
}
475-
_, err := r.ArgoAppClientset.ArgoprojV1alpha1().AppProjects(r.ArgoCDNamespace).Get(ctx, app.Spec.GetProject(), metav1.GetOptions{})
474+
475+
appProject := &argov1alpha1.AppProject{}
476+
err := r.Client.Get(ctx, types.NamespacedName{Name: app.Spec.Project, Namespace: r.ArgoCDNamespace}, appProject)
476477
if err != nil {
477478
if apierr.IsNotFound(err) {
478479
errorsByIndex[i] = fmt.Errorf("application references project %s which does not exist", app.Spec.Project)
@@ -1484,7 +1485,7 @@ func getOwnsHandlerPredicates(enableProgressiveSyncs bool) predicate.Funcs {
14841485
return false
14851486
}
14861487
requeue := shouldRequeueApplicationSet(appOld, appNew, enableProgressiveSyncs)
1487-
logCtx.WithField("requeue", requeue).Debugf("requeue: %t caused by application %s\n", requeue, appNew.Name)
1488+
logCtx.WithField("requeue", requeue).Debugf("requeue: %t caused by application %s", requeue, appNew.Name)
14881489
return requeue
14891490
},
14901491
GenericFunc: func(e event.GenericEvent) bool {

0 commit comments

Comments
 (0)