vshn / component-appcat

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

Get rid of the namespace observer cloudscale #30

Closed ccremer closed 1 year ago

ccremer 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

mweibel commented 1 year ago

fixed.