tutor/tutor/templates/kustomization.yml

60 lines
1.7 KiB
YAML

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- k8s/namespace.yml
- k8s/deployments.yml
- k8s/jobs.yml
- k8s/services.yml
- k8s/volumes.yml
{{ patch("kustomization-resources") }}
# namespace to deploy all Resources to
namespace: {{ K8S_NAMESPACE }}
# annotations added to all Resources
# https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/commonannotations/
commonAnnotations:
app.kubernetes.io/version: {{ TUTOR_VERSION }}
# labels (and label selectors) added to all Resources
# https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
# https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/commonlabels/
commonLabels:
app.kubernetes.io/instance: openedx-{{ ID }}
app.kubernetes.io/part-of: openedx
app.kubernetes.io/managed-by: tutor
{{ patch("kustomization-commonlabels")|indent(2) }}
configMapGenerator:
- name: caddy-config
files:
- apps/caddy/Caddyfile
- name: openedx-settings-lms
files:{% for file in "apps/openedx/settings/lms"|walk_templates %}
- {{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: openedx
- name: openedx-settings-cms
files:{% for file in "apps/openedx/settings/cms"|walk_templates %}
- {{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: openedx
- name: openedx-config
files:{% for file in "apps/openedx/config"|walk_templates %}
- {{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: openedx
- name: redis-config
files:
- apps/redis/redis.conf
options:
labels:
app.kubernetes.io/name: redis
{{ patch("kustomization-configmapgenerator") }}
{{ patch("kustomization") }}