Create Kubernetes Probes for API Server[VOL-1731]
Change-Id: Ie289ffce77af284f2b8f62603f8570d80a598e50
diff --git a/internal/pkg/afrouter/arproxy.go b/internal/pkg/afrouter/arproxy.go
index 80c8611..6d1c747 100644
--- a/internal/pkg/afrouter/arproxy.go
+++ b/internal/pkg/afrouter/arproxy.go
@@ -22,6 +22,7 @@
import (
"github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v2/pkg/probe"
)
// String names for display in error messages.
@@ -33,7 +34,7 @@
}
// Create the routing proxy
-func NewArouterProxy(conf *Configuration) (*ArouterProxy, error) {
+func NewArouterProxy(conf *Configuration, p *probe.Probe) (*ArouterProxy, error) {
arProxy = &ArouterProxy{servers: make(map[string]*server)}
// Create all the servers listed in the configuration
for _, s := range conf.Servers {
@@ -53,6 +54,7 @@
arProxy.api = api
}
+ p.UpdateStatus("affinity-router-proxy", probe.ServiceStatusRunning)
return arProxy, nil
}