Add label platform/application to pods
Add support to 'app.starlingx.io/component' to be overwritten by user override, with possible values being 'platform' and 'application'. With 'platform' being the default value. This change will also restart the pods if the label changes. Test Plan: PASS: upload/apply/remove/delete/update ptp-notification. PASS: Install ptp-notification and check if pods have the label 'app.starlingx.io/component' with the value 'platform'. PASS: Change the value of the labels.isApplication to true using "system helm-override-update" and check, if after re-applying the app, the label 'app.starlingx.component' changes to application' in the pods. PASS: Use 'system application-apply ptp-notification' when there is a change to be applied to 'app.starlingx.component' and verify if the pod is restarted. PASS: If "labels.isApplication" is updated with a value other than true or false, the label on the pods "app.starlingx.io/component" will not change. Story: 2010612 Task: 49132 Change-Id: I2f8586cbb7ceac75892af41b7120db6c189cdafa Signed-off-by: David Barbosa Bastos <david.barbosabastos@windriver.com>
This commit is contained in:
parent
adfae0d2a8
commit
b7b3207afa
@ -24,6 +24,10 @@ spec:
|
||||
labels:
|
||||
app: {{ include "notification.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
app.starlingx.io/component: {{ ternary "application" "platform" .Values.labels.isApplication}}
|
||||
annotations: {
|
||||
configchecksum: {{ toYaml .Values.labels | sha256sum | trunc 63 }}
|
||||
}
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.ptptracking.imagePullSecrets}}
|
||||
|
@ -20,6 +20,10 @@ spec:
|
||||
metadata:
|
||||
labels:
|
||||
app: rabbitmq
|
||||
app.starlingx.io/component: {{ ternary "application" "platform" .Values.labels.isApplication}}
|
||||
annotations: {
|
||||
configchecksum: {{ toYaml .Values.labels | sha256sum | trunc 63 }}
|
||||
}
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.registration.imagePullSecrets }}
|
||||
|
@ -19,6 +19,9 @@ fullnameOverride: ""
|
||||
global:
|
||||
namespace: notification
|
||||
|
||||
labels:
|
||||
isApplication: false
|
||||
|
||||
registration:
|
||||
imagePullSecrets: default-registry-key
|
||||
image:
|
||||
|
Loading…
x
Reference in New Issue
Block a user