Path: blob/main/install/installer/pkg/components/minio/helm.go
2501 views
// Copyright (c) 2021 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// Minio is used for both in-cluster deployments and as a facade for non-GCP storage providers56package minio78import (9"github.com/gitpod-io/gitpod/installer/pkg/common"10"github.com/gitpod-io/gitpod/installer/pkg/components/minio/incluster"11"github.com/gitpod-io/gitpod/installer/pkg/helm"12"k8s.io/apimachinery/pkg/api/resource"13"k8s.io/utils/pointer"14)1516var Helm = common.CompositeHelmFunc(17func(cfg *common.RenderContext) ([]string, error) {18imageRegistry := common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)1920commonHelmValues := []string{21helm.ImagePullSecrets("minio.image.pullSecrets", cfg),22helm.KeyValue("minio.image.registry", imageRegistry),23helm.ImagePullSecrets("minio.volumePermissions.image.pullSecrets", cfg),24helm.KeyValue("minio.volumePermissions.image.registry", imageRegistry),25}2627if cfg.Config.ObjectStorage.Resources != nil && cfg.Config.ObjectStorage.Resources.Requests.Memory() != nil {28memoryRequests := resource.MustParse(cfg.Config.ObjectStorage.Resources.Requests.Memory().String())29commonHelmValues = append(commonHelmValues, helm.KeyValue("minio.resources.requests.memory", memoryRequests.String()))30}3132if pointer.BoolDeref(cfg.Config.ObjectStorage.InCluster, false) {33return incluster.Helm(ServiceAPIPort, ServiceConsolePort, commonHelmValues)(cfg)34}3536return nil, nil37},38)394041