Skip to content

Commit 851e957

Browse files
author
Andrew Farries
committed
Make installer write content-service URL
Populate the usage component's config file with the URL of the in-cluster content-service.
1 parent 6ebc917 commit 851e957

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

install/installer/pkg/components/usage/configmap.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/gitpod-io/gitpod/usage/pkg/server"
1212

1313
"github.com/gitpod-io/gitpod/installer/pkg/common"
14+
"github.com/gitpod-io/gitpod/installer/pkg/components/content-service"
1415
"github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"
1516
corev1 "k8s.io/api/core/v1"
1617
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -20,6 +21,7 @@ import (
2021
func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2122
cfg := server.Config{
2223
ControllerSchedule: time.Hour.String(),
24+
ContentServiceUrl: fmt.Sprintf("%s:%d", content_service.Component, content_service.RPCPort),
2325
Server: &baseserver.Configuration{
2426
Services: baseserver.ServicesConfiguration{
2527
GRPC: &baseserver.ServerConfiguration{

install/installer/pkg/components/usage/configmap_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func TestConfigMap_ContainsSchedule(t *testing.T) {
2323
require.JSONEq(t,
2424
`{
2525
"controllerSchedule": "2m",
26+
"contentServiceUrl": "content-service:8080",
2627
"stripeCredentialsFile": "stripe-secret/apikeys",
2728
"server": {
2829
"services": {

0 commit comments

Comments
 (0)