feat: add templates

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-02-03 19:13:55 +01:00
parent 94244cf937
commit a4092639d1
4 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{% set_global cluster_vars = filter_by_prefix(prefix=["clusters", cluster]) %}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
commonLabels:
app: "{{ service }}"
cluster: "{{ cluster }}"
namespace: "{{ cluster_vars.namespace }}"
replicas:
- name: "{{ service }}"
count: {{ cluster_vars.replicas }}
images:
- name: "deployment"
newName: "{{ service }}"
newTag: "{{ image_tag }}"