surahman commented on pull request #3725:
URL: https://github.com/apache/incubator-heron/pull/3725#issuecomment-962658132


   Most of the last piece of the puzzle for supporting both dynamic and 
statically backed PVCs is now complete. The final piece is the clean up of the 
dynamically backed/provisioned PVCs which I am debugging right now in Minikube.
   
   @nicknezis I am hoping you have some experience with this having 
transitioned Heron to `StatefulSet`s. I have the `Selector matchLabels` set up 
correctly, as indicated by the PVC's YAML below, but the `matchLabels` are 
unable to select the PVC. I am employing the 
[`deleteCollectionNamespacedPersistentVolumeClaim`](https://javadoc.io/doc/io.kubernetes/client-java-api/11.0.0/io/kubernetes/client/openapi/apis/CoreV1Api.html#deleteCollectionNamespacedPersistentVolumeClaim-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.Integer-java.lang.String-java.lang.Integer-java.lang.Boolean-java.lang.String-java.lang.String-java.lang.String-java.lang.Integer-io.kubernetes.client.openapi.models.V1DeleteOptions-)
 method. I can confirm that the `matchLabel` pattern being generated is as 
follows:
   
   ```yaml
   onDemand=true,topology=acking
   ```
   
   <details><summary>PVC Spec</summary>
   
   ```yaml
   apiVersion: v1
   kind: PersistentVolumeClaim
   metadata:
     creationTimestamp: "2021-11-07T16:27:51Z"
     finalizers:
     - kubernetes.io/pvc-protection
     name: ondemand-acking-volumenameofchoice
     namespace: default
     resourceVersion: "714"
     uid: 38f7a7fb-12f2-4315-a5bd-4f346061fdc9
   spec:
     accessModes:
     - ReadWriteOnce
     - ReadOnlyMany
     resources:
       requests:
         storage: 555Gi
     selector:
       matchLabels:
         onDemand: "true"
         topology: acking
     storageClassName: storage-class-name
     volumeMode: Block
     volumeName: volumenameofchoice
   status:
     phase: Pending
   ```
   
   </details>
   
   I have also attempted to match against a single `matchLabel` of `topology` 
to no avail.
   
   <details><summary>Submit Command</summary>
   
   ```yaml
   ~/bin/heron submit kubernetes ~/.heron/examples/heron-api-examples.jar \
   --verbose \
   --config-property 
heron.kubernetes.pod.template.configmap.name=pod-templ-cf-map.pod-template.yaml 
\
   org.apache.heron.examples.api.AckingTopology acking \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.claimName=OnDemand
 \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.storageClassName=storage-class-name
 \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.accessModes=ReadWriteOnce,ReadOnlyMany
 \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.sizeLimit=555Gi
 \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.volumeMode=Block
 \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.path=path/to/mount
 \
   --config-property 
heron.kubernetes.volumes.persistentVolumeClaim.volumenameofchoice.subPath=sub/path/to/mount
   ```
   
   </details>
   
   I  am also testing by loading the PVC spec into K8s and using Kubectl to 
select the PVC with issues:
   
   ```bash
   ❯ minikube kubectl -- get persistentvolumeclaims --selector=topology=acking
   No resources found in default namespace.
   ```
   


-- 
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