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

*: label governing Services to make them discoverable

This commit is contained in:
Frederic Branczyk 2017-02-22 14:54:30 +01:00
parent 0a96b0514c
commit 690ab1de2d
No known key found for this signature in database
GPG key ID: CA14788B1E48B256
2 changed files with 6 additions and 0 deletions
pkg
alertmanager
prometheus

View file

@ -94,6 +94,9 @@ func makeStatefulSetService(p *v1alpha1.Alertmanager) *v1.Service {
svc := &v1.Service{
ObjectMeta: apimetav1.ObjectMeta{
Name: governingServiceName,
Labels: map[string]string{
"operated-alertmanager": "true",
},
},
Spec: v1.ServiceSpec{
ClusterIP: "None",

View file

@ -124,6 +124,9 @@ func makeStatefulSetService(p *v1alpha1.Prometheus) *v1.Service {
svc := &v1.Service{
ObjectMeta: apimetav1.ObjectMeta{
Name: governingServiceName,
Labels: map[string]string{
"operated-prometheus": "true",
},
},
Spec: v1.ServiceSpec{
ClusterIP: "None",