Skip to content

[usage] Add configmap for usage component to control run frequency #10729

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

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Jun 17, 2022

Description

Make the frequency at which the usage component runs configurable via a configmap.

Related Issue(s)

Fixes #10720
Part of #9036

How to test

  • Open the preview environment.
  • Edit the usage-configmap (kubectl edit cm usage-config) and change the schedule to 1m.
  • Kill the usage pod to restart it with the new config (kubectl delete pod <usage pod>).
  • Tail the logs of the new usage pod, including timestamps (kubectl logs -f --timestamps=true <usage-pod>)
  • Watch the logs of the usage component and see that it now runs at 1 minute intervals rather than the previous 1 hour.

Release Notes

NONE
  • /werft run with-payment=true

Andrew Farries added 3 commits June 17, 2022 10:58
Refactor tests to allow arbitrary UsageConfig structs when setting up
the render context.
Set the value of `--schedule` to the value from the configmap.
@andrew-farries andrew-farries requested review from a team June 17, 2022 11:47
@github-actions github-actions bot added team: delivery Issue belongs to the self-hosted team team: webapp Issue belongs to the WebApp team labels Jun 17, 2022
@github-actions github-actions bot removed the size/L label Jun 17, 2022
@andrew-farries
Copy link
Contributor Author

andrew-farries commented Jun 17, 2022

/werft run with-payment=true

👍 started the job as gitpod-build-af-add-configmap-for-usage-controller.3
(with .werft/ from main)

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

/hold

In case you want to revisit how the config is provided (file instead of flag)

@andrew-farries
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit b683410 into main Jun 21, 2022
@roboquat roboquat deleted the af/add-configmap-for-usage-controller branch June 21, 2022 09:54
@roboquat roboquat added the deployed: webapp Meta team change is running in production label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production release-note-none size/L team: delivery Issue belongs to the self-hosted team team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the frequency at which the usage reconciler runs configurable
4 participants