feat(argo-cd): Support AWS ALB Ingress with gRPC (#806)

* Support AWS ALB Ingress with GRPC

Signed-off-by: Thomas O'Neill <toneill818@gmail.com>
Signed-off-by: Thomas O'Neill <toneill@new-innov.com>

* Bump chart version

Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>

* Apply suggestions from code review

Signed-off-by: Marco Kilchhofer <marco@kilchhofer.info>

* Use single if statement

Signed-off-by: Thomas O'Neill <toneill@new-innov.com>

* Append -grpc to the service labels for ALB GRPC service

Signed-off-by: Thomas O'Neill <toneill@new-innov.com>

Co-authored-by: Thomas O'Neill <toneill@new-innov.com>
Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
Co-authored-by: Marco Kilchhofer <marco@kilchhofer.info>
This commit is contained in:
Thomas O'Neill 2021-07-20 07:40:54 -04:00 committed by GitHub
parent 922799081d
commit 1e3a4afd05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 73 additions and 4 deletions

View file

@ -0,0 +1,24 @@
{{- if and .Values.server.ingressGrpc.enabled .Values.server.ingressGrpc.isAWSALB -}}
apiVersion: v1
kind: Service
metadata:
annotations:
alb.ingress.kubernetes.io/backend-protocol-version: HTTP2 #This tells AWS to send traffic from the ALB using HTTP2. Can use GRPC as well if you want to leverage GRPC specific features
labels:
{{- include "argo-cd.labels" (dict "context" . "component" (print .Values.server.name "-gprc") "name" (print .Values.server.name "-grpc")) | nindent 4 }}
name: {{ template "argo-cd.server.fullname" . }}-grpc
spec:
ports:
- name: {{ .Values.server.service.servicePortHttpName }}
protocol: TCP
port: {{ .Values.server.service.servicePortHttp }}
targetPort: {{- if .Values.server.service.namedTargetPort }} {{ .Values.server.name }} {{- else }} {{ .Values.server.containerPort }} {{- end }}
- name: {{ .Values.server.service.servicePortHttpsName }}
protocol: TCP
port: {{ .Values.server.service.servicePortHttps }}
targetPort: {{- if .Values.server.service.namedTargetPort }} {{ .Values.server.name }} {{- else }} {{ .Values.server.containerPort }} {{- end }}
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 4 }}
sessionAffinity: None
type: ClusterIP
{{- end -}}