Skip to content

Commit ea5fbd8

Browse files
committed
STAC-23466 Proper check for global backup enabled
1 parent f2a42a6 commit ea5fbd8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/foundation/config/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (c *Config) StorageEnabled() bool {
3838
if c.IsLegacyMode() {
3939
return c.Minio.Enabled
4040
}
41-
return c.Storage.Service.Name != ""
41+
return c.Storage.GlobalBackupEnabled
4242
}
4343

4444
// GetStorageService returns the service config for the S3-compatible storage,
@@ -128,9 +128,10 @@ type MinioConfig struct {
128128

129129
// StorageConfig holds S3-compatible storage configuration (new mode, replaces Minio)
130130
type StorageConfig struct {
131-
Service ServiceConfig `yaml:"service" validate:"omitempty"`
132-
AccessKey string `yaml:"accessKey"` // From secret
133-
SecretKey string `yaml:"secretKey"` // From secret
131+
GlobalBackupEnabled bool `yaml:"globalBackupEnabled" validate:"boolean"`
132+
Service ServiceConfig `yaml:"service" validate:"omitempty"`
133+
AccessKey string `yaml:"accessKey"` // From secret
134+
SecretKey string `yaml:"secretKey"` // From secret
134135
}
135136

136137
// StackgraphConfig holds Stackgraph backup-specific configuration

0 commit comments

Comments
 (0)