From 8cd21033a317272abbe7d086d586de13a5449cd4 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 36a4386..cbaf3b0 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{}, }