Skip to content

Commit 0bf2f98

Browse files
change ServiceMonitor.Scheme from *string to *prometheusTypes.Scheme
1 parent 42ec26f commit 0bf2f98

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/converter/converter.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,12 @@ func createServiceMonitorEndpoint(name string, servicePorts []core.ServicePort,
580580
}
581581

582582
func createEndpointConf(config *ir.ServiceMonitorConfig, servicePorts []core.ServicePort) prometheusTypes.Endpoint {
583+
scheme := prometheusTypes.Scheme("http")
583584
endpoint := prometheusTypes.Endpoint{
584585
Interval: "30s",
585586
Port: servicePorts[0].Name,
586587
Path: "/actuator/metrics",
587-
Scheme: "http",
588+
Scheme: &scheme,
588589
}
589590
if config.Interval != nil {
590591
endpoint.Interval = prometheusTypes.Duration(*config.Interval)
@@ -593,7 +594,8 @@ func createEndpointConf(config *ir.ServiceMonitorConfig, servicePorts []core.Ser
593594
endpoint.Path = *config.Path
594595
}
595596
if config.Scheme != nil {
596-
endpoint.Scheme = *config.Scheme
597+
scheme := prometheusTypes.Scheme(*config.Scheme)
598+
endpoint.Scheme = &scheme
597599
}
598600
if config.EndpointName != nil {
599601
found := false

0 commit comments

Comments
 (0)