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


   I uncovered an issue where if you have Pod Templates with the same target 
name in multiple `ConfigMaps` the first one we come across will be loaded up. 
This possesses the potential of being a silent error. As an alternative, I 
propose we implement the following protocol for naming and referencing the Pod 
Templates:
   `CONFIGMAP-NAME.POD-TEMPLATE-NAME`.
   
   The `CONFIGMAP-NAME` would be the name of the ConfigMap where the Pod 
Template, named `POD-TEMPLATE-NAME` is located. The user would concatenate the 
two names with a `.`. We can safely rely on `kubectl` to ensure the ConfigMap 
and Pod Template names are unique.
   
   This would mean creating a new protected method in `V1Controller` called 
`getPodTemplateLocation` which will return a `Pair` <`CONFIGMAP-NAME`, 
`POD-TEMPLATE-NAME`>. The string would be split on the first occurrence of a 
`.`, and if it is invalid an exception will be thrown.
   
   I will update the documentation being written up as soon as I have the new 
method completed, tested, and wired into `loadPodFromTemplate` with updated 
tests.


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