Helm 3 - Fix Additional Job Labels
If labels are not specified on a Job, kubernetes defaults them to include the labels of their underlying Pod template. Helm 3 injects metadata into all resources [0] including a `app.kubernetes.io/managed-by: Helm` label. Thus when kubernetes sees a Job's labels they are no longer empty and thus do not get defaulted to the underlying Pod template's labels. This is a problem since Job labels are depended on by - Armada pre-upgrade delete hooks - Armada wait logic configurations - kubernetes-entrypoint dependencies Thus, for Job templates previously missed, this adds labels matching the underlying Pod template to retain the same labels that were present with Helm 2. [0]: https://github.com/helm/helm/pull/7649 Change-Id: Ie438b449a3d9853d786215d40a39c32d164e9950
This commit is contained in:
parent
1e651dc3c3
commit
7803000a54
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Glance
|
||||
name: glance
|
||||
version: 0.2.8
|
||||
version: 0.2.9
|
||||
home: https://docs.openstack.org/glance/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png
|
||||
sources:
|
||||
|
@ -49,6 +49,8 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ print "glance-clean" }}
|
||||
labels:
|
||||
{{ tuple $envAll "glance" "clean" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
|
@ -50,6 +50,8 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: glance-storage-init
|
||||
labels:
|
||||
{{ tuple $envAll "glance" "storage-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.helm3_hook }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
|
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Keystone
|
||||
name: keystone
|
||||
version: 0.2.12
|
||||
version: 0.2.13
|
||||
home: https://docs.openstack.org/keystone/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Keystone/OpenStack_Project_Keystone_vertical.png
|
||||
sources:
|
||||
|
@ -54,6 +54,8 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: keystone-fernet-setup
|
||||
labels:
|
||||
{{ tuple $envAll "keystone" "fernet-setup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
{{- if .Values.helm3_hook }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
|
@ -18,4 +18,5 @@ glance:
|
||||
- 0.2.6 Add Victoria and Wallaby releases support
|
||||
- 0.2.7 Added helm.sh/hook for the jobs
|
||||
- 0.2.8 Helm 3 - Fix Job Labels
|
||||
- 0.2.9 Helm 3 - Fix More Job Labels
|
||||
...
|
||||
|
@ -28,4 +28,5 @@ keystone:
|
||||
- 0.2.10 Make internal TLS more robust
|
||||
- 0.2.11 Add missing slash
|
||||
- 0.2.12 Helm 3 - Fix Job Labels
|
||||
- 0.2.13 Helm 3 - Fix more Job Labels
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user