1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

*: pass TPR labels and annotations through to StatefulSets

This commit is contained in:
Frederic Branczyk 2017-01-18 11:16:35 +01:00
parent bf56e49d52
commit 4466de7fef
No known key found for this signature in database
GPG key ID: CA14788B1E48B256
2 changed files with 6 additions and 2 deletions
pkg
alertmanager
prometheus

View file

@ -44,7 +44,9 @@ func makeStatefulSet(am *v1alpha1.Alertmanager, old *v1beta1.StatefulSet) *v1bet
statefulset := &v1beta1.StatefulSet{
ObjectMeta: v1.ObjectMeta{
Name: fmt.Sprintf("alertmanager-%s", am.Name),
Name: fmt.Sprintf("alertmanager-%s", am.Name),
Labels: am.ObjectMeta.Labels,
Annotations: am.ObjectMeta.Annotations,
},
Spec: makeStatefulSetSpec(am),
}

View file

@ -54,7 +54,9 @@ func makeStatefulSet(p v1alpha1.Prometheus, old *v1beta1.StatefulSet) *v1beta1.S
statefulset := &v1beta1.StatefulSet{
ObjectMeta: v1.ObjectMeta{
Name: fmt.Sprintf("prometheus-%s", p.Name),
Name: fmt.Sprintf("prometheus-%s", p.Name),
Labels: p.ObjectMeta.Labels,
Annotations: p.ObjectMeta.Annotations,
},
Spec: makeStatefulSetSpec(p),
}