KubeZero/charts/kubezero-argo-cd/templates/istio-authorization-policy.yaml

25 lines
617 B
YAML
Raw Normal View History

{{- if index .Values "argo-cd" "istio" "enabled" }}
2020-07-29 17:02:18 +00:00
{{- if index .Values "argo-cd" "istio" "ipBlocks" }}
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
2020-07-29 17:02:18 +00:00
name: argocd-deny-not-in-ipblocks
namespace: istio-system
spec:
selector:
matchLabels:
app: istio-ingressgateway
2020-07-29 17:02:18 +00:00
action: DENY
rules:
- from:
- source:
2020-07-29 17:02:18 +00:00
notIpBlocks:
{{- with index .Values "argo-cd" "istio" "ipBlocks" }}
{{- . | toYaml | nindent 8 }}
{{- end }}
to:
- operation:
hosts: ["{{ index .Values "argo-cd" "server" "config" "url" }}"]
2020-07-29 17:02:18 +00:00
{{- end }}
{{- end }}