Minor gRPC fixes

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
Petr Drastil 2024-01-21 21:42:58 +01:00
parent 63fbf2311c
commit 5dd79c9962
No known key found for this signature in database
GPG key ID: B147517F4051E6ED

View file

@ -1,5 +1,5 @@
{{- if and .Values.server.ingressGrpc.enabled (not .Values.server.ingressGrpc.isAWSALB) -}} {{- if and .Values.server.ingressGrpc.enabled (not .Values.server.ingressGrpc.isAWSALB) -}}
{{- $hostname := printf "grpc.%s" .Values.server.ingress.hostname -}} {{- $hostname := default (printf "grpc.%s" .Values.server.ingress.hostname) .Values.server.ingressGrpc.hostname -}}
{{- $insecure := index .Values.configs.params "server.insecure" | toString -}} {{- $insecure := index .Values.configs.params "server.insecure" | toString -}}
{{- $servicePort := eq $insecure "true" | ternary .Values.server.service.servicePortHttp .Values.server.service.servicePortHttps -}} {{- $servicePort := eq $insecure "true" | ternary .Values.server.service.servicePortHttp .Values.server.service.servicePortHttps -}}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
@ -23,25 +23,25 @@ spec:
ingressClassName: {{ . }} ingressClassName: {{ . }}
{{- end }} {{- end }}
rules: rules:
- host: {{ default $hostname .Values.server.ingressGrpc.hostname }} - host: {{ $hostname }}
http: http:
paths: paths:
{{- with $.Values.server.ingressGrpc.extraPaths }} {{- with .Values.server.ingressGrpc.extraPaths }}
{{- toYaml . | nindent 10 }} {{- toYaml . | nindent 10 }}
{{- end }} {{- end }}
- path: {{ .Values.server.ingressGrpc.path }} - path: {{ .Values.server.ingressGrpc.path }}
pathType: {{ $.Values.server.ingressGrpc.pathType }} pathType: {{ .Values.server.ingressGrpc.pathType }}
backend: backend:
service: service:
name: {{ include "argo-cd.server.fullname" $ }} name: {{ include "argo-cd.server.fullname" . }}
port: port:
number: {{ $servicePort }} number: {{ $servicePort }}
{{- range .Values.server.ingress.extraHosts }} {{- range .Values.server.ingressGrpc.extraHosts }}
- host: {{ .name | quote }} - host: {{ .name | quote }}
http: http:
paths: paths:
- path: {{ default .Values.server.ingress.path .path }} - path: {{ default .Values.server.ingressGrpc.path .path }}
pathType: {{ default .Values.server.ingress.pathType .pathType }} pathType: {{ default .Values.server.ingressGrpc.pathType .pathType }}
backend: backend:
service: service:
name: {{ include "argo-cd.server.fullname" . }} name: {{ include "argo-cd.server.fullname" . }}