1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

pkg/client/monitoring/v1alpha1: use pointer for status

This commit is contained in:
Frederic Branczyk 2017-01-09 12:17:36 +01:00
parent 924ef59119
commit 1ce2c8e97b
No known key found for this signature in database
GPG key ID: CA14788B1E48B256
2 changed files with 3 additions and 4 deletions
pkg
api
client/monitoring/v1alpha1

View file

@ -104,11 +104,10 @@ func (api *API) prometheusStatus(w http.ResponseWriter, req *http.Request) {
return
}
status, _, err := prometheus.PrometheusStatus(api.kclient, p)
p.Status, _, err = prometheus.PrometheusStatus(api.kclient, p)
if err != nil {
api.logger.Log("error", err)
}
p.Status = *status
b, err := json.Marshal(p)
if err != nil {

View file

@ -24,8 +24,8 @@ import (
type Prometheus struct {
metav1.TypeMeta `json:",inline"`
v1.ObjectMeta `json:"metadata,omitempty"`
Spec PrometheusSpec `json:"spec"`
Status PrometheusStatus `json:"status,omitempty"`
Spec PrometheusSpec `json:"spec"`
Status *PrometheusStatus `json:"status,omitempty"`
}
// PrometheusList is a list of Prometheuses.