Open dmetzler opened 6 years ago
This is an unfortunate reality when trying to make it possible to provision more than one in a particular namespace. I personally am investigating an addition to the broker (haven't made it very far) that would use something like moby's name generator to give APBs access to a unique name that would be much shorter. It stinks and I'm sorry.
You could take a "release name" as a parameter if you wish and enforce it's length so you could guarantee the name + your identifiers is less than 63 characters. The other option is to simply use more generic names, that when combined with the UUID. These aren't the greatest solutions but I hope they at least give you a way forward.
I think this issue should remain open and I'll link the proposal in the broker once created.
As in our use case we don't intend to have many services of the same kind in the same project, I'm currently doing
name: "nuxeo-elasticsearch-{{ _apb_service_instance_id |truncate(5, True, '') }}"
the risk of name collision is very limited. I just wanted to share that kind of error as other may have it...
I'm using that playbook as an example for our own APB here https://github.com/nuxeo-sandbox/nuxeo-apb-catalog/.
I'm figuring that using the {{_apb_service_instance_id}} to generate the resources name may lead to too long resources name (more than 63 characters) which ends up with the following error:
With
hello-world
, it's ok as the name is not very long but it becomes quite fast a very constraining limit if you intend to publish that sample as a blueprint. It seems that in Openshift, the service instances are using 5 characters long hash.WDYT?