2024-05-27 22:50:51 +02:00
|
|
|
{%- set service_name = vars.cuddle_vars.service -%}
|
|
|
|
{%- set cluster_name = vars.cluster_vars.name -%}
|
|
|
|
{%- set cluster_namespace = vars.cluster_vars.namespace -%}
|
|
|
|
|
2024-05-26 21:31:39 +02:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2024-05-27 22:50:51 +02:00
|
|
|
name: "{{ service_name }}"
|
|
|
|
namespace: {{ cluster_namespace }}
|
2024-05-26 21:31:39 +02:00
|
|
|
spec:
|
|
|
|
selector:
|
2024-05-27 22:50:51 +02:00
|
|
|
app: {{ service_name }}
|
|
|
|
cluster: {{ cluster_name }}
|
2024-05-26 21:31:39 +02:00
|
|
|
type: LoadBalancer
|
2024-05-27 22:50:51 +02:00
|
|
|
ports:
|
|
|
|
- name: external-http
|
|
|
|
port: 3000
|
|
|
|
targetPort: 3000
|
|
|
|
- name: internal-http
|
|
|
|
port: 3001
|
|
|
|
targetPort: 3001
|
2024-05-29 23:01:03 +02:00
|
|
|
---
|
|
|
|
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:
|
2024-05-29 21:49:40 +02:00
|
|
|
- name: external-grpc
|
|
|
|
port: 4000
|
|
|
|
targetPort: 4000
|
2024-05-27 22:50:51 +02:00
|
|
|
- name: internal-grpc
|
2024-05-29 21:49:40 +02:00
|
|
|
port: 4001
|
|
|
|
targetPort: 4001
|
2024-05-27 22:50:51 +02:00
|
|
|
|