Skip to content

Commit

Permalink
feat(helm): only allow reana-server to connect to reana-cache (#847)
Browse files Browse the repository at this point in the history
Add `NetworkPolicy` that only allows reana-server to connect to
reana-cache, as other services do not rely on it.
  • Loading branch information
mdonadoni committed Nov 22, 2024
1 parent 20a0ea8 commit cb9e17a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions helm/reana/templates/reana-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ spec:
targetPort: 6379
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "reana.prefix" . }}-cache
namespace: {{ .Release.Namespace }}
spec:
podSelector:
matchLabels:
app: {{ include "reana.prefix" . }}-cache
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app: {{ include "reana.prefix" . }}-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down

0 comments on commit cb9e17a

Please sign in to comment.