mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
Add configuration for priority class to be assigned to pods
This commit is contained in:
parent
8eace0a765
commit
01f8a17d54
4 changed files with 13 additions and 3 deletions
pkg
|
@ -396,6 +396,7 @@ func makeStatefulSetSpec(a *monitoringv1.Alertmanager, config Config) (*appsv1.S
|
|||
},
|
||||
Spec: v1.PodSpec{
|
||||
NodeSelector: a.Spec.NodeSelector,
|
||||
PriorityClassName: a.Spec.PriorityClassName,
|
||||
TerminationGracePeriodSeconds: &terminationGracePeriod,
|
||||
Containers: append([]v1.Container{
|
||||
{
|
||||
|
|
|
@ -188,6 +188,8 @@ type PrometheusSpec struct {
|
|||
// This is experimental and may change significantly without backward
|
||||
// compatibility in any release.
|
||||
Thanos *ThanosSpec `json:"thanos,omitempty"`
|
||||
// Priority class assigned to the Pods
|
||||
PriorityClassName string `json:"priorityClassName,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusStatus is the most recent observed status of the Prometheus cluster. Read-only. Not
|
||||
|
@ -665,6 +667,8 @@ type AlertmanagerSpec struct {
|
|||
// Containers allows injecting additional containers. This is meant to
|
||||
// allow adding an authentication proxy to an Alertmanager pod.
|
||||
Containers []v1.Container `json:"containers,omitempty"`
|
||||
// Priority class assigned to the Pods
|
||||
PriorityClassName string `json:"priorityClassName,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerList is a list of Alertmanagers.
|
||||
|
|
|
@ -109,6 +109,8 @@ type PrometheusSpec struct {
|
|||
// EvaluationInterval string `json:"evaluationInterval"`
|
||||
// Remote RemoteSpec `json:"remote"`
|
||||
// Sharding...
|
||||
// Priority class assigned to the Pods
|
||||
PriorityClassName string `json:"priorityClassName,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusStatus is the most recent observed status of the Prometheus cluster. Read-only. Not
|
||||
|
@ -307,6 +309,8 @@ type AlertmanagerSpec struct {
|
|||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
// Define resources requests and limits for single Pods.
|
||||
Resources v1.ResourceRequirements `json:"resources,omitempty"`
|
||||
// Priority class assigned to the Pods
|
||||
PriorityClassName string `json:"priorityClassName,omitempty"`
|
||||
}
|
||||
|
||||
// AlertmanagerList is a list of Alertmanagers.
|
||||
|
|
|
@ -784,10 +784,11 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
|
|||
SecurityContext: securityContext,
|
||||
ServiceAccountName: p.Spec.ServiceAccountName,
|
||||
NodeSelector: p.Spec.NodeSelector,
|
||||
PriorityClassName: p.Spec.PriorityClassName,
|
||||
TerminationGracePeriodSeconds: &terminationGracePeriod,
|
||||
Volumes: volumes,
|
||||
Tolerations: p.Spec.Tolerations,
|
||||
Affinity: p.Spec.Affinity,
|
||||
Volumes: volumes,
|
||||
Tolerations: p.Spec.Tolerations,
|
||||
Affinity: p.Spec.Affinity,
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue