Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multisource + upgrade k8s and argocd pkg #578

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

deferraz
Copy link
Contributor

@deferraz deferraz commented Jun 21, 2023

This PR splits the necessary changes to have multisource support as requested by @jannfis
References:
#548
#564

Fixes #513

Andre Ferraz added 3 commits June 21, 2023 14:24
@jannfis
Copy link
Contributor

jannfis commented Jul 6, 2023

Thanks for your PR!

Can you please take a look at the failing unit tests, as well as the failing DCO? The latter is usually fixed by signing off your commits (i.e. git commit -s).

@aaguilartablada
Copy link

I am very interested in this feature. @deferraz could you give attention to the PR? thanks!

@MaheshAravind
Copy link

hey any update on this PR? image updater is unusable if we use the argo terraform provider due to this.

if app.Spec.Source.Kustomize == nil {
app.Spec.Source.Kustomize = &v1alpha1.ApplicationSourceKustomize{}
// This case seems not possible, but we check it anyway
kustomizeSpec := app.Spec.GetSource().Kustomize
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to fix the error showed in the unit tests I should change some code back to the original and leave it like the suggestion below where the app.Spec.Source.Kustomize will be initialized:

Suggested change
kustomizeSpec := app.Spec.GetSource().Kustomize
app.Spec.Source.Kustomize = app.Spec.GetSource().Kustomize
if app.Spec.Source.Kustomize == nil {
app.Spec.Source.Kustomize = &v1alpha1.ApplicationSourceKustomize{}
}
for i, kImg := range app.Spec.Source.Kustomize.Images {
curr := image.NewFromIdentifier(string(kImg))
override := image.NewFromIdentifier(ksImageParam)
if curr.ImageName == override.ImageName {
curr.ImageAlias = override.ImageAlias
app.Spec.Source.Kustomize.Images[i] = v1alpha1.KustomizeImage(override.String())
}
}
app.Spec.Source.Kustomize.MergeImage(v1alpha1.KustomizeImage(ksImageParam))
return nil

Copy link
Contributor

@askhari askhari Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this snippet to fix the errors showed by the unit tests.

Copy link
Contributor

@askhari askhari Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tried this and it worked to some degree. But in the end, if you want to set the target writeback repository is a bit messy. It would be better to use an annotation.

There is already a merge in the master branch of this repository that adds an annotation to set the writeback repository using multisource, but it seems to fail in the unit tests.

Digging a bit into the code, for this to work properly, it will need some dependencies upgrades (specially the argocd depedency) and a much deeper refactor and development to add this feature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a new PR here (#636) with similar changes to this one but covering some issues that we found when we wanted to write back to Helm values files. I hope this helps.

Please, let me know if we should merge this to PR contents to have only one and work on that.

@teroahonen-vungle
Copy link

Would be awesome to get this approved

@artemlive
Copy link

Would be awesome to get this approved

Agree, we are looking for this feature too.

@chenfli
Copy link

chenfli commented Oct 15, 2023

Any news about this PR, we really need it

@devopsidiot
Copy link

Definitely need this on my team.

@naviat
Copy link

naviat commented Nov 17, 2023

bump? need to add in the next release!

1 similar comment
@baohuynh09-lxp
Copy link

bump? need to add in the next release!

@jannfis
Copy link
Contributor

jannfis commented Dec 4, 2023

I think this now has been superseded by #636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Multiple Sources as per ArgoCD v2.6.0 New Field