feat: add v03 user billing service (#1128)
This commit is contained in:
@@ -642,6 +642,10 @@ function v02ObservableService(deploy, serviceId) {
|
||||
return v02ObservableServicesForDeploy(deploy).find((item) => item.serviceId === serviceId) ?? null;
|
||||
}
|
||||
|
||||
function runtimeLaneObservableService(deploy, lane, serviceId) {
|
||||
return runtimeLaneObservableServicesForDeploy(deploy, lane).find((item) => item.serviceId === serviceId) ?? null;
|
||||
}
|
||||
|
||||
function runtimeLaneObservableServiceIdsForDeploy(deploy, lane) {
|
||||
return new Set(runtimeLaneObservableServicesForDeploy(deploy, lane).map((item) => item.serviceId));
|
||||
}
|
||||
@@ -943,9 +947,9 @@ function v02MetricsSidecarAnnotations(metricsSidecarSha256) {
|
||||
return metricsSidecarSha256 ? { "hwlab.pikastech.local/metrics-sidecar-sha256": metricsSidecarSha256 } : {};
|
||||
}
|
||||
|
||||
function v02MetricsSidecarContainer({ deploy, serviceId, namespace, gitopsTarget }) {
|
||||
const service = v02ObservableService(deploy, serviceId);
|
||||
assert.ok(service, `unknown v0.2 observable service ${serviceId}`);
|
||||
function v02MetricsSidecarContainer({ deploy, serviceId, namespace, gitopsTarget, profile = "v02" }) {
|
||||
const service = runtimeLaneObservableService(deploy, profile, serviceId);
|
||||
assert.ok(service, `unknown ${profile} observable service ${serviceId}`);
|
||||
const extraMetricsEnv = serviceId === "hwlab-cloud-api"
|
||||
? [
|
||||
{ name: "HWLAB_METRICS_EXTRA_URL", value: `http://127.0.0.1:${service.port}/v1/web-performance/metrics` },
|
||||
|
||||
Reference in New Issue
Block a user