Skip to content

Commit

Permalink
Merge pull request #990 from aleksasiriski/trusted-ips
Browse files Browse the repository at this point in the history
Traefik Trusted IPs
  • Loading branch information
aleksasiriski authored Sep 22, 2023
2 parents 49d0799 + 5aa2d5f commit 33f2730
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
20 changes: 18 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -503,19 +503,31 @@ ports:
trustedIPs:
- 127.0.0.1/32
- 10.0.0.0/8
%{for ip in var.traefik_additional_trusted_ips~}
- "${ip}"
%{endfor~}
forwardedHeaders:
trustedIPs:
- 127.0.0.1/32
- 10.0.0.0/8
%{for ip in var.traefik_additional_trusted_ips~}
- "${ip}"
%{endfor~}
websecure:
proxyProtocol:
trustedIPs:
- 127.0.0.1/32
- 10.0.0.0/8
%{for ip in var.traefik_additional_trusted_ips~}
- "${ip}"
%{endfor~}
forwardedHeaders:
trustedIPs:
- 127.0.0.1/32
- 10.0.0.0/8
%{for ip in var.traefik_additional_trusted_ips~}
- "${ip}"
%{endfor~}
%{endif~}
%{if var.traefik_additional_ports != ""~}
%{for option in var.traefik_additional_ports~}
Expand All @@ -529,10 +541,16 @@ ports:
trustedIPs:
- 127.0.0.1/32
- 10.0.0.0/8
%{for ip in var.traefik_additional_trusted_ips~}
- "${ip}"
%{endfor~}
forwardedHeaders:
trustedIPs:
- 127.0.0.1/32
- 10.0.0.0/8
%{for ip in var.traefik_additional_trusted_ips~}
- "${ip}"
%{endfor~}
%{endif~}
%{endfor~}
%{endif~}
Expand All @@ -543,11 +561,9 @@ podDisruptionBudget:
%{endif~}
additionalArguments:
- "--entrypoints.tcp=true"
%{if var.traefik_additional_options != ""~}
%{for option in var.traefik_additional_options~}
- "${option}"
%{endfor~}
%{endif~}
%{if var.traefik_resource_limits~}
resources:
requests:
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ variable "traefik_additional_options" {
description = "Additional options to pass to Traefik as a list of strings. These are the ones that go into the additionalArguments section of the Traefik helm values file."
}

variable "traefik_additional_trusted_ips" {
type = list(string)
default = []
description = "Additional Trusted IPs to pass to Traefik. These are the ones that go into the trustedIPs section of the Traefik helm values file."
}

variable "traefik_values" {
type = string
default = ""
Expand Down

0 comments on commit 33f2730

Please sign in to comment.