From a27a686e012d87a2ffc3d9c386bce9e8cc0f42ac Mon Sep 17 00:00:00 2001 From: Jean-Marc Andre Date: Wed, 3 Feb 2021 22:12:38 +0100 Subject: [PATCH] Push the deployment name as a sidecar container env var to avoid all the operations on the cache --- controllers/backupconfiguration_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/backupconfiguration_controller.go b/controllers/backupconfiguration_controller.go index 719c563..b1585e8 100644 --- a/controllers/backupconfiguration_controller.go +++ b/controllers/backupconfiguration_controller.go @@ -159,6 +159,10 @@ func (r *BackupConfigurationReconciler) addSidecarContainer(backupConf *formolv1 }, }, }, + corev1.EnvVar{ + Name: "POD_DEPLOYMENT", + Value: target.Name, + }, }, VolumeMounts: []corev1.VolumeMount{}, }