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

[usage] Initial setup for component #10227

Merged
merged 1 commit into from
May 25, 2022
Merged

[usage] Initial setup for component #10227

merged 1 commit into from
May 25, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented May 24, 2022

Description

Initial setup for usage-component. This component will be responsible for collecting usage data and eventually creating invoices for SaaS.

This is based on RFC: Usage based pricing (internal)

Related Issue(s)

Fixes #

How to test

#10227 (comment)

Release Notes

NONE

Documentation

NONE

@easyCZ easyCZ force-pushed the mp/usage-setup-component branch from beebbab to 55d1e98 Compare May 24, 2022 19:53
@easyCZ easyCZ marked this pull request as ready for review May 25, 2022 07:09
@easyCZ easyCZ force-pushed the mp/usage-setup-component branch from 232652d to 159abfe Compare May 25, 2022 07:31
@easyCZ easyCZ changed the title [usage-controller] Initial setup for component [usage] Initial setup for component May 25, 2022
@easyCZ easyCZ requested a review from jankeromnes May 25, 2022 07:42
@jankeromnes
Copy link
Contributor

Many thanks @easyCZ!

Could you please add a few hints to the How to test section? (FYI I tried opening your PR in Gitpod, and looked for a usage-xyz pod running, but there was none)

@easyCZ
Copy link
Member Author

easyCZ commented May 25, 2022

@jankeromnes there's currently nothing to test really. It's not yet deployed anywhere as this PR only performs component setup.

One test you can run is cd components/usage && go run main.go to check it runs. This is in a way already tested through CI as we build the component with werft

@easyCZ easyCZ force-pushed the mp/usage-setup-component branch from 159abfe to ba3edac Compare May 25, 2022 08:20
@roboquat roboquat added size/XXL and removed size/L labels May 25, 2022
@easyCZ
Copy link
Member Author

easyCZ commented May 25, 2022

I've changed the hello world in this PR to use baseserver and start it. This then runs the metrics and live/ready endpoints os we can better test this.

To run the test, do

cd components/usage

go run main.go run

and in another terminal, run curl localhost:9502/metrics which demonstrates the server running and serving metrics.

@jankeromnes jankeromnes self-assigned this May 25, 2022
Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks @easyCZ! 👍

Briefly skimmed the code, looks good, ran the provided test commands, works, and generally Gitpod still seems to work fine. 🎉

@roboquat roboquat merged commit df3e316 into main May 25, 2022
@roboquat roboquat deleted the mp/usage-setup-component branch May 25, 2022 11:35
@easyCZ easyCZ mentioned this pull request May 29, 2022
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants