k8s-deployment/common/templates.yaml

107 lines
3.2 KiB
YAML
Raw Normal View History

2024-07-13 20:21:59 +00:00
templates:
# ---------------------------
# -- Hooks
# ---------------------------
crd-management-hook:
hooks:
- events: ["preapply"]
showlogs: true
command: "sh"
args:
- -c
- |
2024-09-11 21:19:35 +00:00
helm show crds {{ `{{ .Release.Chart }}` }} --version {{ `{{ .Release.Version }}` }} | kubectl replace -f - \
|| helm show crds {{ `{{ .Release.Chart }}` }} --version {{ `{{ .Release.Version }}` }} | kubectl create -f - \
2024-07-13 20:21:59 +00:00
|| true
- events: ["prepare"]
showlogs: true
command: "sh"
args:
- -c
2024-09-11 21:19:35 +00:00
- "helm show crds {{ `{{ .Release.Chart }}` }} --version {{ `{{ .Release.Version }}` }} | kubectl diff -f - || true"
2024-07-13 20:21:59 +00:00
- events: ["postuninstall"]
showlogs: true
command: "sh"
args:
- -c
2024-09-11 21:19:35 +00:00
- "helm show crds {{ `{{ .Release.Chart }}` }} --version {{ `{{ .Release.Version }}` }} | kubectl delete -f - || true"
2024-07-13 20:21:59 +00:00
# ----------------------------
# -- Configs
# ----------------------------
default-common-values:
values:
2024-09-11 21:19:35 +00:00
- '{{ requiredEnv "PWD" }}/values/common/values.{{ `{{ .Release.Name }}` }}.yaml'
2024-07-13 20:21:59 +00:00
default-env-values:
values:
2024-09-11 21:19:35 +00:00
- '{{ requiredEnv "PWD" }}/values/{{ .Environment.Name }}/values.{{ `{{ .Release.Name }}` }}.yaml'
2024-07-13 20:21:59 +00:00
default-env-secrets:
secrets:
2024-09-11 21:19:35 +00:00
- '{{ requiredEnv "PWD" }}/values/{{ .Environment.Name }}/secrets.{{ `{{ .Release.Name }}` }}.yaml'
2024-07-13 20:21:59 +00:00
# ----------------------------
# -- Extensions
# ----------------------------
ext-istio-gateway:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: istio-gateway
values:
- '{{ requiredEnv "PWD" }}/values/common/values.istio-gateway.yaml'
ext-tcp-routes:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: traefik
values:
- '{{ requiredEnv "PWD" }}/values/common/values.tcp-route.yaml'
ext-istio-resource:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: istio
values:
- '{{ requiredEnv "PWD" }}/values/common/values.istio.yaml'
ext-certificate:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: certificate
values:
- '{{ requiredEnv "PWD" }}/values/common/values.certificate.yaml'
ext-metallb:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: metallb
values:
- '{{ requiredEnv "PWD" }}/values/common/values.metallb.yaml'
service-monitor:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: service-monitor
values:
- '{{ requiredEnv "PWD" }}/values/common/values.service-monitor.yaml'
namespace:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: ns
inherit:
- template: default-values/common-values
- template: default-env-values
ext-database:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: ext-database
values:
- '{{ requiredEnv "PWD" }}/values/common/values.database.yaml'
ext-secret:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: ext-secret
values:
- '{{ requiredEnv "PWD" }}/values/common/values.secret.yaml'