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

Fix: kustomize write target starts failing after indeterminate period at time #583

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions pkg/argocd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,18 +294,8 @@ var _ changeWriter = writeOverrides
// writeKustomization writes any changes required for updating one or more images to a kustomization.yml
func writeKustomization(app *v1alpha1.Application, wbc *WriteBackConfig, gitC git.Client) (err error, skip bool) {
logCtx := log.WithContext().AddField("application", app.GetName())
if oldDir, err := os.Getwd(); err != nil {
return err, false
} else {
defer func() {
_ = os.Chdir(oldDir)
}()
}

base := filepath.Join(gitC.Root(), wbc.KustomizeBase)
if err := os.Chdir(base); err != nil {
return err, false
}

logCtx.Infof("updating base %s", base)

Expand Down