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

Install GitOps Dashboard for gitops beta run #2469

Merged
merged 6 commits into from
Jul 22, 2022

Conversation

opudrovs
Copy link
Contributor

@opudrovs opudrovs commented Jul 20, 2022

Closes #2358

  • Moved functions in pkg/run/run.go to separate files, because the existing file was getting huge.
  • Added checking if the GitOps Dashboard is installed, and if not, offering to install it.
  • Added prompting user for their password (if the user agrees to install the dashboard) and generating the secret which will be used for logging into the dashboard. The prompt's behavior is similar to a prompt in Flux and everything which is not an explicit Yes is a no. No looping of user input was added, tried it, it was annoying.
  • Added waiting for the dashboard reconciliation and deployment if the dashboard is installed.
  • Added the --dashboard-port flag with default value 9001 and opening this port automatically for the dashboard.
  • Refactored some messages and added comments.

Notes:

  • The code is working in general but maybe i missed the wording in some log/error messages because there are so many of them. So, any comments on naming and wording are very welcome.
  • I've copied and reworked @chanwit's code for opening ports and waiting for dashboard reconciliation and deployment. So, I hope I've used it correctly and in the right places, if not, please let me know.

@opudrovs opudrovs added team/denim type/enhancement New feature or request labels Jul 20, 2022
@opudrovs opudrovs force-pushed the 2358-install-gitops-dashboard-for-gitops-beta-run-new branch 8 times, most recently from dab6a8c to 26d958e Compare July 22, 2022 02:55
@opudrovs opudrovs marked this pull request as ready for review July 22, 2022 03:18
@opudrovs opudrovs requested review from ozamosi and chanwit July 22, 2022 03:19
Copy link
Member

@chanwit chanwit left a comment

Choose a reason for hiding this comment

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

LGTM in general
thank you, @opudrovs 🥇

@opudrovs opudrovs force-pushed the 2358-install-gitops-dashboard-for-gitops-beta-run-new branch from 26d958e to dd2ed42 Compare July 22, 2022 11:07
}

// IsDashboardInstalled checks if the GitOps Dashboard is installed.
func IsDashboardInstalled(log logger.Logger, ctx context.Context, kubeClient *kube.KubeHTTP) bool {
Copy link
Member

Choose a reason for hiding this comment

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

A small glitch here is that someone might install Weave GitOps with a different method.

But we can fix it later when needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would another method also require them to use the same HelmChart? Is it possible to install the dashboard without this HelmChart? Or will the chart be the same just its name will be different?

I mean if using a HelmChart is required for installing the dashboard can we just use something else (not the name) for detecting that this HelmChart is present reliably?

@opudrovs
Copy link
Contributor Author

@chanwit great, thank you! 🌞

@opudrovs opudrovs merged commit 44a6a0e into main Jul 22, 2022
@opudrovs opudrovs deleted the 2358-install-gitops-dashboard-for-gitops-beta-run-new branch July 22, 2022 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install GitOps Dashboard for gitops beta run
2 participants