Skip to content

Commit

Permalink
fixup commit 4 post review
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Jan 7, 2025
1 parent d69229f commit 45f38a0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .github/scripts/e2e_tests_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ log_and_run kubectl port-forward -n "$NAMESPACE" svc/"$SERVICE" "$LOCAL_PORT":"$
PORT_FORWARD_PID=$!

# Wait a few seconds to ensure port-forward is established
while ! nc -vz localhost $LOCAL_PORT > /dev/null 2>&1 ; done
while ! nc -vz localhost $LOCAL_PORT > /dev/null 2>&1 ; do
# echo sleeping
sleep 0.1
done

# Fetch metrics
log_and_run curl -s http://localhost:$LOCAL_PORT/metrics > /tmp/metrics_output.log
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/e2e-feature-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ jobs:
# the script accepts number of requests for APIs: CREATE_BUCKET, DELETE_BUCKET, GET_INFO
# GRANT_ACCESS and REVOKE_ACCESS in order
# Example below we are testing for those API counts:
# - 2 CREATE_BUCKET
# - 1 DELETE_BUCKET
# - 1 GET_INFO
# - 2 GRANT_ACCESS
# - 2 REVOKE_ACCESS
# - 2 CREATE_BUCKET
# - 1 DELETE_BUCKET
# - 1 GET_INFO
# - 2 GRANT_ACCESS
# - 2 REVOKE_ACCESS
- name: E2E tests for metrics using API call metrics generated from above tests
run: |
.github/scripts/e2e_tests_metrics.sh 2 1 1 2 2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/helm-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ jobs:
# the script accepts number of requests for APIs: CREATE_BUCKET, DELETE_BUCKET, GET_INFO
# GRANT_ACCESS and REVOKE_ACCESS in order
# Example below we are testing for those API counts:
# - 0 CREATE_BUCKET
# - 0 DELETE_BUCKET
# - 1 GET_INFO
# - 0 GRANT_ACCESS
# - 0 REVOKE_ACCESS
# - 0 CREATE_BUCKET
# - 0 DELETE_BUCKET
# - 1 GET_INFO
# - 0 GRANT_ACCESS
# - 0 REVOKE_ACCESS
- name: Verify metrics for healthcheck route
run: |
.github/scripts/e2e_tests_metrics.sh 0 0 1 0 0
Expand Down
2 changes: 1 addition & 1 deletion cmd/scality-cosi-driver/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (
var (
driverAddress = flag.String("driver-address", defaultDriverAddress, "driver address for the socket file, default: unix:///var/lib/cosi/cosi.sock")
driverPrefix = flag.String("driver-prefix", defaultDriverPrefix, "prefix for COSI driver, e.g. <prefix>.scality.com, default: cosi")
driverMetricsAddress = flag.String("driver-metrics-address", defaultMetricsAddress, "The address (hostname:port) to expose Prometheus metrics, default: localhost:8080")
driverMetricsAddress = flag.String("driver-metrics-address", defaultMetricsAddress, "The address (hostname:port) to expose Prometheus metrics, default: 0.0.0.0:8080")
driverMetricsPath = flag.String("driver-metrics-path", defaultMetricsPath, "path for the metrics endpoint, default: /metrics")
driverMetricsPrefix = flag.String("driver-custom-metrics-prefix", defaultMetricsPrefix, "prefix for the metrics, default: scality_cosi_driver")
)
Expand Down

0 comments on commit 45f38a0

Please sign in to comment.