Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/install/installer/pkg/components/ws-proxy/objects.go
2501 views
1
// Copyright (c) 2021 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package wsproxy
6
7
import (
8
"github.com/gitpod-io/gitpod/common-go/baseserver"
9
"github.com/gitpod-io/gitpod/installer/pkg/common"
10
"k8s.io/apimachinery/pkg/runtime"
11
)
12
13
var Objects = common.CompositeRenderFunc(
14
configmap,
15
deployment,
16
networkpolicy,
17
rolebinding,
18
role,
19
pdb,
20
func(cfg *common.RenderContext) ([]runtime.Object, error) {
21
ports := []common.ServicePort{
22
{
23
Name: HTTPProxyPortName,
24
ContainerPort: HTTPProxyTargetPort,
25
ServicePort: HTTPProxyPort,
26
},
27
{
28
Name: HTTPSProxyPortName,
29
ContainerPort: HTTPSProxyTargetPort,
30
ServicePort: HTTPSProxyPort,
31
},
32
{
33
Name: baseserver.BuiltinMetricsPortName,
34
ContainerPort: baseserver.BuiltinMetricsPort,
35
ServicePort: baseserver.BuiltinMetricsPort,
36
},
37
{
38
Name: SSHPortName,
39
ContainerPort: SSHTargetPort,
40
ServicePort: SSHServicePort,
41
},
42
}
43
return common.GenerateService(Component, ports)(cfg)
44
},
45
common.DefaultServiceAccount(Component),
46
)
47
48