Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion install/installer/pkg/common/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ func useMinio(context *RenderContext) bool {
func StorageConfig(context *RenderContext) storageconfig.StorageConfig {
var res *storageconfig.StorageConfig
if context.Config.ObjectStorage.CloudStorage != nil {
maximumBackupCount := 3
if context.Config.ObjectStorage.MaximumBackupCount != nil {
maximumBackupCount = *context.Config.ObjectStorage.MaximumBackupCount
}

res = &storageconfig.StorageConfig{
Kind: storageconfig.GCloudStorage,
GCloudConfig: storageconfig.GCPConfig{
Region: context.Config.Metadata.Region,
Project: context.Config.ObjectStorage.CloudStorage.Project,
CredentialsFile: filepath.Join(storageMount, "service-account.json"),
ParallelUpload: 6,
MaximumBackupCount: 3,
MaximumBackupCount: maximumBackupCount,
},
}
}
Expand Down Expand Up @@ -88,6 +93,9 @@ func StorageConfig(context *RenderContext) storageconfig.StorageConfig {
}
// 5 GiB
res.BlobQuota = 5 * 1024 * 1024 * 1024
if context.Config.ObjectStorage.BlobQuota != nil {
res.BlobQuota = *context.Config.ObjectStorage.BlobQuota
}

_ = context.WithExperimental(func(ucfg *experimental.Config) error {
if ucfg.Workspace != nil {
Expand Down
10 changes: 6 additions & 4 deletions install/installer/pkg/config/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ type DatabaseCloudSQL struct {
}

type ObjectStorage struct {
InCluster *bool `json:"inCluster,omitempty"`
S3 *ObjectStorageS3 `json:"s3,omitempty"`
CloudStorage *ObjectStorageCloudStorage `json:"cloudStorage,omitempty"`
Azure *ObjectStorageAzure `json:"azure,omitempty"`
InCluster *bool `json:"inCluster,omitempty"`
S3 *ObjectStorageS3 `json:"s3,omitempty"`
CloudStorage *ObjectStorageCloudStorage `json:"cloudStorage,omitempty"`
Azure *ObjectStorageAzure `json:"azure,omitempty"`
MaximumBackupCount *int `json:"maximumBackupCount,omitempty"`
BlobQuota *int64 `json:"blobQuota,omitempty"`
}

type ObjectStorageS3 struct {
Expand Down