netgroup-polito / CrownLabs

Kubernetes-based Remote Laboratories
https://crownlabs.polito.it
Apache License 2.0
107 stars 42 forks source link

Add controller for counting cpu used by Tenant #762

Closed pierlagreca closed 2 years ago

pierlagreca commented 2 years ago

This PR adds a new controller that computes the amount of cpu minutes usage for each Tenant, and a minutes counter in the Tenant object. This controller is bound to the Tenant Operator and it is scheduled to be executed every 5 minutes, when in execution the controller iterates on each instance and increases the token consumption counter of the tenant by an amount of seconds for each cpu core used, depending on last esecution of the controller itself or the creation timestamp of the instances.

kingmakerbot commented 2 years ago

Hi @pierlagreca. Thanks for your PR.

I am @kingmakerbot. You can interact with me issuing a slash command in the first line of a comment. Currently, I understand the following commands:

Make sure this PR appears in the CrownLabs changelog, adding one of the following labels:

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/rebase

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/undeploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly teared-down!

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

pierlagreca commented 2 years ago

/undeploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly teared-down!

pierlagreca commented 2 years ago

/deploy-staging

kingmakerbot commented 2 years ago

Your staging environment has been correctly deployed/updated! Available here: Frontend, Storybook, Qlkube Operators: add the crownlabs.polito.it/operator-selector=staging-762 label to your tenant.

kingmakerbot commented 2 years ago

Your staging environment has been correctly teared-down!