This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
[feature request] Use resource ID aliases in delta to allow multiple classes for a single resource ID #67
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
score-humanitec
currently generates a single resource ID in the deployment set when thescore.humanitec.io/resId
annotation is used. This means that if the same resource ID is needed with 2 different classes, only one of them is generated.For example:
This will generate a delta wich will result in *one of" those classes added to deployment set.
Describe the solution you'd like
Humanitec supports an alias id in shared reosurces that allows 2 resource dependencies to be genmerated that use the same resource ID and different classes.
If a resource dependency has the
score.humanitec.io/resId
annotation AND the class is not default, an additional resource dependencey is created in the delta that is suffixed with-class-{className}
. The resource placeholeders in teh score file are rewritten to use this alternative resource dependency.The resource dependency name should remain the same in all cases if
class
is ommitted or isdefault
.Describe alternatives you've considered
None. This is simple supporting new functionality.
Additional context
This is not usually a problem in a single score file, but is an issue when deploying multiple workloads to a single application in humanitec. For example, producers and consumers of a queue or read and writing to shared storage.
The text was updated successfully, but these errors were encountered: