diff --git a/api/v1alpha1/shared_types.go b/api/v1alpha1/shared_types.go index 617151e296a6..8d776f262792 100644 --- a/api/v1alpha1/shared_types.go +++ b/api/v1alpha1/shared_types.go @@ -30,7 +30,7 @@ const ( // DefaultShutdownManagerImage is the default image used for the shutdown manager. DefaultShutdownManagerImage = "envoyproxy/gateway-dev:latest" // DefaultRateLimitImage is the default image used by ratelimit. - DefaultRateLimitImage = "envoyproxy/ratelimit:master" + DefaultRateLimitImage = "ghcr.io/zirain-dev/ratelimit:latest" // HTTPProtocol is the common-used http protocol. HTTPProtocol = "http" // GRPCProtocol is the common-used grpc protocol. diff --git a/internal/infrastructure/kubernetes/ratelimit/resource.go b/internal/infrastructure/kubernetes/ratelimit/resource.go index 4785a700d404..d9b8d8bce7c2 100644 --- a/internal/infrastructure/kubernetes/ratelimit/resource.go +++ b/internal/infrastructure/kubernetes/ratelimit/resource.go @@ -277,6 +277,10 @@ func expectedRateLimitContainerEnv(rateLimit *egv1a1.RateLimit, rateLimitDeploym namespace string, ) []corev1.EnvVar { env := []corev1.EnvVar{ + { + Name: "PROTO", + Value: "tcp6", + }, { Name: RuntimeRootEnvVar, Value: "/data", diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/custom.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/custom.yaml index 0c1be549e836..09ee676d8250 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/custom.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/custom.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default-env.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default-env.yaml index 0c1be549e836..09ee676d8250 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default-env.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default-env.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml index 32e56a1ea5ce..9ec267819d5a 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml @@ -40,6 +40,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -86,7 +88,7 @@ spec: value: :19001 - name: PROMETHEUS_MAPPER_YAML value: /etc/statsd-exporter/conf.yaml - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml index 449ed2c1d70a..f7d201b6acd5 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml @@ -36,6 +36,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -76,7 +78,7 @@ spec: value: tcp - name: REDIS_URL value: redis.redis.svc:6379 - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml index 320497017f71..d5801b184d0a 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml @@ -40,6 +40,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -101,7 +103,7 @@ spec: value: "0.6" - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://trace-collector.envoy-gateway-system.svc.cluster.local:4317 - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml index 5b01b9ef3193..b0b91369070b 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml @@ -40,6 +40,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -101,7 +103,7 @@ spec: value: "1.0" - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://trace-collector.envoy-gateway-system.svc.cluster.local:4318 - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/extension-env.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/extension-env.yaml index 65c68972f9dc..360e83551027 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/extension-env.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/extension-env.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml index 4bc241198c6e..96ab5ec413ba 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml @@ -42,6 +42,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -88,7 +90,7 @@ spec: value: :19001 - name: PROMETHEUS_MAPPER_YAML value: /etc/statsd-exporter/conf.yaml - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml index 6681232eeb8e..f3c0c792d95b 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml @@ -42,6 +42,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -88,7 +90,7 @@ spec: value: :19001 - name: PROMETHEUS_MAPPER_YAML value: /etc/statsd-exporter/conf.yaml - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/override-env.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/override-env.yaml index 0c0f73f3c834..fed78a218283 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/override-env.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/override-env.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml index 773607b225a2..6afd3f4231b1 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml @@ -40,6 +40,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -86,7 +88,7 @@ spec: value: :19001 - name: PROMETHEUS_MAPPER_YAML value: /etc/statsd-exporter/conf.yaml - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/redis-tls-settings.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/redis-tls-settings.yaml index 29428fc447b3..21203fea36af 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/redis-tls-settings.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/redis-tls-settings.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/tolerations.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/tolerations.yaml index a2478222625e..20f6a0f59c2d 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/tolerations.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/tolerations.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/volumes.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/volumes.yaml index 30d8852d642b..6d2b8e048008 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/volumes.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/volumes.yaml @@ -41,6 +41,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml index 9cf4e01fbffb..0c47d8814254 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml @@ -40,6 +40,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -86,7 +88,7 @@ spec: value: :19001 - name: PROMETHEUS_MAPPER_YAML value: /etc/statsd-exporter/conf.yaml - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml index 5625daf61a0f..cb312214256a 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml @@ -40,6 +40,8 @@ spec: - command: - /bin/ratelimit env: + - name: PROTO + value: tcp6 - name: RUNTIME_ROOT value: /data - name: RUNTIME_SUBDIRECTORY @@ -86,7 +88,7 @@ spec: value: :19001 - name: PROMETHEUS_MAPPER_YAML value: /etc/statsd-exporter/conf.yaml - image: envoyproxy/ratelimit:master + image: ghcr.io/zirain-dev/ratelimit:latest imagePullPolicy: IfNotPresent name: envoy-ratelimit ports: