Skip to content

Commit 03f449b

Browse files
jaredgorskibrianchandotcom
authored andcommitted
LCD-51304 Add Envoy SecurityPolicy passthrough on default chart
1 parent ca6b187 commit 03f449b

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

cloud/helm/default/templates/_statefulset.tpl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,33 @@ spec:
199199
- group: gateway.networking.k8s.io
200200
kind: HTTPRoute
201201
name: {{ include "liferay.name" .root }}-httproute
202+
{{- with .statefulset.network.securityPolicyAuthorizationSpec }}
203+
---
204+
apiVersion: gateway.envoyproxy.io/v1alpha1
205+
kind: SecurityPolicy
206+
metadata:
207+
labels:
208+
app: {{ include "liferay.name" $.root }}{{ $suffix }}
209+
{{- include "liferay.labels" $.root | nindent 8 }}
210+
name: {{ include "liferay.name" $.root }}-securitypolicy
211+
namespace: {{ include "liferay.namespace" $.root }}
212+
spec:
213+
targetRefs:
214+
{{- if $perHost }}
215+
{{- range $hostname := $.statefulset.network.hostnames }}
216+
{{- $slug := include "liferay.hostnameSlug" $hostname }}
217+
- group: gateway.networking.k8s.io
218+
kind: HTTPRoute
219+
name: {{ include "liferay.name" $.root }}-httproute-{{ $slug }}
220+
{{- end }}
221+
{{- else }}
222+
- group: gateway.networking.k8s.io
223+
kind: HTTPRoute
224+
name: {{ include "liferay.name" $.root }}-httproute
225+
{{- end }}
226+
authorization:
227+
{{- toYaml . | nindent 8 }}
228+
{{- end }}
202229
{{- if .statefulset.network.gatewayName }}
203230
---
204231
apiVersion: gateway.networking.k8s.io/v1

cloud/helm/default/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ network:
269269
gatewayName: ""
270270
hostnames: []
271271
perHostnameRoutes: false
272+
securityPolicyAuthorizationSpec: {}
272273
timeouts: {}
273274
networkPolicy:
274275
allowGatewayIngress: true

0 commit comments

Comments
 (0)