diff --git a/charts/sequencer/Chart.yaml b/charts/sequencer/Chart.yaml index 454f8b912e..b24d657eac 100644 --- a/charts/sequencer/Chart.yaml +++ b/charts/sequencer/Chart.yaml @@ -15,7 +15,7 @@ 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.11.1 +version: 0.11.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sequencer/templates/ingress.yaml b/charts/sequencer/templates/ingress.yaml index f6135180e5..7c9f063d9b 100644 --- a/charts/sequencer/templates/ingress.yaml +++ b/charts/sequencer/templates/ingress.yaml @@ -2,7 +2,7 @@ {{- $ingressSupportsIngressClassName := eq (include "sequencer.ingress.supportsIngressClassName" .) "true" -}} {{- $ingressSupportsPathType := eq (include "sequencer.ingress.supportsPathType" .) "true" -}} -{{- range $service, $ingress := .Values.ingress }} +{{- $ingress := .Values.ingress.rpc -}} {{- if $ingress.enabled -}} {{- $servicePort := $ingress.service.port -}} {{- $serviceName := $ingress.service.name -}} @@ -12,8 +12,8 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ $.Values.config.moniker }}-sequencer-{{ $service }}-ingress - namespace: {{ include "sequencer.namespace" $ }} + name: {{ .Values.config.moniker }}-sequencer-rpc-ingress + namespace: {{ include "sequencer.namespace" . }} labels: {{- with $ingress.labels }} {{- toYaml . | nindent 4 }} @@ -65,17 +65,93 @@ spec: {{- tpl (toYaml .) $ | nindent 4 }} {{- end }} {{- else if $ingress.hostname }} - - host: {{ $service }}.{{ $ingress.hostname }} + - host: rpc.{{ $ingress.hostname }} http: paths: - path: "/" pathType: Prefix backend: service: - name: {{ $.Values.config.moniker }}-sequencer-{{ $service }}-service + name: {{ $.Values.config.moniker }}-sequencer-rpc-service port: - name: cometbft-{{ $service }} - {{- end -}} + name: cometbft-rpc + {{- end }} +--- {{- end }} +{{- $ingress := .Values.ingress.grpc }} +{{- if $ingress.enabled -}} +{{- $servicePort := $ingress.service.port -}} +{{- $serviceName := $ingress.service.name -}} +{{- $ingressPath := $ingress.path -}} +{{- $ingressPathType := $ingress.pathType -}} +{{- $extraPaths := $ingress.extraPaths -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Values.config.moniker }}-sequencer-grpc-ingress + namespace: {{ include "sequencer.namespace" . }} + labels: + {{- with $ingress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + nginx.ingress.kubernetes.io/backend-protocol: "GRPC" + {{- if $ingress.annotations }} + {{- with $ingress.annotations }} + {{- range $key, $value := . }} + {{ $key }}: {{ tpl $value $ | quote }} + {{- end }} + {{- end }} + {{- else }} + kubernetes.io/ingress.class: nginx + {{- end }} +spec: + {{- if and $ingressSupportsIngressClassName $ingress.ingressClassName }} + ingressClassName: {{ $ingress.ingressClassName }} + {{- end -}} + {{- with $ingress.defaultBackend }} + defaultBackend: + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} + rules: + {{- if $ingress.hosts }} + {{- range $ingress.hosts }} + - host: {{ tpl . $ }} + http: + paths: + {{- with $extraPaths }} + {{- toYaml . | nindent 10 }} + {{- end }} + - path: {{ $ingressPath }} + {{- if $ingressSupportsPathType }} + pathType: {{ $ingressPathType }} + {{- end }} + backend: + {{- if $ingressApiIsStable }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end }} + {{- with $ingress.tls }} + tls: + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} + {{- else if $ingress.hostname }} + - host: grpc.{{ $ingress.hostname }} + http: + paths: + - path: "/" + pathType: Prefix + backend: + service: + name: {{ .Values.config.moniker }}-sequencer-grpc-service + port: + name: sequencer-grpc + {{- end }} --- {{- end }} diff --git a/charts/sequencer/values.yaml b/charts/sequencer/values.yaml index 9cf49ecfc5..46511ef11a 100644 --- a/charts/sequencer/values.yaml +++ b/charts/sequencer/values.yaml @@ -201,7 +201,7 @@ ingress: # - secretName: chart-example-tls # hosts: # - chart-example.local - p2p: + grpc: enabled: false hostname: sequencer.localdev.me ingressClassName: nginx diff --git a/dev/values/validators/node0.yml b/dev/values/validators/node0.yml index 8fabd75dca..6e76a52b44 100644 --- a/dev/values/validators/node0.yml +++ b/dev/values/validators/node0.yml @@ -45,7 +45,9 @@ config: pubKey: 4v1RdMiKkWgBBTTP26iRSLOEkAY99gMVfZijm6OCzjs= ingress: - p2p: + rpc: + enabled: true + grpc: enabled: true sequencer-relayer: diff --git a/dev/values/validators/node1.yml b/dev/values/validators/node1.yml index ce0d5530b8..2c92786efe 100644 --- a/dev/values/validators/node1.yml +++ b/dev/values/validators/node1.yml @@ -46,3 +46,5 @@ config: ingress: rpc: enabled: false + grpc: + enabled: false diff --git a/dev/values/validators/node2.yml b/dev/values/validators/node2.yml index 140727d1b0..966ba6f2c6 100644 --- a/dev/values/validators/node2.yml +++ b/dev/values/validators/node2.yml @@ -46,3 +46,5 @@ config: ingress: rpc: enabled: false + grpc: + enabled: false diff --git a/dev/values/validators/single.yml b/dev/values/validators/single.yml index 2e33a69f2f..c2774e5cb3 100644 --- a/dev/values/validators/single.yml +++ b/dev/values/validators/single.yml @@ -11,3 +11,9 @@ sequencer-relayer: sequencerGrpc: http://node0-sequencer-grpc-service.astria-dev-cluster.svc.cluster.local:8080 storage: enabled: false + +ingress: + rpc: + enabled: true + grpc: + enabled: true