feat: add actual grpc service
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-05-29 23:04:52 +02:00
parent dfc4a4d0b6
commit e5db5d8a0f
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
3 changed files with 13 additions and 13 deletions

View File

@ -37,6 +37,14 @@ impl Ingress {
<% if connection_type is defined %><<connection_type>>.<% endif %>{{ host_name }}.{{ environment }}.<< base_host >>
<%- endmacro %>
<%- macro k8s_service() -%>
<%- if connection_type == "grpc" -%>
{{ service_name }}-grpc
<%- else -%>
{{ service_name }}
<%- endif -%>
<%- endmacro %>
---
apiVersion: networking.k8s.io/v1
kind: Ingress
@ -45,10 +53,6 @@ metadata:
cert-manager.io/issuer: << issuer >>
traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.tls: "true"
<%- if connection_type == "grpc" %>
traefik.ingress.kubernetes.io/service.serversscheme: h2c
traefik.ingress.kubernetes.io/service.server.scheme: h2c
<%- endif %>
labels:
app: {{ service_name }}
cluster: {{ vars.cluster_vars.name }}
@ -61,7 +65,7 @@ spec:
paths:
- backend:
service:
name: {{ service_name }}
name: << k8s_service() >>
port:
name: << name >>
path: /

View File

@ -68,7 +68,6 @@ metadata:
cert-manager.io/issuer: kjuulh-app
traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/service.serversscheme: h2c
labels:
app: service
cluster: dev
@ -81,7 +80,7 @@ spec:
paths:
- backend:
service:
name: service
name: service-grpc
port:
name: external-grpc
path: /
@ -99,7 +98,6 @@ metadata:
cert-manager.io/issuer: kjuulh-app
traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/service.serversscheme: h2c
labels:
app: service
cluster: dev
@ -112,7 +110,7 @@ spec:
paths:
- backend:
service:
name: service
name: service-grpc
port:
name: internal-grpc
path: /

View File

@ -68,7 +68,6 @@ metadata:
cert-manager.io/issuer: kjuulh-app
traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/service.serversscheme: h2c
labels:
app: service
cluster: prod
@ -81,7 +80,7 @@ spec:
paths:
- backend:
service:
name: service
name: service-grpc
port:
name: external-grpc
path: /
@ -99,7 +98,6 @@ metadata:
cert-manager.io/issuer: kjuulh-app
traefik.ingress.kubernetes.io/router.entrypoints: web
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/service.serversscheme: h2c
labels:
app: service
cluster: prod
@ -112,7 +110,7 @@ spec:
paths:
- backend:
service:
name: service
name: service-grpc
port:
name: internal-grpc
path: /