mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
Merge pull request #121 from alexsomesan/node-selector
Rebase node selector PR + fix license header in test
This commit is contained in:
commit
a70a15ef2a
4 changed files with 18 additions and 0 deletions
Documentation
pkg
|
@ -42,6 +42,7 @@ still benefiting from the Operator's capabilities of managing Prometheus setups.
|
|||
| storage | Configuration of persistent storage volumes to attach to deployed Prometheus pods. | false | StorageSpec | |
|
||||
| alerting | Configuration of alerting | false | AlertingSpec | |
|
||||
| resources | Resource requirements of single Prometheus server | false | [v1.ResourceRequirements](http://kubernetes.io/docs/api-reference/v1/definitions/#_v1_resourcerequirements) | |
|
||||
| node-selector | [Select nodes](https://kubernetes.io/docs/tasks/administer-cluster/assign-pods-nodes/) to be used to run the Prometheus pods on | false | [strings list](https://kubernetes.io/docs/user-guide/node-selection/) | |
|
||||
|
||||
### `StorageSpec`
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ type PrometheusSpec struct {
|
|||
Alerting AlertingSpec `json:"alerting,omitempty"`
|
||||
// Define resources requests and limits for single Pods.
|
||||
Resources v1.ResourceRequirements `json:"resources,omitempty"`
|
||||
// Define which Nodes the Pods are scheduled on.
|
||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
// EvaluationInterval string `json:"evaluationInterval"`
|
||||
// Remote RemoteSpec `json:"remote"`
|
||||
// Sharding...
|
||||
|
|
|
@ -265,6 +265,7 @@ func makeStatefulSetSpec(p v1alpha1.Prometheus) v1beta1.StatefulSetSpec {
|
|||
},
|
||||
},
|
||||
},
|
||||
NodeSelector: p.Spec.NodeSelector,
|
||||
TerminationGracePeriodSeconds: &terminationGracePeriod,
|
||||
Volumes: []v1.Volume{
|
||||
{
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
// Copyright 2016 The prometheus-operator Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package prometheus
|
||||
|
||||
import (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue