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

migrate with 0-downtime #727

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Conversation

noam-codefresh
Copy link
Contributor

What

improve migration process by having 0-downtime for all applications that might be deployed from git-sources

Why

enable smooth transition from cli to helm runtime

Notes

@@ -115,16 +138,19 @@ func runHelmMigrate(ctx context.Context, opts *MigrateOptions) error {
return err
}

opts.runtimeNamespace = *runtime.Metadata.Namespace
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i decided to just put some values on the opts, and send them down into the funcs, instead of adding more and more parameters


destRepo, _, err := destCloneOpts.GetRepo(ctx)
log.G(ctx).Infof("Pushed changes to installation repo %q, sha: %s", opts.runtimeRepo, sha)
err = removeFromCluster(ctx, opts.helmReleaseName, *runtime.Metadata.Namespace, opts.kubeContext, srcCloneOpts, opts.kubeFactory)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved removeFromCluster (autopilot uninstall) before destRepo persist

@noam-codefresh noam-codefresh merged commit fe69468 into main Dec 14, 2023
2 checks passed
@noam-codefresh noam-codefresh deleted the CR-21638-no-downtime-migration branch December 14, 2023 14:23
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.

3 participants