Skip to content

Commit

Permalink
Add labels to the podSpec selectors
Browse files Browse the repository at this point in the history
- Added labels to the podSpec of DaemonSet and StatefulSet

- wrapped curl with run method

- corrected formatting and removed unusefule echo
  • Loading branch information
Ayush Rangwala committed May 2, 2021
1 parent a4b1e45 commit 80a5cc0
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 52 deletions.
12 changes: 9 additions & 3 deletions deploy/kubernetes-1.18/hostpath/csi-hostpath-attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-attacher
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-attacher
app.kubernetes.io/component: attacher
template:
metadata:
labels:
app: csi-hostpath-attacher
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-attacher
app.kubernetes.io/component: attacher
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/name
operator: In
values:
- csi-hostpathplugin
Expand Down
15 changes: 12 additions & 3 deletions deploy/kubernetes-1.18/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ metadata:
app.kubernetes.io/component: plugin
spec:
selector:
app: csi-hostpathplugin
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpathplugin
app.kubernetes.io/component: plugin
ports:
- name: dummy
port: 12345
Expand All @@ -36,11 +39,17 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpathplugin
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpathplugin
app.kubernetes.io/component: plugin
template:
metadata:
labels:
app: csi-hostpathplugin
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpathplugin
app.kubernetes.io/component: plugin
spec:
serviceAccountName: csi-external-health-monitor-controller
containers:
Expand Down
12 changes: 9 additions & 3 deletions deploy/kubernetes-1.18/hostpath/csi-hostpath-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-provisioner
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-provisioner
app.kubernetes.io/component: provisioner
template:
metadata:
labels:
app: csi-hostpath-provisioner
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-provisioner
app.kubernetes.io/component: provisioner
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/name
operator: In
values:
- csi-hostpathplugin
Expand Down
12 changes: 9 additions & 3 deletions deploy/kubernetes-1.18/hostpath/csi-hostpath-resizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-resizer
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-resizer
app.kubernetes.io/component: resizer
template:
metadata:
labels:
app: csi-hostpath-resizer
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-resizer
app.kubernetes.io/component: resizer
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/name
operator: In
values:
- csi-hostpathplugin
Expand Down
12 changes: 9 additions & 3 deletions deploy/kubernetes-1.18/hostpath/csi-hostpath-snapshotter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-snapshotter
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-snapshotter
app.kubernetes.io/component: snapshotter
template:
metadata:
labels:
app: csi-hostpath-snapshotter
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-snapshotter
app.kubernetes.io/component: snapshotter
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/name
operator: In
values:
- csi-hostpathplugin
Expand Down
17 changes: 13 additions & 4 deletions deploy/kubernetes-1.18/hostpath/csi-hostpath-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ metadata:
spec:
type: NodePort
selector:
app: csi-hostpath-socat
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-socat
app.kubernetes.io/component: socat
ports:
- port: 10000 # fixed port inside the pod, dynamically allocated port outside
---
Expand All @@ -37,18 +40,24 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-socat
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-socat
app.kubernetes.io/component: socat
template:
metadata:
labels:
app: csi-hostpath-socat
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-socat
app.kubernetes.io/component: socat
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/name
operator: In
values:
- csi-hostpathplugin
Expand Down
14 changes: 10 additions & 4 deletions deploy/kubernetes-1.20/hostpath/csi-hostpath-attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-attacher
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-attacher
app.kubernetes.io/component: attacher
template:
metadata:
labels:
app: csi-hostpath-attacher
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-attacher
app.kubernetes.io/component: attacher
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- csi-hostpathplugin
- hostpath.csi.k8s.io
topologyKey: kubernetes.io/hostname
serviceAccountName: csi-attacher
containers:
Expand Down
10 changes: 8 additions & 2 deletions deploy/kubernetes-1.20/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpathplugin
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpathplugin
app.kubernetes.io/component: plugin
template:
metadata:
labels:
app: csi-hostpathplugin
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpathplugin
app.kubernetes.io/component: plugin
spec:
serviceAccountName: csi-external-health-monitor-controller
containers:
Expand Down
14 changes: 10 additions & 4 deletions deploy/kubernetes-1.20/hostpath/csi-hostpath-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-provisioner
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-provisioner
app.kubernetes.io/component: provisioner
template:
metadata:
labels:
app: csi-hostpath-provisioner
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-provisioner
app.kubernetes.io/component: provisioner
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- csi-hostpathplugin
- hostpath.csi.k8s.io
topologyKey: kubernetes.io/hostname
serviceAccountName: csi-provisioner
containers:
Expand Down
14 changes: 10 additions & 4 deletions deploy/kubernetes-1.20/hostpath/csi-hostpath-resizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-resizer
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-resizer
app.kubernetes.io/component: resizer
template:
metadata:
labels:
app: csi-hostpath-resizer
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-resizer
app.kubernetes.io/component: resizer
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- csi-hostpathplugin
- hostpath.csi.k8s.io
topologyKey: kubernetes.io/hostname
serviceAccountName: csi-resizer
containers:
Expand Down
14 changes: 10 additions & 4 deletions deploy/kubernetes-1.20/hostpath/csi-hostpath-snapshotter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-snapshotter
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-snapshotter
app.kubernetes.io/component: snapshotter
template:
metadata:
labels:
app: csi-hostpath-snapshotter
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-snapshotter
app.kubernetes.io/component: snapshotter
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- csi-hostpathplugin
- hostpath.csi.k8s.io
topologyKey: kubernetes.io/hostname
serviceAccountName: csi-snapshotter
containers:
Expand Down
14 changes: 10 additions & 4 deletions deploy/kubernetes-1.20/hostpath/csi-hostpath-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,27 @@ spec:
replicas: 1
selector:
matchLabels:
app: csi-hostpath-socat
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-socat
app.kubernetes.io/component: socat
template:
metadata:
labels:
app: csi-hostpath-socat
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-socat
app.kubernetes.io/component: socat
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
- key: app.kubernetes.io/instance
operator: In
values:
- csi-hostpathplugin
- hostpath.csi.k8s.io
topologyKey: kubernetes.io/hostname
containers:
- name: socat
Expand Down
5 changes: 5 additions & 0 deletions deploy/kubernetes-distributed/app-generic-ephemeral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ kind: Pod
apiVersion: v1
metadata:
name: my-csi-app-inline-volume
labels:
app.kubernetes.io/instance: hostpath.csi.k8s.io
app.kubernetes.io/part-of: csi-driver-host-path
app.kubernetes.io/name: csi-hostpath-ephemral-inline-volume
app.kubernetes.io/component: ephemeral-volume
spec:
containers:
- name: my-frontend
Expand Down
Loading

0 comments on commit 80a5cc0

Please sign in to comment.