-
Notifications
You must be signed in to change notification settings - Fork 115
Rewrite image update step to be a simple loop and fix small Helm bug #1711
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
Conversation
# Conflicts: # source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionHelmTests.cs # source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionTest.cs # source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Show resolved
Hide resolved
|
|
||
| var sourceResults = applicationFromYaml.GetSourcesWithMetadata() | ||
| .Select(applicationSource => | ||
| ProcessSource(applicationSource, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it feels like a smell that we need to pass in application and applicationFromYaml - are these not related under and umbrella type?
Note: this could be done as a separate refactoring.
It alsmost feels like Appllication/AppliactionFromYaml/GitCredentials/RepositoryFactory is a 'Context' - i.e. they're all either providers or factories.
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
|
|
||
| using (var repository = CreateRepository(gitCredentials, applicationSource, repositoryFactory)) | ||
| { | ||
| foreach (var valuesFileSource in helmTargetsForRefSource.Targets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this include the default values.yaml? (i.e. if no values files exist, I think helm always looks at the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the ref source. I know we need to include the default values.yml where the chart is, but we do need to do that for the ref?
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # source/Calamari.Tests/ArgoCD/Helm/HelmValuesFileUpdateTargetParserTests.cs
rain-on
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only reviewed the files with comments - so will come back around to the rest later.
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Conventions/UpdateArgoCDApplicationManifestsInstallConvention.cs
Outdated
Show resolved
Hide resolved
source/Calamari/ArgoCD/Helm/HelmValuesFileUpdateTargetParser.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # source/Calamari.Tests/ArgoCD/Commands/Conventions/ArgoCDApplicationBuilder.cs # source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionHelmTests.cs # source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionTest.cs # source/Calamari/ArgoCD/Conventions/UpdateArgoCDAppImagesInstallConvention.cs
rain-on
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Refactor the Argo CD image update step to be a simple loop that iterates over the sources.
Also fixes a small bug where the default
values.yamlisn't updated if it's not in the HelmvalueFileslist - OctopusDeploy/Issues#9825Diagram: https://whimsical.com/argocd-step-process-flows-WgXQKEM27ouNoJA4H4Gcer