diff --git a/component/promql/appcat.promql b/component/promql/appcat.promql index ef129f5f7..48270c2bf 100644 --- a/component/promql/appcat.promql +++ b/component/promql/appcat.promql @@ -20,7 +20,7 @@ sum_over_time( # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{{{ORGLABEL}} label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), {{TENANT_REPLACE}} ), "claim_namespace", diff --git a/component/promql/metering_cloud.promql b/component/promql/metering_cloud.promql index e0cf0cba2..02f0d7a86 100644 --- a/component/promql/metering_cloud.promql +++ b/component/promql/metering_cloud.promql @@ -6,7 +6,7 @@ sum by (label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla,label_appc # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" (kube_namespace_labels{label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla,label_appcat_vshn_io_claim_name,label_appuio_io_billing_name,label_appuio_io_organization) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})) + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}) # We join it with appuio_control_organization_info to map the organization to a sales_order # This metric is not available on the cluster's prometheus, only on mimir, this is just included for completenes sake. #* on(label_appuio_io_organization) group_left(sales_order) label_replace(appuio_control_organization_info, "label_appuio_io_organization", "$1", "name", "(.*)") diff --git a/component/promql/metering_managed.promql b/component/promql/metering_managed.promql index cecc4cedf..5608cf0fd 100644 --- a/component/promql/metering_managed.promql +++ b/component/promql/metering_managed.promql @@ -9,7 +9,7 @@ sum by (label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla,label_appu label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "{{salesOrderID}}", "", diff --git a/tests/golden/apiserver/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/apiserver/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/apiserver/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/apiserver/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/apiserver/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/apiserver/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/apiserver/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/apiserver/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/billing/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/billing/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/billing/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/billing/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/billing/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/billing/appcat/appcat/10_appcat_metering_recording_rule.yaml index 4a400bad5..012ebe088 100644 --- a/tests/golden/billing/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/billing/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "ST10120", "", diff --git a/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml index aa21df48b..0643bf3e2 100644 --- a/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "", "", diff --git a/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/cloudscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/cloudscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 6699e5ad2..dd3f62ad8 100644 --- a/tests/golden/cloudscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/cloudscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{label_appuio_io_organization=~".+", label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "$1", "label_appuio_io_organization", diff --git a/tests/golden/cloudscale/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/cloudscale/appcat/appcat/10_appcat_metering_recording_rule.yaml index bf21e88a6..26d2a1b37 100644 --- a/tests/golden/cloudscale/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/cloudscale/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -18,7 +18,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" (kube_namespace_labels{label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla,label_appcat_vshn_io_claim_name,label_appuio_io_billing_name,label_appuio_io_organization) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})) + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}) # We join it with appuio_control_organization_info to map the organization to a sales_order # This metric is not available on the cluster's prometheus, only on mimir, this is just included for completenes sake. #* on(label_appuio_io_organization) group_left(sales_order) label_replace(appuio_control_organization_info, "label_appuio_io_organization", "$1", "name", "(.*)") diff --git a/tests/golden/controllers/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/controllers/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/controllers/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/controllers/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/controllers/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/controllers/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/controllers/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/controllers/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/defaults/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/defaults/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/defaults/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/defaults/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/defaults/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/defaults/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/defaults/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/defaults/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/exoscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/exoscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 6699e5ad2..dd3f62ad8 100644 --- a/tests/golden/exoscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/exoscale/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{label_appuio_io_organization=~".+", label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "$1", "label_appuio_io_organization", diff --git a/tests/golden/exoscale/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/exoscale/appcat/appcat/10_appcat_metering_recording_rule.yaml index bf21e88a6..26d2a1b37 100644 --- a/tests/golden/exoscale/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/exoscale/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -18,7 +18,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" (kube_namespace_labels{label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla,label_appcat_vshn_io_claim_name,label_appuio_io_billing_name,label_appuio_io_organization) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})) + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}) # We join it with appuio_control_organization_info to map the organization to a sales_order # This metric is not available on the cluster's prometheus, only on mimir, this is just included for completenes sake. #* on(label_appuio_io_organization) group_left(sales_order) label_replace(appuio_control_organization_info, "label_appuio_io_organization", "$1", "name", "(.*)") diff --git a/tests/golden/minio/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/minio/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/minio/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/minio/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/minio/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/minio/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/minio/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/minio/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/openshift/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/openshift/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 8180792d0..9c91b8400 100644 --- a/tests/golden/openshift/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/openshift/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "t-silent-test-1234", "", diff --git a/tests/golden/openshift/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/openshift/appcat/appcat/10_appcat_metering_recording_rule.yaml index b92fc577b..7c9b2dcdb 100644 --- a/tests/golden/openshift/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/openshift/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -21,7 +21,7 @@ spec: label_replace( kube_namespace_labels{ label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name,label_appcat_vshn_io_claim_name,sales_order,label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "sales_order", "10431", "", diff --git a/tests/golden/vshn/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml b/tests/golden/vshn/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml index 6699e5ad2..dd3f62ad8 100644 --- a/tests/golden/vshn/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml +++ b/tests/golden/vshn/appcat/appcat/10_appcat_legacy_billing_recording_rule.yaml @@ -32,7 +32,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" kube_namespace_labels{label_appuio_io_organization=~".+", label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla, label_appuio_io_billing_name) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})), + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}), "tenant_id", "$1", "label_appuio_io_organization", diff --git a/tests/golden/vshn/appcat/appcat/10_appcat_metering_recording_rule.yaml b/tests/golden/vshn/appcat/appcat/10_appcat_metering_recording_rule.yaml index bf21e88a6..26d2a1b37 100644 --- a/tests/golden/vshn/appcat/appcat/10_appcat_metering_recording_rule.yaml +++ b/tests/golden/vshn/appcat/appcat/10_appcat_metering_recording_rule.yaml @@ -18,7 +18,7 @@ spec: # Fetch all namespaces with label label_appuio_io_billing_name=~"appcat-.+" (kube_namespace_labels{label_appuio_io_billing_name=~"appcat-.+"} * on (namespace) group_right(label_appuio_io_organization,label_appcat_vshn_io_claim_namespace,label_appcat_vshn_io_sla,label_appcat_vshn_io_claim_name,label_appuio_io_billing_name,label_appuio_io_organization) - (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"})) + (kube_pod_info{created_by_kind!="Job"} * on(namespace, pod) kube_pod_labels{label_appcat_io_billing="true"}) # We join it with appuio_control_organization_info to map the organization to a sales_order # This metric is not available on the cluster's prometheus, only on mimir, this is just included for completenes sake. #* on(label_appuio_io_organization) group_left(sales_order) label_replace(appuio_control_organization_info, "label_appuio_io_organization", "$1", "name", "(.*)")