Skip to content

Commit d0b7ffc

Browse files
Andrew Farriesroboquat
Andrew Farries
authored andcommitted
Add HTTP port to public api config
1 parent 72ed327 commit d0b7ffc

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

install/installer/pkg/components/public-api-server/configmap.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2828
GRPC: &baseserver.ServerConfiguration{
2929
Address: fmt.Sprintf(":%d", GRPCContainerPort),
3030
},
31+
HTTP: &baseserver.ServerConfiguration{
32+
Address: fmt.Sprintf(":%d", HTTPContainerPort),
33+
},
3134
},
3235
},
3336
}

install/installer/pkg/components/public-api-server/configmap_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ func TestConfigMap(t *testing.T) {
2929
GRPC: &baseserver.ServerConfiguration{
3030
Address: fmt.Sprintf(":%d", GRPCContainerPort),
3131
},
32+
HTTP: &baseserver.ServerConfiguration{
33+
Address: fmt.Sprintf(":%d", HTTPContainerPort),
34+
},
3235
},
3336
},
3437
}

install/installer/pkg/components/public-api-server/constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ const (
1010
GRPCPortName = "grpc"
1111
GRPCContainerPort = 9001
1212
GRPCServicePort = 9001
13+
HTTPContainerPort = 9002
14+
HTTPServicePort = 9002
15+
HTTPPortName = "http"
1316
)

install/installer/pkg/components/public-api-server/service.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ import (
99
)
1010

1111
func service(ctx *common.RenderContext) ([]runtime.Object, error) {
12-
return common.GenerateService(Component, []common.ServicePort{
12+
servicePorts := []common.ServicePort{
1313
{
1414
Name: GRPCPortName,
1515
ContainerPort: GRPCContainerPort,
1616
ServicePort: GRPCServicePort,
1717
},
18-
})(ctx)
18+
{
19+
Name: HTTPPortName,
20+
ContainerPort: HTTPContainerPort,
21+
ServicePort: HTTPServicePort,
22+
},
23+
}
24+
25+
return common.GenerateService(Component, servicePorts)(ctx)
1926
}

0 commit comments

Comments
 (0)