{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: {{ include "specwright.fullname" . }}
  labels:
    {{- include "specwright.labels" . | nindent 4 }}
spec:
  podSelector:
    matchLabels:
      {{- include "specwright.selectorLabels" . | nindent 6 }}
  policyTypes:
    - Ingress
    - Egress
  ingress:
    - ports:
        - port: http
          protocol: TCP
  egress:
    - {}
{{- end }}
