Skip to content

Commit

Permalink
feat: enable use-proxy-protocol (#1201)
Browse files Browse the repository at this point in the history
Co-authored-by: Ani Argjiri <ani.argjiri@redkubes.com>
  • Loading branch information
jeho and Ani Argjiri authored Jul 28, 2023
1 parent 25cc192 commit ff1f9fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions helmfile.d/snippets/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ environments:
accessLogFile: "/dev/stdout"
enableAutoMtls: true
defaultConfig:
gatewayTopology:
numTrustedProxies: 1
tracing:
sampling: 0.1
jaeger:
Expand Down
9 changes: 8 additions & 1 deletion helmfile.d/snippets/derived.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ environments:
enabled: false # {{ $a | get "snapshot-controller.enabled" (and (eq $provider "aws") (gt ($v.cluster.k8sVersion | float64) 1.22)) }}
tigera-operator:
enabled: {{ $a | get "tigera-operator.enabled" (eq $provider "aws") }}
{{- if $v.otomi.hasCloudLB }}
istio:
meshConfig:
defaultConfig:
gatewayTopology:
numTrustedProxies: 2
{{- end }}
ingress:
classes:
- {{- $v.ingress.platformClass | toYaml | nindent 12 }}
Expand All @@ -123,4 +130,4 @@ environments:
otomi:
version: {{ $otomiTag }}
versions: {{- $versions | toYaml | nindent 10 }}
- ../core.yaml
- ../core.yaml
5 changes: 3 additions & 2 deletions values/ingress-nginx/ingress-nginx.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ controller:
# log-format-upstream: '{"time":"$time_iso8601","remote_addr":"$proxy_protocol_addr","x_forward_for":"$proxy_add_x_forwarded_for","request_id":"$req_id","remote_user":"$remote_user","bytes_sent":$bytes_sent,"request_time":$request_time,"status":$status,"vhost":"$host","request_proto":"$server_protocol","path":"$uri","request_query":"$args","request_length":$request_length,"duration":$request_time,"method":"$request_method","http_referrer":"$http_referer","http_user_agent":"$http_user_agent"}'
ssl-redirect: {{ not $v.otomi.hasCloudLB }}
use-forwarded-headers: {{ $v.otomi.hasCloudLB }}
{{- if eq $v.cluster.provider "aws" }}
use-proxy-protocol: true
{{- end }}
stats:
enabled: true
metrics:
Expand Down Expand Up @@ -135,6 +133,9 @@ controller:
{{- if $privateNetwork }}
service.beta.kubernetes.io/aws-load-balancer-internal: true
{{- end }}
{{- if eq $v.cluster.provider "digitalocean" }}
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: true
{{- end }}
{{- end }} {{/* if eq $v.cluster.provider "aws" */}}
{{- if eq $v.cluster.provider "google" }}
{{- if $privateNetwork }}
Expand Down

0 comments on commit ff1f9fe

Please sign in to comment.