diff --git a/helm/reana/templates/reana-db.yaml b/helm/reana/templates/reana-db.yaml index 84ad8b4e..90121d72 100644 --- a/helm/reana/templates/reana-db.yaml +++ b/helm/reana/templates/reana-db.yaml @@ -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 diff --git a/helm/reana/templates/reana-message-broker.yaml b/helm/reana/templates/reana-message-broker.yaml index 60ad1791..4008fe38 100644 --- a/helm/reana/templates/reana-message-broker.yaml +++ b/helm/reana/templates/reana-message-broker.yaml @@ -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 diff --git a/reana/reana_dev/cluster.py b/reana/reana_dev/cluster.py index 98bd8c81..f2dc7682 100644 --- a/reana/reana_dev/cluster.py +++ b/reana/reana_dev/cluster.py @@ -124,6 +124,11 @@ def add_volume_mounts(node): "hostPort": 31672, "protocol": "TCP", }, # rabbitmq + { + "containerPort": 30432, + "hostPort": 30432, + "protocol": "TCP", + }, # postgresql ] )