UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 65fbc69a authored by Micah Nagel's avatar Micah Nagel
Browse files

Merge branch 'istio-ingress-exception' into 'master'

add exclusion for istio ingress services

Closes #1185

See merge request platform-one/big-bang/bigbang!1732
parents c2a15636 2ffc6076
No related branches found
No related tags found
1 merge request!1732add exclusion for istio ingress services
Pipeline #843858 passed
......@@ -31,6 +31,35 @@ policies:
{{- end }}
{{- end }}
{{- $nodePortIngressGateways := list }}
{{- range $name, $values := .Values.istio.ingressGateways }}
{{- if eq $values.type "NodePort" }}
{{- $nodePortIngressGateways = append $nodePortIngressGateways $name }}
{{- end }}
{{- end }}
{{- range $name, $values := .Values.istio.values.ingressGateways }}
{{- if eq (dig "k8s" "service" "type" "LoadBalancer" $values) "NodePort" }}
{{- $nodePortIngressGateways = append $nodePortIngressGateways $name }}
{{- end }}
{{- end }}
{{- if $nodePortIngressGateways }}
# Istio services (istio ingress) can create type: NodePort services
disallow-nodeport-services:
exclude:
any:
- resources:
kinds:
- Service
names:
{{- range $name := $nodePortIngressGateways }}
- {{ $name }}
{{- end }}
namespaces:
- "istio-system"
{{- end }}
disallow-image-tags:
validationFailureAction: enforce
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment