mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
pkg/client/monitoring/v1alpha1: add Paused
field to status
This commit is contained in:
parent
1ce2c8e97b
commit
1e7e0e82bf
2 changed files with 5 additions and 1 deletions
pkg
|
@ -54,6 +54,10 @@ type PrometheusSpec struct {
|
|||
}
|
||||
|
||||
type PrometheusStatus struct {
|
||||
// Represents whether any actions on the underlaying managed objects are
|
||||
// being performed. Only delete actions will be performed.
|
||||
Paused bool `json:"paused"`
|
||||
|
||||
// Total number of non-terminated pods targeted by this Prometheus deployment
|
||||
// (their labels match the selector).
|
||||
Replicas int32 `json:"replicas"`
|
||||
|
|
|
@ -491,7 +491,7 @@ func (c *Operator) syncVersion(key string, p *v1alpha1.Prometheus) error {
|
|||
}
|
||||
|
||||
func PrometheusStatus(kclient *kubernetes.Clientset, p *v1alpha1.Prometheus) (*v1alpha1.PrometheusStatus, []*v1.Pod, error) {
|
||||
res := &v1alpha1.PrometheusStatus{}
|
||||
res := &v1alpha1.PrometheusStatus{Paused: p.Spec.Paused}
|
||||
|
||||
pods, err := kclient.Core().Pods(p.Namespace).List(ListOptions(p.Name))
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue