Path: blob/main/install/installer/pkg/components/ide-proxy/service.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.34package ide_proxy56import (7"github.com/gitpod-io/gitpod/installer/pkg/common"89corev1 "k8s.io/api/core/v1"10"k8s.io/apimachinery/pkg/runtime"11)1213func service(ctx *common.RenderContext) ([]runtime.Object, error) {14var annotations map[string]string1516if ctx.Config.Components != nil && ctx.Config.Components.IDE != nil && ctx.Config.Components.IDE.Proxy != nil {17annotations = ctx.Config.Components.IDE.Proxy.ServiceAnnotations18}1920ports := []common.ServicePort{21{22Name: PortName,23ContainerPort: ContainerPort,24ServicePort: ServicePort,25},26}2728return common.GenerateService(Component, ports, func(service *corev1.Service) {29for k, v := range annotations {30service.Annotations[k] = v31}32})(ctx)33}343536