From 6c5a419e848d1f267d19a5914bfb37de369273d4 Mon Sep 17 00:00:00 2001
From: Jeremy Scott <js185692@ncr.com>
Date: Thu, 16 Mar 2023 14:38:25 +0000
Subject: [PATCH] Add hostPath case statement for creating persistent volume
 source method

---
 provisioner.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/provisioner.go b/provisioner.go
index 9265ba98..74c5c866 100644
--- a/provisioner.go
+++ b/provisioner.go
@@ -661,6 +661,14 @@ func createPersistentVolumeSource(volumeType string, path string) v1.PersistentV
 				Path: path,
 			},
 		}
+	case "hostpath":
+		hostPathType := v1.HostPathDirectoryOrCreate
+		pvs = v1.PersistentVolumeSource{
+			HostPath: &v1.HostPathVolumeSource{
+				Path: path,
+				Type: &hostPathType,
+			},
+		}
 	default:
 		hostPathType := v1.HostPathDirectoryOrCreate
 		pvs = v1.PersistentVolumeSource{
-- 
GitLab