1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 11:48:53 +00:00

prometheus: add ServiceAccountName field to TPR

This commit is contained in:
Frederic Branczyk 2017-02-20 15:19:22 +01:00
parent d9e1c6c92e
commit adeb21d7e8
No known key found for this signature in database
GPG key ID: CA14788B1E48B256
3 changed files with 6 additions and 3 deletions
cmd/operator
pkg
client/monitoring/v1alpha1
prometheus

View file

@ -34,9 +34,8 @@ import (
)
var (
cfg prometheus.Config
analyticsEnabled bool
configReloaderImage string
cfg prometheus.Config
analyticsEnabled bool
)
func init() {

View file

@ -68,6 +68,9 @@ type PrometheusSpec struct {
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// Define which Nodes the Pods are scheduled on.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// ServiceAccountName is the name of the ServiceAccount to use to run the
// Prometheus Pods.
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// EvaluationInterval string `json:"evaluationInterval"`
// Remote RemoteSpec `json:"remote"`
// Sharding...

View file

@ -271,6 +271,7 @@ func makeStatefulSetSpec(p v1alpha1.Prometheus, c *Config) v1beta1.StatefulSetSp
},
},
},
ServiceAccountName: p.Spec.ServiceAccountName,
NodeSelector: p.Spec.NodeSelector,
TerminationGracePeriodSeconds: &terminationGracePeriod,
Volumes: []v1.Volume{