Commit Graph

371 Commits

Author SHA1 Message Date
Ivan Pedersen 472beb85d7
fix: return empty list instead of nil to prevent panic. Fixes #25189 (#25192) (#794)
Signed-off-by: Ivan Pedersen <ivan.pedersen@volvocars.com>
2025-12-04 13:52:40 -05:00
Peter Jiang 13d5172d3e
fix(cherry-pick:): regression on creationTimestamp with server-side diff (#793)
* fix(cherry-pick): regression on creationTimestamp with server-side diff

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* add diff test

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* format

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-11-08 18:54:03 -05:00
Peter Jiang b89b0871b4
add smd change (#792)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-10-06 13:22:52 -04:00
dependabot[bot] a32d6c3f75
chore(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#790)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 09:55:57 -04:00
dependabot[bot] d1cf80999f
chore(deps): bump actions/setup-go from 5.5.0 to 6.0.0 (#789)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.5.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](d35c59abb0...4469467582)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 09:55:15 -04:00
Peter Jiang cf8d42f2c5
fix: server-side diff shows duplicate containerPorts (#791)
* fix: server-side diff shows duplicate containerPorts

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* lint

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-10-03 15:16:41 -04:00
Leonardo Luz Almeida ff8c1191ac
chore: update the Readme file for migration (#787)
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2025-09-24 09:59:32 -04:00
Papapetrou Patroklos 9068f90261
add readme notice about ongoing migration (#781)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2025-09-10 21:57:48 -10:00
Peter Jiang 97ad5b59a6
chore: bump k8s v1.34 (#773)
* bump k8s v1.34

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* fix broken dependencies

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-09-08 14:24:07 -04:00
Anand Francis Joseph b3a2ec15e6
fix(sync): ApplyOutOfSyncOnly=true sync option is not honoured for cluster scoped resources (#765)
* Using live obj to get the resource key if not nil

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Fixed failing unit tests

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Added test case for validating cluster scoped resources with ApplyOutOfSyncOnly=true

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Fixed gofumpt formatting errors

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Corrected unit tests for cluster scoped resources

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Removed unwanted code comments

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Added comments for explaining the reason why ns is set from live object

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

* Added comments in the unit test

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>

---------

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
2025-09-05 08:06:30 -04:00
Papapetrou Patroklos e0a0d5ba17
chore: Adds a script to prepare repo for migration to main ArgoCD Repo (#766)
* Adds a script to prepare repo for migration to main ArgoCD Repo

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* remove also .gitignore

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* fix script

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

* address pr comments

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>

---------

Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com>
2025-09-04 09:47:31 -04:00
Alexandre Gaudreault dab4cc0b8a
fix(hooks): always remove finalizers on create if hook exists (#770)
* fix(hooks): always remove finalizers

Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>

* unit test

Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>

---------

Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-09-02 15:51:53 -04:00
Alexandre Gaudreault dc952c1a60
validate resource opts (#759)
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-08-27 11:42:04 -04:00
rafal-jan 15973bc6b4
Do not use `--force` with `--dry-run` (#633)
Signed-off-by: rafal-jan <rafal7jan@gmail.com>
2025-08-18 12:59:21 -04:00
Regina Voloshin 90e5e3a40e
added common disable sync otpion (#749)
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
2025-07-28 00:31:59 +03:00
Peter Jiang 38f73a75c3
fix: update normalization for ignoreDifferences on server-side diff (#747)
* WIP fix: update normalization for ignoreDifferences on server-side diff

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* fix linter

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* refactor

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* skip pre-normalization for ssd

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* skip pre-normalization for ssd

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* docs

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* modify Normalize to skip ignoreDifferences conditionally

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* ignoreDifferences for SSD and test backwards compatible

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* rename flags for clarity

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* doc change

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-07-24 09:53:28 -04:00
Andrii Korotkov d590fe55be
chore: Cleanup IterateHierarchy v1 (#748)
* chore: Cleanup IterateHierarchy v1

Part of https://github.com/argoproj/argo-cd/issues/23854

Remove the unused code in gitops-engine.

Signed-off-by: Andrii Korotkov <myolymp@gmail.com>

* Revert some deleted tests

Signed-off-by: Andrii Korotkov <myolymp@gmail.com>

---------

Signed-off-by: Andrii Korotkov <myolymp@gmail.com>
2025-07-22 13:50:43 -07:00
Peter Jiang 093aef0dad
fix: server-side diff shows refresh/hydrate annotations (#737)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-06-17 13:49:52 -04:00
Alexandre Gaudreault 8007df5f6c
fix(sync): create namespace before dry-run (#731) 2025-06-16 17:23:58 -04:00
Peter Jiang f8f1b61ba3
chore: upgrade k8s to 1.33.1 (#735)
* upgrade k8s to 1.33.1

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* fix linter issues

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-06-13 11:47:45 -04:00
Michael Crenshaw 8697b44eea
Revert "Add option to skip the dryrun from the sync context (#708)" (#730)
* Revert "Add option to skip the dryrun from the sync context (#708)"

This reverts commit 717b8bfd69.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* format

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-06-12 14:52:06 -04:00
Peter Jiang 69dfa708a6
feat: auto migrate kubectl-client-side-apply fields for SSA (#727)
* feat: auto migrate kubectl-client-side-apply fields for SSA

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* fix master version

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* run gofumpt

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Propagate sync error instead of logging

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* allow enable/disable of CSA migration using annotation

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* fix linting

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Refactor to allow for multiple managers and disable option

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* remove commentj

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* refactor

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* fix test

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Add docs for client side apply migration

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Edit comment

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-06-12 10:03:52 -04:00
Michael Crenshaw cebed7e704
chore: wrap errors (#732)
* chore: wrap errors

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* report list result along with error

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fixes

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-06-06 10:49:09 -04:00
Peter Jiang 89c110b595
fix: Server-Side diff removed fields missing in diff (#722)
* fix: Server-Side diff removed fields missing in diff

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* add unit test to cover deleted field

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-05-20 14:24:09 -04:00
Michael Crenshaw 90b69e9ae5
chore(deps): bump golangci-lint (#719)
* chore(deps): bump golangci-lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-05-14 17:14:57 -04:00
dependabot[bot] 60c6378a12
chore(deps): bump codecov/codecov-action from a2f73fb6db51fcd2e0aa085dfb36dea90c5e3689 to 5c47607acb93fed5485fdbf7232e8a31425f672a (#649)
* chore(deps): bump codecov/codecov-action

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from a2f73fb6db51fcd2e0aa085dfb36dea90c5e3689 to 5c47607acb93fed5485fdbf7232e8a31425f672a.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](a2f73fb6db...5c47607acb)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update ci.yaml

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-05-14 17:14:49 -04:00
dependabot[bot] c7f25189f0
chore(deps): bump actions/setup-go (#720)
Bumps the dependencies group with 1 update in the / directory: [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/setup-go` from 5.1.0 to 5.5.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](41dfa10bad...d35c59abb0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 16:13:50 -04:00
dependabot[bot] 9169c08c91
chore(deps): bump golang.org/x/net from 0.36.0 to 0.38.0 (#713)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.36.0 to 0.38.0.
- [Commits](https://github.com/golang/net/compare/v0.36.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.38.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 16:04:28 -04:00
Pasha Kostohrys d65e9d9227
feat: Enable SkipDryRunOnMissingResource sync option on Application level (#712)
* fix: go mod tidy is not working due to k8s.io/externaljwt dependency

Signed-off-by: pasha <pasha.k@fyxt.com>

* feat: Enable SkipDryRunOnMissingResource sync option on Application level

Signed-off-by: pasha <pasha.k@fyxt.com>

* feat: Enable SkipDryRunOnMissingResource sync option on Application level

* feat: add support for skipping dry run on missing resources in sync context

- Introduced a new option to skip dry run verification for missing resources at the application level.
- Updated the sync context to include a flag for this feature.
- Enhanced tests to cover scenarios where the skip dry run annotation is applied to all resources.

---------

Signed-off-by: pasha <pasha.k@fyxt.com>
Co-authored-by: pasha <pasha.k@fyxt.com>
2025-04-20 09:41:38 +03:00
Pasha Kostohrys 5f90e7b481
fix: go mod tidy is not working due to k8s.io/externaljwt dependency (#710)
Signed-off-by: pasha <pasha.k@fyxt.com>
Co-authored-by: pasha <pasha.k@fyxt.com>
2025-04-12 22:28:44 +03:00
Nick Heijmink 717b8bfd69
Add option to skip the dryrun from the sync context (#708)
* Add option to skip the dryrun from the sync context

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>

* Fix test by mocking the discovery

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>

* Fix linting errors

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>

* Fix skip dryrun const

---------

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>
2025-04-10 14:12:36 -07:00
Aaron Hoffman c61756277b
feat: return images from resources when sync occurs (#642)
* Add GetResourceImages

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Use require instead of assert

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Add test for empty images case

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Rename test function to match regex

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Add support for conjobs, refactor images implementation and add test for cronjobs

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Move missing images tests to single function

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Refactor test

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Add benchmark for sync

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

* Update comment on images

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>

---------

Signed-off-by: Aaron Hoffman <31711338+Aaron-9900@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-03-27 09:45:14 -04:00
Andrii Korotkov 370078d070
chore: Switch dry run applies to log with debug level (#705)
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
2025-03-18 09:33:28 -04:00
Peter Jiang 7258614f50
chore: add unit test for ssa with dryRun (#703)
Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-03-14 12:43:14 -04:00
dependabot[bot] e5ef2e16d8
chore(deps): bump golang.org/x/net from 0.33.0 to 0.36.0 (#700)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.36.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 11:41:39 -04:00
Peter Jiang 762f9b70f3
fix: Fix checking dryRun when using Server Side Apply (#699)
* fix: properly check dryRun flag for server side apply

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Remove debug logging

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-03-13 09:11:58 -04:00
Andrii Korotkov 1265e8382e
chore(deps): Update some dependencies - another run (#22228) (#696)
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
2025-03-10 06:26:31 -07:00
Andrii Korotkov acb47d5407
chore(deps): Update some package versions (#690)
* chore(deps): Update some package versions

Helps with https://github.com/argoproj/argo-cd/issues/22104

Update some versions trying to avoid legacy dependencies. Bump go to 1.23.5.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Fix versions

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

---------

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
2025-03-05 10:26:49 -05:00
Michael Crenshaw e4cacd37c4
chore(ci): run tests on cherry-pick PRs (#694)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2025-03-04 14:06:13 -05:00
sivchari a16fb84a8c
bump k8s v1.32 (#665)
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2025-03-02 12:29:52 -05:00
Peter Jiang 4fd18478f5
fix: Server-side diff shows incorrect diffs for list related changes (#688)
* fix: Server-side diff shows incorrect diffs for list related changes

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Update docs for removeWebHookMutation

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Update docs

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

* Update docs

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>

---------

Signed-off-by: Peter Jiang <peterjiang823@gmail.com>
2025-02-27 16:20:03 -05:00
Dejan Zele Pejchev 65db274b8d
fix: stuck hook issue when a Job resource has a ttlSecondsAfterFinished field set (#646)
Signed-off-by: Dejan Zele Pejchev <pejcev.dejan@gmail.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
2025-02-07 17:04:47 -05:00
Matthieu MOREL 11a5e25708
chore(deps): bump github.com/evanphx/json-patch to v5.9.11 (#682)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 15:37:51 -05:00
Matthieu MOREL 04266647b1
chore: enable require-error from testifylint (#681)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 15:01:48 -05:00
Matthieu MOREL cc13a7d417
chore: enable gocritic (#680)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 15:00:49 -05:00
Matthieu MOREL ad846ac0fd
chore: enable increment-decrement and redundant-import-alias from revive (#679)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 14:56:44 -05:00
Matthieu MOREL c323d36706
chore: enable dot-imports, duplicated-imports from revive (#678)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 13:10:59 -05:00
Matthieu MOREL 782fb85b94
chore: enable unparam linter (#677)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 12:52:34 -05:00
Matthieu MOREL f5aa9e4d10
chore: enable perfsprint linter (#676)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 12:44:40 -05:00
Matthieu MOREL 367311bd6f
chore: enable thelper linter (#675)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-07 12:43:51 -05:00