Add new metrics related to projects and namespaces
What does this MR do and why?
Configure kube-state-metrics to generate custom metrics to create the link between namespace and rancher projects.
Related reference(s)
sylva-projects/sylva-elements/helm-charts/sylva-thanos-rules!53 (merged)
Closes #1984 (closed)
Test coverage
We have created projects and namespaces in workload cluster and verify the functionality.
Ex:
rancher_project_info{cluster="monitoring-test", description="Default project created for the cluster", project_id="p-h8wwq", project_name="Default"}
kube_namespace_labels{cluster="monitoring-test", label_field_cattle_io_project_id="p-h8wwq", namespace="default"}
CI configuration
CI pipelines perform an update for both management and workload clusters, this update will NOT perform a ClusterAPI rolling update (deletion and creation of new K8s nodes) by default.
For some cases, it may be relevant to perform more complex tests.
Theses features can be activated in an MR by adding one of these labels to the MR and will apply to the next pipelines.
- adding the label ci-featuretest-rolling-update pipelines will perform a node rolling update in the
-updatejobs (without version upgrades) - adding the label ci-featuretest-upgrade-from-1.2.1 pipelines will perform an upgrade from Sylva 1.2.1 to your dev branch (including a k8s version upgrade resulting in a node rolling update)