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: add Paused field to status

This commit is contained in:
Frederic Branczyk 2017-01-09 13:51:00 +01:00
parent 1ce2c8e97b
commit 1e7e0e82bf
No known key found for this signature in database
GPG key ID: CA14788B1E48B256
2 changed files with 5 additions and 1 deletions
pkg
client/monitoring/v1alpha1
prometheus

View file

@ -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"`

View file

@ -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 {