Skip to content

Commit 6972cd5

Browse files
vulkoingimroboquat
authored andcommitted
Fix objectStorage.Resources.Requests required even when empty
1 parent 0899f4d commit 6972cd5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

install/installer/pkg/components/minio/helm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var Helm = common.CompositeHelmFunc(
2626
helm.KeyValue("minio.volumePermissions.image.repository", cfg.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/bitnami-shell")),
2727
}
2828

29-
if cfg.Config.ObjectStorage.Resources.Requests.Memory() != nil {
29+
if cfg.Config.ObjectStorage.Resources != nil && cfg.Config.ObjectStorage.Resources.Requests.Memory() != nil {
3030
memoryRequests := resource.MustParse(cfg.Config.ObjectStorage.Resources.Requests.Memory().String())
3131
commonHelmValues = append(commonHelmValues, helm.KeyValue("minio.resources.requests.memory", memoryRequests.String()))
3232
}

install/installer/pkg/config/v1/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ func (v version) Defaults(in interface{}) error {
4949
cfg.Metadata.Region = "local"
5050
cfg.Metadata.InstallationShortname = "default" // TODO(gpl): we're tied to "default" here because that's what we put into static bridges in the past
5151
cfg.ObjectStorage.InCluster = pointer.Bool(true)
52-
cfg.ObjectStorage.Resources.Requests = corev1.ResourceList{
53-
corev1.ResourceMemory: resource.MustParse("2Gi"),
52+
cfg.ObjectStorage.Resources = &Resources{
53+
Requests: corev1.ResourceList{
54+
corev1.ResourceMemory: resource.MustParse("2Gi"),
55+
},
5456
}
5557
cfg.ContainerRegistry.InCluster = pointer.Bool(true)
5658
cfg.Workspace.Resources.Requests = corev1.ResourceList{
@@ -155,7 +157,7 @@ type ObjectStorage struct {
155157
Azure *ObjectStorageAzure `json:"azure,omitempty"`
156158
MaximumBackupCount *int `json:"maximumBackupCount,omitempty"`
157159
BlobQuota *int64 `json:"blobQuota,omitempty"`
158-
Resources Resources `json:"resources,omitempty"`
160+
Resources *Resources `json:"resources,omitempty"`
159161
}
160162

161163
type ObjectStorageS3 struct {

0 commit comments

Comments
 (0)