Skip to content

Commit a2263c1

Browse files
authored
Merge pull request #1422 from raptorsun/feature/selectorUpdateDocEx
replace deprecated "app" label selector with "app.kubernetes.io/name" in documents and examples
2 parents 5520900 + e7d2135 commit a2263c1

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ local kp = (import 'kube-prometheus/main.libsonnet') + {
575575
],
576576
selector: {
577577
matchLabels: {
578-
app: 'myapp',
578+
'app.kubernetes.io/name': 'myapp',
579579
},
580580
},
581581
},

examples/additional-namespaces-servicemonitor.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ local kp = (import 'kube-prometheus/main.libsonnet') + {
2424
],
2525
selector: {
2626
matchLabels: {
27-
app: 'myapp',
27+
'app.kubernetes.io/name': 'myapp',
2828
},
2929
},
3030
},

examples/basic-auth/service-monitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ spec:
1919
- logging
2020
selector:
2121
matchLabels:
22-
app: myapp
22+
app.kubernetes.io/name: myapp

examples/example-app/example-app.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
namespace: default
88
spec:
99
selector:
10-
app: example-app
10+
app.kubernetes.io/name: example-app
1111
ports:
1212
- name: web
1313
protocol: TCP
@@ -22,17 +22,17 @@ metadata:
2222
spec:
2323
selector:
2424
matchLabels:
25-
app: example-app
25+
app.kubernetes.io/name: example-app
2626
version: 1.1.3
2727
replicas: 4
2828
template:
2929
metadata:
3030
labels:
31-
app: example-app
31+
app.kubernetes.io/name: example-app
3232
version: 1.1.3
3333
spec:
3434
containers:
35-
- name: example-app
35+
- name: example-app
3636
image: quay.io/fabxc/prometheus_demo_service
3737
ports:
3838
- name: web

jsonnet/kube-prometheus/addons/ksm-autoscaler.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
},
8282

8383
deployment:
84-
local podLabels = { app: 'ksm-autoscaler' };
84+
local podLabels = { 'app.kubernetes.io/name': 'ksm-autoscaler' };
8585
local c = {
8686
name: 'ksm-autoscaler',
8787
image: $.values.clusterVerticalAutoscaler.image,

0 commit comments

Comments
 (0)