Skip to content

Commit b0e2723

Browse files
author
Ayush Rangwala
committed
Add labels to the podSpec selectors
- Added labels to the podSpec of DaemonSet and StatefulSet - wrapped curl with run method - corrected formatting and removed unusefule echo
1 parent a4b1e45 commit b0e2723

22 files changed

+242
-54
lines changed

deploy/kubernetes-1.18/hostpath/csi-hostpath-attacher.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-attacher
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-attacher
18+
app.kubernetes.io/component: attacher
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-attacher
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-attacher
25+
app.kubernetes.io/component: attacher
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/name
2733
operator: In
2834
values:
2935
- csi-hostpathplugin

deploy/kubernetes-1.18/hostpath/csi-hostpath-plugin.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ metadata:
1313
app.kubernetes.io/component: plugin
1414
spec:
1515
selector:
16-
app: csi-hostpathplugin
16+
app.kubernetes.io/instance: hostpath.csi.k8s.io
17+
app.kubernetes.io/part-of: csi-driver-host-path
18+
app.kubernetes.io/name: csi-hostpathplugin
19+
app.kubernetes.io/component: plugin
1720
ports:
1821
- name: dummy
1922
port: 12345
@@ -36,11 +39,17 @@ spec:
3639
replicas: 1
3740
selector:
3841
matchLabels:
39-
app: csi-hostpathplugin
42+
app.kubernetes.io/instance: hostpath.csi.k8s.io
43+
app.kubernetes.io/part-of: csi-driver-host-path
44+
app.kubernetes.io/name: csi-hostpathplugin
45+
app.kubernetes.io/component: plugin
4046
template:
4147
metadata:
4248
labels:
43-
app: csi-hostpathplugin
49+
app.kubernetes.io/instance: hostpath.csi.k8s.io
50+
app.kubernetes.io/part-of: csi-driver-host-path
51+
app.kubernetes.io/name: csi-hostpathplugin
52+
app.kubernetes.io/component: plugin
4453
spec:
4554
serviceAccountName: csi-external-health-monitor-controller
4655
containers:

deploy/kubernetes-1.18/hostpath/csi-hostpath-provisioner.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-provisioner
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-provisioner
18+
app.kubernetes.io/component: provisioner
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-provisioner
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-provisioner
25+
app.kubernetes.io/component: provisioner
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/name
2733
operator: In
2834
values:
2935
- csi-hostpathplugin

deploy/kubernetes-1.18/hostpath/csi-hostpath-resizer.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-resizer
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-resizer
18+
app.kubernetes.io/component: resizer
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-resizer
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-resizer
25+
app.kubernetes.io/component: resizer
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/name
2733
operator: In
2834
values:
2935
- csi-hostpathplugin

deploy/kubernetes-1.18/hostpath/csi-hostpath-snapshotter.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-snapshotter
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-snapshotter
18+
app.kubernetes.io/component: snapshotter
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-snapshotter
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-snapshotter
25+
app.kubernetes.io/component: snapshotter
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/name
2733
operator: In
2834
values:
2935
- csi-hostpathplugin

deploy/kubernetes-1.18/hostpath/csi-hostpath-testing.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ metadata:
1919
spec:
2020
type: NodePort
2121
selector:
22-
app: csi-hostpath-socat
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-socat
25+
app.kubernetes.io/component: socat
2326
ports:
2427
- port: 10000 # fixed port inside the pod, dynamically allocated port outside
2528
---
@@ -37,18 +40,24 @@ spec:
3740
replicas: 1
3841
selector:
3942
matchLabels:
40-
app: csi-hostpath-socat
43+
app.kubernetes.io/instance: hostpath.csi.k8s.io
44+
app.kubernetes.io/part-of: csi-driver-host-path
45+
app.kubernetes.io/name: csi-hostpath-socat
46+
app.kubernetes.io/component: socat
4147
template:
4248
metadata:
4349
labels:
44-
app: csi-hostpath-socat
50+
app.kubernetes.io/instance: hostpath.csi.k8s.io
51+
app.kubernetes.io/part-of: csi-driver-host-path
52+
app.kubernetes.io/name: csi-hostpath-socat
53+
app.kubernetes.io/component: socat
4554
spec:
4655
affinity:
4756
podAffinity:
4857
requiredDuringSchedulingIgnoredDuringExecution:
4958
- labelSelector:
5059
matchExpressions:
51-
- key: app
60+
- key: app.kubernetes.io/name
5261
operator: In
5362
values:
5463
- csi-hostpathplugin

