Setting the hostpath is required when mounting the hostpath storage volume to an application
Created by: zhaohuiweixiao
Signed-off-by: zhaohuihui zhaohuihui_yewu@cmss.chinamobile.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
-
During the creation of a homemade application, when the hostpath storage volume type is mounted, an error message(Deployment.apps "ss-v1" is invalid: [spec.template.spec.volumes[0].hostPath.path: Required value, spec.template.spec.containers[0].volumeMounts[0].name: Not found: "test-zhh"]) is displayed if the hostpath is not specified. If the hostpath is specified, the application is successfully created.
-
On the other hand, I looked up the Kubernetes API documentation(https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) and the host path is a property that must be set .
Special notes for reviewers:
/assign @zheng1
Does this PR introduced a user-facing change?
Setting the hostpath is required when mounting the hostpath storage volume to an application
Additional documentation, usage docs, etc.:
Setting the hostpath is required when mounting the hostpath storage volume to an application