Skip to content

Commit

Permalink
chore: allowed_hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
pbastia committed Sep 19, 2024
1 parent fbb3546 commit 55e88eb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
7 changes: 6 additions & 1 deletion estimation/estimation/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ["0.0.0.0", "localhost", "127.0.0.1"]
ALLOWED_HOSTS = [
"0.0.0.0",
"localhost",
"127.0.0.1",
"cas-estimation-tool.apps.silver.devops.gov.bc.ca",
]


# Application definition
Expand Down
22 changes: 21 additions & 1 deletion helm/cas-estimation-tool/templates/network_policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,24 @@ spec:
release: {{ include "cas-estimation-tool.name" . }}
- podSelector:
matchLabels:
app.kubernetes.io/instance: {{ include "cas-estimation-tool.name" . }}
app.kubernetes.io/instance: {{ include "cas-estimation-tool.name" . }}

---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "cas-estimation-tool.fullname" . }}-allow-from-openshift-ingress
spec:
# This policy allows any pod with a route & service combination
# to accept traffic from the OpenShift router pods. This is
# required for things outside of OpenShift (like the Internet)
# to reach your pods.
ingress:
- from:
- namespaceSelector:
matchLabels:
network.openshift.io/policy-group: ingress
podSelector: {}
policyTypes:
- Ingress

0 comments on commit 55e88eb

Please sign in to comment.