openbao-helm/templates/server-network-policy.yaml
Volodymyr Stoiko 66ea34c702
Allow explicit network policy enablement (#381)
* Disable default network policy

* Make network policy configurable by explicit flag only
2020-09-15 23:40:56 -07:00

22 lines
608 B
YAML

{{- if eq (.Values.server.networkPolicy.enabled | toString) "true" }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "vault.fullname" . }}
labels:
app.kubernetes.io/name: {{ template "vault.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: {{ template "vault.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
ingress:
- from:
- namespaceSelector: {}
ports:
- port: 8200
protocol: TCP
- port: 8201
protocol: TCP
{{ end }}