Skip to content

Commit 916993a

Browse files
committed
feat: update ingress template for divi sites server to include rate limit whitelist annotation
1 parent 8009a3d commit 916993a

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

charts/ds-server/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
2-
description: Divi DS Server
2+
description: Divi Sites Server
33
icon: https://raw.githubusercontent.com/nodejs/nodejs.org/main/public/static/images/logo-hexagon.svg
44
maintainers:
55
66
name: Elegant Themes
77
name: ds-server
8-
version: 1.0.6
8+
version: 1.0.7
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{- define "addCIDRToIPs" -}}
2+
{{- $ips := . | split "," -}}
3+
{{- $ipsWithCIDR := list -}}
4+
{{- range $ip := $ips -}}
5+
{{- $ipsWithCIDR = append $ipsWithCIDR (print $ip "/32") -}}
6+
{{- end -}}
7+
{{ $ipsWithCIDR | join "," | quote }}
8+
{{- end -}}

charts/ds-server/templates/ingress.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ metadata:
1717
nginx.ingress.kubernetes.io/enable-rewrite-log: "false"
1818
nginx.ingress.kubernetes.io/ssl-redirect: "false"
1919
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
20+
nginx.ingress.kubernetes.io/limit-whitelist: {{ include "addCIDRToIPs" .Values.ETDC_IP_ADDRESSES }}
2021
spec:
2122
tls:
2223
- hosts:

charts/ds-server/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ DS_SERVER_PORT:
55
DS_SERVER_IMAGE:
66
DS_SERVER_REPO_URL:
77
DS_SERVER_VERSION:
8+
ETDC_IP_ADDRESSES:
89
GITHUB_TOKEN:
910
GIT_REF:
1011
INSTALL_PATH:

0 commit comments

Comments
 (0)