mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-06-01 13:50:47 +00:00
63c8f8ec58
It was observed that waiting time was cut in half after http/3 was enabled. Plus, supporting http/3 is super easy :) Close #845
151 lines
2.4 KiB
YAML
151 lines
2.4 KiB
YAML
{% if ENABLE_WEB_PROXY %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: caddy
|
|
labels:
|
|
app.kubernetes.io/name: caddy
|
|
app.kubernetes.io/component: loadbalancer
|
|
spec:
|
|
type: LoadBalancer
|
|
ports:
|
|
- port: 80
|
|
name: http
|
|
{%- if ENABLE_HTTPS %}
|
|
- port: 443
|
|
protocol: TCP
|
|
name: https
|
|
# include support for http/3
|
|
- port: 443
|
|
protocol: UDP
|
|
name: http3
|
|
{%- endif %}
|
|
selector:
|
|
app.kubernetes.io/name: caddy
|
|
{% else %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: caddy
|
|
labels:
|
|
app.kubernetes.io/name: caddy
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: {{ CADDY_HTTP_PORT }}
|
|
name: http
|
|
selector:
|
|
app.kubernetes.io/name: caddy
|
|
{% endif %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: cms
|
|
labels:
|
|
app.kubernetes.io/name: cms
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8000
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: cms
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: lms
|
|
labels:
|
|
app.kubernetes.io/name: lms
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8000
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: lms
|
|
{% if RUN_ELASTICSEARCH %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: elasticsearch
|
|
labels:
|
|
app.kubernetes.io/name: elasticsearch
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 9200
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: elasticsearch
|
|
{% endif %}
|
|
{% if RUN_MONGODB %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mongodb
|
|
labels:
|
|
app.kubernetes.io/name: mongodb
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 27017
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: mongodb
|
|
{% endif %}
|
|
{% if RUN_MYSQL %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mysql
|
|
labels:
|
|
app.kubernetes.io/name: mysql
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 3306
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: mysql
|
|
{% endif %}
|
|
{% if RUN_REDIS %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis
|
|
labels:
|
|
app.kubernetes.io/name: redis
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: {{ REDIS_PORT }}
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: redis
|
|
{% endif %}
|
|
{% if RUN_SMTP %}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: smtp
|
|
labels:
|
|
app.kubernetes.io/name: smtp
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8025
|
|
protocol: TCP
|
|
selector:
|
|
app.kubernetes.io/name: smtp
|
|
{% endif %}
|
|
{{ patch("k8s-services") }}
|