Skip to content

Commit

Permalink
fix listen bug on ipv6
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <zirain2009@gmail.com>
  • Loading branch information
zirain committed Oct 29, 2024
1 parent 084e9d0 commit a1610aa
Show file tree
Hide file tree
Showing 18 changed files with 100 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/redis/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ data:
kind: EnvoyGateway
provider:
type: Kubernetes
kubernetes:
rateLimitDeployment:
container:
image: ghcr.io/zirain-dev/ratelimit:latest # remove this line when upstream PR merged
gateway:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
extensionApis:
Expand Down
16 changes: 16 additions & 0 deletions internal/infrastructure/kubernetes/ratelimit/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,22 @@ func expectedRateLimitContainerEnv(rateLimit *egv1a1.RateLimit, rateLimitDeploym
namespace string,
) []corev1.EnvVar {
env := []corev1.EnvVar{
{
Name: "PROTO",
Value: "tcp6",
},
{
Name: "HOST",
Value: "",
},
{
Name: "DEBUG_HOST",
Value: "",
},
{
Name: "GRPC_HOST",
Value: "",
},
{
Name: RuntimeRootEnvVar,
Value: "/data",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- command:
- /bin/ratelimit
env:
- name: PROTO
value: tcp6
- name: HOST
- name: DEBUG_HOST
- name: GRPC_HOST
- name: RUNTIME_ROOT
value: /data
- name: RUNTIME_SUBDIRECTORY
Expand Down

0 comments on commit a1610aa

Please sign in to comment.