diff --git a/test/integration/metrics/00-install.yaml b/test/integration/metrics/00-install.yaml index 5c1342d0aa2..a12957e0f7c 100644 --- a/test/integration/metrics/00-install.yaml +++ b/test/integration/metrics/00-install.yaml @@ -6,6 +6,14 @@ spec: type: prometheus targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090" --- +apiVersion: metrics.keptn.sh/v1alpha3 +kind: KeptnMetricsProvider +metadata: + name: my-provider2 +spec: + type: prometheus + targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090" +--- apiVersion: metrics.keptn.sh/v1alpha2 kind: KeptnMetricsProvider metadata: diff --git a/test/integration/metrics/01-teststep-install.yaml b/test/integration/metrics/01-teststep-install.yaml index d17291e8d16..a89d76757e5 100644 --- a/test/integration/metrics/01-teststep-install.yaml +++ b/test/integration/metrics/01-teststep-install.yaml @@ -3,3 +3,4 @@ kind: TestStep apply: - goodmetric1.yaml - goodmetric2.yaml + - goodmetric3.yaml diff --git a/test/integration/metrics/02-teststep-assert.yaml b/test/integration/metrics/02-teststep-assert.yaml index 35f1d0dc227..d5acbc0386c 100644 --- a/test/integration/metrics/02-teststep-assert.yaml +++ b/test/integration/metrics/02-teststep-assert.yaml @@ -2,3 +2,5 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep assert: # this checks that kubectl get resource succeeds - goodmetric1.yaml + - goodmetric2.yaml + - goodmetric3.yaml diff --git a/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml b/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml index b683e120224..1776aabad4f 100644 --- a/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml +++ b/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml @@ -3,3 +3,4 @@ kind: TestStep commands: - script: ./retrieve-metrics.sh "podtato-head1" - script: ./retrieve-metrics.sh "podtato-head2" + - script: ./retrieve-metrics.sh "podtato-head3" diff --git a/test/integration/metrics/goodmetric3.yaml b/test/integration/metrics/goodmetric3.yaml new file mode 100644 index 00000000000..5a16a312098 --- /dev/null +++ b/test/integration/metrics/goodmetric3.yaml @@ -0,0 +1,9 @@ +apiVersion: metrics.keptn.sh/v1alpha3 +kind: KeptnMetric +metadata: + name: podtato-head3 +spec: + provider: + name: "my-provider2" + query: "sum(kube_pod_container_resource_limits{resource='cpu'})" + fetchIntervalSeconds: 5