surahman commented on issue #3723:
URL: 
https://github.com/apache/incubator-heron/issues/3723#issuecomment-955811557


   I have the PVC assembly part of the PR completed and I am now working on 
wiring all this up to make sure it works correctly with custom Pod Templates.
   
   Commands:
   ```bash
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.claimName=nameOfVolumeClaim
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.storageClassName=storageClassNameOfChoice
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.accessModes=comma,separated,list
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.sizeLimit=555Gi
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.volumeMode=volumeModeOfChoice
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.path=path/to/mount
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumeNameOfChoice.subPath=sub/path/to/mount
   ```
   
   Will generate the PVC:
   ```yaml
   apiVersion: v1
   kind: PersistentVolumeClaim
   metadata:
     name: nameOfVolumeClaim
   spec:
     volumeName: volumeNameOfChoice
     accessModes:
       - comma
       - separated
       - list
     volumeMode: volumeModeOfChoice
     resources:
       requests:
         storage: 555Gi
     storageClassName: storageClassNameOfChoice
   ```
   
   Entries will be made in the Pod for a `Volume` and in the `executor` 
container for the `VolumeMount` with the `path` as well as the `subPath`, as 
required.
   
   The commands above are all that I have added for now but the code is 
designed so that you can easily add an enum for the PVC property. You would 
then need to add an entry to the switch statement which adds it to the actual 
PVC. This should make things more maintainable and significantly more 
extensible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to