Skip to content

Conversation

zugao
Copy link
Contributor

@zugao zugao commented Jun 2, 2025

Summary

This ADR presents solutions for our new Event-Based BIlling

Checklist

  • Try to isolate changes into separate PRs (to build a better changelog).
  • Categorize the PR by setting a good title and adding one of the labels:
    change, decision, requirement/quality, requirement/functional, dependency
    as they show up in the changelog
  • Link this PR to related issues if applicable.

@zugao zugao requested review from a team, Kidswiss, ThisIsntTheWay, wejdross and TheBigLee and removed request for a team June 2, 2025 09:42
@zugao zugao added the decision A decision that changes the architecture label Jun 2, 2025
Copy link
Member

@tobru tobru left a comment

Choose a reason for hiding this comment

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

Please structure the ADR document as described in https://kb.vshn.ch/app-catalog/adr/0001-architecture-decision-records.html

Other than that, I like the proposal and I think that could work. I'm a bit unsure about storing the events in CRDs because of the volume, maybe you want to test that a bit more and see where the limitations are.

@zugao
Copy link
Contributor Author

zugao commented Jun 2, 2025

Please structure the ADR document as described in https://kb.vshn.ch/app-catalog/adr/0001-architecture-decision-records.html

Other than that, I like the proposal and I think that could work. I'm a bit unsure about storing the events in CRDs because of the volume, maybe you want to test that a bit more and see where the limitations are.

Up to several thousands CRs I don't see an issue. And if we use one CR per service and not per event we are quite good to go. We could even generate this CR in comp-functions and later be consumed by the controller thus it will be just another object in a service. If we arrive to have hundreds of services, we will gonna have more limitations from stackgres and from kube objects (crossplane) then this CR alone.

@tobru
Copy link
Member

tobru commented Jun 3, 2025

@zugao Mind adding a bit more context to the ADR? I think an example of a creation and a deletion event in the "Context" section would help to set the stage on what events we have to send to Odoo for a better understanding.

Also an important detail: The instance_id has to be globally unique.

@zugao
Copy link
Contributor Author

zugao commented Jun 12, 2025

@zugao Mind adding a bit more context to the ADR? I think an example of a creation and a deletion event in the "Context" section would help to set the stage on what events we have to send to Odoo for a better understanding.

I added a complete example and the reasoning behind the custom resource in the Decision section.

Copy link
Member

@tobru tobru left a comment

Choose a reason for hiding this comment

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

A few nits here and there and a few questions, but all in all, I quite like it and I think we can go this way.

@zugao zugao force-pushed the billing-adr branch 2 times, most recently from d8e5507 to cac94cc Compare June 18, 2025 07:48
@zugao zugao requested a review from tobru June 18, 2025 08:00
@tobru
Copy link
Member

tobru commented Jun 18, 2025

In the implementation phase, we also have to figure out where to get the information for spec.odoo and status.events from. Maybe we should update the ADR then when we know that.

We do store some of the required data as labels and annotations in the organization namespace on the control-plane via the Servala Portal.

@zugao zugao merged commit 2cfac02 into master Jun 23, 2025
1 check passed
@zugao zugao deleted the billing-adr branch June 23, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision A decision that changes the architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants