vshn / component-appcat

BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Get rid of the namespace observer exoscale #35

Closed Kidswiss closed 1 year ago

Kidswiss commented 1 year ago

Context

Currently, for the ObjectBucket XRD and composition we use provider-kubernetes and its Object resource to watch the namespace of the claims. We need that to figure out the APPUiO Cloud organization name for billing purposes (see more: https://kb.vshn.ch/appuio-cloud/references/architecture/metering-data-flow.html). This organization information is in the namespace labels where the claim resides.

The current approach is to copy that appuio.io/organization label to the managed resource, so that the metrics collectors can pick up this information from the managed resources.

Idea

it may be beneficial if the metrics collector directly query the Kubernetes API and figure out this namespace label themselves. We reduce complexity of the compositions, but only slightly increase complexity in the metrics collector. The collectors would have to simply GET the namespace objects for each managed resource.

Impact

Out of Scope

Alternatives

Continue using the current watch-and-patch approach.

Acceptance Criteria

susana-garcia commented 1 year ago

@Kidswiss a question: does this apply only to ObjectBucket XRD or to the DBaaS objects as well?

Kidswiss commented 1 year ago

I think the DBaaS collection also relies on this, so we probably have to touch them to. @mweibel @ZuGao correct me if I'm wrong.

When this issue was created, we didn't yet have the DBaaS collection :)

zugao commented 1 year ago

Yes, the changes has to be made for both objectostorage and dbaas.

susana-garcia commented 1 year ago

that's what I thought, but I just wanted to double checked, thank you both