Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4d43388
chore: ignore api types in codecov (#5886)
shawnh2 May 2, 2025
ea25008
chore/ci: add `go.lint.fmt` target (#5846)
cnvergence May 2, 2025
04df840
fix: staticcheck issues (#5779)
mmorel-35 May 2, 2025
3af260c
docs: local jwks (#5806)
zhaohuabing May 2, 2025
76ead72
disable settings by default in gateway-crds-helm (#5894)
arkodg May 2, 2025
c89ecb0
Add seed corpus to guide the fuzzer to generate combinations of gatew…
sudiptob2 May 2, 2025
ed4d4cc
fix(chart): passing root context to template (#5902)
hansselvig May 3, 2025
6e347dc
chore: improve merge test (#5861)
zirain May 4, 2025
6d3ab1a
fix: httproute precedence by considering header/query match type (#5…
kkk777-7 May 4, 2025
32b8d80
ci: make helm-generate should failed as expected (#5908)
zirain May 5, 2025
24edeed
docs(rate-limit): minor fix in 'Distinct Users Except Admin' section …
tomas-rojo May 5, 2025
f4f42e5
adpot internals/utils/merge.Merge (#5917)
zirain May 5, 2025
70ccbab
Add Bitnami as an Envoy Gateway adopter (#5926)
carrodher May 5, 2025
301163e
build(deps): bump google/osv-scanner-action from 2.0.1 to 2.0.2 (#5920)
dependabot[bot] May 5, 2025
11277ce
build(deps): bump github/codeql-action from 3.28.16 to 3.28.17 (#5919)
dependabot[bot] May 5, 2025
81b85a3
build(deps): bump github.com/valyala/fasthttp from 1.60.0 to 1.61.0 i…
dependabot[bot] May 5, 2025
3962e8c
docs: fix example for http redirects page (#5830)
mczaplinski May 6, 2025
2345f08
docs: Add docs for request buffering (#5910)
markwinter May 6, 2025
603af40
feat: support configuring tls for dynamic resolver backend (#5867)
zhaohuabing May 6, 2025
48b85d6
fix: fix topology injector bug (#5911)
jukie May 6, 2025
563ebe2
feat: allow merge rate limit rule in BTP (#5915)
zirain May 6, 2025
e16c889
docs: install EG via Argo CD (#5824)
zhaohuabing May 6, 2025
787bc47
chore: clean up BTP status (#5934)
zhaohuabing May 7, 2025
d896202
e2e: test for dynamic resolver backend using system ca for TLS (#5932)
zhaohuabing May 7, 2025
cf8ef16
feat: implement offline kubernetes controller (#5767)
shawnh2 May 7, 2025
88a5273
fix: SecurityPolicy reference grant (#5792)
kkk777-7 May 7, 2025
74ae8ff
fix: add validation for header values (#5933)
gavinkflam May 7, 2025
dbbecba
fix: Fixed typo in error message. (#5945)
mathias-ws May 7, 2025
208921f
e2e: disable DynamicResolverBackendTest on IPv6 (#5964)
zhaohuabing May 8, 2025
3c8af6c
fix: proxy creation/deletion error handling in GatewayNamespace mode …
zirain May 8, 2025
f5d1266
ci: kube-deploy support KUBE_DEPLOY_PROFILE (#5957)
zirain May 8, 2025
50b328e
fix: process remaining gatewayClasses after encountering an err (#5953)
arkodg May 8, 2025
065fab8
fix: do not add tls inspector filter to quic listener (#5671)
Xunzhuo May 8, 2025
b5a023e
Add seed corpus related to traffic task. (#5947)
sudiptob2 May 8, 2025
565ea8a
[release/v1.3] release v1.3.3 notes (#5969)
guydc May 8, 2025
d6bc7d4
e2e: fix PreserveCase flaky (#5966)
zirain May 9, 2025
2fc0c53
feat: validate JWT token and use projected token (#5871)
cnvergence May 9, 2025
2d81be2
feat: add controller namespace field to infrastructure render (#5937)
cnvergence May 9, 2025
9593b87
e2e: GatewayNamespace mode (#5961)
zirain May 9, 2025
38ef39d
helm: support standard channel (#5958)
zhaohuabing May 9, 2025
c3f4750
e2e: bump upgrade test version to v1.3.2 (#5976)
zirain May 9, 2025
3ae9fe2
fix: add validation for duplicated API keys (#5955)
gavinkflam May 9, 2025
dd6e608
[release/v1.3] update site to use v1.3.3 (#5980)
guydc May 9, 2025
bb8007a
docs: dynamic resolver backend (#5935)
zhaohuabing May 10, 2025
16159ef
Fuzzing: Fail on xds translation error (#5986)
sudiptob2 May 10, 2025
c59a8c2
fix btp merge not working when there's multi parent refs on router (#…
zirain May 10, 2025
86c539e
e2e: fix GRPCExtAuth flaky (#5987)
zirain May 10, 2025
a38d68a
chore: add coverpkg for coverage test (#5991)
shawnh2 May 10, 2025
ce44ad2
ci: enable conformance test for GatewayNamespaceMode (#5992)
zirain May 12, 2025
bca5592
e2e: add CollectAndDump for EGUpgrade test (#5998)
zirain May 12, 2025
13c72ec
e2e: add test for BTP timeout (#5994)
zirain May 12, 2025
3bee79c
Remoe check for accesslog formatter (#5985)
zirain May 12, 2025
ab2b84f
e2e: fix GRPCExtAuth/http_route_with_ext_auth_authentication (#6001)
zirain May 12, 2025
eda784c
chore: update dependabot (#6007)
zirain May 12, 2025
8845399
e2e: update CORS test (#6011)
zirain May 12, 2025
3b8e17b
chore: add multiple gateways testdata for GatewayNamespace mode (#5972)
cnvergence May 12, 2025
dcc8329
feat: adds support for extension server in standalone mode (#5984)
mathetake May 12, 2025
9226069
docs: Add new conceptual pages for intro concepts (#5981)
melsal13 May 13, 2025
03c6759
docs: update open graph image (#6022)
missBerg May 13, 2025
8a1dec2
temporarily disable the backend tls test (#6030)
zhaohuabing May 13, 2025
65e6b5c
Fix lint (#6031)
zhaohuabing May 13, 2025
9aeb153
fix: allows offline k8s controller to use non default CRDs (#6020)
mathetake May 13, 2025
d673c07
e2e: refactor ratelmit test (#5997)
zirain May 13, 2025
fdedc75
moved shared under rules (#5944)
ryanhristovski May 13, 2025
6cd7760
fix make gen
May 13, 2025
3ab349d
make gen round 2
May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ ignore:
- "test"
- "**/*.pb.go"
- "**/zz_generated.*.go"
- "api/**/*_types.go"
18 changes: 11 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,23 @@ updates:
# Ignore github.com/docker/docker, since it should be updated alongside github.com/google/go-containerregistry
- dependency-name: github.com/docker/docker
groups:
github.com:
gomod:
patterns:
- "github.com*"
- "go.opentelemetry.io*"
- "golang*"
- "google*"
- "fortio.org*"
- "gopkg.in*"
- "helm.sh*"
- "gomodules.xyz"
exclude-patterns:
# Exclude envoyproxy/go-control-plane, since it needs more work to update
- "github.com/envoyproxy/go-control-plane*"
k8s.io:
patterns:
- "k8s.io/*"
- "sigs.k8s.io/*"
go.opentelemetry.io:
patterns:
- "go.opentelemetry.io*"
# Merge golang/google groups into group, since it should be updated alongside opentelemetry
- "golang*"
- "google*"
- package-ecosystem: pip
directories:
- /tools/src/codespell
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,20 @@ jobs:
target:
- version: v1.30.10
ipFamily: ipv4
profile: default
- version: v1.31.6
ipFamily: ipv4
profile: default
- version: v1.32.3
ipFamily: ipv6 # only run ipv6 test on this version to save time
profile: default
# TODO: this's IPv4 first, need a way to test IPv6 first.
- version: v1.33.0
ipFamily: dual # only run dual test on latest version to save time
profile: default
- version: v1.33.0
ipFamily: dual # only run dual test on latest version to save time
profile: gateway-namespace-mode
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./tools/github-actions/setup-deps
Expand All @@ -116,6 +123,7 @@ jobs:
KIND_NODE_TAG: ${{ matrix.target.version }}
IMAGE_PULL_POLICY: IfNotPresent
IP_FAMILY: ${{ matrix.target.ipFamily }}
KUBE_DEPLOY_PROFILE: ${{ matrix.target.profile }}
run: make conformance

e2e-test:
Expand All @@ -127,13 +135,20 @@ jobs:
target:
- version: v1.30.10
ipFamily: ipv4
profile: default
- version: v1.31.6
ipFamily: ipv4
profile: default
- version: v1.32.3
ipFamily: ipv6 # only run ipv6 test on this version to save time
profile: default
# TODO: this's IPv4 first, need a way to test IPv6 first.
- version: v1.33.0
ipFamily: dual # only run dual test on latest version to save time
profile: default
- version: v1.33.0
ipFamily: dual # only run dual test on latest version to save time
profile: gateway-namespace-mode
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./tools/github-actions/setup-deps
Expand All @@ -155,6 +170,7 @@ jobs:
KIND_NODE_TAG: ${{ matrix.target.version }}
IMAGE_PULL_POLICY: IfNotPresent
IP_FAMILY: ${{ matrix.target.ipFamily }}
KUBE_DEPLOY_PROFILE: ${{ matrix.target.profile }}
E2E_TIMEOUT: 1h
NUM_WORKERS: 2
run: make e2e
Expand Down Expand Up @@ -187,6 +203,7 @@ jobs:

- name: Read Benchmark report
run: cat test/benchmark/benchmark_report/benchmark_report.md

resilience-test:
runs-on: ubuntu-latest
if: ${{ ! startsWith(github.event_name, 'push') }}
Expand All @@ -203,7 +220,7 @@ jobs:

publish:
runs-on: ubuntu-latest
needs: [conformance-test, e2e-test]
needs: [conformance-test, e2e-test, resilience-test]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./tools/github-actions/setup-deps
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
- uses: ./tools/github-actions/setup-deps

- name: Initialize CodeQL
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/autobuild@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/license-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run scanner
uses: google/osv-scanner-action/osv-scanner-action@6fc714450122bda9d00e4ad5d639ad6a39eedb1f # v2.0.1
uses: google/osv-scanner-action/osv-scanner-action@e69cc6c86b31f1e7e23935bbe7031b50e51082de # v2.0.2
continue-on-error: true # remove this after https://github.com/google/deps.dev/issues/146 has been resolved
with:
scan-args: |-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/osv-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:
jobs:
scan-scheduled:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@6fc714450122bda9d00e4ad5d639ad6a39eedb1f" # v2.0.1
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@e69cc6c86b31f1e7e23935bbe7031b50e51082de" # v2.0.2
with:
scan-args: |-
--recursive
Expand All @@ -32,7 +32,7 @@ jobs:

scan-pr:
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@6fc714450122bda9d00e4ad5d639ad6a39eedb1f" # v2.0.1
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@e69cc6c86b31f1e7e23935bbe7031b50e51082de" # v2.0.2
with:
scan-args: |-
--recursive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ jobs:
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with:
sarif_file: results.sarif
4 changes: 3 additions & 1 deletion api/v1alpha1/backend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type UnixSocket struct {

// BackendSpec describes the desired state of BackendSpec.
// +kubebuilder:validation:XValidation:rule="self.type != 'DynamicResolver' || !has(self.endpoints) && !has(self.appProtocols)",message="DynamicResolver type cannot have endpoints and appProtocols specified"
// +kubebuilder:validation:XValidation:rule="has(self.tls) ? self.type == 'DynamicResolver' : true",message="TLS settings can only be specified for DynamicResolver backends"
type BackendSpec struct {
// Type defines the type of the backend. Defaults to "Endpoints"
//
Expand Down Expand Up @@ -148,12 +149,13 @@ type BackendSpec struct {
// Only supported for DynamicResolver backends.
//
// +optional
// +notImplementedHide
TLS *BackendTLSSettings `json:"tls,omitempty"`
}

// BackendTLSSettings holds the TLS settings for the backend.
// Only used for DynamicResolver backends.
// +kubebuilder:validation:XValidation:message="must not contain both CACertificateRefs and WellKnownCACertificates",rule="!(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 && has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")"
// +kubebuilder:validation:XValidation:message="must specify either CACertificateRefs or WellKnownCACertificates",rule="(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 || has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")"
type BackendTLSSettings struct {
// CACertificateRefs contains one or more references to Kubernetes objects that
// contain TLS certificates of the Certificate Authorities that can be used
Expand Down
8 changes: 4 additions & 4 deletions api/v1alpha1/envoygateway_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

// SetEnvoyGatewayDefaults sets default EnvoyGateway configuration parameters.
func (e *EnvoyGateway) SetEnvoyGatewayDefaults() {
if e.TypeMeta.Kind == "" {
e.TypeMeta.Kind = KindEnvoyGateway
if e.Kind == "" {
e.Kind = KindEnvoyGateway

Check warning on line 37 in api/v1alpha1/envoygateway_helpers.go

View check run for this annotation

Codecov / codecov/patch

api/v1alpha1/envoygateway_helpers.go#L37

Added line #L37 was not covered by tests
}
if e.TypeMeta.APIVersion == "" {
e.TypeMeta.APIVersion = GroupVersion.String()
if e.APIVersion == "" {
e.APIVersion = GroupVersion.String()

Check warning on line 40 in api/v1alpha1/envoygateway_helpers.go

View check run for this annotation

Codecov / codecov/patch

api/v1alpha1/envoygateway_helpers.go#L40

Added line #L40 was not covered by tests
}
if e.Provider == nil {
e.Provider = DefaultEnvoyGatewayProvider()
Expand Down
145 changes: 0 additions & 145 deletions api/v1alpha1/kubernetes_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

jsonpatch "github.com/evanphx/json-patch"
appsv1 "k8s.io/api/apps/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
corev1 "k8s.io/api/core/v1"
policyv1 "k8s.io/api/policy/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -158,150 +157,6 @@ func (hpa *KubernetesHorizontalPodAutoscalerSpec) setDefault() {
}
}

// ApplyMergePatch applies a merge patch to a deployment based on the merge type
func (deployment *KubernetesDeploymentSpec) ApplyMergePatch(old *appsv1.Deployment) (*appsv1.Deployment, error) {
if deployment.Patch == nil {
return old, nil
}

var patchedJSON []byte
var err error

// Serialize the current deployment to JSON
originalJSON, err := json.Marshal(old)
if err != nil {
return nil, fmt.Errorf("error marshaling original deployment: %w", err)
}

switch {
case deployment.Patch.Type == nil || *deployment.Patch.Type == StrategicMerge:
patchedJSON, err = strategicpatch.StrategicMergePatch(originalJSON, deployment.Patch.Value.Raw, appsv1.Deployment{})
case *deployment.Patch.Type == JSONMerge:
patchedJSON, err = jsonpatch.MergePatch(originalJSON, deployment.Patch.Value.Raw)
default:
return nil, fmt.Errorf("unsupported merge type: %s", *deployment.Patch.Type)
}
if err != nil {
return nil, fmt.Errorf("error applying merge patch: %w", err)
}

// Deserialize the patched JSON into a new deployment object
var patchedDeployment appsv1.Deployment
if err := json.Unmarshal(patchedJSON, &patchedDeployment); err != nil {
return nil, fmt.Errorf("error unmarshaling patched deployment: %w", err)
}

return &patchedDeployment, nil
}

// ApplyMergePatch applies a merge patch to a daemonset based on the merge type
func (daemonset *KubernetesDaemonSetSpec) ApplyMergePatch(old *appsv1.DaemonSet) (*appsv1.DaemonSet, error) {
if daemonset.Patch == nil {
return old, nil
}

var patchedJSON []byte
var err error

// Serialize the current daemonset to JSON
originalJSON, err := json.Marshal(old)
if err != nil {
return nil, fmt.Errorf("error marshaling original daemonset: %w", err)
}

switch {
case daemonset.Patch.Type == nil || *daemonset.Patch.Type == StrategicMerge:
patchedJSON, err = strategicpatch.StrategicMergePatch(originalJSON, daemonset.Patch.Value.Raw, appsv1.DaemonSet{})
case *daemonset.Patch.Type == JSONMerge:
patchedJSON, err = jsonpatch.MergePatch(originalJSON, daemonset.Patch.Value.Raw)
default:
return nil, fmt.Errorf("unsupported merge type: %s", *daemonset.Patch.Type)
}
if err != nil {
return nil, fmt.Errorf("error applying merge patch: %w", err)
}

// Deserialize the patched JSON into a new daemonset object
var patchedDaemonSet appsv1.DaemonSet
if err := json.Unmarshal(patchedJSON, &patchedDaemonSet); err != nil {
return nil, fmt.Errorf("error unmarshaling patched daemonset: %w", err)
}

return &patchedDaemonSet, nil
}

// ApplyMergePatch applies a merge patch to a service based on the merge type
func (service *KubernetesServiceSpec) ApplyMergePatch(old *corev1.Service) (*corev1.Service, error) {
if service.Patch == nil {
return old, nil
}

var patchedJSON []byte
var err error

// Serialize the current service to JSON
originalJSON, err := json.Marshal(old)
if err != nil {
return nil, fmt.Errorf("error marshaling original service: %w", err)
}

switch {
case service.Patch.Type == nil || *service.Patch.Type == StrategicMerge:
patchedJSON, err = strategicpatch.StrategicMergePatch(originalJSON, service.Patch.Value.Raw, corev1.Service{})
case *service.Patch.Type == JSONMerge:
patchedJSON, err = jsonpatch.MergePatch(originalJSON, service.Patch.Value.Raw)
default:
return nil, fmt.Errorf("unsupported merge type: %s", *service.Patch.Type)
}
if err != nil {
return nil, fmt.Errorf("error applying merge patch: %w", err)
}

// Deserialize the patched JSON into a new service object
var patchedService corev1.Service
if err := json.Unmarshal(patchedJSON, &patchedService); err != nil {
return nil, fmt.Errorf("error unmarshaling patched service: %w", err)
}

return &patchedService, nil
}

// ApplyMergePatch applies a merge patch to a HorizontalPodAutoscaler based on the merge type
func (hpa *KubernetesHorizontalPodAutoscalerSpec) ApplyMergePatch(old *autoscalingv2.HorizontalPodAutoscaler) (*autoscalingv2.HorizontalPodAutoscaler, error) {
if hpa.Patch == nil {
return old, nil
}

var patchedJSON []byte
var err error

// Serialize the current HPA to JSON
originalJSON, err := json.Marshal(old)
if err != nil {
return nil, fmt.Errorf("error marshaling original HorizontalPodAutoscaler: %w", err)
}

switch {
case hpa.Patch.Type == nil || *hpa.Patch.Type == StrategicMerge:
patchedJSON, err = strategicpatch.StrategicMergePatch(originalJSON, hpa.Patch.Value.Raw, autoscalingv2.HorizontalPodAutoscaler{})
case *hpa.Patch.Type == JSONMerge:
patchedJSON, err = jsonpatch.MergePatch(originalJSON, hpa.Patch.Value.Raw)
default:
return nil, fmt.Errorf("unsupported merge type: %s", *hpa.Patch.Type)
}
if err != nil {
return nil, fmt.Errorf("error applying merge patch: %w", err)
}

// Deserialize the patched JSON into a new HorizontalPodAutoscaler object
var patchedHpa autoscalingv2.HorizontalPodAutoscaler
if err := json.Unmarshal(patchedJSON, &patchedHpa); err != nil {
return nil, fmt.Errorf("error unmarshaling patched HorizontalPodAutoscaler: %w", err)
}

return &patchedHpa, nil
}

// ApplyMergePatch applies a merge patch to a PodDisruptionBudget based on the merge type
func (pdb *KubernetesPodDisruptionBudgetSpec) ApplyMergePatch(old *policyv1.PodDisruptionBudget) (*policyv1.PodDisruptionBudget, error) {
if pdb.Patch == nil {
Expand Down
15 changes: 6 additions & 9 deletions api/v1alpha1/ratelimit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ type GlobalRateLimit struct {
//
// +kubebuilder:validation:MaxItems=64
Rules []RateLimitRule `json:"rules"`

// Shared determines whether the rate limit rules apply across all the policy targets.
// If set to true, the rule is treated as a common bucket and is shared across all policy targets (xRoutes).
// Default: false.
//
// +optional
// +notImplementedHide
// +kubebuilder:default=false
Shared *bool `json:"shared,omitempty"`
}

// LocalRateLimit defines local rate limit configuration.
Expand Down Expand Up @@ -108,6 +99,12 @@ type RateLimitRule struct {
//
// +optional
Cost *RateLimitCost `json:"cost,omitempty"`
// Shared determines whether this rate limit rule applies across all the policy targets.
// If set to true, the rule is treated as a common bucket and is shared across all policy targets (xRoutes).
// Default: false.
//
// +optional
Shared *bool `json:"shared,omitempty"`
}

type RateLimitCost struct {
Expand Down
Loading
Loading