Skip to content

Commit

Permalink
Merge pull request #125 from bcgov/sec/networkpolicy
Browse files Browse the repository at this point in the history
Add explicit Network Policy for Openshift Ingress
  • Loading branch information
kyle1morel authored Jan 9, 2024
2 parents 6701a66 + 763d9e0 commit a229d30
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions openshift/app.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ labels:
metadata:
name: "${REPO_NAME}-app-dc"
objects:
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-openshift-ingress-to-${APP_NAME}-app-${JOB_NAME}
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
network.openshift.io/policy-group: ingress
ports:
- port: 3000
protocol: TCP
podSelector:
matchLabels:
app: "${APP_NAME}-${JOB_NAME}"
deploymentconfig: "${APP_NAME}-app-${JOB_NAME}"
role: app
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down

0 comments on commit a229d30

Please sign in to comment.