mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-07-09 19:22:21 +02:00
Compare commits
2 Commits
d6f2dc9e69
...
dcc8ab8f51
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dcc8ab8f51 | ||
|
|
287750e854 |
@ -90,12 +90,17 @@ func (c *CatalogMaintenanceRunnable) cycle(ctx context.Context) (time.Duration,
|
||||
return 0, err
|
||||
}
|
||||
|
||||
enabledPlugins := cnpgv1.GetPluginConfigurationEnabledPluginNames(cluster.Spec.Plugins)
|
||||
enabledForBackups := slices.Contains(enabledPlugins, metadata.PluginName)
|
||||
enabledForBackups := false
|
||||
for _, plugin := range cluster.Spec.Plugins {
|
||||
if plugin.Name == metadata.PluginName && plugin.IsEnabled() {
|
||||
enabledForBackups = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !enabledForBackups {
|
||||
contextLogger.Debug("Skipping maintenance cycle." +
|
||||
" Plugin is not enabled for backups")
|
||||
contextLogger.Debug("Skipping retention policy" +
|
||||
" because the plugin is not enabled for backups")
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user