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

[Feature] Implement --auto-restart flag for the create command #61

Merged
merged 1 commit into from
May 21, 2019

Conversation

andyz-dev
Copy link
Contributor

As mentioned in #15.

When creating clusters with the --always-on flag, the cluster can
remain in the "running" state across the docker daemon restart.

Without this flag, a "running" cluster becomes "stopped" after docker
daemon restart.

Clusters stopped with 'k3d stop' command will remain stopped after
docker daemon restart.

Copy link
Member

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

Love it! Maybe an alias like auto-restart or similar would be more intuitive?
I didn't really think it through when I created the issue.

@andyz-dev
Copy link
Contributor Author

Personally, I am not a big fan of aliasing. It is confusing to the user and hard to document. Let's pick one name and stick with it.

How about --unless-stopped? not a great name, but to the point. BTW, I like auto-restart, It would be my 2nd choice.

@iwilltry42
Copy link
Member

iwilltry42 commented May 21, 2019

Personally, I am not a big fan of aliasing. It is confusing to the user and hard to document. Let's pick one name and stick with it.

True, same here 👍

How about --unless-stopped? not a great name, but to the point. BTW, I like auto-restart, It would be my 2nd choice.

I fear that --unless-stopped doesn't express enough what it actually does, which is restarting automatically if stopped by anything other than k3d stop/docker stop.
WDYT?

@iwilltry42 iwilltry42 added the enhancement New feature or request label May 21, 2019
When creating clusters with the --auto-restart flag, any running cluster
will remain "running" up on docker daemon restart.

By default, without this flag, a "running" cluster becomes "stopped"
after docker daemon restart.

Clusters stopped with 'k3d stop' command will remain stopped after
docker daemon restart regardless the settings of this flag.
@andyz-dev
Copy link
Contributor Author

Let's go with --auto-restart. Updated.

@andyz-dev andyz-dev merged commit 6dfb1e0 into k3d-io:master May 21, 2019
@andyz-dev andyz-dev deleted the always-on branch May 21, 2019 17:46
@andyz-dev andyz-dev changed the title [Feature] Implement --always-on flag for the create command [Feature] Implement --auto-restart flag for the create command May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants