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:
parent
924ef59119
commit
1ce2c8e97b
2 changed files with 3 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue