Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions apps/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ spec:
value: "production"
- name: TZ
value: "Europe/Rome"
- name: PUBLIC_URL
value: "https://api.polinetwork.org"
- name: TRUSTED_ORIGINS
value: "https://polinetwork.org,https://admin.polinetwork.org,http://localhost:3001,http://localhost:3002"
- name: DB_NAME
value: "polinetwork_backend"
- name: DB_HOST
Expand All @@ -69,21 +65,6 @@ spec:
secretKeyRef:
name: azure-kv
key: encryption-key
- name: BETTER_AUTH_SECRET
valueFrom:
secretKeyRef:
name: azure-kv
key: auth-secret
- name: GITHUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: azure-kv
key: auth-github-id
- name: GITHUB_CLIENT_ID
valueFrom:
secretKeyRef:
name: azure-kv
key: auth-github-secret
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
Expand Down
9 changes: 0 additions & 9 deletions apps/backend/external-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ spec:
- secretKey: encryption-key
remoteRef:
key: backend-encryption-key
- secretKey: auth-github-id
remoteRef:
key: backend-auth-github-secret
- secretKey: auth-github-secret
remoteRef:
key: backend-auth-github-id
- secretKey: auth-secret
remoteRef:
key: backend-auth-secret
- secretKey: db-pass
remoteRef:
key: postgres-root-password
Expand Down
30 changes: 0 additions & 30 deletions apps/backend/ingress.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion apps/backend/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ resources:
- namespace.yaml
- external-secret.yaml
- deployment.yaml
- ingress.yaml
- network-policy.yaml
43 changes: 43 additions & 0 deletions apps/backend/network-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Only the in-cluster callers may reach the backend (RFC v3 §12): the admin
# dashboard and the website (tRPC, esign agent proxy), the Telegram bot (tRPC
# and its socket) and the IdP (access-changed events on /internal/events).
# Nothing reaches it from outside the cluster since the Ingress was removed.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-callers
namespace: backend
spec:
podSelector:
matchLabels:
app: backend
policyTypes: [Ingress]
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: admin
podSelector:
matchLabels:
app: admin
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: web
podSelector:
matchLabels:
app: web
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: bot-ts
podSelector:
matchLabels:
app: bot-ts
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: auth
podSelector:
matchLabels:
app: auth
ports:
- port: 3000
protocol: TCP
Loading