From b330e2cfdde8e33488c5ed16fe6fab5cfe373942 Mon Sep 17 00:00:00 2001 From: Jean-Marc Andre Date: Wed, 22 Feb 2023 14:54:26 +0100 Subject: [PATCH] documentation --- controllers/backupconfiguration_controller_helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/backupconfiguration_controller_helpers.go b/controllers/backupconfiguration_controller_helpers.go index c40bed7..701d6c0 100644 --- a/controllers/backupconfiguration_controller_helpers.go +++ b/controllers/backupconfiguration_controller_helpers.go @@ -334,6 +334,7 @@ func (r *BackupConfigurationReconciler) addOnlineSidecar(backupConf formolv1alph return } +// Delete the sidecar role is there is no more sidecar container in the namespace func (r *BackupConfigurationReconciler) deleteRBACSidecar(namespace string) error { podList := corev1.PodList{} if err := r.List(r.Context, &podList, &client.ListOptions{ @@ -366,6 +367,8 @@ func (r *BackupConfigurationReconciler) deleteRBACSidecar(namespace string) erro return nil } +// Creates a role to allow the BackupSession controller in the sidecar to have access to resources +// like Repo, Functions, ... func (r *BackupConfigurationReconciler) createRBACSidecar(sa corev1.ServiceAccount) error { if sa.Name == "" { sa.Name = "default"