29 lines
713 B
YAML
29 lines
713 B
YAML
|
{{- if .Values.networkPolicy.enabled }}
|
||
|
---
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: NetworkPolicy
|
||
|
metadata:
|
||
|
name: {{ include "speedtest-exporter.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "speedtest-exporter.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
podSelector:
|
||
|
matchLabels:
|
||
|
{{- include "speedtest-exporter.selectorLabels" . | nindent 6 }}
|
||
|
policyTypes:
|
||
|
- Ingress
|
||
|
{{- if .Values.networkPolicy.egress.enabled }}
|
||
|
- Egress
|
||
|
{{- end }}
|
||
|
ingress:
|
||
|
- ports:
|
||
|
- port: 9798
|
||
|
protocol: TCP
|
||
|
from:
|
||
|
{{- toYaml .Values.networkPolicy.ingress.http | nindent 8 }}
|
||
|
{{- with .Values.networkPolicy.egress }}
|
||
|
egress:
|
||
|
{{- toYaml .extra | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|