Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adjust port name to number port (#7804) #7825

Conversation

sophon-zt
Copy link
Contributor

@sophon-zt sophon-zt commented Jul 17, 2024

The capture execution process of prometheus is as follows:

  1. Obtain Endpoints and Generate Service List:
  for ip in addresses
    for port in ports; 
      services = append(services, ip:port)
  1. Address Conversion Based on Relabeling Strategy:
 - source_labels: [__address__, __meta_kubernetes_service_annotation_monitor_kubeblocks_io_port] 
   action: replace target_label: __address__ 
   regex: (.+?)(?::\d+)?;(\d+) 
   replacement: $1:$2 
  1. Deduplicate Services After Transformation

If the relabeling step fails, it will be bypassed, causing the deduplication logic to be invalid, and as a result, all ports will be scraped.

@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines. label Jul 17, 2024
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 64.93%. Comparing base (0ceeaa6) to head (c9d0e34).
Report is 3 commits behind head on main.

Files Patch % Lines
pkg/common/monitor.go 78.26% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7825   +/-   ##
=======================================
  Coverage   64.92%   64.93%           
=======================================
  Files         345      345           
  Lines       42942    42959   +17     
=======================================
+ Hits        27879    27894   +15     
- Misses      12619    12625    +6     
+ Partials     2444     2440    -4     
Flag Coverage Δ
unittests 64.93% <78.26%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added size/L Denotes a PR that changes 100-499 lines. and removed size/M Denotes a PR that changes 30-99 lines. labels Jul 17, 2024
@apecloud-bot apecloud-bot added the approved PR Approved Test label Jul 17, 2024
@sophon-zt sophon-zt merged commit 7d79805 into main Jul 19, 2024
56 checks passed
@sophon-zt sophon-zt deleted the support/improvement-update-prometheus-kubeblocks-service-job-config-for-port-name-issue7804 branch July 19, 2024 03:04
@github-actions github-actions bot added this to the Release 0.8.4 milestone Jul 19, 2024
@sophon-zt
Copy link
Contributor Author

/cherry-pick release-0.9

Copy link

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kubeblocks/actions/runs/10001887095

github-actions bot pushed a commit that referenced this pull request Jul 19, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] update Prometheus kubeblocks-service job config for PORT-NAME
4 participants