summaryrefslogtreecommitdiff
path: root/pkg/argocd/update.go
AgeCommit message (Collapse)Author
2025-01-14Replace common constant references (#1011)HEADmasterIshita Sequeira
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2025-01-07Move references for kube, image, registry to registry-scanner (#998)Ishita Sequeira
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2024-12-17fix: Image updater changes git write back file (#970)Cheng Fang
Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-12-16Update references of pkg/tag pkg/log pkg/options to use modules from ↵Ishita Sequeira
registry-scanner (#962) Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2024-12-12Improve Application updates when write-back method is ArgoCD (#965)Álvaro Aguilar-Tablada Espinosa
Signed-off-by: Álvaro Aguilar-Tablada Espinosa <Alvaro.Aguilar@mail.schwarz>
2024-10-18fix: Git write back to helm values is incorrect during the first pass and ↵Cheng Fang
corrupts existing data (#885) Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-09-06fix: failed to process a full image-spec annotation with git writeback to ↵Cheng Fang
helmvalues (#843) Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-08-29Allow setting new value in Helm values file (#838)jnovick
Signed-off-by: Joshua Novick <joshua.novick@hunters.ai>
2024-07-18Fix updates to multiple images when using helm values file (#790)Lyupcho Kotev
Signed-off-by: Lyupcho Kotev <lyupcho.kotev@codira.dev>
2024-07-10feat: Support other namespaces than argocd in AIU (#763)sribiere-jellysmack
Signed-off-by: Sebastien RIBIERE <sebastien.ribiere.ext@jellysmack.com> Signed-off-by: Cheng Fang <cfang@redhat.com> Signed-off-by: Mangaal <angommeeteimangaal@gmail.com> Signed-off-by: jannfis <jann@mistrust.net> Co-authored-by: Cheng Fang <cfang@redhat.com> Co-authored-by: Mangaal <44372157+Mangaal@users.noreply.github.com> Co-authored-by: Jann Fischer <jann@mistrust.net>
2024-06-23Fix/helm values wbc (#748)David Vidal Villamide
Signed-off-by: David Vidal Villamide <david@askharilabs.com>
2024-06-18feat: Support for signing commits with gpg and ssh (#710)Dustin Lactin
Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com>
2024-06-14fix: Make Git credentials work again (#737)Jann Fischer
* fix: Make Git credentials work again Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
2024-06-07fix: Pass AppNamespace to UpdateSpec api call (#687)Merijn Wijngaard
Signed-off-by: Merijn Wijngaard <mwijngaard@gmail.com>
2024-05-29check if alias existPasha Kostohrys
Signed-off-by: Pasha Kostohrys <pavel@codefresh.io>
2024-05-29fix: getHelmParamNamesFromAnnotation should take info from container image ↵Pasha Kostohrys
for prevent code duplication Signed-off-by: Pasha Kostohrys <pavel@codefresh.io>
2024-05-29change: make NormalizedSymbolicName() method publicDavid Vidal Villamide
fix: use NormalizedSymbolicName() to retrieve name and version from annotations for Helm app types Signed-off-by: David Vidal Villamide <david@askharilabs.com>
2024-05-27add: GetImagesAndAliasesFromApplication to retrieve images with aliasesDavid Vidal Villamide
fix: now using alias to retrieve annotations when updating Helm type app Signed-off-by: David Vidal Villamide <david@askharilabs.com>
2023-12-04fix: typoguoguangwu
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-12-04feat: multisource support (#636)David Vidal Villamide
* change: update argocd library from 2.7.9 to 2.8.4 for future multisource support Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added support for multisource applications. Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added multisource support to Git WriteBack method Signed-off-by: David Vidal Villamide <david@askharilabs.com> * changed: all Spec.Source references to enable multisource support Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added multisource support for write back method fix: pointer management at getApplicationSource function Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added write-back-target prefix to allow the use of values.yaml files These changes intend to add support for write-back-method git on multisource applications based on Helm sources and value files as Helm does. Also we tried to keep the same coding patterns and the previous features and flows untouched. Signed-off-by: David Vidal Villamide <david@askharilabs.com> * add: helmvalues word to expected dictionaries for check spelling tests Signed-off-by: David Vidal Villamide <david@askharilabs.com> * fix: readthedocs build.os parameter added and set to ubuntu-22.04 Signed-off-by: David Vidal Villamide <david@askharilabs.com> * fix: build.tools.python set to version 3.12 to create documentation Signed-off-by: David Vidal Villamide <david@askharilabs.com> * test: dded coverage for all the new code Signed-off-by: David Vidal Villamide <david@askharilabs.com> * fix: get image and tag parameter from getHelmParameterNamesFromAnnotation fix: set default values for image and tag parameters change: get application source type from Spec intead of Status values Signed-off-by: David Vidal Villamide <david@askharilabs.com> --------- Signed-off-by: David Vidal Villamide <david@askharilabs.com>
2023-08-15feat: Add possibility to specify write-back GIT repository as annotation (#424)Florin Hillebrand
* Add possibility to specify write-back GIT repository as annotation. Signed-off-by: flozzone <flozzone@gmail.com> * Update golangci-lint to 1.52.2. Signed-off-by: flozzone <flozzone@gmail.com> * Replace deprecated golangci linters with 'unused' linter. Signed-off-by: flozzone <flozzone@gmail.com> * Fix Goimport issues. Signed-off-by: flozzone <flozzone@gmail.com> --------- Signed-off-by: flozzone <flozzone@gmail.com>
2023-07-30chore: Update to newer argocd version for better API compatibility (#594)Jesse Bye
* fix: update go mods to use newer argocd app definition Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> * fix deps and tests Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> * fix spelling Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> --------- Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
2023-07-09feat: Respect original parameter overrides with git write-back (#573)KS. Yim
* Fix original override not respected Signed-off-by: KS. Yim <ks.yim@linecorp.com> * Add writeOverrides unittest Signed-off-by: KS. Yim <ks.yim@linecorp.com> * Add helm override commit test Signed-off-by: KS. Yim <ks.yim@linecorp.com> * lint Signed-off-by: KS. Yim <ks.yim@linecorp.com> * fix shadowed err Signed-off-by: KS. Yim <ks.yim@linecorp.com> --------- Signed-off-by: KS. Yim <ks.yim@linecorp.com> Co-authored-by: KS. Yim <ks.yim@linecorp.com>
2022-02-23refactor(WBC): Target field in the WriteBackConfig (#380)Patryk Woziński
2022-01-22chore: Log out warning about tagsortmode (#363)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-19refactor: Refactor logging to provide more context information (#357)jannfis
* refactor: Refactor logging to provide more context information Signed-off-by: jannfis <jann@mistrust.net> * More context Signed-off-by: jannfis <jann@mistrust.net> * Fix unit tests Signed-off-by: jannfis <jann@mistrust.net>
2022-01-12refactor: rename VersionSortMode to UpdateStrategy (#343)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2022-01-12fix: Fetch metadata for multi-arch images with latest strategy (#342)jannfis
* fix: Fetch metadata for multi-arch images with latest strategy Signed-off-by: jannfis <jann@mistrust.net> * Simplify Signed-off-by: jannfis <jann@mistrust.net>
2022-01-11feat: Support manifestlist and multi-arch images (#341)jannfis
* feat: Support manifestlist and multi-arch images Signed-off-by: jannfis <jann@mistrust.net> * Add unit test Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issue Signed-off-by: jannfis <jann@mistrust.net>
2022-01-07feat: add ability to specify a different write and base branch (#304)Nick
* add ability to specify a different write and base branch * format/spelling * add sha1 to template and truncate branch name length * add hasher error checking * document * spelling * correction to template docs * use sha256 and add warning to truncation * condense annotations into one * add some tests * add docs on omitting base branch
2021-10-04chore: Test successful update two images (#264)Zhong, Ming-Xun
* Test successful update two images * fix: NumImagesUpdated regression of commit 274d19c7a06a8413db07672d9983c0821f488ba5
2021-09-12fix: Get tags from correct registry/image with a different kustomize image ↵jannfis
(#253) * fix: Get tags from correct registry/image with a different kustomize image * Fix logs and update image * Fix tags * More tests * More tests
2021-08-02chore: Upgrade Argo CD dependencies to v2.0.5 (#230)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-11feat: allow write-back to actual kustomization files (#200)noah
* feat: allow write-back to actual kustomization files #199 * fix: was not handling default path correctly default is the source path * fix: sort imports
2021-05-04fix: Correctly marshal non-updated images (#203)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-04-26fix : Images not updated if registry or repository is different with same ↵noah
version (#194) * update image even if only difference is the registry * refactor: use annotation methods which are more consistent
2021-04-14feat: Allow setting custom Git commit messages (#193)jannfis
* feat: Support Git commit message templates Signed-off-by: jannfis <jann@mistrust.net> * More templating Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Make TemplateCommitMessage public Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Introduce git.CommitOptions{} Signed-off-by: jannfis <jann@mistrust.net> * Update documentation for commit message templates Signed-off-by: jannfis <jann@mistrust.net> * Add unit tests Signed-off-by: jannfis <jann@mistrust.net> * Update manifests Signed-off-by: jannfis <jann@mistrust.net> * Fix typo in docs Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issues Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issues Signed-off-by: jannfis <jann@mistrust.net>
2021-04-01fix: Prevent nil pointer deref on emtpy tag with running image (#182)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-29feat: Introduce update strategy 'digest' (#176)jannfis
* feat: Introduce update strategy 'digest' Signed-off-by: jannfis <jann@mistrust.net> * Update tests Signed-off-by: jannfis <jann@mistrust.net> * Set dummy digest for update strategy 'digest' Signed-off-by: jannfis <jann@mistrust.net> * Update docs Signed-off-by: jannfis <jann@mistrust.net> * Update spelling Signed-off-by: jannfis <jann@mistrust.net>
2021-03-29fix: Prevent concurrent updates to git repositories (#177)Bartosz Sławianowski
* Add method docs and RequiresLocking method
2021-03-26feat: #164 Send events on image change (#167)Miguel Ángel García
* Send events on image change * fix lints * fix the rest of lints * Addressing feedback: parameterize kubeEvents * small fixes * Running kustomize * try to fix the problem after running make manifests * Move the message to the correct place * reduce annotation size and randomness * Provide full image names as well * goimports/lint
2021-03-25fix: Prevent update loop with git write-back (#171)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-01-31feat: Allow setting Git user and e-mail for commits (#153)jannfis
* feat: Allow setting Git user and e-mail for commits Signed-off-by: jannfis <jann@mistrust.net> * Also allow setting git.user and git.email from configmap * Update docs to include information about Git commit author Signed-off-by: jannfis <jann@mistrust.net> * Update spelling * Add some unit tests Signed-off-by: jannfis <jann@mistrust.net> * Fix linter Signed-off-by: jannfis <jann@mistrust.net>
2021-01-30feat: Resolve symrefs to allow them as targetRevision for write back (#151)jannfis
2021-01-22feat: Allow reuse of Argo CD repo credentials (#141)Alexander Matyushentsev
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-01-22fix: run 'git add' for create files before pushing back (#143)Alexander Matyushentsev
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2020-12-30refactor: Rename package client to kube (#135)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2020-12-20feat: Git write-back of parameters (#133)jannfis
* feat: Initial support for persisting changes in Git Signed-off-by: jannfis <jann@mistrust.net> * Fix unit test Signed-off-by: jannfis <jann@mistrust.net> * Fix up some stuff Signed-off-by: jannfis <jann@mistrust.net> * More tests and fix mocks Signed-off-by: jannfis <jann@mistrust.net> * Spellings * Spellings * Spellings * Fix lint Signed-off-by: jannfis <jann@mistrust.net> * Disable GPG tests * Typo * Exclude ext code from tests
2020-12-04feat: Export Prometheus compatible metrics (#123)jannfis
* feat: Export Prometheus compatible metrics Signed-off-by: jannfis <jann@mistrust.net> * adapt spelling action configuration Signed-off-by: jannfis <jann@mistrust.net> * adapt spelling action configuration Signed-off-by: jannfis <jann@mistrust.net>
2020-09-27feat: Allow ignoring set of tags (#101)jannfis
* feat: Allow ignoring set of tags * Fix a typo in symbol name * Rename symbol * err must be nil; also print trace message * Update documentation * Update documentation * String is already trimmed