From 0cbf192482df0aba26a5ae567b7592b103610921 Mon Sep 17 00:00:00 2001 From: eranreshef-starkware Date: Wed, 6 Mar 2024 21:50:35 +0200 Subject: [PATCH] feat(helm): add a new port --- Dockerfile | 2 +- deployments/helm/Chart.yaml | 2 +- deployments/helm/templates/deployment.yaml | 5 +++-- deployments/helm/templates/ingress.yaml | 7 +++++++ deployments/helm/values.yaml | 5 +++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e08dc9eca9..26cbdbeccf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,7 +91,7 @@ RUN set -ex; \ adduser --ingroup $(getent group ${ID} | cut -d: -f1) --uid ${ID} --gecos "" --disabled-password --home /app papyrus; \ chown -R papyrus:papyrus /app -EXPOSE 8080 8081 +EXPOSE 8080 8081 8082 USER ${ID} diff --git a/deployments/helm/Chart.yaml b/deployments/helm/Chart.yaml index 4f53da0c22..73891673d6 100644 --- a/deployments/helm/Chart.yaml +++ b/deployments/helm/Chart.yaml @@ -15,4 +15,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.2 +version: 0.1.0 diff --git a/deployments/helm/templates/deployment.yaml b/deployments/helm/templates/deployment.yaml index 9dcee887c7..92ff45b5f3 100644 --- a/deployments/helm/templates/deployment.yaml +++ b/deployments/helm/templates/deployment.yaml @@ -64,8 +64,9 @@ spec: - {{ .Values.base_layer_node_url }} {{- if .Values.services }} ports: - - containerPort: {{ .Values.services.rpc.port }} - - containerPort: {{ .Values.services.monitoring.port }} + {{- range $_, $v := .Values.services }} + - containerPort: {{ $v.port }} + {{- end }} {{- end }} volumeMounts: - name: data diff --git a/deployments/helm/templates/ingress.yaml b/deployments/helm/templates/ingress.yaml index 18b369fcc0..c87eea3e6d 100644 --- a/deployments/helm/templates/ingress.yaml +++ b/deployments/helm/templates/ingress.yaml @@ -29,6 +29,13 @@ spec: number: {{ .Values.services.monitoring.port }} path: /monitoring pathType: {{ .Values.ingress.pathType }} + - backend: + service: + name: {{ template "papyrus.name" . }}-peer + port: + number: {{ .Values.services.peer.port }} + path: /peer + pathType: {{ .Values.ingress.pathType }} tls: - hosts: - {{ .Values.ingress.host }} diff --git a/deployments/helm/values.yaml b/deployments/helm/values.yaml index a58ad8ef5d..130591d9cb 100644 --- a/deployments/helm/values.yaml +++ b/deployments/helm/values.yaml @@ -48,6 +48,11 @@ services: type: ClusterIP port: 8081 protocol: TCP + # P2P sync endpoint + peer: + type: ClusterIP + port: 8082 + protocol: TCP # Persistent volume claim variables for a papyrus pod. pvc: