From 07c39f7f853bb18b7782823d8a75b6c76605729e Mon Sep 17 00:00:00 2001 From: qindotguan Date: Mon, 27 Jan 2025 12:16:57 -0500 Subject: [PATCH 1/7] add type service to verticaautoscaler --- .../samples/v1beta1_verticaautoscaler_custom_metrics.yaml | 8 ++------ prometheus/adapter.yaml | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml b/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml index 323422e5e..69147b444 100644 --- a/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml +++ b/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml @@ -33,12 +33,8 @@ spec: type: Value value: "6" - metric: - type: Object - object: - describedObject: - apiVersion: v1 - kind: Service - name: verticadb-sample-sc1 + type: Pods + pods: metric: name: vertica_queued_requests_count target: diff --git a/prometheus/adapter.yaml b/prometheus/adapter.yaml index c33dc3497..151750b0a 100644 --- a/prometheus/adapter.yaml +++ b/prometheus/adapter.yaml @@ -54,6 +54,8 @@ rules: overrides: namespace: resource: namespace + service: + resource: service pod: resource: pod metricsQuery: 'sum(vertica_queued_requests_total) by (namespace, pod)' From d397f4b3bb62bcb11fe4c481f79e452a78427c01 Mon Sep 17 00:00:00 2001 From: qindotguan Date: Mon, 27 Jan 2025 12:17:19 -0500 Subject: [PATCH 2/7] add missing test files --- .../prometheus-sanity/16-assert.yaml | 25 +++++++++++++++ .../16-deploy-prometheus-adapter.yaml | 17 ++++++++++ .../85-delete-prometheus-adapter.yaml | 17 ++++++++++ .../prometheus-sanity/85-errors.yaml | 22 +++++++++++++ .../90-delete-prometheus.yaml | 17 ++++++++++ .../prometheus-sanity/90-errors.yaml | 32 +++++++++++++++++++ 6 files changed, 130 insertions(+) create mode 100644 tests/e2e-leg-12/prometheus-sanity/16-assert.yaml create mode 100644 tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml create mode 100644 tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml create mode 100644 tests/e2e-leg-12/prometheus-sanity/85-errors.yaml create mode 100644 tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml create mode 100644 tests/e2e-leg-12/prometheus-sanity/90-errors.yaml diff --git a/tests/e2e-leg-12/prometheus-sanity/16-assert.yaml b/tests/e2e-leg-12/prometheus-sanity/16-assert.yaml new file mode 100644 index 000000000..1332200a5 --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/16-assert.yaml @@ -0,0 +1,25 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-adapter +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: v1 +kind: Service +metadata: + name: prometheus-adapter diff --git a/tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml b/tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml new file mode 100644 index 000000000..e6e949d44 --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml @@ -0,0 +1,17 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: cd ../../.. && make deploy-prometheus-adapter PROMETHEUS_NAMESPACE=$NAMESPACE PROMETHEUS_ADAPTER_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml b/tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml new file mode 100644 index 000000000..415a6208a --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml @@ -0,0 +1,17 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: cd ../../.. && make undeploy-prometheus-adapter PROMETHEUS_ADAPTER_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/85-errors.yaml b/tests/e2e-leg-12/prometheus-sanity/85-errors.yaml new file mode 100644 index 000000000..2c226322b --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/85-errors.yaml @@ -0,0 +1,22 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-adapter +--- +apiVersion: v1 +kind: Service +metadata: + name: prometheus-adapter diff --git a/tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml b/tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml new file mode 100644 index 000000000..09e979db8 --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml @@ -0,0 +1,17 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: cd ../../.. && make undeploy-prometheus PROMETHEUS_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/90-errors.yaml b/tests/e2e-leg-12/prometheus-sanity/90-errors.yaml new file mode 100644 index 000000000..92bd9639d --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/90-errors.yaml @@ -0,0 +1,32 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Secret +metadata: + name: prometheus-v-prometheus +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: k8s-vertica-prometheus-v-prometheus +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-kube-prometheus-operator +--- +apiVersion: v1 +kind: Service +metadata: + name: prometheus-kube-prometheus-prometheus \ No newline at end of file From 683b2bcf67bc748281ece2c968246cf045e69160 Mon Sep 17 00:00:00 2001 From: qindotguan Date: Mon, 27 Jan 2025 14:32:26 -0500 Subject: [PATCH 3/7] revert the sample to use service --- .../samples/v1beta1_verticaautoscaler_custom_metrics.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml b/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml index 69147b444..323422e5e 100644 --- a/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml +++ b/config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml @@ -33,8 +33,12 @@ spec: type: Value value: "6" - metric: - type: Pods - pods: + type: Object + object: + describedObject: + apiVersion: v1 + kind: Service + name: verticadb-sample-sc1 metric: name: vertica_queued_requests_count target: From 2bcf9c455e49aee1f501b30bb719cc23519e03a5 Mon Sep 17 00:00:00 2001 From: qindotguan Date: Tue, 28 Jan 2025 11:01:37 -0500 Subject: [PATCH 4/7] remove type pod for vertica_queued_requests_total --- prometheus/adapter.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/prometheus/adapter.yaml b/prometheus/adapter.yaml index 151750b0a..e81336622 100644 --- a/prometheus/adapter.yaml +++ b/prometheus/adapter.yaml @@ -46,7 +46,7 @@ rules: resource: service seriesQuery: vertica_sessions_running_counter{namespace!="", service!= "", type="active", initiator="user"} # Number of requests that are queued in the resource pool. Type: gauge - - seriesQuery: 'vertica_queued_requests_total{namespace!="", pod!=""}' + - seriesQuery: 'vertica_queued_requests_total{namespace!="", service!=""}' name: as: ${1}_count matches: ^(.*)_total$ @@ -56,9 +56,7 @@ rules: resource: namespace service: resource: service - pod: - resource: pod - metricsQuery: 'sum(vertica_queued_requests_total) by (namespace, pod)' + metricsQuery: 'sum(vertica_queued_requests_total) by (namespace, service)' # Total number of active sessions. Used for testing - metricsQuery: sum(vertica_sessions_running_counter{type="active", initiator="user"}) by (namespace, pod) resources: From aa937d7c66730e638c4f64eaf9d24cab5f86ded9 Mon Sep 17 00:00:00 2001 From: qindotguan Date: Tue, 28 Jan 2025 11:04:20 -0500 Subject: [PATCH 5/7] added back missing files to deploy prometheus --- .../prometheus-sanity/10-assert.yaml | 33 +++++++++++++++++++ .../10-deploy-prometheus.yaml | 17 ++++++++++ 2 files changed, 50 insertions(+) create mode 100644 tests/e2e-leg-12/prometheus-sanity/10-assert.yaml create mode 100644 tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml diff --git a/tests/e2e-leg-12/prometheus-sanity/10-assert.yaml b/tests/e2e-leg-12/prometheus-sanity/10-assert.yaml new file mode 100644 index 000000000..aacf9adba --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/10-assert.yaml @@ -0,0 +1,33 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: prometheus-prometheus-kube-prometheus-prometheus +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-kube-prometheus-operator +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: v1 +kind: Service +metadata: + name: prometheus-kube-prometheus-prometheus diff --git a/tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml b/tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml new file mode 100644 index 000000000..4cc900038 --- /dev/null +++ b/tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml @@ -0,0 +1,17 @@ +# (c) Copyright [2021-2024] Open Text. +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: cd ../../.. && make deploy-prometheus PROMETHEUS_NAMESPACE=$NAMESPACE From a5ae74d889edb7da7e8a3948646af9e45e090c8f Mon Sep 17 00:00:00 2001 From: qindotguan Date: Tue, 28 Jan 2025 14:51:53 -0500 Subject: [PATCH 6/7] fix verify-prometheus-metrics to add NAMESPACE --- .../prometheus-sanity/25-verify-prometheus-metrics.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml b/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml index c4529d2b0..13c2eab00 100644 --- a/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml +++ b/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml @@ -24,7 +24,8 @@ data: # Setup start and end time for query, e.g: 2024-09-14 START_TIME=$(date +%Y-%m-%d) END_TIME=$(date +%Y-%m-%d --date "$curr +1 day") - CMD="kubectl exec v-prometheus-pri1-0 -it -c server -- curl -g http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090/api/v1/query?query=vertica_build_info&start=${START_TIME}&end=${END_TIME}" + NAMESPACE=$(kubectl get pod v-prometheus-pri1-0 -o=jsonpath='{.metadata.namespace}') + CMD="kubectl exec v-prometheus-pri1-0 -it -c server -- curl -g http://prometheus-kube-prometheus-prometheus.${NAMESPACE}.svc.cluster.local:9090/api/v1/query?query=vertica_build_info&start=${START_TIME}&end=${END_TIME}" RESULT=$(eval $CMD) METRICS=$(echo $RESULT | jq -r '.data.result') From 88d4468ae46409651aa02a116bc5b41454117a0b Mon Sep 17 00:00:00 2001 From: qindotguan Date: Wed, 29 Jan 2025 17:52:38 -0500 Subject: [PATCH 7/7] revert adding prometheus deployment steps --- .../prometheus-sanity/10-assert.yaml | 33 ------------------- .../10-deploy-prometheus.yaml | 17 ---------- .../prometheus-sanity/16-assert.yaml | 25 -------------- .../16-deploy-prometheus-adapter.yaml | 17 ---------- .../25-verify-prometheus-metrics.yaml | 3 +- .../85-delete-prometheus-adapter.yaml | 17 ---------- .../prometheus-sanity/85-errors.yaml | 22 ------------- .../90-delete-prometheus.yaml | 17 ---------- .../prometheus-sanity/90-errors.yaml | 32 ------------------ 9 files changed, 1 insertion(+), 182 deletions(-) delete mode 100644 tests/e2e-leg-12/prometheus-sanity/10-assert.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/16-assert.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/85-errors.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml delete mode 100644 tests/e2e-leg-12/prometheus-sanity/90-errors.yaml diff --git a/tests/e2e-leg-12/prometheus-sanity/10-assert.yaml b/tests/e2e-leg-12/prometheus-sanity/10-assert.yaml deleted file mode 100644 index aacf9adba..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/10-assert.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: prometheus-prometheus-kube-prometheus-prometheus -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus-kube-prometheus-operator -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: prometheus-kube-prometheus-prometheus diff --git a/tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml b/tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml deleted file mode 100644 index 4cc900038..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/10-deploy-prometheus.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: cd ../../.. && make deploy-prometheus PROMETHEUS_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/16-assert.yaml b/tests/e2e-leg-12/prometheus-sanity/16-assert.yaml deleted file mode 100644 index 1332200a5..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/16-assert.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus-adapter -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: prometheus-adapter diff --git a/tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml b/tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml deleted file mode 100644 index e6e949d44..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/16-deploy-prometheus-adapter.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: cd ../../.. && make deploy-prometheus-adapter PROMETHEUS_NAMESPACE=$NAMESPACE PROMETHEUS_ADAPTER_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml b/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml index 13c2eab00..c4529d2b0 100644 --- a/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml +++ b/tests/e2e-leg-12/prometheus-sanity/25-verify-prometheus-metrics.yaml @@ -24,8 +24,7 @@ data: # Setup start and end time for query, e.g: 2024-09-14 START_TIME=$(date +%Y-%m-%d) END_TIME=$(date +%Y-%m-%d --date "$curr +1 day") - NAMESPACE=$(kubectl get pod v-prometheus-pri1-0 -o=jsonpath='{.metadata.namespace}') - CMD="kubectl exec v-prometheus-pri1-0 -it -c server -- curl -g http://prometheus-kube-prometheus-prometheus.${NAMESPACE}.svc.cluster.local:9090/api/v1/query?query=vertica_build_info&start=${START_TIME}&end=${END_TIME}" + CMD="kubectl exec v-prometheus-pri1-0 -it -c server -- curl -g http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090/api/v1/query?query=vertica_build_info&start=${START_TIME}&end=${END_TIME}" RESULT=$(eval $CMD) METRICS=$(echo $RESULT | jq -r '.data.result') diff --git a/tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml b/tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml deleted file mode 100644 index 415a6208a..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/85-delete-prometheus-adapter.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: cd ../../.. && make undeploy-prometheus-adapter PROMETHEUS_ADAPTER_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/85-errors.yaml b/tests/e2e-leg-12/prometheus-sanity/85-errors.yaml deleted file mode 100644 index 2c226322b..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/85-errors.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus-adapter ---- -apiVersion: v1 -kind: Service -metadata: - name: prometheus-adapter diff --git a/tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml b/tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml deleted file mode 100644 index 09e979db8..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/90-delete-prometheus.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: cd ../../.. && make undeploy-prometheus PROMETHEUS_NAMESPACE=$NAMESPACE diff --git a/tests/e2e-leg-12/prometheus-sanity/90-errors.yaml b/tests/e2e-leg-12/prometheus-sanity/90-errors.yaml deleted file mode 100644 index 92bd9639d..000000000 --- a/tests/e2e-leg-12/prometheus-sanity/90-errors.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# (c) Copyright [2021-2024] Open Text. -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: Secret -metadata: - name: prometheus-v-prometheus ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: k8s-vertica-prometheus-v-prometheus ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus-kube-prometheus-operator ---- -apiVersion: v1 -kind: Service -metadata: - name: prometheus-kube-prometheus-prometheus \ No newline at end of file