|
|
@@ -239,25 +239,25 @@ func Test_kubernetesScraper_scrapeDeployments(t *testing.T) {
|
|
|
Name: metric.DeploymentLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.DeploymentLabel: "deployment1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.DeploymentLabel: "deployment1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.DeploymentLabel: "deployment1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.DeploymentLabel: "deployment1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
Name: metric.DeploymentLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.DeploymentLabel: "deployment1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.DeploymentLabel: "deployment1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{},
|
|
|
@@ -266,9 +266,9 @@ func Test_kubernetesScraper_scrapeDeployments(t *testing.T) {
|
|
|
Name: metric.DeploymentAnnotations,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.DeploymentLabel: "deployment1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.DeploymentLabel: "deployment1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{},
|
|
|
@@ -277,9 +277,9 @@ func Test_kubernetesScraper_scrapeDeployments(t *testing.T) {
|
|
|
Name: metric.DeploymentMatchLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.DeploymentLabel: "deployment1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.DeploymentLabel: "deployment1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
@@ -489,21 +489,21 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
@@ -511,11 +511,11 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
@@ -528,11 +528,11 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
@@ -545,15 +545,15 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.OwnerKindLabel: "deployment",
|
|
|
- source.OwnerNameLabel: "deployment1",
|
|
|
- source.OwnerUIDLabel: "",
|
|
|
- source.ContainerLabel: "false",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.OwnerKindLabel: "deployment",
|
|
|
+ source.OwnerNameLabel: "deployment1",
|
|
|
+ source.OwnerUIDLabel: "",
|
|
|
+ source.ContainerLabel: "false",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: nil,
|
|
|
@@ -563,23 +563,23 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.ContainerLabel: "container1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.ContainerLabel: "container1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.ContainerLabel: "container1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.ContainerLabel: "container1",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
@@ -587,14 +587,14 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.ContainerLabel: "container1",
|
|
|
- source.ResourceLabel: "cpu",
|
|
|
- source.UnitLabel: "core",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.ContainerLabel: "container1",
|
|
|
+ source.ResourceLabel: "cpu",
|
|
|
+ source.UnitLabel: "core",
|
|
|
},
|
|
|
Value: 0.5,
|
|
|
AdditionalInfo: nil,
|
|
|
@@ -604,14 +604,14 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.ContainerLabel: "container1",
|
|
|
- source.ResourceLabel: "memory",
|
|
|
- source.UnitLabel: "byte",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.ContainerLabel: "container1",
|
|
|
+ source.ResourceLabel: "memory",
|
|
|
+ source.UnitLabel: "byte",
|
|
|
},
|
|
|
Value: 512,
|
|
|
AdditionalInfo: nil,
|
|
|
@@ -621,14 +621,14 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.ContainerLabel: "container1",
|
|
|
- source.ResourceLabel: "cpu",
|
|
|
- source.UnitLabel: "core",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.ContainerLabel: "container1",
|
|
|
+ source.ResourceLabel: "cpu",
|
|
|
+ source.UnitLabel: "core",
|
|
|
},
|
|
|
Value: 1,
|
|
|
AdditionalInfo: nil,
|
|
|
@@ -638,14 +638,14 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PodLabel: "pod1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NodeUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.NodeLabel: "node1",
|
|
|
- source.InstanceLabel: "node1",
|
|
|
- source.ContainerLabel: "container1",
|
|
|
- source.ResourceLabel: "memory",
|
|
|
- source.UnitLabel: "byte",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NodeUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.NodeLabel: "node1",
|
|
|
+ source.InstanceLabel: "node1",
|
|
|
+ source.ContainerLabel: "container1",
|
|
|
+ source.ResourceLabel: "memory",
|
|
|
+ source.UnitLabel: "byte",
|
|
|
},
|
|
|
Value: 1024,
|
|
|
AdditionalInfo: nil,
|
|
|
@@ -721,21 +721,21 @@ func Test_kubernetesScraper_scrapePVCs(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PVCLabel: "pvc1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.VolumeNameLabel: "vol1",
|
|
|
- source.PVUIDLabel: "",
|
|
|
- source.StorageClassLabel: "storageClass1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.VolumeNameLabel: "vol1",
|
|
|
+ source.PVUIDLabel: "",
|
|
|
+ source.StorageClassLabel: "storageClass1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PVCLabel: "pvc1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.VolumeNameLabel: "vol1",
|
|
|
- source.PVUIDLabel: "",
|
|
|
- source.StorageClassLabel: "storageClass1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.VolumeNameLabel: "vol1",
|
|
|
+ source.PVUIDLabel: "",
|
|
|
+ source.StorageClassLabel: "storageClass1",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
@@ -743,11 +743,11 @@ func Test_kubernetesScraper_scrapePVCs(t *testing.T) {
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
source.PVCLabel: "pvc1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.VolumeNameLabel: "vol1",
|
|
|
- source.PVUIDLabel: "",
|
|
|
- source.StorageClassLabel: "storageClass1",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.VolumeNameLabel: "vol1",
|
|
|
+ source.PVUIDLabel: "",
|
|
|
+ source.StorageClassLabel: "storageClass1",
|
|
|
},
|
|
|
Value: 4096,
|
|
|
AdditionalInfo: nil,
|
|
|
@@ -1002,25 +1002,25 @@ func Test_kubernetesScraper_scrapeStatefulSets(t *testing.T) {
|
|
|
Name: metric.StatefulSetInfo,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.StatefulSetLabel: "statefulSet1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.StatefulSetLabel: "statefulSet1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
Name: metric.StatefulSetLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.StatefulSetLabel: "statefulSet1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{},
|
|
|
@@ -1029,9 +1029,9 @@ func Test_kubernetesScraper_scrapeStatefulSets(t *testing.T) {
|
|
|
Name: metric.StatefulSetAnnotations,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.StatefulSetLabel: "statefulSet1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{},
|
|
|
@@ -1040,9 +1040,9 @@ func Test_kubernetesScraper_scrapeStatefulSets(t *testing.T) {
|
|
|
Name: metric.StatefulSetMatchLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.StatefulSetLabel: "statefulSet1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
@@ -1122,13 +1122,13 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
Name: metric.ReplicaSetInfo,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "replicaSet1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "replicaSet1",
|
|
|
},
|
|
|
},
|
|
|
@@ -1136,7 +1136,7 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
Name: metric.ReplicaSetLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "replicaSet1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
@@ -1146,7 +1146,7 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
Name: metric.ReplicaSetAnnotations,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "replicaSet1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
@@ -1156,13 +1156,13 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
{
|
|
|
Name: metric.KubeReplicasetOwner,
|
|
|
Labels: map[string]string{
|
|
|
- source.ReplicaSetLabel: "replicaSet1",
|
|
|
- source.NamespaceLabel: "namespace1",
|
|
|
- source.UIDLabel: "uuid1",
|
|
|
- source.OwnerNameLabel: "rollout1",
|
|
|
- source.OwnerKindLabel: "Rollout",
|
|
|
- source.OwnerUIDLabel: "",
|
|
|
- source.ControllerLabel: "false",
|
|
|
+ source.ReplicaSetLabel: "replicaSet1",
|
|
|
+ source.NamespaceLabel: "namespace1",
|
|
|
+ source.UIDLabel: "uuid1",
|
|
|
+ source.OwnerNameLabel: "rollout1",
|
|
|
+ source.OwnerKindLabel: "Rollout",
|
|
|
+ source.OwnerUIDLabel: "",
|
|
|
+ source.ControllerLabel: "false",
|
|
|
},
|
|
|
Value: 0,
|
|
|
},
|
|
|
@@ -1171,13 +1171,13 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
Name: metric.ReplicaSetInfo,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid2",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "pureReplicaSet",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid2",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "pureReplicaSet",
|
|
|
},
|
|
|
},
|
|
|
@@ -1185,7 +1185,7 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
Name: metric.ReplicaSetLabels,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid2",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "pureReplicaSet",
|
|
|
},
|
|
|
Value: 0,
|
|
|
@@ -1195,7 +1195,7 @@ func Test_kubernetesScraper_scrapeReplicaSets(t *testing.T) {
|
|
|
Name: metric.ReplicaSetAnnotations,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid2",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ReplicaSetLabel: "pureReplicaSet",
|
|
|
},
|
|
|
Value: 0,
|
|
|
@@ -1287,13 +1287,13 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.ResourceQuotaInfo,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
},
|
|
|
Value: 0,
|
|
|
AdditionalInfo: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
},
|
|
|
},
|
|
|
@@ -1301,7 +1301,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaSpecResourceRequests,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "cpu",
|
|
|
source.UnitLabel: "core",
|
|
|
@@ -1313,7 +1313,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaSpecResourceRequests,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "memory",
|
|
|
source.UnitLabel: "byte",
|
|
|
@@ -1325,7 +1325,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaSpecResourceLimits,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "cpu",
|
|
|
source.UnitLabel: "core",
|
|
|
@@ -1337,7 +1337,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaSpecResourceLimits,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "memory",
|
|
|
source.UnitLabel: "byte",
|
|
|
@@ -1349,7 +1349,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaStatusUsedResourceRequests,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "cpu",
|
|
|
source.UnitLabel: "core",
|
|
|
@@ -1361,7 +1361,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaStatusUsedResourceRequests,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "memory",
|
|
|
source.UnitLabel: "byte",
|
|
|
@@ -1373,7 +1373,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaStatusUsedResourceLimits,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "cpu",
|
|
|
source.UnitLabel: "core",
|
|
|
@@ -1385,7 +1385,7 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
Name: metric.KubeResourceQuotaStatusUsedResourceLimits,
|
|
|
Labels: map[string]string{
|
|
|
source.UIDLabel: "uuid1",
|
|
|
- source.NamespaceUIDLabel: "",
|
|
|
+ source.NamespaceUIDLabel: "",
|
|
|
source.ResourceQuotaLabel: "resourceQuota1",
|
|
|
source.ResourceLabel: "memory",
|
|
|
source.UnitLabel: "byte",
|
|
|
@@ -1419,4 +1419,4 @@ func Test_kubernetesScraper_scrapeResourceQuotas(t *testing.T) {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-}
|
|
|
+}
|