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

feat: add dataplane metrics label #3521

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Feb 9, 2023

What this PR does / why we need it:

This PR adds dataplane metrics label to account for KIC sending configuration to more than 1 gateway.

The outcome of this PR will be that users will see separate time series for each dataplane for the following metrics:

  • ingress_controller_configuration_push_count
  • ingress_controller_configuration_push_duration_milliseconds

Which issue this PR fixes:

Fixes #3417

Special notes for your reviewer:

Blocked by #3421

This will make it so all ingress_controller_configuration_push_count and ingress_controller_configuration_push_duration_milliseconds time series will change. Regardless of running SCD or not. If we'd like to retain the current behaviour (not include the label) then we'd need to tweak this PR to account for this, i.e.:

  • don't add dataplane label when running with 1 Gateway, communicating through localhost/127.0.0.1
  • add it when running in SCD mode

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@pmalek pmalek self-assigned this Feb 9, 2023
@pmalek pmalek force-pushed the single-controller-deployments-dataplane-metrics branch from 38e548c to 5b5e0be Compare February 9, 2023 11:25
@pmalek pmalek linked an issue Feb 9, 2023 that may be closed by this pull request
3 tasks
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Base: 72.4% // Head: 72.5% // Increases project coverage by +0.1% 🎉

Coverage data is based on head (7c3e134) compared to base (22f6bad).
Patch coverage: 100.0% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3521     +/-   ##
=======================================
+ Coverage   72.4%   72.5%   +0.1%     
=======================================
  Files        120     121      +1     
  Lines      14318   14357     +39     
=======================================
+ Hits       10369   10422     +53     
+ Misses      3284    3274     -10     
+ Partials     665     661      -4     
Impacted Files Coverage Δ
internal/dataplane/deckerrors/conflict.go 100.0% <100.0%> (ø)
internal/dataplane/kong_client.go 85.0% <100.0%> (-0.2%) ⬇️
internal/dataplane/sendconfig/sendconfig.go 77.2% <100.0%> (-6.1%) ⬇️
internal/metrics/prometheus.go 100.0% <100.0%> (ø)
internal/dataplane/parser/parser.go 91.5% <0.0%> (+0.8%) ⬆️
internal/dataplane/kongstate/service.go 67.3% <0.0%> (+1.2%) ⬆️
...ternal/controllers/gateway/httproute_controller.go 71.6% <0.0%> (+1.8%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pmalek pmalek force-pushed the single-controller-deployments-srv branch 3 times, most recently from 9dbc558 to 9a400cf Compare February 9, 2023 13:58
Base automatically changed from single-controller-deployments-srv to main February 9, 2023 14:45
@pmalek pmalek force-pushed the single-controller-deployments-dataplane-metrics branch from 5b5e0be to 7c3e134 Compare February 9, 2023 14:49
@pmalek pmalek added this to the KIC v2.9.0 milestone Feb 9, 2023
@pmalek pmalek marked this pull request as ready for review February 9, 2023 14:51
@pmalek pmalek requested a review from a team as a code owner February 9, 2023 14:51
@czeslavo
Copy link
Contributor

czeslavo commented Feb 9, 2023

If we'd like to retain the current behaviour (not include the label) then we'd need to tweak this PR to account for this

IMO we should be fine with adding the label and not adjusting it to the SCD in any special way. I think it's better to have it consistent across deployment modes.

Note: we need to update https://docs.konghq.com/kubernetes-ingress-controller/latest/references/prometheus/.

@pmalek
Copy link
Member Author

pmalek commented Feb 9, 2023

If we'd like to retain the current behaviour (not include the label) then we'd need to tweak this PR to account for this

IMO we should be fine with adding the label and not adjusting it to the SCD in any special way. I think it's better to have it consistent across deployment modes.

👍

Note: we need to update https://docs.konghq.com/kubernetes-ingress-controller/latest/references/prometheus/.

Good catch, I'll add that to the related issue.

@pmalek pmalek merged commit 7cb15ee into main Feb 9, 2023
@pmalek pmalek deleted the single-controller-deployments-dataplane-metrics branch February 9, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConfigPush metrics in SCD mode should be labeled with dataplane's host
2 participants