From 3baff7fe7c71bfb72acfbb7f503f63285c4292d8 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Wed, 29 May 2024 23:01:03 +0200 Subject: [PATCH] feat: add grpc service Signed-off-by: kjuulh --- templates/clusters/service.yaml.jinja2 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/templates/clusters/service.yaml.jinja2 b/templates/clusters/service.yaml.jinja2 index 7b11433..ef77acb 100644 --- a/templates/clusters/service.yaml.jinja2 +++ b/templates/clusters/service.yaml.jinja2 @@ -7,8 +7,6 @@ kind: Service metadata: name: "{{ service_name }}" namespace: {{ cluster_namespace }} - annotations: - traefik.ingress.kubernetes.io/service.serversscheme: h2c spec: selector: app: {{ service_name }} @@ -21,6 +19,20 @@ spec: - name: internal-http port: 3001 targetPort: 3001 +--- +apiVersion: v1 +kind: Service +metadata: + name: "{{ service_name }}-grpc" + namespace: {{ cluster_namespace }} + annotations: + traefik.ingress.kubernetes.io/service.serversscheme: h2c +spec: + selector: + app: {{ service_name }} + cluster: {{ cluster_name }} + type: LoadBalancer + ports: - name: external-grpc port: 4000 targetPort: 4000