integr8ly / application-monitoring-operator

Operator for installing the Application Monitoring Stack on OpenShift (Prometheus, AlertManager, Grafana)
Apache License 2.0
30 stars 44 forks source link

set externalRoute for prometheus and alertmanager #25

Closed pb82 closed 5 years ago

pb82 commented 5 years ago

We need to set the externalUrl properties of the Prometheus and AlertManager CRs. Otherwise the URL that is sent along with the alert will be wrong. This PR retrieves the host from the routes after they are created and assignes them to the CRs.

Verification steps:

aidenkeating commented 5 years ago

👀

aidenkeating commented 5 years ago

@pb82 Tried running this, seeing the following:

$GOPATH/src/github.com/integr8ly/application-monitoring-operator/pkg/controller/applicationmonitoring/applicationmonitoring_controller.go:280
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/pkg/controller/applicationmonitoring/applicationmonitoring_controller.go:166
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/pkg/controller/applicationmonitoring/applicationmonitoring_controller.go:126
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:207
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
$GOPATH/src/github.com/integr8ly/application-monitoring-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/asm_amd64.s:2361
panic: interface conversion: interface {} is nil, not string [recovered]
    panic: interface conversion: interface {} is nil, not string

I can look into this some more

pb82 commented 5 years ago

@aidenkeating hmm strange, but i think i know what the problem is. Will update the PR.