From 0806a86ed86e8c2b576617be4427c5b907e63cc9 Mon Sep 17 00:00:00 2001 From: Martin Schuhmacher <55735359+MartinSchuhmacher@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:10:10 +0100 Subject: [PATCH] BC-5405 - Metadata on k8s ressources (#150) * add specific labels to deployments, cronjobs and pods --- .../templates/deployment.yml.j2 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ansible/roles/schulcloud-calendar-core/templates/deployment.yml.j2 b/ansible/roles/schulcloud-calendar-core/templates/deployment.yml.j2 index 7a2063c..a24115b 100644 --- a/ansible/roles/schulcloud-calendar-core/templates/deployment.yml.j2 +++ b/ansible/roles/schulcloud-calendar-core/templates/deployment.yml.j2 @@ -5,6 +5,13 @@ metadata: namespace: {{ NAMESPACE }} labels: app: calendar + app.kubernetes.io/part-of: schulcloud-verbund + app.kubernetes.io/version: {{ SCHULCLOUD_CALENDAR_IMAGE_TAG }} + app.kubernetes.io/name: calendar + app.kubernetes.io/component: calendar + app.kubernetes.io/managed-by: ansible + git.branch: {{ SCHULCLOUD_CALENDAR_BRANCH_NAME }} + git.repo: {{ SCHULCLOUD_CALENDAR_REPO_NAME }} spec: replicas: {{ CALENDAR_REPLICAS|default("1", true) }} selector: @@ -14,6 +21,13 @@ spec: metadata: labels: app: calendar + app.kubernetes.io/part-of: schulcloud-verbund + app.kubernetes.io/version: {{ SCHULCLOUD_CALENDAR_IMAGE_TAG }} + app.kubernetes.io/name: calendar + app.kubernetes.io/component: calendar + app.kubernetes.io/managed-by: ansible + git.branch: {{ SCHULCLOUD_CALENDAR_BRANCH_NAME }} + git.repo: {{ SCHULCLOUD_CALENDAR_REPO_NAME }} spec: securityContext: #readOnlyRootFilesystem: true @@ -67,4 +81,3 @@ spec: requests: cpu: {{ CALENDAR_CPU_REQUESTS|default("100m", true) }} memory: {{ CALENDAR_MEMORY_REQUESTS|default("128Mi", true) }} -