From b3dec4792aed4dbd1cda5aa910b6af6036b2375c Mon Sep 17 00:00:00 2001 From: Martin Schuhmacher <55735359+MartinSchuhmacher@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:11:15 +0100 Subject: [PATCH] BC-5405 - Metadata on k8s ressources (#5) * add specific labels to deployments, cronjobs and pods --- .github/workflows/push.yml | 2 +- .../templates/deployment.yml.j2 | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7051da7..3709f1e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -65,7 +65,7 @@ jobs: needs: - build_and_push - branch_name - uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/deploy.yml@main + uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/deploy.yml@main with: branch: ${{ needs.branch_name.outputs.branch }} secrets: diff --git a/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 b/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 index 7850ad8..3f3244b 100644 --- a/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 +++ b/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 @@ -5,6 +5,13 @@ metadata: namespace: {{ NAMESPACE }} labels: app: h5p-staticfiles-server + app.kubernetes.io/part-of: schulcloud-verbund + app.kubernetes.io/version: {{ H5P_STATICFILES_SERVER_IMAGE_TAG }} + app.kubernetes.io/name: h5p-staticfiles-server + app.kubernetes.io/component: h5p + app.kubernetes.io/managed-by: ansible + git.branch: {{ H5P_STATICFILES_SERVER_BRANCH_NAME }} + git.repo: {{ H5P_STATICFILES_SERVER_REPO_NAME }} spec: replicas: {{ H5P_STATICFILES_SERVER_REPLICAS|default("1", true) }} selector: @@ -14,6 +21,13 @@ spec: metadata: labels: app: h5p-staticfiles-server + app.kubernetes.io/part-of: schulcloud-verbund + app.kubernetes.io/version: {{ H5P_STATICFILES_SERVER_IMAGE_TAG }} + app.kubernetes.io/name: h5p-staticfiles-server + app.kubernetes.io/component: h5p + app.kubernetes.io/managed-by: ansible + git.branch: {{ H5P_STATICFILES_SERVER_BRANCH_NAME }} + git.repo: {{ H5P_STATICFILES_SERVER_REPO_NAME }} spec: securityContext: runAsUser: 101 @@ -64,4 +78,3 @@ spec: requests: cpu: {{ H5P_STATICFIILES_SERVER_CPU_REQUESTS|default("100m", true) }} memory: {{ H5P_STATICFIILES_SERVER_MEMORY_REQUESTS|default("128Mi", true) }} -