Skip to content

Commit

Permalink
Merge pull request #4 from lalithkota/develop-1.2.0.1-merge
Browse files Browse the repository at this point in the history
Helm Chart: Istio hostname fix
  • Loading branch information
lalithkota authored Jan 27, 2025
2 parents 077037d + e54aac8 commit 13338f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions charts/websub/templates/gateway.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{- if .Values.istio.enabled }}
{{- if .Values.istio.gateway.enabled }}
{{- $istioGatewayHostname := include "common.tplvalues.render" (dict "value" .Values.istio.gateway.host "context" $) }}
{{- $mainHostname := include "common.tplvalues.render" (dict "value" .Values.hostname "context" $) }}
{{- $hostname := default $mainHostname $istioGatewayHostname }}
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
Expand All @@ -18,7 +21,7 @@ spec:
number: 8080
protocol: HTTP2
hosts:
- {{ default .Values.hostname .Values.istio.gateway.host | quote }}
- {{ $hostname | quote }}
{{- if .Values.istio.gateway.httpTlsRedirect }}
tls:
httpsRedirect: true
Expand All @@ -30,7 +33,7 @@ spec:
number: 8443
protocol: HTTPS
hosts:
- {{ default .Values.hostname .Values.istio.gateway.host | quote }}
- {{ $hostname | quote }}
tls:
{{ toYaml (omit .Values.istio.gateway.tls "enabled") | nindent 6 }}
{{- end }}
Expand Down
7 changes: 5 additions & 2 deletions charts/websub/templates/virtualservice.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{- if .Values.istio.enabled }}
{{- if .Values.istio.virtualservice.enabled }}
{{- $istioVsHostname := include "common.tplvalues.render" (dict "value" .Values.istio.virtualservice.host "context" $) }}
{{- $mainHostname := include "common.tplvalues.render" (dict "value" .Values.hostname "context" $) }}
{{- $hostname := default $mainHostname $istioVsHostname }}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
Expand All @@ -10,14 +13,14 @@ metadata:
{{- end }}
spec:
hosts:
- {{ default .Values.hostname .Values.istio.virtualservice.host | quote }}
- {{ $hostname | quote }}
gateways:
- {{ default (include "common.names.fullname" .) .Values.istio.virtualservice.gateway }}
http:
- headers:
request:
set:
x-forwarded-host: {{ default .Values.hostname .Values.istio.virtualservice.host | quote }}
x-forwarded-host: {{ $hostname | quote }}
x-forwarded-proto: https
match:
- uri:
Expand Down

0 comments on commit 13338f4

Please sign in to comment.