Skip to content

Commit c831a80

Browse files
author
Andrew Farries
committed
Rename ContentServiceUrl to ContentServiceAddress
1 parent bd94596 commit c831a80

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

components/usage/pkg/server/server.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type Config struct {
2929

3030
StripeCredentialsFile string `json:"stripeCredentialsFile,omitempty"`
3131

32-
ContentServiceUrl string `json:"contentServiceUrl,omitempty"`
32+
ContentServiceAddress string `json:"contentServiceAddress,omitempty"`
3333

3434
Server *baseserver.Configuration `json:"server,omitempty"`
3535
}
@@ -74,8 +74,8 @@ func Start(cfg Config) error {
7474
}
7575

7676
var contentService contentservice.Interface = &contentservice.NoOpClient{}
77-
if cfg.ContentServiceUrl != "" {
78-
contentService = contentservice.New(cfg.ContentServiceUrl)
77+
if cfg.ContentServiceAddress != "" {
78+
contentService = contentservice.New(cfg.ContentServiceAddress)
7979
}
8080

8181
ctrl, err := controller.New(schedule, controller.NewUsageReconciler(conn, pricer, billingController, contentService))

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020

2121
func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2222
cfg := server.Config{
23-
ControllerSchedule: time.Hour.String(),
24-
ContentServiceUrl: fmt.Sprintf("%s:%d", content_service.Component, content_service.RPCPort),
23+
ControllerSchedule: time.Hour.String(),
24+
ContentServiceAddress: fmt.Sprintf("%s:%d", content_service.Component, content_service.RPCPort),
2525
Server: &baseserver.Configuration{
2626
Services: baseserver.ServicesConfiguration{
2727
GRPC: &baseserver.ServerConfiguration{

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestConfigMap_ContainsSchedule(t *testing.T) {
2323
require.JSONEq(t,
2424
`{
2525
"controllerSchedule": "2m",
26-
"contentServiceUrl": "content-service:8080",
26+
"contentServiceAddress": "content-service:8080",
2727
"stripeCredentialsFile": "stripe-secret/apikeys",
2828
"server": {
2929
"services": {

0 commit comments

Comments
 (0)