1414 ImgProxyImage string `toml:"-"`
1515 FileSizeLimit sizeInBytes `toml:"file_size_limit"`
1616 ImageTransformation * imageTransformation `toml:"image_transformation"`
17+ S3Protocol * s3Protocol `toml:"s3_protocol"`
1718 S3Credentials storageS3Credentials `toml:"-"`
1819 Buckets BucketConfig `toml:"buckets"`
1920 }
@@ -22,6 +23,10 @@ type (
2223 Enabled bool `toml:"enabled"`
2324 }
2425
26+ s3Protocol struct {
27+ Enabled bool `toml:"enabled"`
28+ }
29+
2530 storageS3Credentials struct {
2631 AccessKeyId string `toml:"-"`
2732 SecretAccessKey string `toml:"-"`
@@ -41,10 +46,7 @@ type (
4146func (s * storage ) ToUpdateStorageConfigBody () v1API.UpdateStorageConfigBody {
4247 body := v1API.UpdateStorageConfigBody {
4348 FileSizeLimit : cast .Ptr (int64 (s .FileSizeLimit )),
44- }
45- // When local config is not set, we assume platform defaults should not change
46- if s .ImageTransformation != nil {
47- body .Features = & struct {
49+ Features : & struct {
4850 IcebergCatalog * struct {
4951 Enabled bool `json:"enabled"`
5052 MaxCatalogs int `json:"maxCatalogs"`
@@ -62,9 +64,15 @@ func (s *storage) ToUpdateStorageConfigBody() v1API.UpdateStorageConfigBody {
6264 MaxBuckets int `json:"maxBuckets"`
6365 MaxIndexes int `json:"maxIndexes"`
6466 } `json:"vectorBuckets,omitempty"`
65- }{}
67+ }{},
68+ }
69+ // When local config is not set, we assume platform defaults should not change
70+ if s .ImageTransformation != nil {
6671 body .Features .ImageTransformation .Enabled = s .ImageTransformation .Enabled
6772 }
73+ if s .S3Protocol != nil {
74+ body .Features .S3Protocol .Enabled = s .S3Protocol .Enabled
75+ }
6876 return body
6977}
7078
@@ -74,14 +82,13 @@ func (s *storage) FromRemoteStorageConfig(remoteConfig v1API.StorageConfigRespon
7482 if s .ImageTransformation != nil {
7583 s .ImageTransformation .Enabled = remoteConfig .Features .ImageTransformation .Enabled
7684 }
85+ if s .S3Protocol != nil {
86+ s .S3Protocol .Enabled = remoteConfig .Features .S3Protocol .Enabled
87+ }
7788}
7889
7990func (s * storage ) DiffWithRemote (remoteConfig v1API.StorageConfigResponse ) ([]byte , error ) {
8091 copy := s .Clone ()
81- if s .ImageTransformation != nil {
82- img := * s .ImageTransformation
83- copy .ImageTransformation = & img
84- }
8592 // Convert the config values into easily comparable remoteConfig values
8693 currentValue , err := ToTomlBytes (copy )
8794 if err != nil {
0 commit comments