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

Onboarding wizard enhancements #1318

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

Azanul
Copy link
Collaborator

@Azanul Azanul commented Jan 9, 2024

Problem

  • Onboarding wizard doesn't schedule the fetching of resources
  • No support for opencost in onboarding wizard

Solution

  • Used gocron to fetch resources for added account every hour
  • New input field in kubernetes part of onboarding wizard

Screenshots

Screenshot 2024-01-09 at 1 19 14 PM

Checklist

  • Code follows the contributing guidelines
  • Changes have been thoroughly tested
  • Documentation has been updated, if necessary
  • Any dependencies have been added to the project, if necessary

Reviewers

@jakepage91 @mlabouardy @AllieMendes

Signed-off-by: Azanul <azanulhaque@gmail.com>
Signed-off-by: Azanul <azanulhaque@gmail.com>
Signed-off-by: Azanul <azanulhaque@gmail.com>
@Azanul Azanul changed the title Onboarding wizard Onboarding wizard enhancements Jan 9, 2024
go fetchResourcesForAccount(c, account, handler.db, []string{})

cron := gocron.NewScheduler(time.UTC)
_, err = cron.Every(1).Hours().Do(func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't this be another cron that keeps on running. Lets say a new acc was added and before that the main core cron was already running now with the addition of new clou acc this cron starts too every other hour for same acc. Wont this be redundant

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

main cron doesn't have the acc covered by this one

Copy link
Collaborator

Choose a reason for hiding this comment

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

In case of multiple addition of cloud acc there will be multiple crons running

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's true, for now

Copy link
Collaborator

Choose a reason for hiding this comment

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

sure for time being we can use it but definately we can improve this a lot

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed

@mlabouardy mlabouardy merged commit 6258693 into tailwarden:develop Jan 15, 2024
4 checks passed
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