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: Add a cluster check at dev start #364

Open
ALEXANCHESSS opened this issue Oct 25, 2023 · 8 comments · May be fixed by #373 or UffizziCloud/uffizzi#493
Open

Fix: Add a cluster check at dev start #364

ALEXANCHESSS opened this issue Oct 25, 2023 · 8 comments · May be fixed by #373 or UffizziCloud/uffizzi#493
Assignees
Labels
bug Something isn't working

Comments

@ALEXANCHESSS
Copy link

ALEXANCHESSS commented Oct 25, 2023

Add cluster check when dev start is started. There may be cases when dev start is started after dev stop, but the cluster was deleted on the UI, which results in an error during deployment

Precondition:
Log in and run dev start

STEPS:

  1. Run dev stop
  2. Delete cluster created dev
  3. Run dev start

Expected result:
A check for a cluster from the current-context is performed, if there is no cluster, a new one is created

Actual result:
dev tries to create an environment in a deleted cluster and deployment errors occur.

@ALEXANCHESSS ALEXANCHESSS added the bug Something isn't working label Oct 25, 2023
@moklidia moklidia linked a pull request Nov 2, 2023 that will close this issue
@moklidia moklidia added the question Further information is requested label Nov 3, 2023
@moklidia
Copy link
Collaborator

moklidia commented Nov 3, 2023

The core issue to add the cluster type: UffizziCloud/uffizzi#490

@zipofar
Copy link
Contributor

zipofar commented Nov 7, 2023

@gadkins
Some questions:

  1. Should the user be available to delete the dev cluster from CLI uffizzi cluster delete <name> or UI?
    if so:
    1.1 Should we alert the user if the cluster is running?
    1.2 Should we create the new cluster if it was stopped?

  2. Should the user be available to create the different dev clusters simultaneously for different PC and single account?

@gadkins
Copy link
Member

gadkins commented Nov 7, 2023

1.1. Yes, ask the user to confirm
1.2 I don’t understand. There should only be on dev cluster. Don’t start multiple dev clusters.
2. No

@zipofar zipofar removed the question Further information is requested label Nov 8, 2023
@zipofar
Copy link
Contributor

zipofar commented Nov 8, 2023

@gadkins

  1. Should we limit organisational account by 1 dev cluster? Or should we limit org account by 1 dev cluster per user?

  2. And other situation:
    2.1 User runs uffizzi dev start, then takes another PC and tries to run uffizzi dev start again. Should we warn the user about existing dev cluster and not let them create new ones?
    2.2 If we do not allow him create new cluster
    2.2.1 Should we show the command for deleting existing dev clusters or ask questions like Delete dev cluster? (y/n)
    2.2.2 Or should we update kubeconfig current-context and start skaffold for the existing dev cluster?

  3. Should we interrupt uffizzi dev skaffold process if user delete dev cluster when dev env was running?

@gadkins
Copy link
Member

gadkins commented Nov 8, 2023

@zipofar

  1. 1 Dev cluster per user
    2.1 Yes, show error message and do not allow multiple dev clusters.
    2.2 Show an error message: Dev cluster already exists. Before you create a new dev cluster, you must delete the existing one: $ uffizzi dev delete [NAME] but show the name of the cluster to make it easy for the user.
    2.2.2 If we did this option what would happen to the existing cluster data?

  2. Yes

@zipofar
Copy link
Contributor

zipofar commented Nov 8, 2023

@gadkins

2.2.2 If we did this option what would happen to the existing cluster data?

When a user has a running skaffold, he has running pods, and when he starts a new skaffold on the same cluster, the skaffold will create the same pods in that cluster.

When a user has stopped dev env and he starts dev on a another pc and an existing dev cluster, there shouldn't be any conflicts

@zipofar
Copy link
Contributor

zipofar commented Nov 10, 2023

@gadkins
Can a user have a dev cluster for the current account and for different projects?

@gadkins
Copy link
Member

gadkins commented Nov 10, 2023

The user can have one dev cluster per project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Code Review
5 participants
@gadkins @zipofar @moklidia @ALEXANCHESSS and others