Skip to content

Commit

Permalink
fix(helm): add NodePort services for debugging (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlemesh committed Jul 31, 2024
1 parent 9112171 commit 33359ca
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
17 changes: 17 additions & 0 deletions helm/reana/templates/reana-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ spec:
- port: 5432
targetPort: 5432
protocol: TCP
{{- if .Values.debug.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "reana.prefix" . }}-db-debug
namespace: {{ .Release.Namespace }}
spec:
type: "NodePort"
selector:
app: {{ include "reana.prefix" . }}-db
ports:
- port: 5432
targetPort: 5432
nodePort: 30432
protocol: TCP
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
25 changes: 18 additions & 7 deletions helm/reana/templates/reana-message-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,30 @@ spec:
targetPort: 5672
name: "tcp"
protocol: TCP
{{- if .Values.debug.enabled }}
- port: 31672
targetPort: 15672
name: "management"
protocol: TCP
{{- else }}
- port: 15672
targetPort: 15672
name: "management"
protocol: TCP
{{- end }}
selector:
app: {{ include "reana.prefix" . }}-message-broker
{{- if .Values.debug.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "reana.prefix" . }}-message-broker-debug
namespace: {{ .Release.Namespace }}
spec:
type: "NodePort"
selector:
app: {{ include "reana.prefix" . }}-message-broker
ports:
- port: 15672
targetPort: 15672
nodePort: 31672
name: "management"
protocol: TCP
{{- end }}
---
apiVersion: apps/v1
kind: StatefulSet
Expand Down
5 changes: 5 additions & 0 deletions reana/reana_dev/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def add_volume_mounts(node):
"hostPort": 31672,
"protocol": "TCP",
}, # rabbitmq
{
"containerPort": 30432,
"hostPort": 30432,
"protocol": "TCP",
}, # postgresql
]
)

Expand Down

0 comments on commit 33359ca

Please sign in to comment.