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:
parent
0a96b0514c
commit
690ab1de2d
2 changed files with 6 additions and 0 deletions
pkg
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue