bcgov/common-object-management-service

View on GitHub
charts/coms/templates/networkpolicy.yaml

Summary

Maintainability
Test Coverage
{{- if .Values.networkPolicy.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-openshift-ingress-to-{{ include "coms.fullname" . }}-app
  labels:
    {{- include "coms.labels" . | nindent 4 }}
spec:
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              network.openshift.io/policy-group: ingress
      ports:
        - port: {{ default "8080" .Values.config.configMap.SERVER_PORT | atoi }}
          protocol: TCP
  podSelector:
    matchLabels: {{- include "coms.selectorLabels" . | nindent 6 }}
{{- end }}