From c492b34cd270527a7de63e230457c82db22295a0 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 20 Sep 2024 11:54:47 +0200 Subject: [PATCH 1/2] p2p-svc depending on svc type --- charts/op-geth/Chart.yaml | 2 +- charts/op-geth/templates/service-p2p.yaml | 44 +++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/charts/op-geth/Chart.yaml b/charts/op-geth/Chart.yaml index f018fae8..4cbf37b5 100644 --- a/charts/op-geth/Chart.yaml +++ b/charts/op-geth/Chart.yaml @@ -1,7 +1,7 @@ --- name: op-geth apiVersion: v2 -version: 0.3.1 +version: 0.3.2 description: Celo implementation for op-geth execution engine (Optimism Rollup) home: https://clabs.co sources: diff --git a/charts/op-geth/templates/service-p2p.yaml b/charts/op-geth/templates/service-p2p.yaml index d1617058..33af6b64 100644 --- a/charts/op-geth/templates/service-p2p.yaml +++ b/charts/op-geth/templates/service-p2p.yaml @@ -10,6 +10,7 @@ {{- if lt $index (len .clusterIPs) }} {{- $clusterIP = index .clusterIPs $index }} {{- end }} +{{- if eq .type "LoadBalancer" }} --- apiVersion: v1 kind: Service @@ -84,6 +85,49 @@ spec: selector: {{- include "op-geth.selectorLabels" $ | nindent 4 }} statefulset.kubernetes.io/pod-name: {{ template "op-geth.fullname" $ }}-{{ $index }} +{{- else }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "op-geth.fullname" $ }}-p2p-{{ $index }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + service-type: p2p + {{- include "op-geth.labels" $ | nindent 4 }} +spec: + type: {{ .type }} + {{- with $loadBalancerIP }} + loadBalancerIP: {{ . }} + {{- end }} + {{- with $clusterIP }} + clusterIP: {{ . }} + {{- end }} + {{- with .externalTrafficPolicy }} + externalTrafficPolicy: {{ . }} + {{- end }} + {{- with .internalTrafficPolicy }} + internalTrafficPolicy: {{ . }} + {{- end }} + {{- with .publishNotReadyAddresses }} + publishNotReadyAddresses: {{ . }} + {{- end }} + ports: + - name: p2p-tcp + port: {{ .port }} + targetPort: p2p-tcp + protocol: TCP + - name: p2p-udp + port: {{ .port }} + targetPort: p2p-udp + protocol: UDP + selector: + {{- include "op-geth.selectorLabels" $ | nindent 4 }} + statefulset.kubernetes.io/pod-name: {{ template "op-geth.fullname" $ }}-{{ $index }} +{{- end }} {{- end }} {{- end }} {{- end }} From f507eaf784058032a6f94b69455f65f501f7177c Mon Sep 17 00:00:00 2001 From: jcortejoso Date: Fri, 20 Sep 2024 09:57:48 +0000 Subject: [PATCH 2/2] [Automatic] - Update chart README.md --- charts/op-geth/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/op-geth/README.md b/charts/op-geth/README.md index 63e63b57..6afc9d5d 100644 --- a/charts/op-geth/README.md +++ b/charts/op-geth/README.md @@ -1,6 +1,6 @@ # op-geth -![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.0](https://img.shields.io/badge/AppVersion-v1.0.0-informational?style=flat-square) +![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.0](https://img.shields.io/badge/AppVersion-v1.0.0-informational?style=flat-square) Celo implementation for op-geth execution engine (Optimism Rollup) Initially based on [dysnix/charts/op-geth](https://github.com/dysnix/charts/tree/main/dysnix/op-geth).