cuddle-rust-service-plan/templates/clusters/service.yaml.jinja2

43 lines
942 B
Plaintext
Raw Normal View History

{%- set service_name = vars.cuddle_vars.service -%}
{%- set cluster_name = vars.cluster_vars.name -%}
{%- set cluster_namespace = vars.cluster_vars.namespace -%}
apiVersion: v1
kind: Service
metadata:
name: "{{ service_name }}"
namespace: {{ cluster_namespace }}
spec:
selector:
app: {{ service_name }}
cluster: {{ cluster_name }}
type: LoadBalancer
ports:
- name: external-http
port: 3000
targetPort: 3000
- 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
- name: internal-grpc
port: 4001
targetPort: 4001