Created
January 20, 2023 22:35
-
-
Save bleggett/7dd1e05d9c9f9063744e02a55489ca65 to your computer and use it in GitHub Desktop.
Istio DR rule SAN override
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO destination rules need to be created for any SPIFFE IDs that don't follow the | |
# format that Istio expects (ns/NAMESPACE/sa/TARGET_POD_SVC_ACCOUNT) | |
# because ATM Istio defaults to clientside SAN checks that assume that SPIFFE ID format | |
# and this is not currently configurable - however this should be resolved soonish. | |
# https://github.com/istio/istio/issues/28712 | |
# | |
# Additionally, since DestinationRules override Istio's "default automTLS" settings, we need `mode: ISTIO_MUTUAL` | |
# in each DestRule to tell Istio that even though we have a custom destination config, we still want mTLS. | |
{{- range .Values.spireIdentities }} | |
--- | |
apiVersion: networking.istio.io/v1beta1 | |
kind: DestinationRule | |
metadata: | |
name: {{ .serviceName }}-custom-spire-destrule | |
spec: | |
host: {{ .serviceName }} | |
trafficPolicy: | |
tls: | |
mode: ISTIO_MUTUAL | |
subjectAltNames: | |
- spiffe://example.org/ns/{{ $.Release.Namespace }}/{{ .serviceName }} | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment