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 >>
|
<% if connection_type is defined %><<connection_type>>.<% endif %>{{ host_name }}.{{ environment }}.<< base_host >>
|
||||||
<%- endmacro %>
|
<%- endmacro %>
|
||||||
|
|
||||||
|
<%- macro k8s_service() -%>
|
||||||
|
<%- if connection_type == "grpc" -%>
|
||||||
|
{{ service_name }}-grpc
|
||||||
|
<%- else -%>
|
||||||
|
{{ service_name }}
|
||||||
|
<%- endif -%>
|
||||||
|
<%- endmacro %>
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
@ -45,10 +53,6 @@ metadata:
|
|||||||
cert-manager.io/issuer: << issuer >>
|
cert-manager.io/issuer: << issuer >>
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
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:
|
labels:
|
||||||
app: {{ service_name }}
|
app: {{ service_name }}
|
||||||
cluster: {{ vars.cluster_vars.name }}
|
cluster: {{ vars.cluster_vars.name }}
|
||||||
@ -61,7 +65,7 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: {{ service_name }}
|
name: << k8s_service() >>
|
||||||
port:
|
port:
|
||||||
name: << name >>
|
name: << name >>
|
||||||
path: /
|
path: /
|
||||||
|
@ -68,7 +68,6 @@ metadata:
|
|||||||
cert-manager.io/issuer: kjuulh-app
|
cert-manager.io/issuer: kjuulh-app
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
traefik.ingress.kubernetes.io/service.serversscheme: h2c
|
|
||||||
labels:
|
labels:
|
||||||
app: service
|
app: service
|
||||||
cluster: dev
|
cluster: dev
|
||||||
@ -81,7 +80,7 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: service
|
name: service-grpc
|
||||||
port:
|
port:
|
||||||
name: external-grpc
|
name: external-grpc
|
||||||
path: /
|
path: /
|
||||||
@ -99,7 +98,6 @@ metadata:
|
|||||||
cert-manager.io/issuer: kjuulh-app
|
cert-manager.io/issuer: kjuulh-app
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
traefik.ingress.kubernetes.io/service.serversscheme: h2c
|
|
||||||
labels:
|
labels:
|
||||||
app: service
|
app: service
|
||||||
cluster: dev
|
cluster: dev
|
||||||
@ -112,7 +110,7 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: service
|
name: service-grpc
|
||||||
port:
|
port:
|
||||||
name: internal-grpc
|
name: internal-grpc
|
||||||
path: /
|
path: /
|
||||||
|
@ -68,7 +68,6 @@ metadata:
|
|||||||
cert-manager.io/issuer: kjuulh-app
|
cert-manager.io/issuer: kjuulh-app
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
traefik.ingress.kubernetes.io/service.serversscheme: h2c
|
|
||||||
labels:
|
labels:
|
||||||
app: service
|
app: service
|
||||||
cluster: prod
|
cluster: prod
|
||||||
@ -81,7 +80,7 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: service
|
name: service-grpc
|
||||||
port:
|
port:
|
||||||
name: external-grpc
|
name: external-grpc
|
||||||
path: /
|
path: /
|
||||||
@ -99,7 +98,6 @@ metadata:
|
|||||||
cert-manager.io/issuer: kjuulh-app
|
cert-manager.io/issuer: kjuulh-app
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
traefik.ingress.kubernetes.io/service.serversscheme: h2c
|
|
||||||
labels:
|
labels:
|
||||||
app: service
|
app: service
|
||||||
cluster: prod
|
cluster: prod
|
||||||
@ -112,7 +110,7 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: service
|
name: service-grpc
|
||||||
port:
|
port:
|
||||||
name: internal-grpc
|
name: internal-grpc
|
||||||
path: /
|
path: /
|
||||||
|
Loading…
Reference in New Issue
Block a user