Skip to content

Commit

Permalink
feat: update ingress template for divi sites server to include rate l…
Browse files Browse the repository at this point in the history
…imit whitelist annotation
  • Loading branch information
lots0logs committed Aug 20, 2024
1 parent 8009a3d commit 916993a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/ds-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
description: Divi DS Server
description: Divi Sites Server
icon: https://raw.githubusercontent.com/nodejs/nodejs.org/main/public/static/images/logo-hexagon.svg
maintainers:
- email: dustin@elegantthemes.com
name: Elegant Themes
name: ds-server
version: 1.0.6
version: 1.0.7
8 changes: 8 additions & 0 deletions charts/ds-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- define "addCIDRToIPs" -}}
{{- $ips := . | split "," -}}
{{- $ipsWithCIDR := list -}}
{{- range $ip := $ips -}}
{{- $ipsWithCIDR = append $ipsWithCIDR (print $ip "/32") -}}
{{- end -}}
{{ $ipsWithCIDR | join "," | quote }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/ds-server/templates/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metadata:
nginx.ingress.kubernetes.io/enable-rewrite-log: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/limit-whitelist: {{ include "addCIDRToIPs" .Values.ETDC_IP_ADDRESSES }}
spec:
tls:
- hosts:
Expand Down
1 change: 1 addition & 0 deletions charts/ds-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ DS_SERVER_PORT:
DS_SERVER_IMAGE:
DS_SERVER_REPO_URL:
DS_SERVER_VERSION:
ETDC_IP_ADDRESSES:
GITHUB_TOKEN:
GIT_REF:
INSTALL_PATH:
Expand Down

0 comments on commit 916993a

Please sign in to comment.