deploy/kubernetes-1.20/hostpath/csi-hostpath-attacher.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-attacher
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-attacher
18+
app.kubernetes.io/component: attacher
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-attacher
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-attacher
25+
app.kubernetes.io/component: attacher
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/instance
2733
operator: In
2834
values:
29-
- csi-hostpathplugin
35+
- hostpath.csi.k8s.io
3036
topologyKey: kubernetes.io/hostname
3137
serviceAccountName: csi-attacher
3238
containers:

deploy/kubernetes-1.20/hostpath/csi-hostpath-plugin.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,17 @@ spec:
3636
replicas: 1
3737
selector:
3838
matchLabels:
39-
app: csi-hostpathplugin
39+
app.kubernetes.io/instance: hostpath.csi.k8s.io
40+
app.kubernetes.io/part-of: csi-driver-host-path
41+
app.kubernetes.io/name: csi-hostpathplugin
42+
app.kubernetes.io/component: plugin
4043
template:
4144
metadata:
4245
labels:
43-
app: csi-hostpathplugin
46+
app.kubernetes.io/instance: hostpath.csi.k8s.io
47+
app.kubernetes.io/part-of: csi-driver-host-path
48+
app.kubernetes.io/name: csi-hostpathplugin
49+
app.kubernetes.io/component: plugin
4450
spec:
4551
serviceAccountName: csi-external-health-monitor-controller
4652
containers:

deploy/kubernetes-1.20/hostpath/csi-hostpath-provisioner.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-provisioner
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-provisioner
18+
app.kubernetes.io/component: provisioner
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-provisioner
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-provisioner
25+
app.kubernetes.io/component: provisioner
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/instance
2733
operator: In
2834
values:
29-
- csi-hostpathplugin
35+
- hostpath.csi.k8s.io
3036
topologyKey: kubernetes.io/hostname
3137
serviceAccountName: csi-provisioner
3238
containers:

deploy/kubernetes-1.20/hostpath/csi-hostpath-resizer.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@ spec:
1212
replicas: 1
1313
selector:
1414
matchLabels:
15-
app: csi-hostpath-resizer
15+
app.kubernetes.io/instance: hostpath.csi.k8s.io
16+
app.kubernetes.io/part-of: csi-driver-host-path
17+
app.kubernetes.io/name: csi-hostpath-resizer
18+
app.kubernetes.io/component: resizer
1619
template:
1720
metadata:
1821
labels:
19-
app: csi-hostpath-resizer
22+
app.kubernetes.io/instance: hostpath.csi.k8s.io
23+
app.kubernetes.io/part-of: csi-driver-host-path
24+
app.kubernetes.io/name: csi-hostpath-resizer
25+
app.kubernetes.io/component: resizer
2026
spec:
2127
affinity:
2228
podAffinity:
2329
requiredDuringSchedulingIgnoredDuringExecution:
2430
- labelSelector:
2531
matchExpressions:
26-
- key: app
32+
- key: app.kubernetes.io/instance
2733
operator: In
2834
values:
29-
- csi-hostpathplugin
35+
- hostpath.csi.k8s.io
3036
topologyKey: kubernetes.io/hostname
3137
serviceAccountName: csi-resizer
3238
containers:

0 commit comments

Comments
 (0)