feat: add cuddle plan
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
f27d538b38
commit
166b5d6f53
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ vars.cuddle_vars.service }}-config
|
||||
data:
|
||||
{%- if (vars.cluster_vars.env | items | length) > 0 %}
|
||||
environment:
|
||||
{%- for (name, value) in vars.cluster_vars.env | dictsort %}
|
||||
{{name | upper | replace(".", "_") | replace("-", "_") }}: {{value}}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
@ -0,0 +1,41 @@
|
||||
{%- set service_name = vars.cuddle_vars.service -%}
|
||||
{%- set cluster_name = vars.cluster_vars.name -%}
|
||||
{%- set cluster_namespace = vars.cluster_vars.namespace -%}
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ service_name }}
|
||||
cluster: {{ cluster_name }}
|
||||
name: {{ service_name }}
|
||||
namespace: {{ cluster_namespace }}
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ service_name }}
|
||||
cluster: {{ cluster_name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ service_name }}
|
||||
cluster: {{ cluster_name }}
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- serve
|
||||
command:
|
||||
- {{ service_name }}
|
||||
image: kasperhermansen/{{ service_name }}:main-1715336504
|
||||
name: {{ service_name }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{service_name}}-config
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: external-http
|
||||
- containerPort: 3001
|
||||
name: internal-http
|
||||
- containerPort: 3002
|
||||
name: internal-grpc
|
Loading…
Reference in New Issue
Block a user