Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
dfc4a4d0b6
commit
e5db5d8a0f
@ -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: /
|
||||
|
@ -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: /
|
||||
|
@ -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: /
|
||||
|
Loading…
Reference in New Issue
Block a user