From b54ac72ff960d8bb55ed4b71736f26d13ec4660d Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Mon, 11 Sep 2023 21:15:02 -0400 Subject: [PATCH] add grpc ingress setup --- temporal/helm/temporal/Chart.yaml | 2 +- .../helm/temporal/templates/grpc-ingress.yaml | 27 +++++++++++++++++++ temporal/helm/temporal/values.yaml | 11 ++++++++ temporal/helm/temporal/values.yaml.tpl | 9 +++++++ temporal/plural/recipes/temporal-aws.yaml | 3 +++ temporal/plural/recipes/temporal-azure.yaml | 3 +++ temporal/plural/recipes/temporal-gcp.yaml | 3 +++ 7 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 temporal/helm/temporal/templates/grpc-ingress.yaml diff --git a/temporal/helm/temporal/Chart.yaml b/temporal/helm/temporal/Chart.yaml index c19a0fc01..7c03a92d6 100644 --- a/temporal/helm/temporal/Chart.yaml +++ b/temporal/helm/temporal/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: temporal description: helm chart for temporal type: application -version: 0.1.1 +version: 0.1.2 appVersion: "1.21.5" dependencies: - name: postgres diff --git a/temporal/helm/temporal/templates/grpc-ingress.yaml b/temporal/helm/temporal/templates/grpc-ingress.yaml new file mode 100644 index 000000000..68d09de39 --- /dev/null +++ b/temporal/helm/temporal/templates/grpc-ingress.yaml @@ -0,0 +1,27 @@ +{{ if .Values.grpc.hostname }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + {{ toYaml .Values.grpc.annotations | nindent 4 }} + name: grpc-ingress + labels: + {{ include "temporal-plural.labels" . | nindent 4 }} +spec: + ingressClassName: {{ .Values.grpc.ingressClass }} + rules: + - host: {{ .Values.grpc.hostname }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Values.grpc.service }} + port: + name: {{ .Values.grpc.port }} + tls: + - secretName: temporal-grpc-tls + hosts: + - {{ .Values.grpc.hostname }} +{{ end }} \ No newline at end of file diff --git a/temporal/helm/temporal/values.yaml b/temporal/helm/temporal/values.yaml index 91b7fa89c..35890737d 100644 --- a/temporal/helm/temporal/values.yaml +++ b/temporal/helm/temporal/values.yaml @@ -9,6 +9,17 @@ oidc: clientId: bogus clientSecret: bogus +grpc: + hostname: ~ + ingressClass: internal-nginx + service: temporal-frontend + port: grpc-rpc + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/backend-protocol: "GRPC" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + temporal: web: config: diff --git a/temporal/helm/temporal/values.yaml.tpl b/temporal/helm/temporal/values.yaml.tpl index 3549e94ee..696fc30f1 100644 --- a/temporal/helm/temporal/values.yaml.tpl +++ b/temporal/helm/temporal/values.yaml.tpl @@ -3,6 +3,15 @@ global: links: - description: temporal web ui url: {{ .Values.hostname }} + {{ if .Values.grpcHostname }} + - description: grpc endpoint + url: {{ .Values.grpcHostname }} + {{ end }} + +{{ if .Values.grpcHostname }} +grpc: + hostname: {{ .Values.grpcHostname }} +{{ end }} {{ if .OIDC }} oidc: diff --git a/temporal/plural/recipes/temporal-aws.yaml b/temporal/plural/recipes/temporal-aws.yaml index 588a5cf2e..6463923bd 100644 --- a/temporal/plural/recipes/temporal-aws.yaml +++ b/temporal/plural/recipes/temporal-aws.yaml @@ -19,6 +19,9 @@ sections: - name: hostname documentation: the fqdn for the temporal admin console type: DOMAIN + - name: grpcHostname + documentation: fqdn for temporals grpc service (this will be used for temporal clients) + type: DOMAIN items: - type: TERRAFORM name: aws diff --git a/temporal/plural/recipes/temporal-azure.yaml b/temporal/plural/recipes/temporal-azure.yaml index de9536e7c..9105ab91f 100644 --- a/temporal/plural/recipes/temporal-azure.yaml +++ b/temporal/plural/recipes/temporal-azure.yaml @@ -19,6 +19,9 @@ sections: - name: hostname documentation: the fqdn for the temporal admin console type: DOMAIN + - name: grpcHostname + documentation: fqdn for temporals grpc service (this will be used for temporal clients) + type: DOMAIN items: - type: TERRAFORM name: azure diff --git a/temporal/plural/recipes/temporal-gcp.yaml b/temporal/plural/recipes/temporal-gcp.yaml index 2780d0577..98b7f8f7d 100644 --- a/temporal/plural/recipes/temporal-gcp.yaml +++ b/temporal/plural/recipes/temporal-gcp.yaml @@ -19,6 +19,9 @@ sections: - name: hostname documentation: the fqdn for the temporal admin console type: DOMAIN + - name: grpcHostname + documentation: fqdn for temporals grpc service (this will be used for temporal clients) + type: DOMAIN items: - type: TERRAFORM name: gcp