Skip to content

Commit

Permalink
[sophora-server][sophora-cluster-common] change path of grpc ingresses (
Browse files Browse the repository at this point in the history
#140)

* [sophora-server][sophora-cluster-common] change path of grpc ingresses

* [sophora-server][sophora-cluster-common] add more documentation for distinction between srpc and grpc

---------

Co-authored-by: Konrad Schergaut <[email protected]>
  • Loading branch information
philmtd and schwerlaut authored Dec 9, 2024
1 parent d536a99 commit e67f23f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/sophora-cluster-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: sophora-cluster-common
description: A Helm chart containing some common resources useful for Sophora cloud setups
type: application
version: 1.2.0
version: 1.2.1
appVersion: "4"
2 changes: 1 addition & 1 deletion charts/sophora-cluster-common/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ clusterServerLb:
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
- host: "cms.mysophora.com"
path: /sophora\.grpc.*
path: /sophora\.srpc.*

podDisruptionBudget:
enabled: true
Expand Down
7 changes: 4 additions & 3 deletions charts/sophora-cluster-common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ clusterServerLb:
# - host: ""
# path: /

# This can be used to configure a different ingress for the gRPC service as gRPC may require different settings,
# e.g. nginx needs to be explicitly informed that the backend protocol is gRPC and that the path should be regex-matched.
# This can be used to configure a different ingress for the SRPC service as it might require different settings.
# The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC
# The paths can be regex-matched since all SRPC-calls have the root-path sophora.srpc
grpcIngress:
enabled: false
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
Expand All @@ -45,7 +46,7 @@ clusterServerLb:
# nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
# - host: chart-example.local
# path: /sophora\.grpc.*
# path: /sophora\.srpc.*
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down
2 changes: 1 addition & 1 deletion charts/sophora-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2.5.1
version: 2.5.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
Expand Down
9 changes: 6 additions & 3 deletions charts/sophora-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ For all other configuration options use `sophora.server.properties`.

It's also possible to use postgres as your jcr repository. To use postgres with jcr set `sophora.server.persistence.repositoryType` to `postgres`.

## gRPC API (Sophora v6+)
Sophora 6 introduces a gRPC API. gRPC is basically HTTP/2 but requires specific non-default settings in most HTTP proxies, including Ingress Controllers.
## Sophora RPC (Sophora v6+)
Sophora 6 introduces a completely new API for client-server communication called Sophora RPC (short srpc). Srpc is based on gRPC which in return is essentially HTTP/2 but requires specific non-default settings in most HTTP proxies, including Ingress Controllers.
To deal with this, the chart now supports deploying a second Ingress for the gRPC API, which can be configured differently from the main Ingress.

This is not enabled by default.
To enable it, set `grpcIngress.enabled` to `true` and configure it as needed.
The example configuration contains the required
settings for the Nginx Ingress Controller.
settings for the Nginx Ingress Controller (all paths starting with `/sophora.srpc.` need to be forwarded as gRPC traffic).

## Tips for productive installations

Expand Down Expand Up @@ -164,6 +164,9 @@ sophora.persistence.postgres.port=5432

## Notable Changes

## 2.5.2
This version changes the paths for the gRPC-controller from the technology-driven name sophora.grpc to the product driven name sophora.srpc. This only affects server in version 6 or newer.

## 2.5.1
This version updates the pre-stop hook to version 2.1.0 which is required when using Sophora 6. It is still compatible with previous versions of Sophora.

Expand Down
2 changes: 1 addition & 1 deletion charts/sophora-server/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ grpcIngress:
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
- host: "sophora.domain.de"
path: /sophora\.grpc.*
path: /sophora\.srpc.*

extraDeploy:
- |
Expand Down
7 changes: 4 additions & 3 deletions charts/sophora-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ ingress:
# hosts:
# - chart-example.local

# This can be used to configure a different ingress for the gRPC service as gRPC may require different settings,
# e.g. nginx needs to be explicitly informed that the backend protocol is gRPC and that the path should be regex-matched.
# This can be used to configure a different ingress for the SRPC service as it might require different settings.
# The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC
# The paths can be regex-matched since all SRPC-calls have the root-path sophora.srpc
grpcIngress:
enabled: false
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
Expand All @@ -342,7 +343,7 @@ grpcIngress:
# nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
# - host: chart-example.local
# path: /sophora\.grpc.*
# path: /sophora\.srpc.*
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down

0 comments on commit e67f23f

Please sign in to comment.