25 lines
579 B
YAML
25 lines
579 B
YAML
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: << resource_name >>
|
|
namespace: << namespace >>
|
|
spec:
|
|
ipAllowList:
|
|
sourceRange:
|
|
<%- for source_range in source_ranges.split(',') %>
|
|
- << source_range.strip() >>
|
|
<%- endfor %>
|
|
<%- if ip_strategy_depth_enabled or excluded_ips_enabled %>
|
|
ipStrategy:
|
|
<%- if ip_strategy_depth_enabled %>
|
|
depth: << ip_strategy_depth >>
|
|
<%- endif %>
|
|
<%- if excluded_ips_enabled %>
|
|
excludedIPs:
|
|
<%- for ip in excluded_ips.split(',') %>
|
|
- << ip.strip() >>
|
|
<%- endfor %>
|
|
<%- endif %>
|
|
<%- endif %>
|