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

Include Kong service name in multi-Service Events #3318

Merged
merged 1 commit into from
Jan 19, 2023
Merged

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Jan 4, 2023

What this PR does / why we need it:

Adds Kong Service name to invalid multi-Service backend Events. This name indicates the route resource that requires the Service, and will in turn indicate the other Services that need matching annotations:

11:32:06-0800 esenin $ kubectl -n 71dba048-df32-448b-bfb4-d6df2913e4f7 get events | grep multi                                         
74s         Warning   KongConfigurationTranslationFailed   service/httpbin                                  Service has inconsistent konghq.com/host-header annotation and is used in multi-Service backend httproute.71dba048-df32-448b-bfb4-d6df2913e4f7.2ab68c8f-e26c-4a32-86d1-96208bb7c6ef.1.All Services in a multi-Service backend must have matching Kong annotations. Review the associated route resource and align annotations in its multi-Service backends.

Cannot think of a non-awkward way to write that sentence though.

Which issue this PR fixes:

Fix #2566. Simpler than the original proposal, but satisfies the main goal of it.

Special notes for your reviewer:

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

@rainest rainest force-pushed the feat/service-parent branch 4 times, most recently from 1c96456 to f2c58ef Compare January 4, 2023 20:22
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 4, 2023
@rainest rainest changed the title Emit route Events for invalid multi-Service backends Include Kong service name in multi-Service Events Jan 4, 2023
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 4, 2023
@rainest rainest force-pushed the feat/service-parent branch 2 times, most recently from 75fde8d to e0f4e21 Compare January 4, 2023 23:30
@pull-request-size pull-request-size bot added size/M and removed size/L labels Jan 4, 2023
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 73.9% // Head: 73.9% // Increases project coverage by +0.0% 🎉

Coverage data is based on head (1074a0c) compared to base (bf32874).
Patch coverage: 100.0% of modified lines in pull request are covered.

❗ Current head 1074a0c differs from pull request most recent head 9e43fed. Consider uploading reports for the commit 9e43fed to get more accurate results

Additional details and impacted files
@@          Coverage Diff           @@
##            main   #3318    +/-   ##
======================================
  Coverage   73.9%   73.9%            
======================================
  Files        113     110     -3     
  Lines      13896   13265   -631     
======================================
- Hits       10282    9816   -466     
+ Misses      2963    2813   -150     
+ Partials     651     636    -15     
Impacted Files Coverage Δ
internal/dataplane/parser/ingressrules.go 94.5% <100.0%> (+<0.1%) ⬆️
internal/util/builder/allowedroutes.go 50.0% <0.0%> (-50.0%) ⬇️
internal/util/builder/routenamespaces.go 50.0% <0.0%> (-21.5%) ⬇️
internal/cmd/rootcmd/run.go 16.6% <0.0%> (-8.4%) ⬇️
internal/manager/run.go 48.7% <0.0%> (-5.1%) ⬇️
...ternal/controllers/gateway/httproute_controller.go 52.5% <0.0%> (-4.6%) ⬇️
internal/dataplane/kong_client.go 85.1% <0.0%> (-2.1%) ⬇️
internal/dataplane/sendconfig/sendconfig.go 77.0% <0.0%> (-1.9%) ⬇️
internal/cmd/rootcmd/signal.go 51.7% <0.0%> (-1.7%) ⬇️
internal/dataplane/deckgen/deckgen.go 68.9% <0.0%> (-1.3%) ⬇️
... and 25 more

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.

@rainest rainest marked this pull request as ready for review January 17, 2023 21:55
@rainest rainest requested a review from a team as a code owner January 17, 2023 21:55
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Include the Kong service name when emitting Events related to
multi-Service backend annotation inconsistency. This name indicates the
parent route resource. Reviewing the route resource will show the other
Services used by the problem rule.
Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 nit but you can disregard it and merge it

internal/dataplane/parser/ingressrules.go Show resolved Hide resolved
@rainest rainest merged commit 375ac6f into main Jan 19, 2023
@rainest rainest deleted the feat/service-parent branch January 19, 2023 23:39
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.

Provide parent name to parser service builder
3 participants