Skip to content

Commit

Permalink
Add ipwhitelist middleware (#82)
Browse files Browse the repository at this point in the history
* Add ipwhitelist middleware

* bump chart
  • Loading branch information
enys authored Apr 8, 2024
1 parent 230dd6b commit 7cf03b5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/linkurious-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.28
version: 0.2.29

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
18 changes: 18 additions & 0 deletions charts/linkurious-enterprise/templates/ipwhitelist-middleware.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
{{ if .Capabilities.APIVersions.Has "traefik.containo.us/v1alpha1" -}}
{{- if and .Values.ingress.enabled .Values.ipWhiteList -}}
{{- $fullName := include "linkurious-enterprise.fullname" . -}}
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ $fullName }}-ipwhitelist
namespace: {{ .Release.Namespace }}
labels:
{{- include "linkurious-enterprise.labels" . | nindent 4 }}
spec:
ipWhiteList:
{{- with .Values.ipWhiteList }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{ end -}}
{{ end -}}

0 comments on commit 7cf03b5

Please sign in to comment.