mirror of
https://github.com/stakater/Reloader.git
synced 2026-05-20 15:42:53 +00:00
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
{{- if and ( .Values.reloader.netpol.enabled ) }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
annotations:
|
|
{{ include "reloader-helm3.annotations" . | indent 4 }}
|
|
labels:
|
|
{{ include "reloader-labels.chart" . | indent 4 }}
|
|
{{- if .Values.reloader.matchLabels }}
|
|
{{ toYaml .Values.reloader.matchLabels | indent 4 }}
|
|
{{- end }}
|
|
name: {{ template "reloader-fullname" . }}
|
|
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: {{ template "reloader-fullname" . }}
|
|
release: {{ .Release.Name | quote }}
|
|
{{- if .Values.reloader.matchLabels }}
|
|
{{ toYaml .Values.reloader.matchLabels | indent 6 }}
|
|
{{- end }}
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress
|
|
ingress:
|
|
- ports:
|
|
- port: http
|
|
{{- with .Values.reloader.netpol.from}}
|
|
from:
|
|
{{- toYaml .| nindent 8 }}
|
|
{{- end }}
|
|
egress:
|
|
- ports:
|
|
- port: 443
|
|
{{- with .Values.reloader.netpol.to}}
|
|
to:
|
|
{{- toYaml .| nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|