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

sotw: rlp workflow #893

Merged
merged 60 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e7d4a67
sotw: effective ratelimitpolicy
guicassolato Sep 27, 2024
9e21c61
removed unused function to apply rlp overrides
guicassolato Oct 8, 2024
688be2c
istio extension (WasmPlugin) reconciler
guicassolato Oct 8, 2024
1cbf4c9
fixup: unique limit definitions per scope
guicassolato Oct 8, 2024
7d0b7e9
fixup: log error only when indeed there's an error to be logged
guicassolato Oct 8, 2024
e60aed0
do not fail when missing kuadrant object
guicassolato Oct 8, 2024
962510d
fixup: equality between wasmplugins and avoid rebuilding wasm config …
guicassolato Oct 8, 2024
77158b3
fixup: error comparison
guicassolato Oct 8, 2024
d9256ab
cleanup istio extension objects when it cannot calculate effective po…
guicassolato Oct 8, 2024
8d4414a
refactor: removal of SortablePolicy for sorting policies objects by c…
guicassolato Oct 9, 2024
78c2175
remove no longer relevant integration test case
guicassolato Oct 9, 2024
fe28e06
fixup: avoid updating invalid rate limit policies to 'accepted' on ev…
guicassolato Oct 9, 2024
42846b9
fixup: continue istio extension workflow when it fails for a given ga…
guicassolato Oct 10, 2024
0b30d5b
Remove unnused event recorder from base reconciler
guicassolato Oct 10, 2024
a3b646e
Istio rate limit cluster reconciler
guicassolato Oct 10, 2024
6db892f
enable Istio-related rate limit tasks only when Istio is installed
guicassolato Oct 10, 2024
1e57ef4
ensure at least one hostname per wasm config policy
guicassolato Oct 10, 2024
063390e
bump istio to 1.22
guicassolato Oct 11, 2024
30b13cd
Use targetRefs to attach to gateways in the Istio EnvoyFilter and Was…
guicassolato Oct 11, 2024
ebbdf9f
refactor: debug log messages for when Limitador, EnvoyFilter and Wasm…
guicassolato Oct 12, 2024
6b8fff4
sort wasm 'policies' within the wasm plugin config by hostname from m…
guicassolato Oct 12, 2024
fae64cd
go fmt: refactor: debug log messages for when Limitador, EnvoyFilter …
guicassolato Oct 12, 2024
8ce2f58
sort wasm 'policies' within the wasm plugin config by hostname and ht…
guicassolato Oct 12, 2024
6f7a812
code style: remove unused parameter ctx
guicassolato Oct 12, 2024
9a50401
fix: unit test: sort wasm 'policies' within the wasm plugin config by…
guicassolato Oct 12, 2024
4ed7b3e
Refactor WasmPlugin reconciliation to reduce repetition with EnvoyExt…
guicassolato Oct 14, 2024
0a99570
envoy gateway rate limit cluster reconciler
guicassolato Oct 14, 2024
3ef09d3
fix: wrong default GroupKind assumed on Istio policies TargetRefs
guicassolato Oct 15, 2024
ca820d1
minor fixes to code comments and log messages
guicassolato Oct 15, 2024
9d4aad1
envoy gateway extension reconciler
guicassolato Oct 15, 2024
384b230
code style: ratelimit.RateLimitIndex -> Index
guicassolato Oct 15, 2024
4e5c7c5
code style: wasm.WasmExtensionName -> ExtensionName
guicassolato Oct 15, 2024
f071fbd
code style: wasm.WasmRuleBuilderFunc -> RuleBuilderFunc
guicassolato Oct 15, 2024
b676b86
code style: fix grouping of go imports
guicassolato Oct 15, 2024
341f7ab
new structure of the wasm config based on https://github.com/Kuadrant…
guicassolato Oct 15, 2024
7683ef2
fix: envoy_gateway_extension_reconciler.go file name
guicassolato Oct 16, 2024
1ba85f6
fix: log messages of envoy patch policy reconciliation
guicassolato Oct 16, 2024
a6673ba
rlp enforced condition and consistency in the message when target not…
guicassolato Oct 16, 2024
de8d2c7
tests: gateway extension reconciler tests resource comparison
guicassolato Oct 16, 2024
8c67cc5
more descriptive wasm actionset names
guicassolato Oct 17, 2024
9c99f61
tests: fix integration tests - order of wasm action sets
guicassolato Oct 17, 2024
e29420d
fixup: should not increment twice on the index of http route match wh…
guicassolato Oct 17, 2024
c17818d
tests: fix integration tests - order of wasm action sets (again!)
guicassolato Oct 17, 2024
6321b35
back to opaque wasm action set names
guicassolato Oct 17, 2024
a4516d5
remove duplicate GetKuadrantFromTopology func
guicassolato Oct 17, 2024
e142372
do not isolate policy-machinery imports in a separate group
guicassolato Oct 17, 2024
c19a78b
helper function to extract network objects in a request path
guicassolato Oct 17, 2024
fe75a17
set owner reference directly when building the desired objects
guicassolato Oct 17, 2024
7fe21ee
only validate policies on create and update events
guicassolato Oct 18, 2024
3388d57
update policy status on all kinds of policy-releated event (deleting …
guicassolato Oct 18, 2024
baeb961
use labels on the internal resources created to watch and select them…
guicassolato Oct 18, 2024
4f66c9a
policy not enforced due to 'not in the path to any existing routes' (…
guicassolato Oct 18, 2024
4c9996d
tests: fix integration tests - Istio EnvoyFilter only created if RLP …
guicassolato Oct 18, 2024
fe85021
lint: removed unnused func arg in the tests
guicassolato Oct 18, 2024
2245a38
tests: fix integration tests - Istio WasmPlugin config with correct l…
guicassolato Oct 18, 2024
1e66d6f
check state of the targeted resources to define the policy's enforced…
guicassolato Oct 18, 2024
144f340
re-enable RateLimitPolicy discoverability (PolicyAffected status cond…
guicassolato Oct 18, 2024
7d83a8c
tests: fix integration tests - common ratelimit workflow tests
guicassolato Oct 18, 2024
fa62eb0
refactor: common.NamespacedNameFromLocator func
guicassolato Oct 18, 2024
b2d57ea
hack to isolate test namespaces sharing the same limitador cr
guicassolato Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint: removed unnused func arg in the tests
Signed-off-by: Guilherme Cassolato <[email protected]>
  • Loading branch information
guicassolato committed Oct 22, 2024
commit fe850217acfe2095ea46ed126c2224b9aea8e400
8 changes: 4 additions & 4 deletions tests/istio/extension_reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() {
Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue())
}

expectedWasmPluginConfig := func(rlpKey client.ObjectKey, httpRoute *gatewayapiv1.HTTPRoute, key, hostname string) *wasm.Config {
expectedWasmPluginConfig := func(httpRoute *gatewayapiv1.HTTPRoute, key, hostname string) *wasm.Config {
mGateway := &machinery.Gateway{Gateway: gateway}
mHTTPRoute := &machinery.HTTPRoute{HTTPRoute: httpRoute}
pathID := kuadrantv1.PathID([]machinery.Targetable{
Expand Down Expand Up @@ -2566,7 +2566,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() {
Expect(testClient().Get(ctx, wasmPluginKey, existingWasmPlugin)).To(Succeed())
existingWASMConfig, err := wasm.ConfigFromStruct(existingWasmPlugin.Spec.PluginConfig)
Expect(err).ToNot(HaveOccurred())
Expect(existingWASMConfig).To(Equal(expectedWasmPluginConfig(gwRLPKey, httpRoute, controllers.LimitNameToLimitadorIdentifier(gwRLPKey, "gateway"), "*.example.com")))
Expect(existingWASMConfig).To(Equal(expectedWasmPluginConfig(httpRoute, controllers.LimitNameToLimitadorIdentifier(gwRLPKey, "gateway"), "*.example.com")))

// Create Route RLP
routeRLP := &kuadrantv1beta3.RateLimitPolicy{
Expand Down Expand Up @@ -2604,7 +2604,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() {
g.Expect(testClient().Get(ctx, wasmPluginKey, existingWasmPlugin)).To(Succeed())
existingWASMConfig, err = wasm.ConfigFromStruct(existingWasmPlugin.Spec.PluginConfig)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(existingWASMConfig).To(Equal(expectedWasmPluginConfig(routeRLPKey, httpRoute, controllers.LimitNameToLimitadorIdentifier(routeRLPKey, "route"), "*.example.com")))
g.Expect(existingWASMConfig).To(Equal(expectedWasmPluginConfig(httpRoute, controllers.LimitNameToLimitadorIdentifier(routeRLPKey, "route"), "*.example.com")))
}).WithContext(ctx).Should(Succeed())

// Update GW RLP to overrides
Expand All @@ -2621,7 +2621,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() {
g.Expect(testClient().Get(ctx, wasmPluginKey, existingWasmPlugin)).To(Succeed())
existingWASMConfig, err = wasm.ConfigFromStruct(existingWasmPlugin.Spec.PluginConfig)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(existingWASMConfig).To(Equal(expectedWasmPluginConfig(routeRLPKey, httpRoute, controllers.LimitNameToLimitadorIdentifier(routeRLPKey, "gateway"), "*.example.com")))
g.Expect(existingWASMConfig).To(Equal(expectedWasmPluginConfig(httpRoute, controllers.LimitNameToLimitadorIdentifier(routeRLPKey, "gateway"), "*.example.com")))
}).WithContext(ctx).Should(Succeed())

}, testTimeOut)
Expand Down