From f9458d51b8c3b677e89cc95a5b2bc2012b391c19 Mon Sep 17 00:00:00 2001 From: jchialun Date: Mon, 30 Sep 2024 15:26:53 -0500 Subject: [PATCH] Add app.kubernetes.io/name label to openstack pods This commit adds recommended kubernetes name label to pods definition. This label is used by FluxCD operators to correctly look for the status of every pod. Change-Id: I866f1dfdb3ca8379682e090aca4c889d81579e5a Signed-off-by: Johnny Chia --- helm-toolkit/Chart.yaml | 2 +- .../templates/snippets/_kubernetes_metadata_labels.tpl | 3 +++ releasenotes/notes/helm-toolkit.yaml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index f849ba869..e8ccd617a 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.2.76 +version: 0.2.77 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl index 48b53fa10..5c2dedb06 100644 --- a/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl +++ b/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl @@ -40,6 +40,9 @@ return: | release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }} application: {{ $application }} component: {{ $component }} +app.kubernetes.io/name: {{ $application }} +app.kubernetes.io/component: {{ $component }} +app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }} {{- if ($envAll.Values.pod).labels }} {{- if hasKey $envAll.Values.pod.labels $component }} {{ index $envAll.Values.pod "labels" $component | toYaml }} diff --git a/releasenotes/notes/helm-toolkit.yaml b/releasenotes/notes/helm-toolkit.yaml index 2324dab5c..f2cb15f5d 100644 --- a/releasenotes/notes/helm-toolkit.yaml +++ b/releasenotes/notes/helm-toolkit.yaml @@ -83,4 +83,5 @@ helm-toolkit: - 0.2.74 Remove trailing slash in endpoinds - 0.2.75 Add daemonset_overrides_root util - 0.2.76 update tookit to support fqdn alias + - 0.2.77 Add recommended kubernetes name label to pods definition ...