Skip to content

Commit 95f7d24

Browse files
committed
Add namespace: default to Service and StatefulSets
When the driver is deployed while the current context is set to something else than `default`, things go wrong as the Service and StatefulSets are created in the current namespace. By adding the namespace explicitly in the Service and StatefulSets, all components of the driver get deployed correctly in the namespace called `default`.
1 parent 3d7b5ea commit 95f7d24

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ kind: StatefulSet
190190
apiVersion: apps/v1
191191
metadata:
192192
name: csi-hostpathplugin
193+
namespace: default
193194
labels:
194195
app.kubernetes.io/instance: hostpath.csi.k8s.io
195196
app.kubernetes.io/part-of: csi-driver-host-path

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ apiVersion: v1
1111
kind: Service
1212
metadata:
1313
name: hostpath-service
14+
namespace: default
1415
labels:
1516
app.kubernetes.io/instance: hostpath.csi.k8s.io
1617
app.kubernetes.io/part-of: csi-driver-host-path
@@ -30,6 +31,7 @@ kind: StatefulSet
3031
apiVersion: apps/v1
3132
metadata:
3233
name: csi-hostpath-socat
34+
namespace: default
3335
labels:
3436
app.kubernetes.io/instance: hostpath.csi.k8s.io
3537
app.kubernetes.io/part-of: csi-driver-host-path

0 commit comments

Comments
 (0)