Skip to content

Commit

Permalink
Fix ingress for grpc. (percona#272)
Browse files Browse the repository at this point in the history
* Fix ingress for grpc.

* Bump pmm chart version to 1.3.6.
  • Loading branch information
MostovykVlad authored and gdubicki committed Jan 15, 2024
1 parent d51e7d4 commit a7d60c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/pmm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pmm
description: A Helm chart for Percona Monitoring and Management (PMM)
type: application
version: 1.3.5
version: 1.3.6
appVersion: "2.41.0"
home: https://github.com/percona/pmm
maintainers:
Expand Down
18 changes: 10 additions & 8 deletions charts/pmm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $serviceName := .Values.service.name -}}
{{- $grpcPort := (index $.Values.service.ports 0).port -}}
{{- $servicePort := (index $.Values.service.ports 1).port -}}
{{- $ingressPathType := .Values.ingress.pathType -}}
apiVersion: networking.k8s.io/v1
Expand Down Expand Up @@ -51,28 +52,28 @@ spec:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
- path: {{ printf "%s/inventory." . | replace "//" "/" }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
- path: {{ printf "%s/management." . | replace "//" "/" }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
- path: {{ printf "%s/server." . | replace "//" "/" }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
{{- end }}
{{- end }}
{{- end }}
Expand All @@ -90,6 +91,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
nginx.ingress.kubernetes.io/backend-protocol: "GRPCS"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
Expand Down Expand Up @@ -117,28 +119,28 @@ spec:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
- path: {{ printf "%s/inventory." . | replace "//" "/" }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
- path: {{ printf "%s/management." . | replace "//" "/" }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
- path: {{ printf "%s/server." . | replace "//" "/" }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $serviceName }}-grpc
port:
number: 443 # MUST proxy to HTTPS
number: {{ $grpcPort }} # MUST proxy to HTTPS
{{- end }}
{{- end }}
---
Expand Down

0 comments on commit a7d60c3

Please sign in to comment.